CbmRoot
Loading...
Searching...
No Matches
CbmMvdDigitizer.h
Go to the documentation of this file.
1/* Copyright (C) 2014-2020 Institut fuer Kernphysik, Goethe-Universitaet Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Philipp Sitzmann [committer], Florian Uhlig */
4
5// ----------------------------------------------------------------------------
6// ----- CbmMvdDigitizer header file -----
7// ----- Created by C. Dritsa (2009) -----
8// ----- Maintained by M.Deveaux (m.deveaux(att)gsi.de) -----
9// ----- Update by P.Sitzmann (p.sitzmann(att)gsi.de -----
10// ----------------------------------------------------------------------------
11
12#ifndef CBMMVDDIGITIZER_H
13#define CBMMVDDIGITIZER_H 1
14
15#include "CbmDefs.h" // for ECbmModuleId
16#include "CbmDigitize.h" // for CbmDigitize
17#include "CbmMvdDigi.h" // for CbmMvdDigi
18
19#include <FairTask.h> // for InitStatus
20
21#include <Rtypes.h> // for ClassDef
22#include <RtypesCore.h> // for Int_t, Float_t, Bool_t, kTRUE, Double_t
23#include <TStopwatch.h> // for TStopwatch
24#include <TString.h> // for TString
25
26#include <string> // for string
27#include <utility> // for pair
28#include <vector> // for vector
29
30class CbmMatch;
31class CbmMvdDetector;
33class TBuffer;
34class TClass;
35class TClonesArray;
36class TMemberInspector;
37
38class CbmMvdDigitizer : public CbmDigitize<CbmMvdDigi> {
39
40 public:
43
44
49 CbmMvdDigitizer(const char* name, Int_t mode = 0, Int_t iVerbose = 1);
50
51
54
55 void Exec(Option_t* opt);
56
61
65 Double_t GetLatency() const { return fLatency; }
66
67 void SetLatency(Float_t latency) { fLatency = latency; }
68
69 void SetPileUp(Int_t pileUp) { fNPileup = pileUp; }
70 void SetDeltaEvents(Int_t deltaEvents) { fNDeltaElect = deltaEvents; }
71 void SetBgFileName(TString fileName) { fBgFileName = fileName; }
72 void SetDeltaName(TString fileName) { fDeltaFileName = fileName; }
73 void SetBgBufferSize(Int_t nBuffer) { fBgBufferSize = nBuffer; }
74 void SetDeltaBufferSize(Int_t nBuffer) { fDeltaBufferSize = nBuffer; }
75 void SetMisalignment(Float_t misalignment[3])
76 {
77 for (Int_t i = 0; i < 3; i++)
78 epsilon[i] = misalignment[i];
79 } // set the misalignment in cm
80
81 void BuildEvent();
83 {
84 fShowDebugHistos = kTRUE;
85 } // Requests Task to create the histograms. Call before calling Init()
86 void DisplayDebugHistos(); // Function to display histograms at Finish, must call ShowDebugHistograms before.
87 void
88 SafeDebugHistosToFile(TString histoFile); // Function safes histograms to file, must call ShowDebugHistograms before.
89 void CollectHistograms(); // Collects histograms from the sensors and safes them in TObjArray* fHistoArray.
90 // Histos are NOT copied, copy manually if wanted.
91 TObjArray* GetHistograms()
92 {
93 return fHistoArray;
94 }; // Access to Histos. They are NOT copied, clone manually if wanted.
95
96 void SetProduceNoise() { fNoiseSensors = kTRUE; };
97 Int_t DetectPlugin(Int_t pluginID);
98
99
101 virtual void ResetArrays();
102
103
105 virtual InitStatus Init();
106
107
109 virtual InitStatus ReInit();
110
111
113 virtual void Finish();
114
115
117 void Register();
118
119 void GetMvdGeometry();
120
121
123 void Reset();
124
125
127 void PrintParameters() const;
128 std::string ParametersToString() const;
129
130 private:
132 Int_t fMode;
133
136
138
139 TClonesArray* fInputPoints;
140 TClonesArray* fMcPileUp;
141
142 TClonesArray* fTmpMatch;
143 TClonesArray* fTmpDigi;
144
145 TObjArray* fHistoArray;
146
147 std::vector<CbmMvdDigi*> fDigiVect;
148 std::vector<CbmMatch*> fMatchVect;
149
150 std::pair<Float_t, Int_t> fPerformanceDigi;
151
153
154 Double_t fFakeRate; // Fake hit rate
155 Int_t fNPileup; // Number of pile-up background events
156 Int_t fNDeltaElect; // Number of delta electron events
159 Float_t epsilon[3];
160
161 TString fInputBranchName; // Name of input branch (MvdPoint)
162 TString fBgFileName; // Name of background (pileup) file
163 TString fDeltaFileName; // Name of the file containing delta electrons
165
166
167 TStopwatch fTimer;
168
169 Float_t fLatency{150000.}; // maximum time of digi disordering
170
174
175
176 private:
179
181};
182
183
184#endif
ECbmModuleId
Definition CbmDefs.h:39
@ kMvd
Micro-Vertex Detector.
Base class template for CBM digitisation tasks.
Definition CbmDigitize.h:44
void SetBgFileName(TString fileName)
std::string ParametersToString() const
CbmMvdPileupManager * fDeltaManager
void SetDeltaName(TString fileName)
CbmMvdDigitizer operator=(const CbmMvdDigitizer &)
TClonesArray * fMcPileUp
void SetLatency(Float_t latency)
void SetPileUp(Int_t pileUp)
CbmMvdPileupManager * fPileupManager
void SetMisalignment(Float_t misalignment[3])
TObjArray * fHistoArray
Temporary TClonesArray to absorb from MvdDetector.
CbmMvdDigitizer(const CbmMvdDigitizer &)
TClonesArray * fInputPoints
virtual InitStatus Init()
void Exec(Option_t *opt)
TObjArray * GetHistograms()
ClassDef(CbmMvdDigitizer, 1)
void SetDeltaEvents(Int_t deltaEvents)
std::vector< CbmMatch * > fMatchVect
Temporary storage for CbmDaq.
void SetBgBufferSize(Int_t nBuffer)
void SetDeltaBufferSize(Int_t nBuffer)
TClonesArray * fTmpDigi
Temporary TClonesArray to absorb from MvdDetector.
Double_t GetLatency() const
Detector specific latency.
virtual void ResetArrays()
Clear data arrays.
std::vector< CbmMvdDigi * > fDigiVect
virtual InitStatus ReInit()
ECbmModuleId GetSystemId() const
Detector system ID.
virtual void Finish()
TClonesArray * fTmpMatch
Int_t DetectPlugin(Int_t pluginID)
std::pair< Float_t, Int_t > fPerformanceDigi
Temporary storage for CbmDaq.
CbmMvdDetector * fDetector
void SafeDebugHistosToFile(TString histoFile)
void PrintParameters() const
TStopwatch fTimer
ROOT timer.