TrueEnergy.h
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////////////
2 /// \brief A class to contain true energy deposited in/escaping the detector
3 /// Remember that as this data product holds information from all daughters
4 /// it is possible (and in fact likely) that not all of the numbers add up.
5 /// Especially as the energies are kinetic energies.
6 /// Consider for example a very low energy muon KE = 10 KeV which decays.
7 /// The electron it produces will likely deposit ~50 KeV in the detector.
8 /// The neutrinos will likely leave the detector with about ~50 KeV energy.
9 /// Therefore, EntEn = 10 KeV, EnDep = ~60 KeV, TotEscEn = ~50 KeV!!!
10 /// \author karlwarb@iastate.edu
11 /// \date
12 /////////////////////////////////////////////////////////////////////////////////
13 #ifndef TRUEENERGY_H
14 #define TRUEENERGY_H
15
16 #include <iomanip>
17 #include <iosfwd>
18 #include <iostream>
19 #include <vector>
20
21 namespace sim
22 {
23  class TrueEnergy {
24  public:
25  TrueEnergy();
26  TrueEnergy(int TrId, float EnEnt, float EnEsc, float TotDep, float TotEsc);
27  ~TrueEnergy();
28
29  void SetTrackId (int TrId ) { fTrackId = TrId; }
30  void SetEnteringEnergy(float EnEnt) { fEnteringEnergy = EnEnt; }
31  void SetEscapingEnergy(float EnEsc) { fEscapingEnergy = EnEsc; }
32  void SetTotalDepEnergy(float ToDep) { fTotalDepEnergy = ToDep; }
33  void SetTotalEscEnergy(float ToEsc) { fTotalEscEnergy = ToEsc; }
34  // void Print();
35
36  int TrackId() const { return fTrackId; }
37  float EnteringEnergy() const { return fEnteringEnergy; }
38  float EscapingEnergy() const { return fEscapingEnergy; }
39  float TotalDepEnergy() const { return fTotalDepEnergy; }
40  float TotalEscEnergy() const { return fTotalEscEnergy; }
41
42  friend std::ostream& operator<< (std::ostream& o, const TrueEnergy& TrueE);
43
44  private:
45  int fTrackId; ///< The track id of the Monte Carlo particle we are looking at.
46  float fEnteringEnergy; ///< The kinetic energy which the given particle when it FIRST entered the detector.
47  float fEscapingEnergy; ///< The kinetic energy which from this particle which is not deposited in the detector.
48  float fTotalDepEnergy; ///< The sum of energy depositions due to this particle, and all of its daughters in the detector.
49  float fTotalEscEnergy; ///< The sum of the kinetic energy for all daughters of the particle which exit the detector.
50
51  };
52
53 } // end namespace
54
55 #endif // TRUEENERGY_H
56 //////////////////////////////////////////////////////////////////
int TrackId() const
Definition: TrueEnergy.h:36
float fEscapingEnergy
The kinetic energy which from this particle which is not deposited in the detector.
Definition: TrueEnergy.h:47
void SetTrackId(int TrId)
Definition: TrueEnergy.h:29
float EscapingEnergy() const
Definition: TrueEnergy.h:38
float fEnteringEnergy
The kinetic energy which the given particle when it FIRST entered the detector.
Definition: TrueEnergy.h:46
float TotalEscEnergy() const
Definition: TrueEnergy.h:40
float EnteringEnergy() const
Definition: TrueEnergy.h:37
void SetEscapingEnergy(float EnEsc)
Definition: TrueEnergy.h:31
Example routine for calculating the "ultimate e-m mother" of a particle in a simulated event...
Definition: FillTruth.h:15
void SetTotalEscEnergy(float ToEsc)
Definition: TrueEnergy.h:33
friend std::ostream & operator<<(std::ostream &o, const TrueEnergy &TrueE)
Definition: TrueEnergy.cxx:30
int fTrackId
The track id of the Monte Carlo particle we are looking at.
Definition: TrueEnergy.h:45
float fTotalEscEnergy
The sum of the kinetic energy for all daughters of the particle which exit the detector.
Definition: TrueEnergy.h:49
void SetEnteringEnergy(float EnEnt)
Definition: TrueEnergy.h:30
float TotalDepEnergy() const
Definition: TrueEnergy.h:39
void SetTotalDepEnergy(float ToDep)
Definition: TrueEnergy.h:32
float fTotalDepEnergy
The sum of energy depositions due to this particle, and all of its daughters in the detector...
Definition: TrueEnergy.h:48