FairRoot/PandaRoot
PndDrcTimeDigiTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndDrcTimeDigiTask header file -----
3 // ----- HARPHOOL KUMAWAT h.kumawat@gsi.de -----
4 // ----- -----
5 // ----- -----
6 // -------------------------------------------------------------------------
7 
8 /* * PndDrcTimeDigiTask.h
9 
10  **
11  ** Class for producing DRC hits directly from MCPoints
12 
13  * */
14 
15 
16 #ifndef PNDDRCTIMEDIGITASK_H
17 #define PNDDRCTIMEDIGITASK_H
18 
19 #include <PndPersistencyTask.h>
20 #include "FairTimeStamp.h"
21 #include "TClonesArray.h"
22 #include "PndMCTrack.h"
23 #include "PndDrcDigi.h"
24 #include "PndStack.h"
25 #include "FairBaseParSet.h"
26 #include "PndGeoDrcPar.h"
27 #include "TString.h"
28 #include <string>
29 #include "TH1.h"
30 #include "TH2.h"
31 #include "PndGeoDrc.h"
32 #include "PndGeoHandling.h"
33 
34 #include "PndDrcPDPoint.h"
35 #include "PndDrcBarPoint.h"
36 #include "PndMCTrack.h"
37 
38 #ifndef ROOT_TParticlePDG
39 #include "TParticlePDG.h"
40 #endif
41 #ifndef ROOT_TDatabasePDG
42 #include "TDatabasePDG.h"
43 #endif
44 
45 #include <map>
48 
49 public:
50 
53 
56 
58  virtual ~PndDrcTimeDigiTask();
59 
61  // virtual void SetParContainers();
62  void RunTimeBased(){fTimeOrderedDigi =kFALSE;/*kTRUE;*/}
63  virtual InitStatus Init();
64 
66  virtual void Exec(Option_t* option);
67 
69  void Reset();
70 
72  virtual void Finish();
77  PndDrcDigi* AddDrcDigi(Int_t index, Int_t iDetectorId, Double_t charge, Double_t TimeStamp, Int_t csflag);
78 
81  Double_t& , Double_t& , Double_t& , Int_t ) //xPoint yPoint zPoint xHit yHit zHit pmtID //[R.K.03/2017] unused variable(s)
82 {std::cerr << "WARNNING PndDrcTimeDigiTask::FindDrcHitPosition() not properly implemented." <<std::endl;};
85  void SetFakeDetEff();
90 
91  void SetActiveTime(Double_t ActiveTime = 10){fActiveTime = ActiveTime;}
92  void SetTimeSmearing(Bool_t ct = 0){fTimeSmearing = ct;}
94  TVector3 GetSensorDimensions(Int_t sensorID);
95 
96 
97  //########################################
98  void SetTilt(Double_t tilt = 0.){ftilt = tilt;} // degrees
99  void SetTimeOrdered(Bool_t TimeOrderedDigi = kFALSE){fTimeOrderedDigi = TimeOrderedDigi;} // degrees
100  void SetTimeResolution(Double_t Sigmat=0.1){fSigmat = Sigmat;}
101 //########################################
102 
103  void DrawDetEfficiency(Bool_t dr=kFALSE){fDrawing = dr;}
104 
105  protected:
106 
108 
109 
110  private:
111 
113  TClonesArray* fHitArray;
114 // std::vector<TClonesArray*> fHitArray;
115  void ProcessPhotonPoint();
116  void Smear(Double_t& time, Double_t sigt);
117  void ActivatePixel(Int_t DetectorId, Int_t sensorId, Double_t signalTime, Int_t k, Int_t csflag);
120 
121  // basic parameters of DIRC
138  Int_t fNpix; // in one column/row
143  Double_t fThreshold; // in % of the total probability of 1 to detect a hit
144  Double_t fTimeGranularity; // granularity of the time signal [ns]
145 
153  Int_t fDetectorID;
154  TVector3 fPosHit;
155  TVector3 fDPosHit;
156  TVector3 fPosPDHit;
159  Int_t fRefIndex;
160  Int_t fPixelID;//fPDRefIndex;
163  Int_t fBarId;
164  Int_t fBoxId;
165  Int_t fTrackId;
166  TVector3 fTrackIniVertex;
167  Int_t fMrId;
168  Int_t fMrIdPho;
169  Int_t fPdg;
170  TVector3 fTrackMom;
173  Int_t fNDigis;
174  TClonesArray* fDigis;
178  std::map<Int_t, Int_t> fPixelMap;
179  std::map<Int_t, Double_t> fTimeMap;
180 
181  TClonesArray* fBarPointArray; // DRC MC points in the bars
183  TClonesArray* fPDPointArray; // DRC MC points in the photon plane
187  TClonesArray* fDrcDigiArray; // DRC Photon Detector hits
188  TClonesArray* fMCArray; // DRC Hits in the photon detector
189 
190  TH2F* detEffLam;
191 
192 
194 
196 
198  Int_t fVerbose;
199 
201  Int_t fDetType; // detector type
202 
203  Double_t nRefrac; //Refractive index of photon detector
204  Double_t fSigmat; //Time Resolution in ps
205  Double_t fCollectionEff; //Collection Efficiency
206  Double_t fPackingFraction; //Packing Fraction or Active Area Ratio
207  Double_t fRoughness; // Surface roughness (bars)
208  Int_t fDetection;
209  Int_t nevents;
210 
211  //vars for detector and transport efficiency
217  TH1D * PileUp;
221 
223  void SetParameters();
224 
225 
226  ClassDef(PndDrcTimeDigiTask,1)
227 
228 };
229 
230 #endif
void SetTimeSmearing(Bool_t ct=0)
virtual void Exec(Option_t *option)
TClonesArray * fMCArray
std::map< Int_t, Int_t > fPixelMap
void SetChargeSharing(Bool_t ct=0)
#define verbose
std::map< Int_t, Double_t > fTimeMap
void SetTimeResolution(Double_t Sigmat=0.1)
void FindDrcHitPosition(Double_t, Double_t, Double_t, Double_t &, Double_t &, Double_t &, Int_t)
PndDrcDigiWriteoutBuffer * fDrcTimeDigiArray
TClonesArray * fBarPointArray
void Smear(Double_t &time, Double_t sigt)
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
void DrawDetEfficiency(Bool_t dr=kFALSE)
TClonesArray * fDrcDigiArray
Double_t FindPhiRot(Double_t, Double_t)
Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t)
Class to access the naming information of the MVD.
PndDrcDigi * AddDrcDigi(Int_t index, Int_t iDetectorId, Double_t charge, Double_t TimeStamp, Int_t csflag)
Double_t
PndDrcBarPoint * fBarPoint
void SetTilt(Double_t tilt=0.)
PndGeoHandling * fGeoH
void SetActiveTime(Double_t ActiveTime=10)
TVector3 GetSensorDimensions(Int_t sensorID)
virtual InitStatus Init()
TClonesArray * fPDPointArray
void SetTimeOrdered(Bool_t TimeOrderedDigi=kFALSE)
Double_t fDetEfficiency[800]
Double_t FuncD3(Double_t x, Double_t y)
Double_t x
Double_t fTranspEfficiency[798]
Double_t FuncD1(Double_t x)
PndDrcPDPoint * fPpt
Double_t y
void ActivatePixel(Int_t DetectorId, Int_t sensorId, Double_t signalTime, Int_t k, Int_t csflag)
TClonesArray * fHitArray
///< converter for detector names