Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef ROOT_THcCherenkov
#define ROOT_THcCherenkov
///////////////////////////////////////////////////////////////////////////////
// //
// Cherenkov //
// //
///////////////////////////////////////////////////////////////////////////////
#include "TClonesArray.h"
#include "THaNonTrackingDetector.h"
#include "THcHitList.h"
#include "THcCherenkovHit.h"
class THcCherenkov : public THaNonTrackingDetector, public THcHitList {
public:
THcCherenkov( const char* name, const char* description = "",
THaApparatus* a = NULL );
virtual ~THcCherenkov();
virtual void Clear( Option_t* opt="" );
virtual Int_t Decode( const THaEvData& );
virtual EStatus Init( const TDatime& run_time );
virtual Int_t ReadDatabase( const TDatime& date );
virtual Int_t DefineVariables( EMode mode = kDefine );
virtual Int_t CoarseProcess( TClonesArray& tracks );
virtual Int_t FineProcess( TClonesArray& tracks );
virtual void AccumulatePedestals(TClonesArray* rawhits);
virtual void CalculatePedestals();
virtual Int_t ApplyCorrections( void );
virtual void Print(const Option_t* opt) const;
THcCherenkov(); // for ROOT I/O
protected:
Int_t fAnalyzePedestals;
// Parameters
Double_t* fPosGain;
Double_t* fNegGain;
// Event information
Int_t fNhits;
Float_t* fA_Pos; // [fNelem] Array of ADC amplitudes
Float_t* fA_Neg; // [fNelem] Array of ADC amplitudes
Float_t* fA_Pos_p; // [fNelem] Array of ped-subtracted ADC amplitudes
Float_t* fA_Neg_p; // [fNelem] Array of ped-subtracted ADC amplitudes
Float_t* fT_Pos; // [fNelem] Array of TDCs
Float_t* fT_Neg; // [fNelem] Array of TDCs
Double_t fA_1; // Ahmed
Double_t fA_2; // Ahmed
Double_t fNHits_1; // Ahmed
Double_t fNHits_2; // Ahmed
Double_t fNHits; // Ahmed
Double_t fA_p_1; // Ahmed
Double_t fA_p_2; // Ahmed
Double_t fNpe_1; // Ahmed
Double_t fNpe_2; // Ahmed
Double_t fNpe; // Ahmed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Double_t fPosNpeSum;
Double_t fNegNpeSum;
Double_t fNpeSum;
Int_t fNGoodHits;
Int_t fNADCPosHits;
Int_t fNADCNegHits;
Int_t fNTDCPosHits;
Int_t fNTDCNegHits;
Double_t* fPosNpe; // [fNelem] # Photoelectrons per positive tube
Double_t* fNegNpe; // [fNelem] # Photoelectrons per negative tube
// Hits
TClonesArray* fPosTDCHits;
TClonesArray* fNegTDCHits;
TClonesArray* fPosADCHits;
TClonesArray* fNegADCHits;
// Pedestals
Int_t fNPedestalEvents;
Int_t fMinPeds;
Int_t *fPosPedSum; /* Accumulators for pedestals */
Int_t *fPosPedSum2;
Int_t *fPosPedLimit;
Int_t *fPosPedCount;
Int_t *fNegPedSum;
Int_t *fNegPedSum2;
Int_t *fNegPedLimit;
Int_t *fNegPedCount;
Double_t *fPosPed;
Double_t *fPosSig;
Double_t *fPosThresh;
Double_t *fNegPed;
Double_t *fNegSig;
Double_t *fNegThresh;
Double_t *fPosPedMean; /* Can be supplied in parameters and then */
Double_t *fNegPedMean; /* be overwritten from ped analysis */
void Setup(const char* name, const char* description);
virtual void InitializePedestals( );
ClassDef(THcCherenkov,0) // Generic cherenkov class
};
#endif