FairRoot/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:
43 
46 
48  PndDrcDigiTask(Int_t verbose);
49 
51  virtual ~PndDrcDigiTask();
52 
54  // virtual void SetParContainers();
55  virtual InitStatus Init();
56 
58  virtual void Exec(Option_t* option);
59 
61  void Reset();
62 
64  virtual void Finish();
65 
67  void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t zPoint,
68  Double_t& xHit, Double_t& yHit, Double_t& zHit, Int_t pmtID);
69 
70 
71  void RunTimeBased(){fTimeOrderedDigi = kTRUE;}
73  void SetDeadTime(Double_t var){ fDeadTime = var; }
75 
76  TVector3 GetSensorDimensions(Int_t sensorID);
77 
78 protected:
79 
81 
82 private:
83 
85  void ProcessPhotonPoint();
86  void Smear(Double_t& time, Double_t sigt);
87  void ActivatePixel(Int_t sensorId, Int_t k, Int_t csflag);
88 
89  // basic parameters of DIRC
92  Int_t fNpix; // in one column/row
97  Double_t fThreshold; // in % of the total probability of 1 to detect a hit
98  Double_t fTimeGranularity; // granularity of the time signal [ns]
99 
102  Int_t fDetectorID;
103  TVector3 fPosHit;
104  TVector3 fDPosHit;
105  TVector3 fPosPDHit;
108  Int_t fRefIndex;
109  Int_t fPixelID;
110  Int_t fBarId;
111 
112  Int_t fNDigis;
113  TClonesArray* fDigis;
116  std::map<Int_t, Int_t> fPixelMap; // Map of active pixels to index of PndDrcDigis
117 
118  TClonesArray* fBarPointArray; // DRC MC points in the bars
119  TClonesArray* fPDPointArray; // DRC MC points in the photon plane
120  TClonesArray* fDrcDigiArray; // DRC digis
121  TClonesArray* fMCArray; // DRC Hits in the photon detector
122 
124  PndGeoDrc* fGeo; // Basic geometry data of barrel DRC.
125 
126  Int_t fVerbose; // Verbosity level
127 
129  Int_t fDetType; // detector type
130 
131  Double_t nRefrac; //Refractive index of photon detector
132  Double_t fSigmat; //Time Resolution in ps
133  Int_t nevents;
134 
139 
141  void SetParameters();
142 
143  ClassDef(PndDrcDigiTask,1)
144 };
145 
146 #endif
void SetChargeSharing(Bool_t ct=0)
Double_t fPixelGap
void ActivatePixel(Int_t sensorId, Int_t k, Int_t csflag)
PndDrcBarPoint * fBarPoint
virtual InitStatus Init()
virtual void Finish()
TClonesArray * fPDPointArray
#define verbose
Double_t fTimeGranularity
void SetDeadTime(Double_t var)
Double_t fPixelSigma
TVector3 fPosPDHit
Double_t fMcpActiveArea
Bool_t fTimeOrderedDigi
Double_t fThreshold
std::map< Int_t, Int_t > fPixelMap
TClonesArray * fMCArray
Class to access the naming information of the MVD.
TClonesArray * fDrcDigiArray
Double_t
TClonesArray * fDigis
TClonesArray * fBarPointArray
PndGeoHandling * fGeoH
PndMCTrack * fMCtrk
PndGeoDrcPar * fPar
Double_t fPixelStep
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)
PndDrcPDPoint * fPpt
Double_t fErrThetaC
virtual void Exec(Option_t *option)
void Smear(Double_t &time, Double_t sigt)
PndGeoDrc * fGeo
Double_t fPixelSize
PndDrcDigiWriteoutBuffer * fDataBuffer
void ProcessPhotonPoint()
///&lt; converter for detector names
Double_t fDeadTime
virtual ~PndDrcDigiTask()