PandaRoot
PndDrcDigiTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndDrcHitProducer header file -----
3 // ----- Created 30/10/09 by Dipanwita Dutta
4 // ----- -----
5 // ----- -----
6 // -------------------------------------------------------------------------
7 
8 #ifndef PNDDRCDIGITASK_H
9 #define PNDDRCDIGITASK_H
10 
11 #include <PndPersistencyTask.h>
12 #include "TClonesArray.h"
13 #include "PndMCTrack.h"
14 #include "PndDrcDigi.h"
15 #include "PndStack.h"
16 #include "FairBaseParSet.h"
17 #include "PndGeoDrcPar.h"
18 #include "TString.h"
19 #include <string>
20 #include "TH1.h"
21 #include "TH2.h"
22 #include "PndGeoDrc.h"
23 #include "PndGeoHandling.h"
24 #include "FairEventHeader.h"
25 
26 #include "PndDrcPDPoint.h"
27 #include "PndDrcBarPoint.h"
28 #include "PndMCTrack.h"
30 
31 #ifndef ROOT_TParticlePDG
32 #include "TParticlePDG.h"
33 #endif
34 #ifndef ROOT_TDatabasePDG
35 #include "TDatabasePDG.h"
36 #endif
37 
38 #include <map>
39 
41 
42  public:
45 
47  PndDrcDigiTask(Int_t verbose);
48 
50  virtual ~PndDrcDigiTask();
51 
53  // virtual void SetParContainers();
54  virtual InitStatus Init();
55 
57  virtual void Exec(Option_t *option);
58 
60  void Reset();
61 
63  virtual void Finish();
64 
66  void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t zPoint, Double_t &xHit, Double_t &yHit, Double_t &zHit, Int_t pmtID);
67 
68  void RunTimeBased() { fTimeOrderedDigi = kTRUE; }
69  void SetChargeSharing(Bool_t ct = 0) { fChargeSharing = ct; }
70  void SetDeadTime(Double_t var) { fDeadTime = var; }
71  void SetTimeResolution(Double_t var) { fSigmat = var; }
72 
73  TVector3 GetSensorDimensions(Int_t sensorID);
74 
75  protected:
77 
78  private:
80  void ProcessPhotonPoint();
81  void Smear(Double_t &time, Double_t sigt);
82  void ActivatePixel(Int_t sensorId, Int_t k, Int_t csflag);
83 
84  // basic parameters of DIRC
85  Double_t fMcpActiveArea;
86  Double_t fPixelSize;
87  Int_t fNpix; // in one column/row
88  Double_t fPixelGap;
89  Double_t fPixelStep;
90  Double_t fPixelSigma;
91  Double_t fDeadTime; //[ns]
92  Double_t fThreshold; // in % of the total probability of 1 to detect a hit
93  Double_t fTimeGranularity; // granularity of the time signal [ns]
94 
95  Bool_t fChargeSharing;
96  Bool_t fTimeOrderedDigi;
97  Int_t fDetectorID;
98  TVector3 fPosHit;
99  TVector3 fDPosHit;
100  TVector3 fPosPDHit;
101  Double_t fThetaC, fErrThetaC;
102  Double_t fTime;
103  Int_t fRefIndex;
104  Int_t fPixelID;
105  Int_t fBarId;
106 
107  Int_t fNDigis;
108  TClonesArray *fDigis;
110  std::map<Int_t, Int_t> fPixelMap; // Map of active pixels to index of PndDrcDigis
111 
112  TClonesArray *fBarPointArray; // DRC MC points in the bars
113  TClonesArray *fPDPointArray; // DRC MC points in the photon plane
114  TClonesArray *fDrcDigiArray; // DRC digis
115  TClonesArray *fMCArray; // DRC Hits in the photon detector
116 
117  PndGeoDrcPar *fPar;
118  PndGeoDrc *fGeo; // Basic geometry data of barrel DRC.
119 
120  Int_t fVerbose; // Verbosity level
121 
123  Int_t fDetType; // detector type
124 
125  Double_t nRefrac; // Refractive index of photon detector
126  Double_t fSigmat; // Time Resolution in ps
127  Int_t nevents;
128 
129  PndDrcPDPoint *fPpt;
130  PndMCTrack *fMCtrk;
131  PndDrcBarPoint *fBarPoint;
132  PndDrcDigiWriteoutBuffer *fDataBuffer;
133 
135  void SetParameters();
136 
137  ClassDef(PndDrcDigiTask, 1)
138 };
139 
140 #endif
void SetChargeSharing(Bool_t ct=0)
virtual InitStatus Init()
virtual void Exec(Option_t *option)
void SetDeadTime(Double_t var)
Class to access the naming information of the MVD.
PndGeoHandling * fGeoH
void SetTimeResolution(Double_t var)
TVector3 GetSensorDimensions(Int_t sensorID)
void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t zPoint, Double_t &xHit, Double_t &yHit, Double_t &zHit, Int_t pmtID)
virtual void Finish()
virtual ~PndDrcDigiTask()