CbmRoot
CbmMvdSensorDigiToHitTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmMvdSensorClusterfinderTask header file -----
3 // ----- 27.11.18 Edited by K. Hunold -----
4 // -------------------------------------------------------------------------
5 
6 
7 #ifndef CBMMVDSENSORDIGITOHITTASK_H
8 #define CBMMVDSENSORDIGITOHITTASK_H 1
9 
10 #include "CbmMvdCluster.h"
11 #include "CbmMvdDigi.h"
12 #include "CbmMvdHit.h"
13 
14 #include "TArrayS.h"
15 #include "TCanvas.h"
16 #include "TObjArray.h"
17 #include "TRefArray.h"
18 
19 
20 #include "TH1.h"
21 #include "TH1F.h"
22 #include "TH2.h"
23 #include "TMath.h"
24 #include "TRandom3.h"
25 #include "TStopwatch.h"
26 #include "TString.h"
27 #include <list>
28 #include <map>
29 #include <numeric>
30 #include <utility>
31 #include <vector>
32 //#include <Vc/Vc>
33 
34 #include "CbmMvdSensor.h"
35 #include "CbmMvdSensorTask.h"
36 
37 class TClonesArray;
38 class TRandom3;
39 
41 
42 public:
45 
46 
51  CbmMvdSensorDigiToHitTask(Int_t mode, Int_t iVerbose);
52 
53 
56 
58  void ExecChain();
59  void Exec();
60 
62  void InitTask(CbmMvdSensor* mySensor);
63 
64  virtual void SetInputDigi(CbmMvdDigi* digi) {
65  new ((*fInputBuffer)[fInputBuffer->GetEntriesFast()])
66  CbmMvdDigi(*((CbmMvdDigi*) digi));
67  inputSet = kTRUE;
68  }
69 
70 
72  void SetSigmaNoise(Double_t sigmaNoise, Bool_t addNoise) {
73  fSigmaNoise = sigmaNoise;
74  fAddNoise = addNoise;
75  }
76  void SetSeedThreshold(Double_t seedCharge) { fSeedThreshold = seedCharge; }
77  void SetNeighbourThreshold(Double_t neighCharge) {
78  fNeighThreshold = neighCharge;
79  }
80 
81 
82  void SetAdcDynamic(Int_t adcDynamic) { fAdcDynamic = adcDynamic; };
83  void SetAdcOffset(Int_t adcOffset) { fAdcOffset = adcOffset; };
84  void SetAdcBits(Int_t adcBits) { fAdcBits = adcBits; };
85  float GetAdcCharge(Float_t charge);
86 
89  void SetHitPosErrX(Double_t errorX) { fHitPosErrX = errorX; }
90  void SetHitPosErrY(Double_t errorY) { fHitPosErrY = errorY; }
91  void SetHitPosErrZ(Double_t errorZ) { fHitPosErrZ = errorZ; }
92 
94 
95  //protected:
96 protected:
97  // ---------- Protected data members ------------------------------------
98  Int_t fAdcDynamic;
99  Int_t fAdcOffset;
100  Int_t fAdcBits;
101  TCanvas* c1;
102 
103 
104  std::map<std::pair<Int_t, Int_t>, Int_t> fDigiMap;
105  std::map<std::pair<Int_t, Int_t>, Int_t>::iterator fDigiMapIt;
106 
107 private:
108  Int_t fVerbose;
109  Double_t fSigmaNoise;
110  Double_t fSeedThreshold;
111  Double_t fNeighThreshold;
112 
113  Bool_t inputSet;
114 
115  Double_t fLayerRadius;
117  Double_t fLayerPosZ;
118  Double_t fHitPosX;
119  Double_t fHitPosY;
120  Double_t fHitPosZ;
121  Double_t fHitPosErrX;
122  Double_t fHitPosErrY;
123  Double_t fHitPosErrZ;
124 
125 
126  static const Short_t fChargeArraySize =
127  5; //must be an odd number >3, recommended numbers= 5 or 7
128 
129  Bool_t fAddNoise;
130 
131  // ----- Private methods ---------------------------------------------
132 
133 
135  void Reset() { ; };
136 
138  void Finish();
139 
141  Bool_t ReInit();
142 
143 
147  Int_t GetMvdGeometry() { return 0; };
148 
149 
150 private:
153 
155 };
156 
157 
158 #endif
CbmMvdSensorDigiToHitTask::fVerbose
Int_t fVerbose
Definition: CbmMvdSensorDigiToHitTask.h:108
CbmMvdSensorDigiToHitTask::fAdcDynamic
Int_t fAdcDynamic
Definition: CbmMvdSensorDigiToHitTask.h:98
CbmMvdSensorDigiToHitTask::fAddNoise
Bool_t fAddNoise
Definition: CbmMvdSensorDigiToHitTask.h:129
CbmMvdSensorDigiToHitTask::fSigmaNoise
Double_t fSigmaNoise
Definition: CbmMvdSensorDigiToHitTask.h:109
CbmMvdSensorDigiToHitTask::~CbmMvdSensorDigiToHitTask
virtual ~CbmMvdSensorDigiToHitTask()
Definition: CbmMvdSensorDigiToHitTask.cxx:82
CbmMvdSensorDigiToHitTask::SetSeedThreshold
void SetSeedThreshold(Double_t seedCharge)
Definition: CbmMvdSensorDigiToHitTask.h:76
CbmMvdSensorDigiToHitTask::fLayerRadius
Double_t fLayerRadius
Definition: CbmMvdSensorDigiToHitTask.h:115
CbmMvdSensorDigiToHitTask::fHitPosX
Double_t fHitPosX
Definition: CbmMvdSensorDigiToHitTask.h:118
CbmMvdSensorDigiToHitTask::fHitPosErrX
Double_t fHitPosErrX
Definition: CbmMvdSensorDigiToHitTask.h:121
CbmMvdSensorDigiToHitTask::CbmMvdSensorDigiToHitTask
CbmMvdSensorDigiToHitTask()
Definition: CbmMvdSensorDigiToHitTask.cxx:77
CbmMvdDigi.h
CbmMvdSensorDigiToHitTask::UpdateDebugHistos
void UpdateDebugHistos(CbmMvdCluster *cluster)
CbmMvdSensorDigiToHitTask::Finish
void Finish()
Definition: CbmMvdSensorDigiToHitTask.cxx:473
CbmMvdSensor.h
CbmMvdSensorDigiToHitTask::operator=
CbmMvdSensorDigiToHitTask operator=(const CbmMvdSensorDigiToHitTask &)
CbmMvdSensorDigiToHitTask::CbmMvdSensorDigiToHitTask
CbmMvdSensorDigiToHitTask(const CbmMvdSensorDigiToHitTask &)
CbmMvdSensorDigiToHitTask::fAdcOffset
Int_t fAdcOffset
Definition: CbmMvdSensorDigiToHitTask.h:99
CbmMvdCluster
Definition: CbmMvdCluster.h:27
CbmMvdSensorDigiToHitTask::fSeedThreshold
Double_t fSeedThreshold
Definition: CbmMvdSensorDigiToHitTask.h:110
CbmMvdSensorDigiToHitTask::fLayerRadiusInner
Double_t fLayerRadiusInner
Definition: CbmMvdSensorDigiToHitTask.h:116
CbmMvdSensorDigiToHitTask::inputSet
Bool_t inputSet
Definition: CbmMvdSensorDigiToHitTask.h:113
CbmMvdSensorDigiToHitTask::SetHitPosErrY
void SetHitPosErrY(Double_t errorY)
Definition: CbmMvdSensorDigiToHitTask.h:90
CbmMvdSensorDigiToHitTask::ExecChain
void ExecChain()
Definition: CbmMvdSensorDigiToHitTask.cxx:141
CbmMvdSensorDigiToHitTask::SetNeighbourThreshold
void SetNeighbourThreshold(Double_t neighCharge)
Definition: CbmMvdSensorDigiToHitTask.h:77
CbmMvdSensorDigiToHitTask::SetAdcDynamic
void SetAdcDynamic(Int_t adcDynamic)
Definition: CbmMvdSensorDigiToHitTask.h:82
CbmMvdSensorTask
Definition: CbmMvdSensorTask.h:26
CbmMvdSensorDigiToHitTask::GetMvdGeometry
Int_t GetMvdGeometry()
Definition: CbmMvdSensorDigiToHitTask.h:147
CbmMvdSensorDigiToHitTask::GetAdcCharge
float GetAdcCharge(Float_t charge)
Definition: CbmMvdSensorDigiToHitTask.cxx:457
CbmMvdSensor
Definition: CbmMvdSensor.h:40
CbmMvdSensorDigiToHitTask::SetSigmaNoise
void SetSigmaNoise(Double_t sigmaNoise, Bool_t addNoise)
Definition: CbmMvdSensorDigiToHitTask.h:72
CbmMvdSensorDigiToHitTask::SetAdcBits
void SetAdcBits(Int_t adcBits)
Definition: CbmMvdSensorDigiToHitTask.h:84
CbmMvdSensorDigiToHitTask::InitTask
void InitTask(CbmMvdSensor *mySensor)
Definition: CbmMvdSensorDigiToHitTask.cxx:115
CbmMvdSensorDigiToHitTask::fDigiMapIt
std::map< std::pair< Int_t, Int_t >, Int_t >::iterator fDigiMapIt
Definition: CbmMvdSensorDigiToHitTask.h:105
CbmMvdSensorDigiToHitTask::fNeighThreshold
Double_t fNeighThreshold
Definition: CbmMvdSensorDigiToHitTask.h:111
CbmMvdSensorDigiToHitTask::fHitPosErrY
Double_t fHitPosErrY
Definition: CbmMvdSensorDigiToHitTask.h:122
CbmMvdSensorDigiToHitTask::fHitPosZ
Double_t fHitPosZ
Definition: CbmMvdSensorDigiToHitTask.h:120
CbmMvdSensorDigiToHitTask::SetAdcOffset
void SetAdcOffset(Int_t adcOffset)
Definition: CbmMvdSensorDigiToHitTask.h:83
CbmMvdSensorDigiToHitTask
Definition: CbmMvdSensorDigiToHitTask.h:40
CbmMvdSensorDigiToHitTask::fAdcBits
Int_t fAdcBits
Definition: CbmMvdSensorDigiToHitTask.h:100
CbmMvdSensorDigiToHitTask::fHitPosY
Double_t fHitPosY
Definition: CbmMvdSensorDigiToHitTask.h:119
CbmMvdSensorDigiToHitTask::fLayerPosZ
Double_t fLayerPosZ
Definition: CbmMvdSensorDigiToHitTask.h:117
CbmMvdSensorDigiToHitTask::ClassDef
ClassDef(CbmMvdSensorDigiToHitTask, 1)
CbmMvdSensorTask::fInputBuffer
TClonesArray * fInputBuffer
Definition: CbmMvdSensorTask.h:53
CbmMvdSensorDigiToHitTask::fHitPosErrZ
Double_t fHitPosErrZ
Definition: CbmMvdSensorDigiToHitTask.h:123
CbmMvdSensorDigiToHitTask::Reset
void Reset()
Definition: CbmMvdSensorDigiToHitTask.h:135
CbmMvdHit.h
CbmMvdSensorDigiToHitTask::SetHitPosErrZ
void SetHitPosErrZ(Double_t errorZ)
Definition: CbmMvdSensorDigiToHitTask.h:91
CbmMvdDigi
Definition: CbmMvdDigi.h:21
CbmMvdSensorDigiToHitTask::Exec
void Exec()
Definition: CbmMvdSensorDigiToHitTask.cxx:145
CbmMvdSensorDigiToHitTask::c1
TCanvas * c1
Definition: CbmMvdSensorDigiToHitTask.h:101
CbmMvdSensorDigiToHitTask::SetHitPosErrX
void SetHitPosErrX(Double_t errorX)
Definition: CbmMvdSensorDigiToHitTask.h:89
CbmMvdSensorTask.h
CbmMvdSensorDigiToHitTask::fChargeArraySize
static const Short_t fChargeArraySize
Definition: CbmMvdSensorDigiToHitTask.h:126
CbmMvdSensorDigiToHitTask::ReInit
Bool_t ReInit()
Definition: CbmMvdSensorDigiToHitTask.cxx:133
CbmMvdSensorDigiToHitTask::SetInputDigi
virtual void SetInputDigi(CbmMvdDigi *digi)
Definition: CbmMvdSensorDigiToHitTask.h:64
CbmMvdSensorDigiToHitTask::fDigiMap
std::map< std::pair< Int_t, Int_t >, Int_t > fDigiMap
Definition: CbmMvdSensorDigiToHitTask.h:104
CbmMvdCluster.h