/[PAMELA software]/calo/flight/CaloProfile/inc/CaloProfile.h
ViewVC logotype

Annotation of /calo/flight/CaloProfile/inc/CaloProfile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Sep 22 20:08:10 2008 UTC (16 years, 4 months ago) by mocchiut
Branch: MAIN
Changes since 1.2: +101 -4 lines
File MIME type: text/plain
Added -m32 flag for cross compilation on 64bit machines

1 mocchiut 1.1 /**
2     * \file CaloProfile.h
3     * \author Emiliano Mocchiutti
4     */
5     #ifndef caloprofile_h
6     #define caloprofile_h
7    
8 mocchiut 1.3 #include <iostream>
9 mocchiut 1.1 #include <TTree.h>
10     #include <TFriendElement.h>
11     #include <TChain.h>
12     #include <TCanvas.h>
13     #include <TGraph.h>
14     #include <TH1F.h>
15     #include <TH2F.h>
16     #include <TFile.h>
17     #include <TPolyLine.h>
18     #include <TMath.h>
19     #include <TStyle.h>
20     #include <TList.h>
21     #include <TKey.h>
22     #include <TSystemFile.h>
23     #include <TSystemDirectory.h>
24     #include <TSQLServer.h>
25     #include <TF1.h>
26 mocchiut 1.3
27     #include <PamLevel2.h>
28 mocchiut 1.1
29     using namespace std;
30    
31     /**
32     *
33     */
34     class CaloLat : public TObject {
35    
36     private:
37     //
38     PamLevel2 *L2;
39     Bool_t debug;
40     //
41     // needed to avoid reprocessing the same event over and over to obtain the variables
42     //
43     UInt_t OBT;
44     UInt_t PKT;
45     UInt_t atime;
46     //
47     Float_t estrip[2][22][96];
48     //
49    
50     public:
51     //
52     //
53     void Draw();
54     void Draw(Int_t,Int_t);
55     //
56     CaloLat();
57     CaloLat(PamLevel2 *L2);
58     ~CaloLat(){ Delete(); };
59     //
60     void SetDebug(Bool_t d){ debug=d; };
61     //
62     void Clear();
63     void Clear(Option_t *option){Clear();};
64     void Delete();
65 mocchiut 1.2 void Delete(Option_t *option){Delete();};
66 mocchiut 1.1 //
67     void Process(); ///< Process data
68     void Print();
69 mocchiut 1.2 void Print(Option_t *option){Print();};
70 mocchiut 1.1 //
71     ClassDef(CaloLat,1);
72     };
73    
74     /**
75     *
76     */
77     class CaloLong : public TObject {
78    
79     private:
80     //
81     PamLevel2 *L2;
82     Bool_t debug;
83     //
84     // needed to avoid reprocessing the same event over and over to obtain the variables
85     //
86     UInt_t OBT;
87     UInt_t PKT;
88     UInt_t atime;
89 mocchiut 1.3 UInt_t fOBT;
90     UInt_t fPKT;
91     UInt_t fatime;
92     //
93     Int_t N;
94     Int_t NC;
95     Bool_t sel;
96     Bool_t cont;
97     Int_t mask18b;
98     //
99     Float_t chi2;
100     Float_t ndf;
101     Float_t E0;
102     Float_t a;
103     Float_t b;
104     Float_t errE0;
105     Float_t erra;
106     Float_t errb;
107     Float_t etmax;
108     Float_t asymm;
109     Float_t X0pl;
110     Int_t fitresult;
111     //
112     Bool_t no18x;
113 mocchiut 1.1 //
114     Float_t eplane[2][22];
115     //
116    
117     public:
118     //
119     //
120 mocchiut 1.3 void Fit();
121     void Fit(Bool_t draw);
122     //
123     // Double_t ccurve(Double_t *t, Double_t *par);
124     //
125     Float_t Get_E0(){this->Fit(); return E0;};
126     Float_t Get_a(){this->Fit(); return a;};
127     Float_t Get_b(){this->Fit(); return b;};
128     Float_t Get_errE0(){this->Fit(); return errE0;};
129     Float_t Get_erra(){this->Fit(); return erra;};
130     Float_t Get_errb(){this->Fit(); return errb;};
131     Float_t Get_chi2(){this->Fit(); return chi2;};
132     Float_t Get_ndf(){this->Fit(); return ndf;};
133     Float_t Get_nchi2(){this->Fit(); if ( ndf > 0 ) return (chi2/ndf); return 0;};
134     Float_t Get_tmax(){this->Fit(); if ( b != 0 ) return ((a-1.)/b); return 0;};
135     Float_t Get_asymm(){this->Fit(); return asymm;};
136     Float_t Get_exptmax(){this->Process(); return etmax;};
137     Float_t Get_X0pl(){this->Process(); return X0pl;};
138     Int_t Get_fitresult(){this->Fit(); return fitresult;};
139     //
140 mocchiut 1.1 void Draw();
141     void Draw(Int_t);
142     //
143     CaloLong();
144     CaloLong(PamLevel2 *L2);
145     ~CaloLong(){ Delete(); };
146     //
147     void SetDebug(Bool_t d){ debug=d; };
148 mocchiut 1.3 void UsePlane18X(){ no18x=false; };
149     //
150     void Selection(){sel = true; cont = false;}; ///< Set selection mode: planes from 1 to 22-N are used, plane 18 - N is masked if "emulate18" variable is true (DEFAULT);
151     void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used.
152     void SetNoWpreSampler(Int_t n);
153     void SetNoWcalo(Int_t n);
154     Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler.
155     Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter.
156     //
157     void Clear();
158     void Clear(Option_t *option){Clear();};
159     void Delete();
160     void Delete(Option_t *option){Delete();};
161     //
162     void Process(); ///< Process data
163     void Print();
164     void Print(Option_t *option){Print();};
165     //
166     ClassDef(CaloLong,2);
167     };
168    
169     /**
170     *
171     */
172     class Calo2D : public TObject {
173    
174     private:
175     //
176     PamLevel2 *L2;
177     Bool_t debug;
178     //
179     // needed to avoid reprocessing the same event over and over to obtain the variables
180     //
181     UInt_t OBT;
182     UInt_t PKT;
183     UInt_t atime;
184     //
185     Float_t estrip[23][96][96];
186     Int_t smax[23];
187     Int_t smay[23];
188     //
189    
190     public:
191     //
192     //
193     void Draw();
194     void Draw(Int_t);
195     //
196     Calo2D();
197     Calo2D(PamLevel2 *L2);
198     ~Calo2D(){ Delete(); };
199     //
200     void SetDebug(Bool_t d){ debug=d; };
201 mocchiut 1.1 //
202     void Clear();
203     void Clear(Option_t *option){Clear();};
204     void Delete();
205 mocchiut 1.2 void Delete(Option_t *option){Delete();};
206 mocchiut 1.1 //
207     void Process(); ///< Process data
208     void Print();
209 mocchiut 1.2 void Print(Option_t *option){Print();};
210 mocchiut 1.1 //
211 mocchiut 1.3 ClassDef(Calo2D,1);
212 mocchiut 1.1 };
213    
214     #endif
215    

  ViewVC Help
Powered by ViewVC 1.1.23