SND@LHC Software
Loading...
Searching...
No Matches
ecalStructureFiller Class Reference

#include <ecalStructureFiller.h>

Inheritance diagram for ecalStructureFiller:
Collaboration diagram for ecalStructureFiller:

Public Member Functions

 ecalStructureFiller ()
 
 ecalStructureFiller (const char *name, const Int_t iVerbose=1, const char *fileGeo="ecal_FullMC.geo")
 
virtual ~ecalStructureFiller ()
 
virtual InitStatus Init ()
 
ecalStructureInitPython (TClonesArray *litePoints)
 
virtual void Exec (Option_t *option, TClonesArray *litePoints)
 
virtual void Finish ()
 
void SetUseMCPoints (Bool_t UseMCPoints)
 
ecalStructureGetStructure () const
 
void StoreTrackInformation (Bool_t storetrackinfo=kTRUE)
 
Bool_t GetStoreTrackInformation () const
 
Bool_t GetUseMCPoints () const
 
Bool_t GetUseSummableHits () const
 
Bool_t GetUseHits () const
 

Private Member Functions

void SetParContainers ()
 
void LoopForMCPoints ()
 
 ecalStructureFiller (const ecalStructureFiller &)
 
ecalStructureFilleroperator= (const ecalStructureFiller &)
 

Private Attributes

ecalStructurefStr
 
ecalInffInf
 
TClonesArray * fListECALpts
 
Int_t fEvent
 
Bool_t fInited
 Internal event counter.
 
Bool_t fUseMCPoints
 
Bool_t fStoreTrackInfo
 
TString fFileGeo
 

Detailed Description

Definition at line 24 of file ecalStructureFiller.h.

Constructor & Destructor Documentation

◆ ecalStructureFiller() [1/3]

ecalStructureFiller::ecalStructureFiller ( )

Default constructor

Definition at line 19 of file ecalStructureFiller.cxx.

20 : FairTask(),
21 fStr(NULL),
22 fInf(NULL),
23 fListECALpts(NULL),
24 fEvent(0),
25 fInited(kFALSE),
26 fUseMCPoints(kFALSE),
27 fStoreTrackInfo(kTRUE),
28 fFileGeo("")
29{
30}
Bool_t fInited
Internal event counter.
TClonesArray * fListECALpts

◆ ecalStructureFiller() [2/3]

ecalStructureFiller::ecalStructureFiller ( const char *  name,
const Int_t  iVerbose = 1,
const char *  fileGeo = "ecal_FullMC.geo" 
)

Standard constructor

Definition at line 34 of file ecalStructureFiller.cxx.

35 : FairTask(name,iVerbose),
36 fStr(NULL),
37 fInf(ecalInf::GetInstance(fileGeo)),
38 fListECALpts(NULL),
39 fEvent(0),
40 fInited(kFALSE),
41 fUseMCPoints(kFALSE),
42 fStoreTrackInfo(kTRUE),
43 fFileGeo(fileGeo)
44{
45}
static ecalInf * GetInstance(const char *filename)
Definition ecalInf.cxx:35

◆ ~ecalStructureFiller()

ecalStructureFiller::~ecalStructureFiller ( )
virtual

Destructor

Definition at line 50 of file ecalStructureFiller.cxx.

51{
52 ;
53}

◆ ecalStructureFiller() [3/3]

ecalStructureFiller::ecalStructureFiller ( const ecalStructureFiller )
private

Member Function Documentation

◆ Exec()

void ecalStructureFiller::Exec ( Option_t *  option,
TClonesArray *  litePoints 
)
virtual

Executed task

Definition at line 142 of file ecalStructureFiller.cxx.

143{
144 fEvent++;
145 fListECALpts=litePoints;
146 if (fVerbose>0)
147 cout << "--> Event no. " << fEvent;
148
151
152 if (fVerbose>0)
153 cout << endl << flush;
154}

◆ Finish()

void ecalStructureFiller::Finish ( )
virtual

Finish task

Definition at line 159 of file ecalStructureFiller.cxx.

160{
161 ;
162}

◆ GetStoreTrackInformation()

Bool_t ecalStructureFiller::GetStoreTrackInformation ( ) const
inline

Definition at line 106 of file ecalStructureFiller.h.

107{
108 return fStoreTrackInfo;
109}

◆ GetStructure()

ecalStructure * ecalStructureFiller::GetStructure ( ) const
inline

Definition at line 111 of file ecalStructureFiller.h.

112{
113 return fStr;
114}

◆ GetUseHits()

Bool_t ecalStructureFiller::GetUseHits ( ) const

◆ GetUseMCPoints()

Bool_t ecalStructureFiller::GetUseMCPoints ( ) const
inline

Definition at line 95 of file ecalStructureFiller.h.

96{
97 return fUseMCPoints;
98}

◆ GetUseSummableHits()

Bool_t ecalStructureFiller::GetUseSummableHits ( ) const

◆ Init()

InitStatus ecalStructureFiller::Init ( )
virtual

Initialization of the task

Definition at line 62 of file ecalStructureFiller.cxx.

63{
64 fInited=kTRUE;
65 FairRootManager* fManager = FairRootManager::Instance();
66
67 if (fUseMCPoints==kFALSE)
68 {
69 Warning("Init()", "No data source for structure filler! Calorimeter structure will be empty.");
70// return kFATAL;
71 }
72 //ECAL MC points
73 if (fUseMCPoints)
74 fListECALpts = (TClonesArray*)fManager->GetObject("EcalPointLite");
75
76 //fInf->CheckVariables();
79 fStr->Construct();
80
81 fManager->Register("EcalStructure", "ECAL", fStr, kFALSE);
82 return kSUCCESS;
83}
void SetUseMC(Int_t mc=0)

◆ InitPython()

ecalStructure * ecalStructureFiller::InitPython ( TClonesArray *  litePoints)

Definition at line 87 of file ecalStructureFiller.cxx.

88{
89 fListECALpts=litePoints;
90
91 //fInf->CheckVariables();
94 fStr->Construct();
95
96 return fStr;
97}

◆ LoopForMCPoints()

void ecalStructureFiller::LoopForMCPoints ( )
private

Loop over MCPoints

Loop over MCPoints hits and add them to cells

Definition at line 101 of file ecalStructureFiller.cxx.

102{
103 ecalPoint* pt;
104 ecalCell* cell;
105 Int_t ten;
106 UInt_t n;
107 Bool_t isPS;
108
109 n=fListECALpts->GetEntriesFast();
110 if (fVerbose>0)
111 {
112 cout << ". Number of input MC points: ";
113 cout << n << flush;
114 }
115
116 for(UInt_t j=0; j<n; j++)
117 {
118 pt=(ecalPoint*)fListECALpts->At(j);
119 cell=fStr->GetCell(pt->GetDetectorID(), ten, isPS);
120 if (ten==0) {
121 if (isPS)
122 ; // cell->AddPSEnergy(pt->GetEnergyLoss()); preshower removed
123 else
124 cell->AddEnergy(pt->GetEnergyLoss());
125 }
126 }
127 if (fStoreTrackInfo)
128 for(UInt_t j=0; j<n; j++)
129 {
130 pt=(ecalPoint*)fListECALpts->At(j);
131 ecalCellMC* cellmc=(ecalCellMC*)fStr->GetCell(pt->GetDetectorID(), ten, isPS);
132 if (ten==0) {
133 if (isPS)
134 ; // cell->AddTrackPSEnergy(pt->GetTrackID(),pt->GetEnergyLoss()); //preshower removed
135 else
136 cellmc->AddTrackEnergy(pt->GetTrackID(),pt->GetEnergyLoss(), pt->GetTime());
137 }
138 }
139}
void AddTrackEnergy(Int_t num, Float_t energy, Float_t time=-1111)
Definition ecalCellMC.h:31
void AddEnergy(Float_t energy)
Definition ecalCell.h:68
ecalCell * GetCell(Float_t x, Float_t y) const

◆ operator=()

ecalStructureFiller & ecalStructureFiller::operator= ( const ecalStructureFiller )
private

◆ SetParContainers()

void ecalStructureFiller::SetParContainers ( )
private

Init parameter containers

Definition at line 56 of file ecalStructureFiller.cxx.

57{
58 ;
59}

◆ SetUseMCPoints()

void ecalStructureFiller::SetUseMCPoints ( Bool_t  UseMCPoints)
inline

Set data source for hit producer. This must be called before Init() (No effect other case)!

Definition at line 89 of file ecalStructureFiller.h.

90{
91 if (fInited) return;
92 fUseMCPoints=UseMCPoints;
93}

◆ StoreTrackInformation()

void ecalStructureFiller::StoreTrackInformation ( Bool_t  storetrackinfo = kTRUE)
inline

Definition at line 100 of file ecalStructureFiller.h.

101{
102 if (fInited) return;
103 fStoreTrackInfo=storetrackinfo;
104}

Member Data Documentation

◆ fEvent

Int_t ecalStructureFiller::fEvent
private

Definition at line 70 of file ecalStructureFiller.h.

◆ fFileGeo

TString ecalStructureFiller::fFileGeo
private

Geo file to use

Definition at line 80 of file ecalStructureFiller.h.

◆ fInf

ecalInf* ecalStructureFiller::fInf
private

Definition at line 67 of file ecalStructureFiller.h.

◆ fInited

Bool_t ecalStructureFiller::fInited
private

Internal event counter.

Is Init() already done?

Definition at line 73 of file ecalStructureFiller.h.

◆ fListECALpts

TClonesArray* ecalStructureFiller::fListECALpts
private

Definition at line 69 of file ecalStructureFiller.h.

◆ fStoreTrackInfo

Bool_t ecalStructureFiller::fStoreTrackInfo
private

Should we store information about tracks/energy depostion

Definition at line 78 of file ecalStructureFiller.h.

◆ fStr

ecalStructure* ecalStructureFiller::fStr
private

Definition at line 66 of file ecalStructureFiller.h.

◆ fUseMCPoints

Bool_t ecalStructureFiller::fUseMCPoints
private

Should we take data from MCPoints?

Definition at line 75 of file ecalStructureFiller.h.


The documentation for this class was generated from the following files: