Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcShowerArray.h
Go to the documentation of this file.
1#ifndef ROOT_THcShowerArray
2#define ROOT_THcShowerArray
3
4//#define HITPIC 1
5#ifdef HITPIC
6#define NPERLINE 5
7#endif
8
10//
11// THcShowerArray
12//
13// A Hall C Fly's Eye Shower Array
14//
15// Subdetector for the fly's eye part of the SHMS shower counter.
16//
18
19#include "THaSubDetector.h"
20#include "THaTrack.h"
21#include "TClonesArray.h"
22#include "THcShowerHit.h"
23
24#include <iostream>
25
26#include <fstream>
27
28class THaEvData;
29class THaSignalHit;
30class THcHodoscope;
31
33
34public:
35 THcShowerArray( const char* name, const char* description,
36 Int_t planenum, THaDetectorBase* parent = NULL);
37 virtual ~THcShowerArray();
38
39 virtual void Clear( Option_t* opt="" );
40 virtual Int_t Decode( const THaEvData& );
41 virtual EStatus Init( const TDatime& run_time );
42
43 virtual Int_t CoarseProcess( TClonesArray& tracks );
44 virtual Int_t FineProcess( TClonesArray& tracks );
45 Bool_t IsTracking() { return kFALSE; }
46 virtual Bool_t IsPid() { return kFALSE; }
47
48 virtual Int_t ProcessHits(TClonesArray* rawhits, Int_t nexthit);
49 virtual Int_t CoarseProcessHits();
50 virtual Int_t AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit);
51 virtual void CalculatePedestals( );
52 virtual void InitializePedestals( );
53 virtual void FillADC_DynamicPedestal( );
54 virtual void FillADC_SampleIntegral( );
55 virtual void FillADC_SampIntDynPed( );
56 virtual void FillADC_Standard( );
57
58 // Cluster to track association method.
60
61 // Get total energy deposited in the cluster matched to the given
62 // spectrometer Track.
63
69 return fClustSize;
70 };
72 return fMatchClX;
73 };
75 return fMatchClY;
76 };
77
78 // Double_t fSpacing; not used
79
80 // TClonesArray* fParentHitList; not used
81
83 return fEarray;
84 };
85
86 // Fiducial volume limits.
92
94
95protected:
96
97#ifdef HITPIC
98 char **hitpic;
99 Int_t piccolumn;
100#endif
101
102
103
104
105
106 //counting variables
107 Int_t fTotNumAdcHits; // Total number of ADC hits
108 Int_t fTotNumGoodAdcHits; // Total number of good ADC hits (pass threshold)
109
110 vector<Int_t> fNumGoodAdcHits; // shower good occupancy
111 vector<Double_t> fGoodAdcPulseIntRaw; // [fNelem] Good Raw ADC pulse Integrals of blocks
112
113 vector<Double_t> fGoodAdcPed; // [fNelem] Event by event (FADC) good pulse pedestals
114 vector<Double_t> fGoodAdcMult;
115 vector<Double_t> fGoodAdcPulseInt; // [fNelem] good pedestal subtracted pulse integrals
116 vector<Double_t> fGoodAdcPulseAmp;
117 vector<Double_t> fGoodAdcPulseTime;
118 vector<Double_t> fGoodAdcTdcDiffTime;
119 vector<Double_t> fSampWaveform;
120
121 vector<Double_t> fE; //[fNelem] energy deposition in shower blocks
122
123 Int_t* fBlock_ClusterID; // [fNelem] Cluster ID of the block -1 then not in a cluster
124 Double_t fEarray; // Total Energy deposition in the array.
125 TClonesArray* fADCHits; // List of ADC hits
126
127 // Parameters
128
131 Double_t fXFront; // Front position X
132 Double_t fYFront; // Front position Y
133 Double_t fZFront; // Front position Z, from FP
134 Double_t fXStep; // distance btw centers of blocks along X
135 Double_t fYStep; // distance btw centers of blocks along Y
136 Double_t fZSize; // Block size along Z
137 Double_t** fXPos; // block X coordinates
138 Double_t** fYPos; // block Y coordinates
139 Double_t** fZPos; // block Z coordinates
140
141 Int_t fUsingFADC; // != 0 if using FADC in sample mode
143 // 1 == Use the pulse int - pulse ped
144 // 2 == Use the sample integral - known ped
145 // 3 == Use the sample integral - sample ped
146 static const Int_t kADCStandard=0;
148 static const Int_t kADCSampleIntegral=2;
149 static const Int_t kADCSampIntDynPed=3;
155
157 Int_t fPedSampLow; // Sample range for
158 Int_t fPedSampHigh; // dynamic pedestal
159 Int_t fDataSampLow; // Sample range for
160 Int_t fDataSampHigh; // sample integration
161
162 Int_t fLayerNum; // 2 for SHMS
163
170
171 // Accumulators for pedestals go here
172
173 Int_t fNPedestalEvents; /* Pedestal event counter */
174 Int_t fMinPeds; /* Only analyze/update if num events > */
175
176 // 2D arrays
177
178 Int_t *fPedSum; /* Accumulators for pedestals */
180 Int_t *fPedLimit; // Analyze pedestal if ADC signal < PedLimit
181 Int_t *fPedCount; // [fNelem] counter of pedestal analysis
182
183 Float_t *fPed; // [fNelem] pedestal positions
184 Float_t *fSig; // [fNelem] pedestal rms-s
185 Float_t *fThresh; // [fNelem] ADC thresholds
186
187 Double_t* fGain; // [fNelem] Gain constants from calibration
188
189 Int_t fNclust; // Number of hit clusters
190 Int_t fNtracks; // Number of shower tracks, i.e. number of
191 // cluster-to-track associations
192
197
198 THcShowerClusterList* fClusterList; // List of hit clusters
199
209
219
220 //Quatitites for efficiency calculations.
221
225 vector<Int_t> fStatNumTrk;
226 vector<Int_t> fStatNumHit;
229
230 virtual Int_t ReadDatabase( const TDatime& date );
231 virtual Int_t DefineVariables( EMode mode = kDefine );
232 THcHodoscope* fglHod; // Hodoscope to get start time
233
235
236 ClassDef(THcShowerArray,0); // Fly;s Eye calorimeter array
237};
238
239#endif
int Int_t
unsigned int UInt_t
bool Bool_t
const Bool_t kFALSE
float Float_t
double Double_t
const char Option_t
THcShowerHitSet THcShowerCluster
vector< THcShowerCluster * > THcShowerClusterList
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends.
Fly's eye array of shower blocks.
virtual Int_t CoarseProcessHits()
TClonesArray * frAdcSampPulseIntRaw
TClonesArray * frAdcSampPulseAmp
Double_t GetClMaxEnergyBlock()
vector< Double_t > fGoodAdcMult
Double_t GetEarray()
vector< Double_t > fGoodAdcPulseInt
virtual Int_t DefineVariables(EMode mode=kDefine)
Double_t fStatMaxChi2
Double_t GetClSize()
Double_t GetClX()
static const Int_t kADCSampleIntegral
TClonesArray * frAdcSampPulseTime
TClonesArray * frAdcSampPulseTimeRaw
virtual Bool_t IsPid()
Double_t fMatchClMaxEnergyBlock
TClonesArray * frAdcSampPed
virtual void FillADC_Standard()
vector< Double_t > fGoodAdcPulseTime
virtual void Clear(Option_t *opt="")
virtual Int_t Decode(const THaEvData &)
static const Int_t kADCSampIntDynPed
TClonesArray * frAdcSampPulseInt
vector< Double_t > fGoodAdcPulseIntRaw
virtual Int_t ReadDatabase(const TDatime &date)
Double_t ** fYPos
virtual Int_t CoarseProcess(TClonesArray &tracks)
Bool_t IsTracking()
virtual Int_t AccumulatePedestals(TClonesArray *rawhits, Int_t nexthit)
THcHodoscope * fglHod
vector< Double_t > fGoodAdcPulseAmp
THcShowerClusterList * fClusterList
Double_t clMaxEnergyBlock(THcShowerCluster *cluster)
TClonesArray * frAdcPulseAmpRaw
TClonesArray * fADCHits
virtual void CalculatePedestals()
Double_t ** fXPos
virtual ~THcShowerArray()
virtual void InitializePedestals()
Float_t GetShEnergy(THaTrack *)
THaDetectorBase * fParent
vector< Int_t > fStatNumTrk
TClonesArray * frAdcPulseAmp
Int_t AccumulateStat(TClonesArray &tracks)
Double_t fSampThreshold
virtual Int_t FineProcess(TClonesArray &tracks)
vector< Int_t > fStatNumHit
vector< Double_t > fGoodAdcPed
virtual void FillADC_DynamicPedestal()
TClonesArray * frAdcSampWaveform
Int_t * fBlock_ClusterID
virtual void FillADC_SampleIntegral()
vector< Double_t > fE
TClonesArray * frAdcPulseIntRaw
TClonesArray * frAdcPed
TClonesArray * frAdcPedRaw
virtual Int_t ProcessHits(TClonesArray *rawhits, Int_t nexthit)
Double_t * fAdcTimeWindowMin
Double_t * fAdcTimeWindowMax
Double_t GetClY()
vector< Double_t > fGoodAdcTdcDiffTime
TClonesArray * frAdcPulseTime
TClonesArray * frAdcPulseInt
Double_t fAdcTdcOffset
ClassDef(THcShowerArray, 0)
TClonesArray * frAdcErrorFlag
static const Int_t kADCStandard
vector< Double_t > fSampWaveform
Double_t fAdcThreshold
Double_t ** fZPos
vector< Int_t > fNumGoodAdcHits
TClonesArray * frAdcPulseTimeRaw
virtual void FillADC_SampIntDynPed()
Int_t MatchCluster(THaTrack *, Double_t &, Double_t &)
static const Int_t kADCDynamicPedestal
THcShowerArray(const char *name, const char *description, Int_t planenum, THaDetectorBase *parent=NULL)
TClonesArray * frAdcSampPedRaw
TClonesArray * frAdcSampPulseAmpRaw