Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
lardataobj
lardataobj
AnalysisBase
CosmicTag.cxx
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// \brief Definition of CosmicTag analysis object
4
//
5
// \author lockwitz@fnal.gov
6
////////////////////////////////////////////////////////////////////////
7
8
#include "
lardataobj/AnalysisBase/CosmicTag.h
"
9
10
#include <iostream>
11
#include <iomanip>
12
13
namespace
anab
{
14
15
//----------------------------------------------------------------------
16
CosmicTag::CosmicTag
()
17
: endPt1(0)
18
, endPt2(0)
19
, fCosmicScore(0)
20
, fCosmicType(
CosmicTagID_t
::
kUnknown
)
21
{
22
}
23
24
//----------------------------------------------------------------------
25
CosmicTag::CosmicTag
(
float
f
) :
26
endPt1
(0),
27
endPt2
(0),
28
fCosmicScore
(f),
29
fCosmicType
(
CosmicTagID_t
::
kUnknown
)
30
{
31
32
}
33
34
//----------------------------------------------------------------------
35
CosmicTag::CosmicTag
(std::vector<float> ePt1,
36
std::vector<float> ePt2,
37
// double flashTime, // should go
38
float
cScore,
39
CosmicTagID_t
cType) :
40
endPt1
(ePt1),
41
endPt2
(ePt2),
42
fCosmicScore
(cScore),
43
fCosmicType
(cType)
44
{
45
}
46
47
48
49
//----------------------------------------------------------------------
50
// ostream operator.
51
//
52
std::ostream&
operator<<
(std::ostream & o,
CosmicTag
const
&
a
)
53
{
54
o
//<< "Flash Time : " << a.flashTime // should go
55
<<
"\n Cosmic Score : "
<< a.
fCosmicScore
56
<<
"\n Cosmic Type : "
<< a.
fCosmicType
57
<<
"\n End Point 1: "
<<
std::endl
;
58
for
(
size_t
i=0;i<a.
endPt1
.size(); i++)
59
o << a.
endPt1
[i] <<
", "
;
60
o <<
std::endl
;
61
o <<
"\n End Point 2: "
<<
std::endl
;
62
for
(
size_t
i=0;i<a.
endPt2
.size(); i++)
63
o << a.
endPt2
[i] <<
", "
;
64
o <<
std::endl
;
65
66
67
return
o;
68
}
69
70
float
CosmicTag::getXInteraction
(
float
oldX,
float
xDrift,
int
tSample,
71
float
realTime,
int
tick
)
const
{
72
// fix this
73
int
t
=3*tSample;
74
if
( (tick > 0*tSample) && (tick < 1*tSample) ) t = 0*tSample;
75
if
( (tick > 1*tSample) && (tick < 2*tSample) ) t = 1*tSample;
76
if
( (tick > 2*tSample) && (tick < 3*tSample) ) t = 2*tSample;
77
78
float
newX = oldX + (xDrift/tSample)*(t - realTime);
79
return
newX;
80
}
81
82
83
}
anab::CosmicTag::operator<<
friend std::ostream & operator<<(std::ostream &o, CosmicTag const &a)
Definition:
CosmicTag.cxx:52
keras_to_tensorflow.f
f
Definition:
keras_to_tensorflow.py:162
anab::CosmicTagID_t
enum anab::cosmic_tag_id CosmicTagID_t
anab::CosmicTag
Definition:
CosmicTag.h:36
anab
Definition:
DUNEAnaTrackUtils.h:27
anab::CosmicTag::endPt1
std::vector< float > endPt1
Definition:
CosmicTag.h:43
a
const double a
Definition:
gUpMuFluxGen.cxx:164
reco_momentum_tuples.t
t
Definition:
reco_momentum_tuples.py:25
util::quantities::tick
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition:
electronics.h:75
anab::CosmicTag::endPt2
std::vector< float > endPt2
Definition:
CosmicTag.h:44
anab::CosmicTag::getXInteraction
float getXInteraction(float oldX, float xDrift, int tSample, float realTime, int tick) const
Definition:
CosmicTag.cxx:70
anab::CosmicTag::CosmicTag
CosmicTag()
Definition:
CosmicTag.cxx:16
anab::CosmicTag::fCosmicScore
float fCosmicScore
Definition:
CosmicTag.h:45
anab::kUnknown
Definition:
CosmicTag.h:18
anab::CosmicTag::fCosmicType
CosmicTagID_t fCosmicType
Definition:
CosmicTag.h:48
CosmicTag.h
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11