LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
MCTruth.h
Go to the documentation of this file.
1 #ifndef SIMB_MCTRUTH_H
9 #define SIMB_MCTRUTH_H
10 
11 #include <vector>
13 
14 namespace simb {
15 
16  class MCParticle;
17 
19  typedef enum _ev_origin{
25  } Origin_t;
26 
27  //......................................................................
28 
30  class MCTruth {
31  public:
32  MCTruth();
33 
34  private:
35 
36  std::vector<simb::MCParticle> fPartList;
39  bool fNeutrinoSet;
40 
41 #ifndef __GCCXML__
42  public:
43 
44  simb::Origin_t Origin() const;
45  int NParticles() const;
46  const simb::MCParticle& GetParticle(int i) const;
47  const simb::MCNeutrino& GetNeutrino() const;
48  bool NeutrinoSet() const;
49 
50  void Add(simb::MCParticle& part);
52  void SetNeutrino(int CCNC,
53  int mode,
54  int interactionType,
55  int target,
56  int nucleon,
57  int quark,
58  double w,
59  double x,
60  double y,
61  double qsqr);
62 
63  friend std::ostream& operator<< (std::ostream& o, simb::MCTruth const& a);
64 #endif
65 
66  };
67 }
68 
69 #ifndef __GCCXML__
70 
71 inline simb::Origin_t simb::MCTruth::Origin() const { return fOrigin; }
72 inline int simb::MCTruth::NParticles() const { return (int)fPartList.size(); }
73 inline const simb::MCParticle& simb::MCTruth::GetParticle(int i) const { return fPartList[i]; }
74 inline const simb::MCNeutrino& simb::MCTruth::GetNeutrino() const { return fMCNeutrino; }
75 inline bool simb::MCTruth::NeutrinoSet() const { return fNeutrinoSet; }
76 
77 inline void simb::MCTruth::Add(simb::MCParticle& part) { fPartList.push_back(part); }
79 
80 #endif
81 
82 #endif //SIMB_MCTRUTH_H
83 
Float_t x
Definition: compare.C:6
std::vector< simb::MCParticle > fPartList
list of particles in this event
Definition: MCTruth.h:36
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:74
void SetOrigin(simb::Origin_t origin)
Definition: MCTruth.h:78
cout<< "-> Edep in the target
Definition: analysis.C:54
Float_t y
Definition: compare.C:6
simb::Origin_t Origin() const
Definition: MCTruth.h:71
enum simb::_ev_origin Origin_t
event origin types
_ev_origin
event origin types
Definition: MCTruth.h:19
int NParticles() const
Definition: MCTruth.h:72
void SetNeutrino(int CCNC, int mode, int interactionType, int target, int nucleon, int quark, double w, double x, double y, double qsqr)
Definition: MCTruth.cxx:30
simb::MCNeutrino fMCNeutrino
reference to neutrino info - null if not a neutrino
Definition: MCTruth.h:37
void Add(simb::MCParticle &part)
Definition: MCTruth.h:77
single particles thrown at the detector
Definition: MCTruth.h:24
TString part[npart]
Definition: Style.C:32
Framework includes.
const simb::MCParticle & GetParticle(int i) const
Definition: MCTruth.h:73
simb::Origin_t fOrigin
origin for this event
Definition: MCTruth.h:38
friend std::ostream & operator<<(std::ostream &o, simb::MCTruth const &a)
Definition: MCTruth.cxx:70
Supernova neutrinos.
Definition: MCTruth.h:23
bool NeutrinoSet() const
Definition: MCTruth.h:75
Event generator information.
Definition: MCTruth.h:30
bool fNeutrinoSet
flag for whether the neutrino information has been set
Definition: MCTruth.h:39
Event generator information.
Definition: MCNeutrino.h:18
Float_t w
Definition: plot.C:23
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230
Cosmic rays.
Definition: MCTruth.h:22
Beam neutrinos.
Definition: MCTruth.h:21