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 |
Int_t GetLadder() { return 1+(Int_t)((maxs-1)/1024); }; ///< ladder number |
void Clear(Option_t *option){Clear();}; |
49 |
|
void Delete(){Clear();}; |
50 |
|
|
51 |
Float_t GetSignal(Int_t, Float_t); ///< cluster signal |
Float_t GetSignal(Int_t, Float_t); ///< cluster signal |
52 |
Float_t GetSignal(Float_t cut) { return GetSignal( (Int_t)0, cut); }; |
Float_t GetSignal(Float_t cut) { return GetSignal( (Int_t)0, cut); }; |
62 |
Int_t GetMultiplicity(Float_t); ///< cluster multiplicity |
Int_t GetMultiplicity(Float_t); ///< cluster multiplicity |
63 |
Int_t GetMultiplicity() { return GetMultiplicity(INC_CUT); }; |
Int_t GetMultiplicity() { return GetMultiplicity(INC_CUT); }; |
64 |
|
|
65 |
cTrkLevel1* GetLevel1Struct(); |
void GetLevel1Struct(cTrkLevel1* l1); |
66 |
|
void GetLevel1Struct(){GetLevel1Struct(&level1event_);}; |
67 |
|
|
68 |
Float_t GetCOG(Int_t); |
Float_t GetCOG(Int_t); |
69 |
|
Float_t GetCOG(Float_t angle); |
70 |
Float_t GetCOG(){ return GetCOG(0); }; |
Float_t GetCOG(){ return GetCOG(0); }; |
71 |
Float_t GetETA(Int_t,float); |
Float_t GetETA(Int_t,float); |
72 |
Float_t GetETA(float angle){ return GetETA(0,angle); }; |
Float_t GetETA(float angle){ return GetETA(0,angle); }; |
73 |
|
|
74 |
Bool_t IsBad(Int_t); ///< bad-cluster flag |
Bool_t IsBad(Int_t); ///< bad-cluster flag |
75 |
|
Bool_t IsSaturated(Int_t); ///< saturated-cluster flag |
76 |
|
|
77 |
|
Int_t GetPlane() { return (Int_t)((view+1)/2);}; ///< plane number (1-6) |
78 |
|
Int_t GetLadder(){ return 1+(Int_t)((maxs-1)/1024); }; ///< ladder number (1-3) |
79 |
|
Bool_t IsY(){ return (Bool_t)view%2; }; |
80 |
|
Bool_t IsX(){ return !((Bool_t)view%2); }; |
81 |
|
|
82 |
TrkCluster* GetTrkCluster(){ return this; }; |
TrkCluster* GetTrkCluster(){ return this; }; |
83 |
|
|
97 |
class TrkLevel1 : public TObject { |
class TrkLevel1 : public TObject { |
98 |
|
|
99 |
private: |
private: |
100 |
|
|
101 |
public: |
public: |
102 |
|
|
103 |
Int_t good[12]; ///< event status |
Int_t good[12]; ///< event status |
104 |
Float_t cnev[24][12]; ///< CN |
Float_t cn[24][12]; ///< CN |
105 |
Int_t cnnev[24][12]; ///< number of strips for CN computation |
// Float_t cnrms[24][12]; ///< CN RMS |
106 |
// Int_t fshower[12]; |
Int_t cnn[24][12]; ///< number of strips for CN computation |
107 |
// Int_t good1; |
|
|
// Int_t crc[12]; |
|
108 |
|
|
109 |
TClonesArray *Cluster; ///< clusters |
TClonesArray *Cluster; ///< clusters |
110 |
|
|
|
|
|
111 |
TrkLevel1(); |
TrkLevel1(); |
112 |
~TrkLevel1(){Delete();}; |
~TrkLevel1(){Delete();}; |
113 |
|
|
114 |
int nclstr() {return Cluster->GetEntries();} ///< number of stored clusters |
int nclstr() {return Cluster->GetEntries();} ///< number of stored clusters |
115 |
|
|
116 |
void Dump(); |
void Dump(); |
117 |
void SetFromLevel1Struct(cTrkLevel1 *); |
// void SetFromLevel1Struct(cTrkLevel1 *, Bool_t); |
118 |
// void GetLevel1Struct(cTrkLevel1 *) const; |
// void GetLevel1Struct(cTrkLevel1 *) const; |
119 |
cTrkLevel1* GetLevel1Struct(); |
void GetLevel1Struct(cTrkLevel1 *l1); |
120 |
void Clear(); |
void SetFromLevel1Struct(cTrkLevel1 *l1, Bool_t full); |
121 |
void Delete(); |
void GetLevel1Struct(){GetLevel1Struct(&level1event_);}; |
122 |
|
void SetFromLevel1Struct(Bool_t full){SetFromLevel1Struct(&level1event_,full);}; |
123 |
|
void SetFromLevel1Struct(){SetFromLevel1Struct(true);}; |
124 |
|
|
125 |
|
void Clear(); |
126 |
|
void Delete(); |
127 |
|
void Set(); |
128 |
|
|
129 |
TrkCluster* GetCluster(int); |
TrkCluster* GetCluster(int); |
130 |
|
|
131 |
TrkLevel1* GetTrkLevel1(){return this;} |
TrkLevel1* GetTrkLevel1(){return this;} |
132 |
TClonesArray* GetClusters(){return Cluster;}; ///< returns pointer to the cluster array |
TClonesArray* GetClusters(){return Cluster;}; ///< returns pointer to the cluster array |
133 |
|
|
134 |
int LoadPfaParam(TString); |
/* int LoadPfaParam(TString); */ |
135 |
|
/* int LoadFieldParam(TString); */ |
136 |
ClassDef(TrkLevel1,2); |
/* int LoadChargeParam(TString); */ |
137 |
|
/* int LoadAlignmentParam(TString); */ |
138 |
|
/* int LoadMipParam(TString); */ |
139 |
|
/* int LoadVKMaskParam(TString); */ |
140 |
|
/* int LoadPfaParam(){return LoadPfaParam("");}; */ |
141 |
|
/* int LoadFieldParam(){return LoadFieldParam("");}; */ |
142 |
|
/* int LoadChargeParam(){return LoadChargeParam("");}; */ |
143 |
|
/* int LoadAlignmentParam(){return LoadAlignmentParam("");}; */ |
144 |
|
/* int LoadMipParam(){return LoadMipParam("");}; */ |
145 |
|
/* int LoadVKMaskParam(){return LoadVKMaskParam("");}; */ |
146 |
|
/* int LoadParams(); */ |
147 |
|
|
148 |
|
int ProcessEvent(int); |
149 |
|
int ProcessEvent(){return ProcessEvent(0);}; |
150 |
|
|
151 |
|
|
152 |
|
int GetPfaNbinsAngle(); |
153 |
|
int GetPfaNbinsETA(); |
154 |
|
int GetPfaNbinsCharge(){return 0;}; |
155 |
|
float* GetPfaCoord(TString pfa, int nview, int nladder, int nang); |
156 |
|
float* GetPfaAbs(TString pfa, int nang); |
157 |
|
|
158 |
|
|
159 |
|
ClassDef(TrkLevel1,2); |
160 |
|
|
161 |
}; |
}; |
162 |
|
|