CosmicTag.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////
2 // \version 0.0
3 //
4 // \brief Definition of data product to hold CosmicTag information
5 //
6 // \author lockwitz@fnal.gov
7 //
8 ////////////////////////////////////////////////////////////////////////////
9 #ifndef ANAB_COSMICTAG_H
10 #define ANAB_COSMICTAG_H
11 
12 #include <vector>
13 #include <iosfwd>
14 
15 namespace anab {
16 
17  typedef enum cosmic_tag_id{
34  } CosmicTagID_t;
35 
36  class CosmicTag{
37  public:
38 
39  CosmicTag();
40 
41  private:
42 
43  std::vector<float> endPt1; // x,y,z assuming t_0 = t_beam
44  std::vector<float> endPt2; // x,y,z assuming t_0 = t_beam
45  float fCosmicScore; // -1 means very likely neutrino,
46  // 0 means probably not a cosmic (or unknown),
47  // 1 means cosmic
49 
50  public:
51 
52  CosmicTag(std::vector<float> ePt1,
53  std::vector<float> ePt2,
54  float cScore,
55  CosmicTagID_t cTypes);
56 
57  CosmicTag(float cScore);
58 
59 
60  // Allow direct access to score/type
61  float& CosmicScore() {return fCosmicScore;}
63 
64  friend std::ostream& operator << (std::ostream &o, CosmicTag const& a);
65 
66  float getXInteraction(float oldX, float xDrift, int tSample, float realTime, int tick ) const;
67 
68  const std::vector<float>& EndPoint1() const;
69  const std::vector<float>& EndPoint2() const;
70  const float& CosmicScore() const;
71  const CosmicTagID_t& CosmicType() const;
72 
73  };
74 
75 }
76 
77 
78 inline const std::vector<float>& anab::CosmicTag::EndPoint1() const {return endPt1;}
79 inline const std::vector<float>& anab::CosmicTag::EndPoint2() const {return endPt2;}
80 inline const float& anab::CosmicTag::CosmicScore() const {return fCosmicScore; }
82 
83 
84 
85 #endif //ANAB_COSMICTAG
friend std::ostream & operator<<(std::ostream &o, CosmicTag const &a)
Definition: CosmicTag.cxx:52
const std::vector< float > & EndPoint2() const
Definition: CosmicTag.h:79
enum anab::cosmic_tag_id CosmicTagID_t
float & CosmicScore()
Definition: CosmicTag.h:61
std::vector< float > endPt1
Definition: CosmicTag.h:43
const double a
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
const std::vector< float > & EndPoint1() const
Definition: CosmicTag.h:78
std::vector< float > endPt2
Definition: CosmicTag.h:44
float getXInteraction(float oldX, float xDrift, int tSample, float realTime, int tick) const
Definition: CosmicTag.cxx:70
cosmic_tag_id
Definition: CosmicTag.h:17
float fCosmicScore
Definition: CosmicTag.h:45
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:48
CosmicTagID_t & CosmicType()
Definition: CosmicTag.h:62