PandaRoot
BSEmcMCDeposit.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- BSEmcMCDeposit header file -----
3 // ----- Created 14/08/06 by S.Spataro -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef BSEMCMCDEPOSIT_HH
7 #define BSEMCMCDEPOSIT_HH
8 
9 #include <map> // for map
10 #include <set>
11 #include <string> // for string
12 #include <vector>
13 
14 #include "Rtypes.h" // for BSEmcMCDeposit::Class, BSEmcMCDeposit::Stre...
15 #include "RtypesCore.h" // for Int_t, Double_t, Double32_t, Option_t
16 
17 #include "FairHit.h" // for FairHit
18 #include "FairMultiLinkedData.h" // for FairMultiLinkedData
19 
20 #include "BSEmcDataBranchNames.h"
21 
22 class TBuffer;
23 class TClass;
24 class TMemberInspector;
25 
31 // class BSEmcMCDeposit : public FairTimeStamp
32 class BSEmcMCDeposit : public FairHit {
33  public:
36 
37  BSEmcMCDeposit(Int_t t_id, Float_t t_time, std::vector<Int_t> t_mcTruth, FairMultiLinkedData t_enteringTrack, FairMultiLinkedData t_exitingTrack);
38 
41 
43  virtual ~BSEmcMCDeposit();
44 
46  virtual void Print(const Option_t *t_opt = "") const;
47 
49  // virtual void SetEnergy(Double32_t energy) { fEnergy = energy ;};
50  virtual void SetTime(Double32_t t_time) { fTimeStamp = t_time * 1E9; };
51 
53  virtual Double_t GetEnergy() const;
54  virtual Double_t GetTime() const { return fTimeStamp / 1E9; };
55 
56  FairMultiLinkedData GetTrackEntering() const { return fTrackEntering; }
57  FairMultiLinkedData GetTrackExiting() const { return fTrackExiting; }
58 
59  const std::vector<Int_t> &GetMcList() { return fMcList; }
60 
61  Int_t GetDetectorID() const { return fDetectorID; }
62  void SetDetectorID(Int_t t_detectorId) { fDetectorID = t_detectorId; }
63 
64  Int_t GetDetectorId() const { return fDetectorID; }
65  void SetDetectorId(Int_t t_detectorId) { fDetectorID = t_detectorId; }
66 
67  void SetDepositedEnergyMap(const std::map<Int_t, Double_t> &t_depEnergy) { fDepositedEnergy = t_depEnergy; }
68  void AddDepositedEnergy(Int_t t_mcId, Double_t t_depEnergy) { fDepositedEnergy[t_mcId] += t_depEnergy; }
69 
70  std::set<Int_t> GetClusterList() const;
71  const std::map<Int_t, Double_t> &GetDepositedEnergyMap() const { return fDepositedEnergy; }
72 
73  protected:
74  std::map<Int_t, Double_t> fDepositedEnergy{}; // MC deposited energy per (primary) MC particle
75  std::vector<Int_t> fMcList{}; // Mc TrackIndex contributed to hit (including low level tracks (aka not just cluster causing tracks))
76  FairMultiLinkedData fTrackEntering{}; // Links to tracks entering the crystal (including low level tracks (aka not just cluster causing tracks))
77  FairMultiLinkedData fTrackExiting{}; // Links to tracks exiting the crystal (including low level tracks (aka not just cluster causing tracks))
78 
79  Int_t fDetectorID{-1};
80 
81  ClassDef(BSEmcMCDeposit, 3)
82 };
83 
84 #endif /*BSEMCMCDEPOSIT_HH*/
void SetDepositedEnergyMap(const std::map< Int_t, Double_t > &t_depEnergy)
Int_t GetDetectorID() const
FairMultiLinkedData fTrackExiting
Int_t GetDetectorId() const
represents the deposited energy of one emc crystal from simulation
std::vector< Int_t > fMcList
const std::map< Int_t, Double_t > & GetDepositedEnergyMap() const
FairMultiLinkedData fTrackEntering
std::map< Int_t, Double_t > fDepositedEnergy
virtual void Print(const Option_t *t_opt="") const
void SetDetectorId(Int_t t_detectorId)
virtual Double_t GetTime() const
void AddDepositedEnergy(Int_t t_mcId, Double_t t_depEnergy)
virtual void SetTime(Double32_t t_time)
FairMultiLinkedData GetTrackEntering() const
std::set< Int_t > GetClusterList() const
FairMultiLinkedData GetTrackExiting() const
const std::vector< Int_t > & GetMcList()
void SetDetectorID(Int_t t_detectorId)
virtual Double_t GetEnergy() const
virtual ~BSEmcMCDeposit()