PandaRoot
PndDrcDigiTask.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndDrcHitProducer header file -----
15 // ----- Created 30/10/09 by Dipanwita Dutta
16 // ----- -----
17 // ----- -----
18 // -------------------------------------------------------------------------
19 
20 #ifndef PNDDRCDIGITASK_H
21 #define PNDDRCDIGITASK_H
22 
23 #include <PndPersistencyTask.h>
24 #include "TClonesArray.h"
25 #include "PndMCTrack.h"
26 #include "PndDrcDigi.h"
27 #include "PndStack.h"
28 #include "FairBaseParSet.h"
29 #include "PndGeoDrcPar.h"
30 #include "TString.h"
31 #include <string>
32 #include "TH1.h"
33 #include "TH2.h"
34 #include "PndGeoDrc.h"
35 #include "PndGeoHandling.h"
36 #include "FairEventHeader.h"
37 
38 #include "PndDrcPDPoint.h"
39 #include "PndDrcBarPoint.h"
40 #include "PndMCTrack.h"
42 
43 #ifndef ROOT_TParticlePDG
44 #include "TParticlePDG.h"
45 #endif
46 #ifndef ROOT_TDatabasePDG
47 #include "TDatabasePDG.h"
48 #endif
49 
50 #include <map>
51 
53 
54  public:
57 
59  PndDrcDigiTask(Int_t verbose);
60 
62  virtual ~PndDrcDigiTask();
63 
65  // virtual void SetParContainers();
66  virtual InitStatus Init();
67 
69  virtual void Exec(Option_t *option);
70 
72  void Reset();
73 
75  virtual void Finish();
76 
78  void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t zPoint, Double_t &xHit, Double_t &yHit, Double_t &zHit, Int_t pmtID);
79 
80  void RunTimeBased() { fTimeOrderedDigi = kTRUE; }
81  void SetChargeSharing(Bool_t ct = 0) { fChargeSharing = ct; }
82  void SetDeadTime(Double_t var) { fDeadTime = var; }
83  void SetTimeResolution(Double_t var) { fSigmat = var; }
84 
85  TVector3 GetSensorDimensions(Int_t sensorID);
86 
87  protected:
89 
90  private:
92  void ProcessPhotonPoint();
93  void Smear(Double_t &time, Double_t sigt);
94  void ActivatePixel(Int_t sensorId, Int_t k, Int_t csflag);
95 
96  // basic parameters of DIRC
97  Double_t fMcpActiveArea;
98  Double_t fPixelSize;
99  Int_t fNpix; // in one column/row
100  Double_t fPixelGap;
101  Double_t fPixelStep;
102  Double_t fPixelSigma;
103  Double_t fDeadTime; //[ns]
104  Double_t fThreshold; // in % of the total probability of 1 to detect a hit
105  Double_t fTimeGranularity; // granularity of the time signal [ns]
106 
107  Bool_t fChargeSharing;
108  Bool_t fTimeOrderedDigi;
109  Int_t fDetectorID;
110  TVector3 fPosHit;
111  TVector3 fDPosHit;
112  TVector3 fPosPDHit;
113  Double_t fThetaC, fErrThetaC;
114  Double_t fTime;
115  Int_t fRefIndex;
116  Int_t fPixelID;
117  Int_t fBarId;
118 
119  Int_t fNDigis;
120  TClonesArray *fDigis;
122  std::map<Int_t, Int_t> fPixelMap; // Map of active pixels to index of PndDrcDigis
123 
124  TClonesArray *fBarPointArray; // DRC MC points in the bars
125  TClonesArray *fPDPointArray; // DRC MC points in the photon plane
126  TClonesArray *fDrcDigiArray; // DRC digis
127  TClonesArray *fMCArray; // DRC Hits in the photon detector
128 
129  PndGeoDrcPar *fPar;
130  PndGeoDrc *fGeo; // Basic geometry data of barrel DRC.
131 
132  Int_t fVerbose; // Verbosity level
133 
135  Int_t fDetType; // detector type
136 
137  Double_t nRefrac; // Refractive index of photon detector
138  Double_t fSigmat; // Time Resolution in ps
139  Int_t nevents;
140 
141  PndDrcPDPoint *fPpt;
142  PndMCTrack *fMCtrk;
143  PndDrcBarPoint *fBarPoint;
144  PndDrcDigiWriteoutBuffer *fDataBuffer;
145 
147  void SetParameters();
148 
149  ClassDef(PndDrcDigiTask, 1)
150 };
151 
152 #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()