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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon Dec 14 14:52:39 2009 UTC (15 years, 1 month ago) by mocchiut
Branch: MAIN
Changes since 1.4: +1 -1 lines
File MIME type: text/plain
Do not use plane 18x by default

1 pamelats 1.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     //
39     // needed to avoid reprocessing the same event over and over to obtain the variables
40     //
41     UInt_t OBT;
42     UInt_t PKT;
43     UInt_t atime;
44     Int_t tr;
45     Int_t sntr;
46     //parametri calorimetro
47     Int_t NPLA;
48     Int_t NCHA;
49     Int_t nView;
50    
51     Float_t AA;//mm larghezza strip
52     Float_t ADIST;//mm distanza tra pad
53     Float_t PIANO;//mm distanza
54    
55     Float_t ySi;//mm spessore silicio
56     Float_t yW;//mm spessore tungsteno
57     Float_t rhoSi;//g/cm3 densita' silicio
58     Float_t rhoW;//g/cm3 densita' tugsteno
59     Float_t MIP;//Mev g/cm2 energia al minimo nel silicio per 0.38 mm
60    
61     Float_t emin;
62 mocchiut 1.4
63     //
64     Bool_t usepl18x;
65    
66 pamelats 1.1 //parametri bethe-bloch
67     Float_t pigr;
68     Float_t Na;
69     Float_t ZA; /*Z/A per Si*/
70     Float_t ISi; /*MeV*/
71     Float_t Me; /* MeV*/
72     Float_t MassP;/*MeV*/
73     Float_t r2; /*ro*ro in cm */
74    
75     //variabili globali caricabili
76     Float_t Integrale;
77     Float_t bestchi2[4];
78 pamelats 1.3 /* Float_t qtchi2; */
79     /* Float_t qtz; */
80     /* Float_t qtetot; */
81     /* Float_t qtpskip; */
82 pamelats 1.1 Float_t lpchi2;
83     Float_t lpz;
84     Float_t lpetot;
85     Float_t lppskip;
86     Float_t calorimetro[44][2];
87     Float_t spessore[3];
88     Float_t estremi[2][2];//[0][0]primo piano [0][1]energia primo
89     //[1][0]ultim piano [1][1]energia ultim
90     //Float_t shift[2][22];//shift dei piani
91     //Float_t piano[22]; //posizione z dei piani
92     Float_t elem[32];//A degli elementi
93     //
94 pamelats 1.2 /* void SWAP(Float_t*,Float_t*); */
95 pamelats 1.1 void LoadParam();
96     void conversione();
97     void BetheBloch(Float_t *,Float_t *,Float_t *,Float_t *,Float_t *,Float_t *);
98     void ELOSS(Float_t *,Int_t *, Float_t *, Float_t *);
99 pamelats 1.2 void Enetrack(Int_t *, Float_t *, Float_t *,Float_t *,Float_t * );
100 pamelats 1.1 void chiquadro(Float_t *, Float_t *);
101     void loopze(Float_t ,Float_t ,Float_t ,Float_t );
102     void mediatroncata();
103     void Zdaloop();
104    
105    
106     public:
107     //
108     //
109 pamelats 1.3 Float_t Get_firstplane(){ Process(); return estremi[0][0];}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
110     Float_t Get_lastplane(){ Process(); return estremi[1][0];}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
111     /* Float_t Get_qtchi2(){ Process(); return qtchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
112     /* Float_t Get_qtz(){ Process(); return qtz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
113     /* Float_t Get_qtetot(){ Process(); return qtetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
114     /* Float_t Get_qtpskip(){ Process(); return qtpskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
115 pamelats 1.1 Float_t Get_lpchi2(){ Process(); return lpchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
116     Float_t Get_lpz(){ Process(); return lpz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
117     Float_t Get_lpetot(){ Process(); return lpetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
118     Float_t Get_lppskip(){ Process(); return lppskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
119    
120 mocchiut 1.4 void UsePlane18X(Bool_t use){usepl18x = use;};
121     //
122    
123 pamelats 1.1 //
124     CaloBragg();
125     CaloBragg(PamLevel2 *L2);
126     ~CaloBragg(){ Delete(); };
127     //
128     void Draw();
129     void SetDebug(Bool_t d){ debug=d; };
130     void UseTrack(Bool_t d){ usetrack=d; };
131     //
132     void Clear();
133     void Clear(Option_t *option){Clear();};
134     void Delete();
135     void Delete(Option_t *option){Delete();};
136     //
137     void Process(); ///< Process data for track number 0
138     void Process(Int_t ntr); ///< Process data for track number ntr
139     void Print();
140     void Print(Option_t *option){Print();};
141     //
142 mocchiut 1.5 ClassDef(CaloBragg,3);
143 pamelats 1.1 };
144    
145     #endif
146    

  ViewVC Help
Powered by ViewVC 1.1.23