1 |
pam-fi |
1.1 |
/** |
2 |
|
|
* \file TrkLevel1.h |
3 |
|
|
* \author Elena Vannuccini |
4 |
|
|
*/ |
5 |
|
|
#ifndef trklevel1_h |
6 |
|
|
#define trklevel1_h |
7 |
|
|
|
8 |
|
|
#include <TObject.h> |
9 |
|
|
#include <TClonesArray.h> |
10 |
|
|
#include <TRef.h> |
11 |
|
|
|
12 |
|
|
#include <TrkStruct.h> |
13 |
|
|
|
14 |
pam-fi |
1.2 |
#define INC_CUT 4. |
15 |
pam-fi |
1.1 |
/** |
16 |
|
|
* \brief Class to describe tracker clusters. |
17 |
|
|
* |
18 |
pam-fi |
1.2 |
* A cluster is defined as a group of adjacent strips whose signals exceed noise by INC_CUT sigma, and at least one strip has signal/noise > SEED_CUT. Tipical values are SEED_CUT = 7 and INC_CUT = 4. |
19 |
|
|
* |
20 |
pam-fi |
1.1 |
*/ |
21 |
|
|
// ================================================================== |
22 |
|
|
class TrkCluster : public TObject { |
23 |
|
|
|
24 |
|
|
private: |
25 |
|
|
|
26 |
|
|
|
27 |
|
|
public: |
28 |
|
|
|
29 |
pam-fi |
1.5 |
int view; ///< view |
30 |
|
|
int maxs; ///< strip number (1-3072) of cluster center |
31 |
|
|
int indmax; |
32 |
|
|
|
33 |
|
|
Int_t CLlength; ///< number of stored strip info (signal+sigma+adc+bad) |
34 |
|
|
Float_t *clsignal; //[CLlength] |
35 |
|
|
Float_t *clsigma; //[CLlength] |
36 |
|
|
Int_t *cladc; //[CLlength] |
37 |
|
|
Bool_t *clbad; //[CLlength] |
38 |
|
|
|
39 |
pam-fi |
1.1 |
TrkCluster(); |
40 |
pam-fi |
1.5 |
~TrkCluster(); |
41 |
pam-fi |
1.1 |
TrkCluster(const TrkCluster&); |
42 |
|
|
|
43 |
|
|
void Dump(); |
44 |
|
|
|
45 |
pam-fi |
1.4 |
Int_t GetLadder() { return 1+(Int_t)((maxs-1)/1024); }; ///< ladder number |
46 |
pam-fi |
1.3 |
|
47 |
pam-fi |
1.4 |
Float_t GetSignal(Int_t, Float_t); ///< cluster signal |
48 |
|
|
Float_t GetSignal(Float_t cut) { return GetSignal( (Int_t)0, cut); }; |
49 |
|
|
Float_t GetSignal(Int_t nstrip) { return GetSignal( nstrip, (Float_t)(-1000) ); }; |
50 |
|
|
Float_t GetSignal() { return GetSignal( (Int_t)0,(Float_t)INC_CUT); }; |
51 |
|
|
|
52 |
|
|
Float_t GetSignalToNoise(Int_t,Float_t); ///< cluster signal/noise |
53 |
|
|
Float_t GetSignalToNoise(Float_t cut) { return GetSignalToNoise( (Int_t)0, cut); }; |
54 |
|
|
Float_t GetSignalToNoise(Int_t nstrip) { return GetSignalToNoise( nstrip, (Float_t)(-1000) ); }; |
55 |
|
|
Float_t GetSignalToNoise() { return GetSignalToNoise( (Int_t)0, (Float_t)INC_CUT); }; |
56 |
|
|
|
57 |
|
|
|
58 |
|
|
Int_t GetMultiplicity(Float_t); ///< cluster multiplicity |
59 |
|
|
Int_t GetMultiplicity() { return GetMultiplicity(INC_CUT); }; |
60 |
|
|
|
61 |
|
|
cTrkLevel1* GetLevel1Struct(); |
62 |
|
|
|
63 |
|
|
Float_t GetCOG(Int_t); |
64 |
pam-fi |
1.5 |
Float_t GetCOG(Float_t angle); |
65 |
pam-fi |
1.4 |
Float_t GetCOG(){ return GetCOG(0); }; |
66 |
|
|
Float_t GetETA(Int_t,float); |
67 |
|
|
Float_t GetETA(float angle){ return GetETA(0,angle); }; |
68 |
|
|
|
69 |
|
|
Bool_t IsBad(Int_t); ///< bad-cluster flag |
70 |
pam-fi |
1.2 |
|
71 |
|
|
TrkCluster* GetTrkCluster(){ return this; }; |
72 |
pam-fi |
1.1 |
|
73 |
|
|
friend class TrkLevel1; |
74 |
|
|
|
75 |
pam-fi |
1.2 |
ClassDef(TrkCluster,2); |
76 |
pam-fi |
1.1 |
|
77 |
|
|
}; |
78 |
|
|
|
79 |
|
|
/** |
80 |
|
|
* \brief Class to describe tracker LEVEL1 data. |
81 |
|
|
* |
82 |
pam-fi |
1.2 |
* A Level1 tracker event is defined as a collection of clusters ( TrkCluster objects ). |
83 |
|
|
* The result of common-noise computation for each viking is also stored ( cnev[24][12] ). |
84 |
|
|
* A general flag summarize the event status (missing sections, crc failures, decoding errors ans so on...). |
85 |
pam-fi |
1.1 |
*/ |
86 |
|
|
class TrkLevel1 : public TObject { |
87 |
|
|
|
88 |
|
|
private: |
89 |
pam-fi |
1.5 |
|
90 |
pam-fi |
1.1 |
public: |
91 |
|
|
|
92 |
pam-fi |
1.5 |
Int_t good[12]; ///< event status |
93 |
|
|
Float_t cn[24][12]; ///< CN |
94 |
|
|
// Float_t cnrms[24][12]; ///< CN RMS |
95 |
|
|
Int_t cnn[24][12]; ///< number of strips for CN computation |
96 |
pam-fi |
1.2 |
// Int_t fshower[12]; |
97 |
|
|
// Int_t good1; |
98 |
pam-fi |
1.1 |
// Int_t crc[12]; |
99 |
pam-fi |
1.2 |
|
100 |
pam-fi |
1.1 |
TClonesArray *Cluster; ///< clusters |
101 |
pam-fi |
1.5 |
|
102 |
pam-fi |
1.1 |
|
103 |
|
|
TrkLevel1(); |
104 |
pam-fi |
1.5 |
~TrkLevel1(){Delete();}; |
105 |
|
|
|
106 |
|
|
int nclstr() {return Cluster->GetEntries();} ///< number of stored clusters |
107 |
|
|
|
108 |
pam-fi |
1.1 |
void Dump(); |
109 |
|
|
void SetFromLevel1Struct(cTrkLevel1 *); |
110 |
pam-fi |
1.3 |
// void GetLevel1Struct(cTrkLevel1 *) const; |
111 |
pam-fi |
1.5 |
cTrkLevel1* GetLevel1Struct(); |
112 |
|
|
void Clear(); |
113 |
|
|
void Delete(); |
114 |
|
|
|
115 |
pam-fi |
1.1 |
TrkCluster* GetCluster(int); |
116 |
|
|
|
117 |
|
|
TrkLevel1* GetTrkLevel1(){return this;} |
118 |
pam-fi |
1.3 |
TClonesArray* GetClusters(){return Cluster;}; ///< returns pointer to the cluster array |
119 |
pam-fi |
1.1 |
|
120 |
pam-fi |
1.5 |
int LoadPfaParam(TString); |
121 |
|
|
|
122 |
|
|
ClassDef(TrkLevel1,2); |
123 |
pam-fi |
1.1 |
|
124 |
|
|
}; |
125 |
|
|
|
126 |
|
|
|
127 |
|
|
#endif |