/[PAMELA software]/DarthVader/TrackerLevel2/inc/TrkLevel1.h
ViewVC logotype

Annotation of /DarthVader/TrackerLevel2/inc/TrkLevel1.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (hide annotations) (download)
Mon Aug 27 12:57:14 2007 UTC (17 years, 3 months ago) by pam-fi
Branch: MAIN
CVS Tags: v5r00, v4r00
Changes since 1.14: +9 -7 lines
File MIME type: text/plain
fixed bug on pfa + new methods added

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 pam-fi 1.11 #include <TROOT.h>
12     #include <TSystem.h>
13 pam-fi 1.1
14 pam-fi 1.11 //#include <TrkStruct.h>
15     #include <TrkParams.h>
16 pam-fi 1.1
17 pam-fi 1.2 #define INC_CUT 4.
18 pam-fi 1.1 /**
19     * \brief Class to describe tracker clusters.
20     *
21 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.
22     *
23 pam-fi 1.1 */
24     // ==================================================================
25     class TrkCluster : public TObject {
26    
27     private:
28    
29    
30     public:
31    
32 pam-fi 1.5 int view; ///< view
33     int maxs; ///< strip number (1-3072) of cluster center
34     int indmax;
35    
36     Int_t CLlength; ///< number of stored strip info (signal+sigma+adc+bad)
37     Float_t *clsignal; //[CLlength]
38     Float_t *clsigma; //[CLlength]
39     Int_t *cladc; //[CLlength]
40     Bool_t *clbad; //[CLlength]
41    
42 pam-fi 1.1 TrkCluster();
43 pam-fi 1.8 ~TrkCluster(){Clear();};
44 pam-fi 1.1 TrkCluster(const TrkCluster&);
45    
46     void Dump();
47 pam-fi 1.7 void Clear();
48 pam-fi 1.8 void Clear(Option_t *option){Clear();};
49     void Delete(){Clear();};
50 pam-fi 1.3
51 pam-fi 1.15 Float_t GetSignal(Int_t, Float_t, Bool_t); ///< cluster signal
52     Float_t GetSignal(Float_t cut) { return GetSignal( 0, cut, false); };
53     Float_t GetSignal(Int_t nstrip, Bool_t force) { return GetSignal( nstrip, -1000., force ); };
54     Float_t GetSignal(Int_t nstrip) { return GetSignal( nstrip, -1000., false ); };
55     Float_t GetSignal() { return GetSignal( 0,(Float_t)INC_CUT, false); };
56 pam-fi 1.4
57     Float_t GetSignalToNoise(Int_t,Float_t); ///< cluster signal/noise
58 pam-fi 1.15 Float_t GetSignalToNoise(Float_t cut) { return GetSignalToNoise( 0, cut); };
59     Float_t GetSignalToNoise(Int_t nstrip) { return GetSignalToNoise( nstrip,-1000. ); };
60     Float_t GetSignalToNoise() { return GetSignalToNoise( 0, (Float_t)INC_CUT); };
61 pam-fi 1.4
62    
63     Int_t GetMultiplicity(Float_t); ///< cluster multiplicity
64     Int_t GetMultiplicity() { return GetMultiplicity(INC_CUT); };
65    
66 pam-fi 1.11 void GetLevel1Struct(cTrkLevel1* l1);
67     void GetLevel1Struct(){GetLevel1Struct(&level1event_);};
68 pam-fi 1.4
69     Float_t GetCOG(Int_t);
70 pam-fi 1.5 Float_t GetCOG(Float_t angle);
71 pam-fi 1.4 Float_t GetCOG(){ return GetCOG(0); };
72 pam-fi 1.14 Float_t GetETA(Int_t,float,bool);
73     // Float_t GetETA(float angle){ return GetETA(0,angle); };
74     Float_t GetPositionPU(float);
75 pam-fi 1.15 Int_t GetPFAstrips(float angle);
76 pam-fi 1.14
77    
78 pam-fi 1.4 Bool_t IsBad(Int_t); ///< bad-cluster flag
79 pam-fi 1.8 Bool_t IsSaturated(Int_t); ///< saturated-cluster flag
80 pam-fi 1.6
81     Int_t GetPlane() { return (Int_t)((view+1)/2);}; ///< plane number (1-6)
82     Int_t GetLadder(){ return 1+(Int_t)((maxs-1)/1024); }; ///< ladder number (1-3)
83     Bool_t IsY(){ return (Bool_t)view%2; };
84     Bool_t IsX(){ return !((Bool_t)view%2); };
85 pam-fi 1.2
86     TrkCluster* GetTrkCluster(){ return this; };
87 pam-fi 1.1
88     friend class TrkLevel1;
89    
90 pam-fi 1.2 ClassDef(TrkCluster,2);
91 pam-fi 1.1
92     };
93    
94     /**
95     * \brief Class to describe tracker LEVEL1 data.
96     *
97 pam-fi 1.2 * A Level1 tracker event is defined as a collection of clusters ( TrkCluster objects ).
98     * The result of common-noise computation for each viking is also stored ( cnev[24][12] ).
99     * A general flag summarize the event status (missing sections, crc failures, decoding errors ans so on...).
100 pam-fi 1.1 */
101     class TrkLevel1 : public TObject {
102    
103     private:
104 pam-fi 1.5
105 pam-fi 1.1 public:
106    
107 pam-fi 1.5 Int_t good[12]; ///< event status
108     Float_t cn[24][12]; ///< CN
109     // Float_t cnrms[24][12]; ///< CN RMS
110     Int_t cnn[24][12]; ///< number of strips for CN computation
111 pam-fi 1.7
112 pam-fi 1.2
113 pam-fi 1.1 TClonesArray *Cluster; ///< clusters
114 pam-fi 1.7
115 pam-fi 1.1 TrkLevel1();
116 pam-fi 1.5 ~TrkLevel1(){Delete();};
117    
118     int nclstr() {return Cluster->GetEntries();} ///< number of stored clusters
119    
120 pam-fi 1.1 void Dump();
121 pam-fi 1.11 // void SetFromLevel1Struct(cTrkLevel1 *, Bool_t);
122 pam-fi 1.3 // void GetLevel1Struct(cTrkLevel1 *) const;
123 pam-fi 1.11 void GetLevel1Struct(cTrkLevel1 *l1);
124     void SetFromLevel1Struct(cTrkLevel1 *l1, Bool_t full);
125     void GetLevel1Struct(){GetLevel1Struct(&level1event_);};
126     void SetFromLevel1Struct(Bool_t full){SetFromLevel1Struct(&level1event_,full);};
127     void SetFromLevel1Struct(){SetFromLevel1Struct(true);};
128    
129 pam-fi 1.5 void Clear();
130     void Delete();
131 pam-fi 1.9 void Set();
132 pam-fi 1.5
133 pam-fi 1.1 TrkCluster* GetCluster(int);
134    
135     TrkLevel1* GetTrkLevel1(){return this;}
136 pam-fi 1.3 TClonesArray* GetClusters(){return Cluster;}; ///< returns pointer to the cluster array
137 pam-fi 1.1
138 pam-fi 1.11 /* int LoadPfaParam(TString); */
139     /* int LoadFieldParam(TString); */
140     /* int LoadChargeParam(TString); */
141     /* int LoadAlignmentParam(TString); */
142     /* int LoadMipParam(TString); */
143     /* int LoadVKMaskParam(TString); */
144     /* int LoadPfaParam(){return LoadPfaParam("");}; */
145     /* int LoadFieldParam(){return LoadFieldParam("");}; */
146     /* int LoadChargeParam(){return LoadChargeParam("");}; */
147     /* int LoadAlignmentParam(){return LoadAlignmentParam("");}; */
148     /* int LoadMipParam(){return LoadMipParam("");}; */
149     /* int LoadVKMaskParam(){return LoadVKMaskParam("");}; */
150     /* int LoadParams(); */
151    
152 pam-fi 1.13 // int ProcessEvent(int);
153     // int ProcessEvent(){return ProcessEvent();};
154     int ProcessEvent();
155 pam-fi 1.11
156     int GetPfaNbinsAngle();
157     int GetPfaNbinsETA();
158 pam-fi 1.10 int GetPfaNbinsCharge(){return 0;};
159     float* GetPfaCoord(TString pfa, int nview, int nladder, int nang);
160     float* GetPfaAbs(TString pfa, int nang);
161    
162 pam-fi 1.12 void StatusDump(int view);
163     Bool_t StatusCheck(int view, int flagmask);
164    
165 pam-fi 1.13
166     void SetPFA(int pfaid){ sw_.pfaid = pfaid; };
167     int GetPFA(){ return sw_.pfaid; };
168    
169 pam-fi 1.11
170 pam-fi 1.5 ClassDef(TrkLevel1,2);
171 pam-fi 1.1
172     };
173    
174    
175     #endif

  ViewVC Help
Powered by ViewVC 1.1.23