FairRoot/PandaRoot
PndEmcAnalysis.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------- // File and Version Information:
2 // $Id: Exp $
3 //
4 // Description:
5 // Class PndEmcAnalysis. Module to take the hit list for the
6 // calorimeter and make ADC waveforms from them.
7 //
8 // Software developed for the BaBar Detector at the SLAC B-Factory.
9 // Adapted for the PANDA experiment at GSI
10 //
11 // Author List:
12 // Phil Strother Original Author
13 // Dima Melnichuk - adaption for PANDA
14 //
15 // Copyright Information:
16 // Copyright (C) 1996 Imperial College
17 //
18 //----------------------------------------------------------------------
19 //#pragma once
20 #ifndef PndEmcAnalysis_H
21 #define PndEmcAnalysis_H
22 
23 #include "FairTask.h"
25 #include "FairTSBufferFunctional.h"
26 #include <string>
27 #include <map>
28 #include <vector>
29 #include <set>
30 #include "TTree.h"
31 #include "TFile.h"
32 #include "TVectorD.h"
33 #include "TLorentzVector.h"
34 #include "PndEmcDigiCalibrator.h"
35 
36 class PndEmcHit;
38 class PndEmcWaveform;
39 
40 class TClonesArray;
41 class PndEmcDigiPar;
42 class PndEmcRecoPar;
43 class PndEmcFpgaPar;
44 class PndEmcAbsPSA;
46 
47 using namespace std;
48 
49 class PndEmcAnalysis : public FairTask
50 {
51 
52 public:
53 
54  // Constructors
55 
56  PndEmcAnalysis(Int_t verbose=0, Bool_t storeRootFile=kTRUE);
57 
58  // Destructor
59 
60  virtual ~PndEmcAnalysis();
61 
63  virtual InitStatus Init();
64 
66  virtual void Exec(Option_t* opt);
67 
68  void SetOutput(TString name) { fileName = name; }
69 
70  void RunTimeBased(){fTimeOrderedDigi = kTRUE;}
71 
72  virtual void FinishTask();
73 
84 
85 private:
86  void SetParContainers();
88  TClonesArray* fEmcHitsArray;
89  TClonesArray* fWaveformArray;
90  TClonesArray* fDigiArray;
91  TClonesArray* fSharedDigiArray;
92  TClonesArray* fClusterArray;
93  TClonesArray* fBumpArray;
94  TClonesArray* fMcTrackArray;
95  TClonesArray* fEvtHeaderArray;
96  TClonesArray* fChargedCand;
97  TClonesArray* fNeutralCand;
98 
99 
100 
101  Int_t fVerbose;
103 
105  PndEmcAnalysis& operator= (const PndEmcAnalysis&) {return *this;};
106 
107  ClassDef(PndEmcAnalysis,1);
108 
109  BinaryFunctor* fFunctor;
110 
111  //for time-based analysis
113  //event no, how many waveforms in this event, how many pileup waveforms
114  std::map<Int_t, std::pair<Int_t, Int_t> > evtMap;
115  std::set<Int_t> pevtset;//pileup event numbers
116  std::set<Int_t> evtset;//total event numbers
117 
119  TFile* fRootFile;
120  TTree* tHit;//hit information
121  TTree* tDigi;//digi information
122  TTree* tWave;//wave information
123  TTree* tBump;//bump information
124  TTree* tTask;//task summary
125  TTree* tEvtPileup;//pileup at event level
126  TTree* tTaskPileup;//pileup at task level
127  TTree* tMcTruth;//MC Truth
128  TTree* tRec;//reconstruction
129  //for Tree tHit
134  Int_t fNPoint;
135  //variables for Tree tWave
137  Int_t fModule;
138  Int_t fHitIndex;
141  Int_t fWaveLen;
142  Int_t fWaveIdx;
143  Int_t fEventNo;
145  Int_t fXcor;
146  Int_t fYcor;
148  //for Tree tDigi;
150  //Double_t fEvtTime;
151  //Int_t fModule;
152  //Double_t fWaveTime;
153  //Double_t fHitEnergy;
156  //Int_t fWaveIdx;
157  //Int_t fEventNo;
158  TVector3 fPosition;
159  TVector3 fSeedPosition;
160  //for Tree tBump;
163  //Double_t fEvtTime;
164  //Int_t fEventNo ,"EventNO/I");
165  //Int_t fModule ,"Module/I");
171  //TVector3 fPosition;
172  //for Tree tTask
173  Int_t fNumDigi;
174  Int_t fNumBump;
175  Int_t fClusterIdx;
176  Int_t fNumOfSeed;
178  Int_t fNumOfMatch;
180  //for tree task
183  //Int_t fEventNo;
184  Int_t fNumOfHits;
186  //Int_t fNumDigi;
188  Int_t fNumCluster;
189  //Int_t fNumBump;
190  Int_t fNumMcTrack;
191 
192  //for Tree tTaskPileup
193  Int_t fTotWave;
194  Int_t fPileupWave;
202 
203  //for Tree tRec
204  const static Int_t NElement = 30;
205  Double_t fp4[4*NElement];
206  Double_t fMcp4[4*NElement];
207  Double_t fPositionV[3*NElement];
208  Double_t fEnergy[NElement];
209  Double_t fEnergyC1[NElement];
210  Double_t fEnergyC2[NElement];
211  Double_t fZ201[NElement];
212  Double_t fZ531[NElement];
213  Double_t fLat1[NElement];
214  Int_t fModule1[NElement];
215  Int_t fPDGCode[NElement];
216  Double_t fTheta1[NElement];
217  Double_t fPhi1[NElement];
221  Int_t fNumGT;
222  //for Tree tMcTruth
223  Int_t fDet1[NElement];
224  Int_t fHitEmc1[NElement];
225  Int_t fHitEmc2[NElement];
226  Int_t fNPointV[NElement];
227 
228 
229  //pid data
230 
231  Int_t fchar[NElement];
232 // Double_t fp4[NElement] ;
233  Double_t fpos[NElement] ;
234  Double_t fmom[NElement] ;
235  Int_t fmcidx[NElement];
236  Double_t frawe[NElement] ;
237  Double_t fcale[NElement] ;
238  Int_t fndigi[NElement];
239  Int_t fmod[NElement] ;
240  Int_t fcluIdx[NElement];
241  Double_t fe25[NElement] ;
242  Double_t fe9[NElement] ;
243  Int_t fnbump[NElement] ;
244 
245  TTree* tCharged;//charged track
246  TTree* tNeutral;//photons
247 
248  TTree* tAna3g;//specified analysis
249  //jpsi-->3 gamma
251  Double_t fExternalEnergy;//other energy excluding 3 photon
252 
253  Double_t f4p1[4];//photon 1
254  Double_t fMc4p1[4];//photon 1, MC truth
255  Double_t fpos1[3];//position
256  Double_t fmom1;//momentum amplitude
259  Int_t fndigi1;//fired crystals by this photon
260  Int_t fmod1;
261  Int_t fMcTrack1;
266 
267  Double_t f4p2[4];//photon 2
268  Double_t fMc4p2[4];//photon 2, MC truth
269  Double_t fpos2[3];//position
270  Double_t fmom2;//momentum amplitude
273  Int_t fndigi2;//fired crystals by this photon
274  Int_t fmod2;
275  Int_t fMcTrack2;
280 
281  Double_t f4p3[4];//photon 3
282  Double_t fMc4p3[4];//photon 3, MC truth
283  Double_t fpos3[3];//position
284  Double_t fmom3;//momentum amplitude
287  Int_t fndigi3;//fired crystals by this photon
288  Int_t fmod3;
289  Int_t fMcTrack3;
294 
295 
297 
298 };
299 
300 #endif
301 
302 
303 
304 
305 
Double_t fBumpEnergy
Double_t fRestEnergy1
TClonesArray * fEmcHitsArray
Bool_t fSavePidNeutral
Double_t fExternalEnergy
Double_t totDigiEnergy
Int_t totNumOfPileupEvents
#define verbose
TClonesArray * fMcTrackArray
std::map< Int_t, std::pair< Int_t, Int_t > > evtMap
std::set< Int_t > pevtset
TClonesArray * fBumpArray
TClonesArray * fClusterArray
Double_t fBumpTime3
stores crystal index coordinates (x,y) or (theta,phi)
Double_t fBaseline
BinaryFunctor * fFunctor
Double_t fHitEnergy
Double_t fEnergy1C
Double_t fDigiTime
Double_t fSeedTime
std::set< Int_t > evtset
Double_t
TClonesArray * fNeutralCand
Double_t fBumpTime1
Bool_t fSaveJpsiTo3g
Int_t fNumberOfGoodPhoton
parameter set of Emc digitisation
Definition: PndEmcDigiPar.h:12
PndEmcDigiCalibrator digiCalibrator
TClonesArray * fDigiArray
Double_t fEnergy2C
Double_t fRestEnergy3
TString name
represents a simulated waveform in an emc crystal
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: PndEmcAbsPSA.h:21
TClonesArray * fSharedDigiArray
represents the deposited energy of one emc crystal from simulation
Definition: PndEmcHit.h:26
TVector3 fPosition
pulseshape interface
fRun Init()
Definition: NHitsPerEvent.C:20
TClonesArray * fEvtHeaderArray
TVector3 fSeedPosition
Double_t fWavePeak
TClonesArray * fChargedCand
Double_t fDistance
Bool_t fTimeOrderedDigi
set to kTRUE to use the time ordering of the output data.
Bool_t fSavePidCharged
Double_t fRestEnergy2
TClonesArray * fWaveformArray
Int_t totNumOfSharedDigi
Double_t fDigiEnergy
Double_t fBumpTime2
Double_t totSharedDigiEnergy
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:12
void SetOutput(TString name)
Double_t fWaveTime