Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcShowerPlane.h
Go to the documentation of this file.
1#ifndef ROOT_THcShowerPlane
2#define ROOT_THcShowerPlane
3
5//
6// THcShowerPlane
7//
8// A Hall C Shower plane
9//
10// May want to later inherit from a THcPlane class if there are similarities
11// in what a plane is shared with other detector types (shower, etc.)
12//
14
15#include "THaSubDetector.h"
16#include "THcCherenkov.h"
17#include "TClonesArray.h"
18
19#include <iostream>
20#include <vector>
21#include <fstream>
22
23using namespace std;
24
25class THaEvData;
26class THaSignalHit;
27class THcHodoscope;
28
30
31public:
32 THcShowerPlane( const char* name, const char* description,
33 Int_t planenum, THaDetectorBase* parent = NULL);
34 virtual ~THcShowerPlane();
35
36 virtual void Clear( Option_t* opt="" );
37 virtual Int_t Decode( const THaEvData& );
38 virtual EStatus Init( const TDatime& run_time );
39
40 virtual Int_t CoarseProcess( TClonesArray& tracks );
41 virtual Int_t FineProcess( TClonesArray& tracks );
42 Bool_t IsTracking() { return kFALSE; }
43 virtual Bool_t IsPid() { return kFALSE; }
44
45 virtual Int_t ProcessHits(TClonesArray* rawhits, Int_t nexthit);
46 virtual Int_t CoarseProcessHits();
47 virtual Int_t AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit);
48 virtual void CalculatePedestals( );
49
50 // Double_t fSpacing; not used
51
52 // TClonesArray* fParentHitList; not used
53
55 return fOrigin;
56 }
57
59 return fEplane;
60 };
61
63 return fEplane_pos;
64 };
65
67 return fEplane_neg;
68 };
69
71 return fEmean[i];
72 };
73
75 return fEpos[i];
76 };
77
79 return fEneg[i];
80 };
81
83 return fGoodPosAdcPulseInt[i];
84 };
85
87 return fGoodNegAdcPulseInt[i];
88 };
89
91 return fGoodPosAdcPulseIntRaw[i];
92 };
93
95 return fGoodNegAdcPulseIntRaw[i];
96 };
97
99 return fPosThresh[i];
100 };
101
103 return fNegThresh[i];
104 };
105
107 return fPosPed[i];
108 };
109
111 return fNegPed[i];
112 };
113
115
116protected:
117
120
121 // Flash ADC parameters
122 Int_t fUsingFADC; // != 0 if using FADC in sample mode
123 // 1 == Use the pulse int - pulse ped
124 // 2 == Use the sample integral - known ped
125 // 3 == Use the sample integral - sample ped
126 static const Int_t kADCStandard=0;
128 static const Int_t kADCSampleIntegral=2;
129 static const Int_t kADCSampIntDynPed=3;
130
131 Int_t fDebugAdc; // fADC debug flag
132 Int_t fPedSampLow; // Sample range for
133 Int_t fPedSampHigh; // dynamic pedestal
134 Int_t fDataSampLow; // Sample range for
135 Int_t fDataSampHigh; // sample integration
139
146
147 //counting variables
151
155
156 //individual pmt data objects
157 vector<Int_t> fNumGoodPosAdcHits;
158 vector<Int_t> fNumGoodNegAdcHits;
159
160 vector<Double_t> fGoodPosAdcPed;
161 vector<Double_t> fGoodPosAdcPulseInt;
162 vector<Double_t> fGoodPosAdcPulseAmp;
163 vector<Double_t> fGoodPosAdcPulseTime;
164 vector<Double_t> fGoodPosAdcTdcDiffTime;
165
166 vector<Double_t> fGoodNegAdcPed;
167 vector<Double_t> fGoodNegAdcPulseInt;
168 vector<Double_t> fGoodNegAdcPulseAmp;
169 vector<Double_t> fGoodNegAdcPulseTime;
170 vector<Double_t> fGoodNegAdcTdcDiffTime;
171
172 vector<Double_t> fGoodPosAdcPulseIntRaw;
173 vector<Double_t> fGoodNegAdcPulseIntRaw;
174
175 vector<Double_t> fNegAdcSampWaveform;
176 vector<Double_t> fPosAdcSampWaveform;
177
178 vector<Double_t> fGoodPosAdcMult;
179 vector<Double_t> fGoodNegAdcMult;
180
181
182 vector<Double_t> fEpos; // [fNelem] energy depositions seen by positive PMTs
183 vector<Double_t> fEneg; // [fNelem] energy depositions seen by negative PMTs
184 vector<Double_t> fEmean; // [fNelem] mean energy depositions (pos + neg)
185
186
187 Double_t fEplane_pos; // Energy deposition in the plane from positive PMTs
188 Double_t fEplane_neg; // Energy deposition in the plane from negative PMTs
190
191 // These lists are not used actively for now.
192 TClonesArray* fPosADCHits; // List of positive ADC hits
193 TClonesArray* fNegADCHits; // List of negative ADC hits
194
195 Int_t fLayerNum; // Layer # 1-4
196
197 Int_t fNPedestalEvents; /* Pedestal event counter */
198 Int_t fMinPeds; /* Only analyze/update if num events > */
199 Int_t *fPosPedSum; /* Accumulators for pedestals */
201 Int_t *fPosPedLimit; // Analyze pedestal if ADC signal < PedLimit
202 Int_t *fPosPedCount; // [fNelem] counter of pedestal analysis
205 Int_t *fNegPedLimit; // Analyze pedestal if ADC signal < PedLimit
206 Int_t *fNegPedCount; // [fNelem] counter of pedestal analysis
207
208 Float_t *fPosPed; // [fNelem] pedestal positions
209 Float_t *fPosSig; // [fNelem] pedestal rms-s
210 Float_t *fPosThresh; // [fNelem] ADC thresholds
214
231
238
243
250
255
256 virtual Int_t ReadDatabase( const TDatime& date );
257 virtual Int_t DefineVariables( EMode mode = kDefine );
258 virtual void InitializePedestals( );
259 virtual void FillADC_DynamicPedestal( );
260 virtual void FillADC_SampleIntegral( );
261 virtual void FillADC_SampIntDynPed( );
262 virtual void FillADC_Standard( );
263
264 //Quatitites for efficiency calculations.
265
269 vector<Int_t> fStatNumTrk;
270 vector<Int_t> fStatNumHit;
273
274 THcHodoscope* fglHod; // Hodoscope to get start time
275
276 ClassDef(THcShowerPlane,0); // Calorimeter bars in a plane
277};
278#endif
int Int_t
bool Bool_t
const Bool_t kFALSE
float Float_t
double Double_t
const char Option_t
TVector3 fOrigin
Class for gas Cherenkov detectors.
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends.
One plane of shower blocks with side readout.
vector< Int_t > fStatNumHit
vector< Double_t > fNegAdcSampWaveform
Double_t GetAneg(Int_t i)
TClonesArray * fNegADCHits
vector< Double_t > fEpos
TClonesArray * frNegAdcSampPedRaw
virtual void FillADC_SampleIntegral()
TClonesArray * frPosAdcErrorFlag
virtual void FillADC_DynamicPedestal()
vector< Double_t > fGoodNegAdcPed
vector< Double_t > fGoodPosAdcPulseAmp
Double_t GetEplane_neg()
TClonesArray * frPosAdcThreshold
TClonesArray * frPosAdcSampPulseInt
Double_t GetEplane()
TClonesArray * frPosAdcSampPulseAmp
Bool_t IsTracking()
Double_t GetNegPed(Int_t i)
TClonesArray * frPosAdcSampPulseIntRaw
virtual Bool_t IsPid()
virtual Int_t CoarseProcessHits()
TClonesArray * frNegAdcPulseAmpRaw
vector< Double_t > fGoodPosAdcTdcDiffTime
TClonesArray * frPosAdcPulseAmpRaw
TClonesArray * frPosAdcSampPedRaw
Float_t * fPosThresh
vector< Double_t > fEneg
Double_t GetAposP(Int_t i)
virtual ~THcShowerPlane()
virtual void FillADC_SampIntDynPed()
TClonesArray * frNegAdcThreshold
static const Int_t kADCSampIntDynPed
vector< Int_t > fNumGoodPosAdcHits
THcShowerPlane(const char *name, const char *description, Int_t planenum, THaDetectorBase *parent=NULL)
TClonesArray * frNegAdcPulseTime
virtual void FillADC_Standard()
virtual Int_t CoarseProcess(TClonesArray &tracks)
TClonesArray * frNegAdcSampPulseInt
virtual void Clear(Option_t *opt="")
THcCherenkov * fCherenkov
vector< Double_t > fGoodNegAdcMult
Double_t GetEplane_pos()
virtual Int_t ReadDatabase(const TDatime &date)
vector< Double_t > fEmean
TClonesArray * frPosAdcSampPulseAmpRaw
Int_t fTotNumGoodPosAdcHits
static const Int_t kADCSampleIntegral
virtual void InitializePedestals()
vector< Double_t > fPosAdcSampWaveform
TClonesArray * frNegAdcPulseIntRaw
vector< Double_t > fGoodPosAdcPulseInt
vector< Double_t > fGoodNegAdcPulseInt
TClonesArray * frPosAdcPulseInt
TClonesArray * frPosAdcPulseTimeRaw
Int_t fTotNumGoodNegAdcHits
vector< Double_t > fGoodNegAdcPulseIntRaw
Double_t GetEpos(Int_t i)
Double_t GetEneg(Int_t i)
TClonesArray * frPosAdcSampPulseTimeRaw
virtual Int_t FineProcess(TClonesArray &tracks)
TClonesArray * frNegAdcPulseTimeRaw
TClonesArray * frNegAdcSampPulseTime
Double_t GetPosThr(Int_t i)
TClonesArray * frNegAdcPulseAmp
virtual Int_t ProcessHits(TClonesArray *rawhits, Int_t nexthit)
TClonesArray * frNegAdcPed
Double_t GetEmean(Int_t i)
TClonesArray * frPosAdcSampPed
Double_t GetAnegP(Int_t i)
vector< Double_t > fGoodPosAdcPulseIntRaw
vector< Int_t > fStatNumTrk
TClonesArray * frNegAdcErrorFlag
THaDetectorBase * fParent
virtual Int_t AccumulatePedestals(TClonesArray *rawhits, Int_t nexthit)
TClonesArray * frNegAdcSampPulseTimeRaw
TClonesArray * frPosAdcSampPulseTime
TClonesArray * frPosAdcPulseTime
Double_t fAdcTdcOffset
Double_t GetNegThr(Int_t i)
TClonesArray * frNegAdcPedRaw
virtual void CalculatePedestals()
Double_t GetPosPed(Int_t i)
vector< Double_t > fGoodPosAdcPed
Double_t GetApos(Int_t i)
vector< Double_t > fGoodPosAdcMult
static const Int_t kADCStandard
TClonesArray * frNegAdcPulseInt
virtual Int_t Decode(const THaEvData &)
TClonesArray * frNegAdcSampPulseAmp
Float_t * fNegThresh
TClonesArray * frNegAdcSampPulseAmpRaw
TClonesArray * fPosADCHits
static const Int_t kADCDynamicPedestal
TClonesArray * frPosAdcPed
Double_t fAdcPosThreshold
vector< Double_t > fGoodNegAdcPulseTime
TClonesArray * frPosAdcPedRaw
TVector3 GetOrigin()
vector< Double_t > fGoodNegAdcTdcDiffTime
TClonesArray * frPosAdcPulseAmp
TClonesArray * frNegAdcSampPulseIntRaw
THcHodoscope * fglHod
Int_t AccumulateStat(TClonesArray &tracks)
vector< Double_t > fGoodNegAdcPulseAmp
Double_t fStatMaxChi2
ClassDef(THcShowerPlane, 0)
TClonesArray * frNegAdcSampPed
Double_t fSampThreshold
vector< Double_t > fGoodPosAdcPulseTime
vector< Int_t > fNumGoodNegAdcHits
TClonesArray * frPosAdcPulseIntRaw
Double_t fAdcNegThreshold
virtual Int_t DefineVariables(EMode mode=kDefine)
STL namespace.