PandaRoot
BSEmcMCDeposit.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- BSEmcMCDeposit header file -----
15 // ----- Created 14/08/06 by S.Spataro -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef BSEMCMCDEPOSIT_HH
19 #define BSEMCMCDEPOSIT_HH
20 
21 #include <map> // for map
22 #include <set>
23 #include <string> // for string
24 #include <vector>
25 
26 #include "Rtypes.h" // for BSEmcMCDeposit::Class, BSEmcMCDeposit::Stre...
27 #include "RtypesCore.h" // for Int_t, Double_t, Double32_t, Option_t
28 
29 #include "FairHit.h" // for FairHit
30 #include "FairMultiLinkedData.h" // for FairMultiLinkedData
31 
32 #include "BSEmcDataBranchNames.h"
33 
34 class TBuffer;
35 class TClass;
36 class TMemberInspector;
37 
43 // class BSEmcMCDeposit : public FairTimeStamp
44 class BSEmcMCDeposit : public FairHit {
45  public:
48 
49  BSEmcMCDeposit(Int_t t_id, Float_t t_time, std::vector<Int_t> t_mcTruth, FairMultiLinkedData t_enteringTrack, FairMultiLinkedData t_exitingTrack);
50 
53 
55  virtual ~BSEmcMCDeposit();
56 
58  virtual void Print(const Option_t *t_opt = "") const;
59 
61  // virtual void SetEnergy(Double32_t energy) { fEnergy = energy ;};
62  virtual void SetTime(Double32_t t_time) { fTimeStamp = t_time * 1E9; };
63 
65  virtual Double_t GetEnergy() const;
66  virtual Double_t GetTime() const { return fTimeStamp / 1E9; };
67 
68  FairMultiLinkedData GetTrackEntering() const { return fTrackEntering; }
69  FairMultiLinkedData GetTrackExiting() const { return fTrackExiting; }
70 
71  const std::vector<Int_t> &GetMcList() { return fMcList; }
72 
73  Int_t GetDetectorID() const { return fDetectorID; }
74  void SetDetectorID(Int_t t_detectorId) { fDetectorID = t_detectorId; }
75 
76  Int_t GetDetectorId() const { return fDetectorID; }
77  void SetDetectorId(Int_t t_detectorId) { fDetectorID = t_detectorId; }
78 
79  void SetDepositedEnergyMap(const std::map<Int_t, Double_t> &t_depEnergy) { fDepositedEnergy = t_depEnergy; }
80  void AddDepositedEnergy(Int_t t_mcId, Double_t t_depEnergy) { fDepositedEnergy[t_mcId] += t_depEnergy; }
81 
82  std::set<Int_t> GetClusterList() const;
83  const std::map<Int_t, Double_t> &GetDepositedEnergyMap() const { return fDepositedEnergy; }
84 
85  protected:
86  std::map<Int_t, Double_t> fDepositedEnergy{}; // MC deposited energy per (primary) MC particle
87  std::vector<Int_t> fMcList{}; // Mc TrackIndex contributed to hit (including low level tracks (aka not just cluster causing tracks))
88  FairMultiLinkedData fTrackEntering{}; // Links to tracks entering the crystal (including low level tracks (aka not just cluster causing tracks))
89  FairMultiLinkedData fTrackExiting{}; // Links to tracks exiting the crystal (including low level tracks (aka not just cluster causing tracks))
90 
91  Int_t fDetectorID{-1};
92 
93  ClassDef(BSEmcMCDeposit, 3)
94 };
95 
96 #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()