/[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.1 by mocchiut, Fri Nov 9 09:11:24 2007 UTC revision 1.4 by mocchiut, Thu Dec 18 21:05:52 2008 UTC
# Line 5  Line 5 
5  #ifndef caloprofile_h  #ifndef caloprofile_h
6  #define caloprofile_h  #define caloprofile_h
7    
8  #include <PamLevel2.h>  #include <iostream>
   
9  #include <TTree.h>  #include <TTree.h>
10  #include <TFriendElement.h>  #include <TFriendElement.h>
11  #include <TChain.h>  #include <TChain.h>
# Line 24  Line 23 
23  #include <TSystemDirectory.h>  #include <TSystemDirectory.h>
24  #include <TSQLServer.h>  #include <TSQLServer.h>
25  #include <TF1.h>  #include <TF1.h>
26  #include <iostream>  
27    #include <PamLevel2.h>
28    
29  using namespace std;  using namespace std;
30    
# Line 62  class CaloLat : public TObject { Line 62  class CaloLat : public TObject {
62      void Clear();      void Clear();
63      void Clear(Option_t *option){Clear();};      void Clear(Option_t *option){Clear();};
64      void Delete();      void Delete();
65        void Delete(Option_t *option){Delete();};
66      //      //
67      void Process(); ///< Process data      void Process(); ///< Process data
68      void Print();      void Print();
69        void Print(Option_t *option){Print();};
70      //      //
71      ClassDef(CaloLat,1);      ClassDef(CaloLat,1);
72  };  };
# Line 84  class CaloLong : public TObject { Line 86  class CaloLong : public TObject {
86      UInt_t OBT;      UInt_t OBT;
87      UInt_t PKT;      UInt_t PKT;
88      UInt_t atime;      UInt_t atime;
89        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      //      //
114      Float_t eplane[2][22];      Float_t eplane[2][22];
115      //      //
# Line 91  class CaloLong : public TObject { Line 117  class CaloLong : public TObject {
117   public:   public:
118      //      //
119      //      //
120        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      void Draw();      void Draw();
141      void Draw(Int_t);      void Draw(Int_t);
142      //      //
# Line 99  class CaloLong : public TObject { Line 145  class CaloLong : public TObject {
145      ~CaloLong(){ Delete(); };      ~CaloLong(){ Delete(); };
146      //      //
147      void SetDebug(Bool_t d){ debug=d; };      void SetDebug(Bool_t d){ debug=d; };
148        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        void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo);
155        Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler.
156        Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter.
157        //
158        void Clear();
159        void Clear(Option_t *option){Clear();};
160        void Delete();
161        void Delete(Option_t *option){Delete();};
162        //
163        void Process(); ///< Process data
164        void Print();
165        void Print(Option_t *option){Print();};
166        //
167        ClassDef(CaloLong,2);
168    };
169    
170    /**
171     *
172     */
173    class Calo2D : public TObject {
174    
175     private:
176        //
177        PamLevel2 *L2;
178        Bool_t debug;
179        //
180        // needed to avoid reprocessing the same event over and over to obtain the variables
181        //
182        UInt_t OBT;
183        UInt_t PKT;
184        UInt_t atime;
185        //
186        Float_t estrip[23][96][96];
187        Int_t smax[23];
188        Int_t smay[23];
189        //
190    
191     public:
192        //
193        //
194        void Draw();
195        void Draw(Int_t);
196        //
197        Calo2D();
198        Calo2D(PamLevel2 *L2);
199        ~Calo2D(){ Delete(); };
200        //
201        void SetDebug(Bool_t d){ debug=d; };
202      //      //
203      void Clear();      void Clear();
204      void Clear(Option_t *option){Clear();};      void Clear(Option_t *option){Clear();};
205      void Delete();      void Delete();
206        void Delete(Option_t *option){Delete();};
207      //      //
208      void Process(); ///< Process data      void Process(); ///< Process data
209      void Print();      void Print();
210        void Print(Option_t *option){Print();};
211      //      //
212      ClassDef(CaloLong,1);      ClassDef(Calo2D,1);
213  };  };
214    
215  #endif  #endif

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23