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