LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 <vector>
13 #include <iosfwd>
14 #include <iostream>
15 #include <iomanip>
16 
17 
18 
19 namespace anab {
20 
21  typedef enum cosmic_tag_id{
38  } CosmicTagID_t;
39 
40  class CosmicTag{
41  public:
42 
43  CosmicTag();
44 
45  private:
46 
47  std::vector<float> endPt1; // x,y,z assuming t_0 = t_beam
48  std::vector<float> endPt2; // x,y,z assuming t_0 = t_beam
49  float fCosmicScore; // -1 means very likely neutrino,
50  // 0 means probably not a cosmic (or unknown),
51  // 1 means cosmic
53 
54  public:
55 
56  CosmicTag(std::vector<float> ePt1,
57  std::vector<float> ePt2,
58  float cScore,
59  CosmicTagID_t cTypes);
60 
61  CosmicTag(float cScore);
62 
63 
64  // Allow direct access to score/type
65  float& CosmicScore() {return fCosmicScore;}
67 
68  friend std::ostream& operator << (std::ostream &o, CosmicTag const& a);
69 
70  float getXInteraction(float oldX, float xDrift, int tSample, float realTime, int tick ) const;
71 
72  const std::vector<float>& EndPoint1() const;
73  const std::vector<float>& EndPoint2() const;
74  const float& CosmicScore() const;
75  const CosmicTagID_t& CosmicType() const;
76 
77  };
78 
79 }
80 
81 
82 inline const std::vector<float>& anab::CosmicTag::EndPoint1() const {return endPt1;}
83 inline const std::vector<float>& anab::CosmicTag::EndPoint2() const {return endPt2;}
84 inline const float& anab::CosmicTag::CosmicScore() const {return fCosmicScore; }
86 
87 
88 
89 #endif //ANAB_COSMICTAG
friend std::ostream & operator<<(std::ostream &o, CosmicTag const &a)
Definition: CosmicTag.cxx:50
const std::vector< float > & EndPoint2() const
Definition: CosmicTag.h:83
enum anab::cosmic_tag_id CosmicTagID_t
float & CosmicScore()
Definition: CosmicTag.h:65
std::vector< float > endPt1
Definition: CosmicTag.h:47
const std::vector< float > & EndPoint1() const
Definition: CosmicTag.h:82
std::vector< float > endPt2
Definition: CosmicTag.h:48
Int_t oldX
float getXInteraction(float oldX, float xDrift, int tSample, float realTime, int tick) const
Definition: CosmicTag.cxx:68
cosmic_tag_id
Definition: CosmicTag.h:21
float fCosmicScore
Definition: CosmicTag.h:49
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:52
CosmicTagID_t & CosmicType()
Definition: CosmicTag.h:66