8 |
#include <TObject.h> |
#include <TObject.h> |
9 |
#include <TClonesArray.h> |
#include <TClonesArray.h> |
10 |
#include <TRef.h> |
#include <TRef.h> |
11 |
|
#include <TROOT.h> |
12 |
|
#include <TSystem.h> |
13 |
|
|
14 |
#include <TrkStruct.h> |
//#include <TrkStruct.h> |
15 |
|
#include <TrkParams.h> |
16 |
|
|
17 |
#define INC_CUT 4. |
#define INC_CUT 4. |
18 |
/** |
/** |
29 |
|
|
30 |
public: |
public: |
31 |
|
|
32 |
int view; ///< view |
int view; ///< view |
33 |
int maxs; ///< strip number (1-3072) of cluster center |
int maxs; ///< strip number (1-3072) of cluster center |
34 |
int indmax; |
int indmax; |
35 |
|
|
36 |
Int_t CLlength; ///< number of stored strip info (signal+sigma+adc+bad) |
Int_t CLlength; ///< number of stored strip info (signal+sigma+adc+bad) |
37 |
Float_t *clsignal; //[CLlength] |
Float_t *clsignal; //[CLlength] |
38 |
Float_t *clsigma; //[CLlength] |
Float_t *clsigma; //[CLlength] |
39 |
Int_t *cladc; //[CLlength] |
Int_t *cladc; //[CLlength] |
40 |
Bool_t *clbad; //[CLlength] |
Bool_t *clbad; //[CLlength] |
41 |
|
|
42 |
TrkCluster(); |
TrkCluster(); |
43 |
~TrkCluster(); |
~TrkCluster(){Clear();} |
44 |
TrkCluster(const TrkCluster&); |
TrkCluster(const TrkCluster&); |
45 |
|
|
46 |
void Dump(); |
void Dump(); |
47 |
|
void Clear(); |
48 |
|
void Clear(Option_t *option){Clear();} |
49 |
|
void Delete(){Clear();} |
50 |
|
|
51 |
Int_t GetLadder() { return 1+(Int_t)((maxs-1)/1024); }; ///< ladder number |
Float_t GetSignal(Int_t, Float_t, Bool_t); ///< cluster signal |
52 |
Float_t GetSignal(Float_t); ///< cluster signal |
Float_t GetSignal(Float_t cut) { return GetSignal( 0, cut, false); } |
53 |
Float_t GetSignalToNoise(Float_t); ///< cluster signal/noise |
Float_t GetSignal(Int_t nstrip, Bool_t force) { return GetSignal( nstrip, -1000., force ); } |
54 |
Int_t GetMultiplicity(Float_t); ///< cluster multiplicity |
Float_t GetSignal(Int_t nstrip) { return GetSignal( nstrip, -1000., false ); } |
55 |
Float_t GetSignal() { return GetSignal(INC_CUT); }; |
Float_t GetSignal() { return GetSignal( 0,(Float_t)INC_CUT, false); } |
56 |
Float_t GetSignalToNoise() { return GetSignalToNoise(INC_CUT); }; |
|
57 |
Int_t GetMultiplicity() { return GetMultiplicity(INC_CUT); }; |
Float_t GetSignalToNoise(Int_t,Float_t); ///< cluster signal/noise |
58 |
|
Float_t GetSignalToNoise(Float_t cut) { return GetSignalToNoise( 0, cut); } |
59 |
Bool_t IsBad(Int_t); ///< bad-cluster flag |
Float_t GetSignalToNoise(Int_t nstrip) { return GetSignalToNoise( nstrip,-1000. ); } |
60 |
|
Float_t GetSignalToNoise() { return GetSignalToNoise( 0, (Float_t)INC_CUT); } |
61 |
|
|
62 |
|
|
63 |
|
Int_t GetMultiplicity(Float_t); ///< cluster multiplicity |
64 |
|
Int_t GetMultiplicity() { return GetMultiplicity(INC_CUT); } |
65 |
|
|
66 |
|
void GetLevel1Struct(cTrkLevel1* l1); |
67 |
|
void GetLevel1Struct(){GetLevel1Struct(&level1event_);} |
68 |
|
|
69 |
|
Float_t GetCOG(Int_t); |
70 |
|
Float_t GetCOG(Float_t angle); |
71 |
|
Float_t GetCOG(){ return GetCOG(0); } |
72 |
|
Float_t GetETA(Int_t,float,bool); |
73 |
|
// Float_t GetETA(float angle){ return GetETA(0,angle); } |
74 |
|
Float_t GetDigSat(); |
75 |
|
Float_t GetPositionPU(float); |
76 |
|
Int_t GetPFAstrips(float angle); |
77 |
|
|
78 |
|
|
79 |
|
Bool_t IsBad(Int_t); ///< bad-cluster flag |
80 |
|
Bool_t IsSaturated(Int_t); ///< saturated-cluster flag |
81 |
|
|
82 |
|
Int_t GetPlane() { return (Int_t)((view+1)/2);} ///< plane number (1-6) |
83 |
|
Int_t GetLadder(){ return 1+(Int_t)((maxs-1)/1024); } ///< ladder number (1-3) |
84 |
|
Bool_t IsY(){ return (Bool_t)(view%2); } |
85 |
|
Bool_t IsX(){ return !((Bool_t)(view%2)); } |
86 |
|
|
87 |
TrkCluster* GetTrkCluster(){ return this; }; |
TrkCluster* GetTrkCluster(){ return this; } |
88 |
|
|
89 |
friend class TrkLevel1; |
friend class TrkLevel1; |
90 |
|
|
102 |
class TrkLevel1 : public TObject { |
class TrkLevel1 : public TObject { |
103 |
|
|
104 |
private: |
private: |
105 |
|
|
106 |
public: |
public: |
107 |
|
|
108 |
Int_t good[12]; ///< event status |
Int_t good[12]; ///< event status |
109 |
Float_t cnev[24][12]; ///< CN |
Float_t cn[24][12]; ///< CN |
110 |
Int_t cnnev[24][12]; ///< number of strips for CN computation |
// Float_t cnrms[24][12]; ///< CN RMS |
111 |
// Int_t fshower[12]; |
Int_t cnn[24][12]; ///< number of strips for CN computation |
112 |
// Int_t good1; |
|
|
// Int_t crc[12]; |
|
113 |
|
|
114 |
TClonesArray *Cluster; ///< clusters |
TClonesArray *Cluster; ///< clusters |
115 |
|
|
|
|
|
116 |
TrkLevel1(); |
TrkLevel1(); |
117 |
|
~TrkLevel1(){Delete();} |
118 |
int nclstr() {return Cluster->GetEntries();} ///< number of stored clusters |
|
119 |
|
int nclstr() {return Cluster->GetEntries();} ///< number of stored clusters |
120 |
|
|
121 |
void Dump(); |
void Dump(); |
122 |
void SetFromLevel1Struct(cTrkLevel1 *); |
// void SetFromLevel1Struct(cTrkLevel1 *, Bool_t); |
123 |
void GetLevel1Struct(cTrkLevel1 *) const; |
// void GetLevel1Struct(cTrkLevel1 *) const; |
124 |
void Clear(); |
void GetLevel1Struct(cTrkLevel1 *l1); |
125 |
|
void SetFromLevel1Struct(cTrkLevel1 *l1, Bool_t full); |
126 |
|
void GetLevel1Struct(){GetLevel1Struct(&level1event_);} |
127 |
|
void SetFromLevel1Struct(Bool_t full){SetFromLevel1Struct(&level1event_,full);} |
128 |
|
void SetFromLevel1Struct(){SetFromLevel1Struct(true);} |
129 |
|
|
130 |
|
void Clear(); |
131 |
|
void Delete(); |
132 |
|
void Set(); |
133 |
|
|
134 |
TrkCluster* GetCluster(int); |
TrkCluster* GetCluster(int); |
135 |
|
|
136 |
TrkLevel1* GetTrkLevel1(){return this;} |
TrkLevel1* GetTrkLevel1(){return this;} |
137 |
TClonesArray* GetClusters(){return Cluster;};///< returns pointer to the cluster array |
TClonesArray* GetClusters(){return Cluster;} ///< returns pointer to the cluster array |
138 |
|
|
139 |
|
/* int LoadPfaParam(TString); */ |
140 |
|
/* int LoadFieldParam(TString); */ |
141 |
|
/* int LoadChargeParam(TString); */ |
142 |
|
/* int LoadAlignmentParam(TString); */ |
143 |
|
/* int LoadMipParam(TString); */ |
144 |
|
/* int LoadVKMaskParam(TString); */ |
145 |
|
/* int LoadPfaParam(){return LoadPfaParam("");} */ |
146 |
|
/* int LoadFieldParam(){return LoadFieldParam("");} */ |
147 |
|
/* int LoadChargeParam(){return LoadChargeParam("");} */ |
148 |
|
/* int LoadAlignmentParam(){return LoadAlignmentParam("");} */ |
149 |
|
/* int LoadMipParam(){return LoadMipParam("");} */ |
150 |
|
/* int LoadVKMaskParam(){return LoadVKMaskParam("");} */ |
151 |
|
/* int LoadParams(); */ |
152 |
|
|
153 |
|
// int ProcessEvent(int); |
154 |
|
// int ProcessEvent(){return ProcessEvent();} |
155 |
|
int ProcessEvent(); |
156 |
|
|
157 |
|
// spostati in TrkParams |
158 |
|
/* int GetPfaNbinsAngle(); */ |
159 |
|
/* int GetPfaNbinsETA(); */ |
160 |
|
/* int GetPfaNbinsCharge(){return 0;} */ |
161 |
|
/* float* GetPfaCoord(TString pfa, int nview, int nladder, int nang); */ |
162 |
|
/* float* GetPfaAbs(TString pfa, int nang); */ |
163 |
|
|
164 |
|
void StatusDump(int view); |
165 |
|
Bool_t StatusCheck(int view, int flagmask); |
166 |
|
|
167 |
|
|
168 |
|
void SetPFA(int pfaid){ sw_.pfaid = pfaid; } |
169 |
|
int GetPFA(){ return sw_.pfaid; } |
170 |
|
|
171 |
|
|
172 |
ClassDef(TrkLevel1,2); |
ClassDef(TrkLevel1,2); |
173 |
|
|
174 |
}; |
}; |