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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Wed Jun 15 12:28:44 2011 UTC (13 years, 7 months ago) by mocchiut
Branch: MAIN
Changes since 1.7: +1 -1 lines
File MIME type: text/plain
Bugs fixed and new methods implemented

1 /**
2 * \file CaloBragg.h
3 * \author Emiliano Mocchiutti & Valeria Malvezzi & Daniele Tavagnacco
4 */
5 #ifndef calobragg_h
6 #define calobragg_h
7 #define SQ(a) ( a * a )
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 <TStyle.h>
18 #include <TSystemDirectory.h>
19 #include <TSQLServer.h>
20 #include <TCanvas.h>
21 #include <TH2F.h>
22 #include <iostream>
23
24 using namespace std;
25
26
27 /**
28 *
29 * Class to store and calculate variables useful for nuclei analysis
30 */
31 class CaloBragg : public TObject {
32
33 private:
34 //
35 PamLevel2 *L2;
36 Bool_t debug;
37 Bool_t usetrack;
38 Bool_t startZero;
39
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 Int_t tr;
47 Int_t sntr;
48 //parametri calorimetro
49 Int_t NPLA;
50 Int_t NCHA;
51 Int_t nView;
52
53 Float_t AA;//mm larghezza strip
54 Float_t ADIST;//mm distanza tra pad
55 Float_t PIANO;//mm distanza
56
57 Float_t ySi;//mm spessore silicio
58 Float_t yW;//mm spessore tungsteno
59 Float_t rhoSi;//g/cm3 densita' silicio
60 Float_t rhoW;//g/cm3 densita' tugsteno
61 Float_t MIP;//Mev g/cm2 energia al minimo nel silicio per 0.38 mm
62
63 Float_t emin;
64 Float_t fzeta;
65
66 //
67 Bool_t usepl18x;
68 Bool_t newchi2;
69 Bool_t usenewBB;
70 Int_t ndf;
71
72
73 //parametri bethe-bloch
74 Float_t pigr;
75 Float_t Na;
76 Float_t ZA; /*Z/A per Si*/
77 Float_t ISi; /*MeV*/
78 Float_t IW; /*MeV*/
79 Float_t Me; /* MeV*/
80 Float_t MassP;/*MeV*/
81 Float_t r2; /*ro*ro in cm */
82
83 //variabili globali caricabili
84 Float_t Integrale;
85 Float_t bestchi2[4];
86 /* Float_t qtchi2; */
87 /* Float_t qtz; */
88 /* Float_t qtetot; */
89 /* Float_t qtpskip; */
90 Float_t lpchi2;
91 Float_t lpz;
92 Float_t lpetot;
93 Float_t lppskip;
94 Float_t calorimetro[44][2];
95 Float_t spessore[4];
96 Float_t estremi[2][2];//[0][0]primo piano [0][1]energia primo
97 //[1][0]ultim piano [1][1]energia ultim
98 //Float_t shift[2][22];//shift dei piani
99 //Float_t piano[22]; //posizione z dei piani
100 Float_t elem[32];//A degli elementi
101 //
102
103 Float_t dEplan[2*22];//energia rilasciata calcolata
104
105 /* void SWAP(Float_t*,Float_t*); */
106 void LoadParam();
107 void conversione();
108 void BetheBloch(Float_t *,Float_t *,Float_t *,Float_t *,Float_t *,Float_t *, Float_t);
109 void ELOSS(Float_t *,Int_t *, Float_t *, Float_t *, Float_t);
110 void Enetrack(Int_t *, Float_t *, Float_t *,Float_t *,Float_t * );
111 void chiquadro(Float_t *, Float_t *);
112 void loopze(Float_t ,Float_t ,Float_t ,Float_t, Int_t );
113 void mediatroncata();
114 void Zdaloop();
115 void CleanPlanes(Float_t epiano[22][2]);
116
117 public:
118 //
119 void SetStartZero(Bool_t yes=false){ startZero = yes;};
120 //
121 Float_t Get_firstplane(){ Process(); return estremi[0][0];}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
122 Float_t Get_lastplane(){ Process(); return estremi[1][0];}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
123 /* Float_t Get_qtchi2(){ Process(); return qtchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
124 /* Float_t Get_qtz(){ Process(); return qtz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
125 /* Float_t Get_qtetot(){ Process(); return qtetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
126 /* Float_t Get_qtpskip(){ Process(); return qtpskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
127 Float_t Get_lpchi2(){ Process(); return lpchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
128 Float_t Get_lpz(){ Process(); return lpz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
129 Float_t Get_lpetot(){ Process(); return lpetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
130 Float_t Get_lppskip(){ Process(); return lppskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
131
132 Float_t Integral();
133 Float_t LastIntegral();
134
135 void ForceZeta(Float_t zeta){ fzeta = zeta;};
136 void ForceProcessing(){ sntr = -1000.;};
137
138 void UsePlane18X(Bool_t use){usepl18x = use;};
139
140 void UseNewChi2(Bool_t use){newchi2 = use;};
141 void UseNewBB(Bool_t use){usenewBB = use;};
142 //
143
144 //
145 CaloBragg();
146 CaloBragg(PamLevel2 *L2);
147 ~CaloBragg(){ Delete(); };
148 //
149 void Draw();
150 void SetDebug(Bool_t d){ debug=d; };
151 void UseTrack(Bool_t d){ usetrack=d; };
152 //
153 void Clear();
154 void Clear(Option_t *option){Clear();};
155 void Delete();
156 void Delete(Option_t *option){Delete();};
157 //
158 void Process(); ///< Process data for track number 0
159 void Process(Int_t ntr); ///< Process data for track number ntr
160 void Print();
161 void Print(Option_t *option){Print();};
162 //
163 ClassDef(CaloBragg,6);
164 };
165
166 #endif
167

  ViewVC Help
Powered by ViewVC 1.1.23