CbmRoot
Loading...
Searching...
No Matches
CbmMvdSensorDigiToHitTask.h
Go to the documentation of this file.
1/* Copyright (C) 2019 Frankfurt Institute for Advanced Studies, Goethe-Universität Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andreas Redelbach [committer] */
4
5#ifndef CBMMVDSENSORDIGITOHITTASK_H
6#define CBMMVDSENSORDIGITOHITTASK_H 1
7
8#include "CbmMvdCluster.h"
9#include "CbmMvdDigi.h"
10#include "CbmMvdHit.h"
11#include "CbmMvdSensor.h"
12#include "CbmMvdSensorTask.h"
13#include "TArrayS.h"
14#include "TCanvas.h"
15#include "TH1.h"
16#include "TH1F.h"
17#include "TH2.h"
18#include "TMath.h"
19#include "TObjArray.h"
20#include "TRandom3.h"
21#include "TRefArray.h"
22#include "TStopwatch.h"
23#include "TString.h"
24
25#include <list>
26#include <map>
27#include <numeric>
28#include <utility>
29#include <vector>
30
31
32class TClonesArray;
33class TRandom3;
34
36
37 public:
40
41
46 CbmMvdSensorDigiToHitTask(Int_t mode, Int_t iVerbose);
47
48
51
53 void ExecChain();
54 void Exec();
55
57 void InitTask(CbmMvdSensor* mySensor);
58
59 virtual void SetInputDigi(CbmMvdDigi* digi)
60 {
61 new ((*fInputBuffer)[fInputBuffer->GetEntriesFast()]) CbmMvdDigi(*((CbmMvdDigi*) digi));
62 inputSet = kTRUE;
63 }
64
65
67 void SetSigmaNoise(Double_t sigmaNoise, Bool_t addNoise)
68 {
69 fSigmaNoise = sigmaNoise;
70 fAddNoise = addNoise;
71 }
72 void SetSeedThreshold(Double_t seedCharge) { fSeedThreshold = seedCharge; }
73 void SetNeighbourThreshold(Double_t neighCharge) { fNeighThreshold = neighCharge; }
74
75
76 void SetAdcDynamic(Int_t adcDynamic) { fAdcDynamic = adcDynamic; };
77 void SetAdcOffset(Int_t adcOffset) { fAdcOffset = adcOffset; };
78 void SetAdcBits(Int_t adcBits) { fAdcBits = adcBits; };
79 float GetAdcCharge(Float_t charge);
80
83 void SetHitPosErrX(Double_t errorX) { fHitPosErrX = errorX; }
84 void SetHitPosErrY(Double_t errorY) { fHitPosErrY = errorY; }
85 void SetHitPosErrZ(Double_t errorZ) { fHitPosErrZ = errorZ; }
86
88
89 //protected:
90 protected:
91 // ---------- Protected data members ------------------------------------
94 Int_t fAdcBits;
95 TCanvas* c1;
96
97
98 std::map<std::pair<Int_t, Int_t>, Int_t> fDigiMap;
99 std::map<std::pair<Int_t, Int_t>, Int_t>::iterator fDigiMapIt;
100
101 private:
102 Int_t fVerbose;
103 Double_t fSigmaNoise;
106
107 Bool_t inputSet;
108
109 Double_t fLayerRadius;
111 Double_t fLayerPosZ;
112 Double_t fHitPosX;
113 Double_t fHitPosY;
114 Double_t fHitPosZ;
115 Double_t fHitPosErrX;
116 Double_t fHitPosErrY;
117 Double_t fHitPosErrZ;
118
119
120 static const Short_t fChargeArraySize = 5; //must be an odd number >3, recommended numbers= 5 or 7
121
122 Bool_t fAddNoise;
123
124 // ----- Private methods ---------------------------------------------
125
126
128 void Reset() { ; };
129
131 void Finish();
132
134 Bool_t ReInit();
135
136
140 Int_t GetMvdGeometry() { return 0; };
141
142
143 private:
146
148};
149
150
151#endif
ClassDef(CbmMvdSensorDigiToHitTask, 1)
void InitTask(CbmMvdSensor *mySensor)
void SetNeighbourThreshold(Double_t neighCharge)
void SetSigmaNoise(Double_t sigmaNoise, Bool_t addNoise)
void SetSeedThreshold(Double_t seedCharge)
CbmMvdSensorDigiToHitTask operator=(const CbmMvdSensorDigiToHitTask &)
std::map< std::pair< Int_t, Int_t >, Int_t > fDigiMap
void UpdateDebugHistos(CbmMvdCluster *cluster)
virtual void SetInputDigi(CbmMvdDigi *digi)
CbmMvdSensorDigiToHitTask(const CbmMvdSensorDigiToHitTask &)
void SetAdcDynamic(Int_t adcDynamic)
std::map< std::pair< Int_t, Int_t >, Int_t >::iterator fDigiMapIt
TClonesArray * fInputBuffer