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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mocchiut, Mon Sep 22 20:08:10 2008 UTC revision 1.16 by mocchiut, Thu May 13 13:55:32 2010 UTC
# Line 5  Line 5 
5  #ifndef caloprofile_h  #ifndef caloprofile_h
6  #define caloprofile_h  #define caloprofile_h
7    
8    #define EMPTY -1
9    #define MAX 50
10    
11  #include <iostream>  #include <iostream>
12    #include <stdio.h>
13    #include <string.h>
14    #include <ctype.h>
15  #include <TTree.h>  #include <TTree.h>
16  #include <TFriendElement.h>  #include <TFriendElement.h>
17  #include <TChain.h>  #include <TChain.h>
# Line 23  Line 29 
29  #include <TSystemDirectory.h>  #include <TSystemDirectory.h>
30  #include <TSQLServer.h>  #include <TSQLServer.h>
31  #include <TF1.h>  #include <TF1.h>
32    #include <TGraphErrors.h>
33    #include <TMinuit.h>
34    
35  #include <PamLevel2.h>  #include <PamLevel2.h>
36    
37  using namespace std;  using namespace std;
38    
39    struct stack{
40        char data[MAX];
41        int top;
42    };
43    
44  /**  /**
45   *   *
46   */   */
# Line 45  class CaloLat : public TObject { Line 58  class CaloLat : public TObject {
58      UInt_t atime;      UInt_t atime;
59      //      //
60      Float_t estrip[2][22][96];      Float_t estrip[2][22][96];
61        TString suf;
62        Bool_t usepl18x;
63      //      //
64    
65   public:   public:
# Line 68  class CaloLat : public TObject { Line 83  class CaloLat : public TObject {
83      void Print();      void Print();
84      void Print(Option_t *option){Print();};      void Print(Option_t *option){Print();};
85      //      //
86      ClassDef(CaloLat,1);      
87        void UsePlane18X(Bool_t use){usepl18x = use;};
88        //
89        //
90        void SetSuffix(TString suffix){ suf = suffix;};
91        //
92        ClassDef(CaloLat,3);
93  };  };
94    
95  /**  /**
# Line 95  class CaloLong : public TObject { Line 116  class CaloLong : public TObject {
116      Bool_t sel;      Bool_t sel;
117      Bool_t cont;      Bool_t cont;
118      Int_t mask18b;      Int_t mask18b;
119        Bool_t usepl18x;
120      //      //
121      Float_t chi2;      Float_t chi2;
122      Float_t ndf;      Float_t ndf;
# Line 107  class CaloLong : public TObject { Line 129  class CaloLong : public TObject {
129      Float_t etmax;      Float_t etmax;
130      Float_t asymm;      Float_t asymm;
131      Float_t X0pl;      Float_t X0pl;
132        Float_t defE0;
133        Float_t umax;
134        Float_t lmax;
135        TString sumax;
136        TString slmax;
137      Int_t fitresult;      Int_t fitresult;
138      //      //
139      Bool_t no18x;      Bool_t no18x;
140        Bool_t maskXE;
141        Bool_t maskYE;
142        Bool_t maskXO;
143        Bool_t maskYO;
144        //
145        Bool_t xyaverage;
146        //
147        Bool_t heavytail;
148        Float_t letmax;
149        Float_t lmipth;
150      //      //
151      Float_t eplane[2][22];      Float_t eplane[2][22];
152      //      //
153        CaloLevel2 *clp;
154        //
155        Float_t Evaluate(TString s, Float_t tmax, Float_t X0pl ); // expression must be of the form "tmax+2.*X0pl", "5*tmax"."tmax+10","tmax-(4*tmax)+3.*X0pl"...
156        //
157        TString suf;
158    
159   public:   public:
160      //      //
161      //      //
162      void Fit();      void Fit();
163      void Fit(Bool_t draw);      void Fit(Bool_t draw);
164        TF1 *GetFit();
165      //      //
166      //    Double_t ccurve(Double_t *t, Double_t *par);      //    Double_t ccurve(Double_t *t, Double_t *par);
167      //      //
168        void SetCaloLevel2Pointer(CaloLevel2 *cp){ clp = cp;};
169        //
170      Float_t Get_E0(){this->Fit(); return E0;};      Float_t Get_E0(){this->Fit(); return E0;};
171        Float_t Get_defE0(){this->Fit(); return defE0;};
172      Float_t Get_a(){this->Fit(); return a;};      Float_t Get_a(){this->Fit(); return a;};
173      Float_t Get_b(){this->Fit(); return b;};      Float_t Get_b(){this->Fit(); return b;};
174      Float_t Get_errE0(){this->Fit(); return errE0;};      Float_t Get_errE0(){this->Fit(); return errE0;};
# Line 135  class CaloLong : public TObject { Line 181  class CaloLong : public TObject {
181      Float_t Get_asymm(){this->Fit(); return asymm;};      Float_t Get_asymm(){this->Fit(); return asymm;};
182      Float_t Get_exptmax(){this->Process(); return etmax;};      Float_t Get_exptmax(){this->Process(); return etmax;};
183      Float_t Get_X0pl(){this->Process(); return X0pl;};      Float_t Get_X0pl(){this->Process(); return X0pl;};
     Int_t Get_fitresult(){this->Fit(); return fitresult;};  
184      //      //
185        Float_t Get_letmax(){ return letmax;};
186        Float_t Get_lmipth(){ return lmipth;};
187        Int_t Get_fitresult(){this->Fit(); return fitresult;};    
188        //
189        void ForceNextFit(){atime=0;fatime=0;};
190      void Draw();      void Draw();
191      void Draw(Int_t);      void Draw(Int_t);
192      //      //
# Line 145  class CaloLong : public TObject { Line 195  class CaloLong : public TObject {
195      ~CaloLong(){ Delete(); };      ~CaloLong(){ Delete(); };
196      //      //
197      void SetDebug(Bool_t d){ debug=d; };      void SetDebug(Bool_t d){ debug=d; };
198      void UsePlane18X(){ no18x=false; };      //    void UsePlane18X(){ no18x=false; };
199        
200        void UsePlane18X(Bool_t use="false"){usepl18x = use; no18x=!use;};
201        //
202        //
203        void UseAverage(){ xyaverage = true;};
204        void UseAllMeas(){ xyaverage = false;};
205      //      //
206        void MaskSection(TString);
207        void UnMaskSection(TString);
208        void UnMaskSections();
209      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);      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);
210      void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used.      void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used.
211      void SetNoWpreSampler(Int_t n);      void SetNoWpreSampler(Int_t n);
212      void SetNoWcalo(Int_t n);      void SetNoWcalo(Int_t n);
213        void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo);
214      Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler.      Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler.
215      Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter.      Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter.
216        void SetEnergies(Float_t myene[][22]);
217        //
218        void SetLowerLimit(Float_t l){ lmax = l; };
219        void SetUpperLimit(Float_t u){ umax = u; };
220        void SetLowerLimit(TString sl){ slmax = sl; };// expression must be of the form "5*t"."t+10","t-(4*t)"... where t will be replaced by the fitted maximum (X0)
221        void SetUpperLimit(TString su){ sumax = su; };// expression must be of the form "5*t"."t+10","t-(4*t)"... where t will be replaced by the fitted maximum (X0)
222        //
223        void Setletmax(Float_t l){ letmax = l;};
224        void Setlmipth(Float_t l){ lmipth = l;};
225        void HeavyTail(Bool_t b){ heavytail=b;};
226        //
227        Float_t GetLowerLimit(){ return lmax;};
228        Float_t GetUpperLimit(){ return umax;};
229        //
230        void SetSuffix(TString suffix){ suf = suffix;};
231      //      //
232      void Clear();      void Clear();
233      void Clear(Option_t *option){Clear();};      void Clear(Option_t *option){Clear();};
# Line 163  class CaloLong : public TObject { Line 238  class CaloLong : public TObject {
238      void Print();      void Print();
239      void Print(Option_t *option){Print();};      void Print(Option_t *option){Print();};
240      //      //
241      ClassDef(CaloLong,2);      ClassDef(CaloLong,4);
242  };  };
243    
244  /**  /**
# Line 185  class Calo2D : public TObject { Line 260  class Calo2D : public TObject {
260      Float_t estrip[23][96][96];      Float_t estrip[23][96][96];
261      Int_t smax[23];      Int_t smax[23];
262      Int_t smay[23];      Int_t smay[23];
263        Bool_t usepl18x;
264      //      //
265        TString suf;
266    
267   public:   public:
268      //      //
# Line 204  class Calo2D : public TObject { Line 281  class Calo2D : public TObject {
281      void Delete();      void Delete();
282      void Delete(Option_t *option){Delete();};      void Delete(Option_t *option){Delete();};
283      //      //
284        void SetSuffix(TString suffix){ suf = suffix;};
285        
286        void UsePlane18X(Bool_t use){usepl18x = use;};
287        //
288        //
289      void Process(); ///< Process data      void Process(); ///< Process data
290      void Print();      void Print();
291      void Print(Option_t *option){Print();};      void Print(Option_t *option){Print();};
292      //      //
293      ClassDef(Calo2D,1);      ClassDef(Calo2D,3);
294  };  };
295    
296  #endif  #endif

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.23