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

Contents of /calo/flight/CaloEnergy/inc/CaloEnergy.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jul 13 16:10:22 2009 UTC (15 years, 6 months ago) by mocchiut
Branch: MAIN
Changes since 1.2: +13 -1 lines
File MIME type: text/plain
New features added

1 /**
2 * \file CaloEnergy.h
3 * \authors Emiliano Mocchiutti & Giovanna Jerse
4 */
5 #ifndef caloenergy_h
6 #define caloenergy_h
7
8 #include <PamLevel2.h>
9
10 #include <TTree.h>
11 #include <TFriendElement.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 #include <TList.h>
15 #include <TKey.h>
16 #include <TSystemFile.h>
17 #include <TSystemDirectory.h>
18 #include <TSQLServer.h>
19
20 #include <iostream>
21
22 using namespace std;
23
24 /**
25 *
26 */
27 class CaloEnergy : public TObject {
28
29 private:
30 //
31 PamLevel2 *L2;
32 Bool_t debug;
33 //
34 // needed to avoid reprocessing the same event over and over to obtain the variables
35 //
36 UInt_t OBT;
37 UInt_t PKT;
38 UInt_t atime;
39 TString sntr;
40 UInt_t AOBT;
41 UInt_t APKT;
42 UInt_t aatime;
43 TString asntr;
44 //
45 Float_t fM;
46 Float_t fM1;
47 Int_t fPl;
48 Float_t fConv_rxe;
49 Float_t fConv_rxo;
50 Float_t fConv_rye;
51 Float_t fConv_ryo;
52 Bool_t fLong;
53 //
54 Float_t fEnergyxe;
55 Float_t fEnergyxo;
56 Float_t fEnergyye;
57 Float_t fEnergyyo;
58 Float_t fEnergy;
59 Float_t fCount;
60 Int_t fMax_planexe;
61 Int_t fMax_planexo;
62 Int_t fMax_planeyo;
63 Int_t fMax_planeye;
64 Float_t fMax_plane;
65 //
66 Float_t xe1;
67 Float_t xe2;
68 Float_t xe3;
69 Float_t xe4;
70 Float_t xe5;
71 Float_t xe6;
72 Float_t z1;
73 Float_t yo1;
74 Float_t yo2;
75 Float_t yo3;
76 Float_t yo4;
77 Float_t yo5;
78 Float_t yo6;
79 Float_t z2;
80 Float_t xo1;
81 Float_t xo2;
82 Float_t xo3;
83 Float_t xo4;
84 Float_t xo5;
85 Float_t xo6;
86 Float_t z3;
87 Float_t ye1;
88 Float_t ye2;
89 Float_t ye3;
90 Float_t ye4;
91 Float_t ye5;
92 Float_t ye6;
93 Float_t z4;
94 Float_t trk_z[22][2];
95 Float_t en;
96 Int_t view;
97 Int_t plane;
98 Int_t strip;
99 Int_t fRad;
100 Float_t energyxe;
101 Float_t energyyo;
102 Float_t energyxo;
103 Float_t energyye;
104 Float_t en_xep[11];
105 Float_t en_yop[11];
106 Float_t en_xop[11];
107 Float_t en_yep[11];
108 Float_t enstrip[2][22][96];
109 //
110 Bool_t fXosel;
111 Bool_t fXesel;
112 Bool_t fYosel;
113 Bool_t fYesel;
114 Bool_t fSel;
115 Bool_t fPartsel;
116 Int_t fXeout;
117 Int_t fYeout;
118 Int_t fXoout;
119 Int_t fYoout;
120 Int_t fXomin;
121 Int_t fXemin;
122 Int_t fYomin;
123 Int_t fYemin;
124 //
125 Bool_t fSimu;
126 void DefineGeometry();
127 void Set();
128
129 public:
130 //
131 CaloEnergy();
132 CaloEnergy(PamLevel2 *L2);
133 CaloEnergy(PamLevel2 *L2, Bool_t simulation);
134 ~CaloEnergy(){ Delete(); };
135 //
136 void SetDebug(Bool_t d){ debug=d; };
137 //
138 void Clear();
139 void Clear(Option_t *option){Clear();};
140 void Delete();
141 void Delete(Option_t *option){Delete();};
142 //
143 void Process();
144 void Process(TString section);
145 void Print();
146 void Print(Option_t *option){Print();};
147 //
148 Bool_t IsInsideAcceptance(TString section);
149 Bool_t IsInsideReducedAcceptance(){return fPartsel;};
150 //
151 Bool_t IsInsideXE(){return(IsInsideAcceptance("XE"));};
152 Bool_t InsideXEcheck(){return fXesel;};
153 Bool_t IsInsideXO(){return(IsInsideAcceptance("XO"));};
154 Bool_t InsideXOcheck(){return fXosel;};
155 Bool_t IsInsideYE(){return(IsInsideAcceptance("YE"));};
156 Bool_t InsideYEcheck(){return fYesel;};
157 Bool_t IsInsideYO(){return(IsInsideAcceptance("YO"));};
158 Bool_t InsideYOcheck(){return fYosel;};
159 //
160 Float_t GetEnergy(){ Process(); return fEnergy;};
161 Float_t GetEnergy(TString section){ Process(section); return fEnergy;};
162 Float_t GetCount(){ return fCount;};
163 //
164 Float_t GetMaxplane(){ return fMax_plane;};
165 Float_t GetMaxEnergy(TString section){ return(this->GetEnergy(section)*this->GetConversionFactor(section));};
166 Int_t GetMaxplane(TString section);
167 //
168 void UseLongitudinalFitEnergy(){ fPl = 0; fLong = true;};
169 void UseMeasuredEnergyUpToMax(){ fLong = false;};
170 void SetMargin(Float_t margin){fM = margin + 0.096; fM1 = margin - 0.122 - 0.096; if ( fM1 < 0. ) fM1 = 0.;};
171 void SetMarginStripDirection(Float_t margin){fM = margin + 0.096;};
172 void SetMarginStripReading(Float_t margin){fM1 = margin -0.122 - 0.096;};
173 void SetRadius(Int_t strip){fRad = strip;};
174 void SetMaxPlaneOffset(Int_t noplanes){fPl = noplanes;};
175 //
176 void SetMinimumContainment(TString section, Int_t plane);
177 Int_t GetMinimumContainment(TString section);
178 void SetConversionFactor(TString section, Float_t conv_r);
179 Float_t GetConversionFactor(TString section);
180 //
181 ClassDef(CaloEnergy,1);
182 };
183
184 #endif
185

  ViewVC Help
Powered by ViewVC 1.1.23