/[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.1 - (hide annotations) (download)
Fri Jun 13 08:11:04 2008 UTC (16 years, 6 months ago) by pamelats
Branch: MAIN
Branch point for: CaloBragg
File MIME type: text/plain
Initial revision

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    
63     //parametri bethe-bloch
64     Float_t pigr;
65     Float_t Na;
66     Float_t ZA; /*Z/A per Si*/
67     Float_t ISi; /*MeV*/
68     Float_t Me; /* MeV*/
69     Float_t MassP;/*MeV*/
70     Float_t r2; /*ro*ro in cm */
71    
72     //variabili globali caricabili
73     Float_t Integrale;
74     Float_t bestchi2[4];
75     Float_t qtchi2;
76     Float_t qtz;
77     Float_t qtetot;
78     Float_t qtpskip;
79     Float_t lpchi2;
80     Float_t lpz;
81     Float_t lpetot;
82     Float_t lppskip;
83     Float_t calorimetro[44][2];
84     Float_t spessore[3];
85     Float_t estremi[2][2];//[0][0]primo piano [0][1]energia primo
86     //[1][0]ultim piano [1][1]energia ultim
87     //Float_t shift[2][22];//shift dei piani
88     //Float_t piano[22]; //posizione z dei piani
89     Float_t elem[32];//A degli elementi
90     //
91     void SWAP(Float_t*,Float_t*);
92     void LoadParam();
93     void conversione();
94     void BetheBloch(Float_t *,Float_t *,Float_t *,Float_t *,Float_t *,Float_t *);
95     void ELOSS(Float_t *,Int_t *, Float_t *, Float_t *);
96     void Enetrack(Int_t *, Float_t *, Float_t *,Float_t * );
97     void chiquadro(Float_t *, Float_t *);
98     void loopze(Float_t ,Float_t ,Float_t ,Float_t );
99     void mediatroncata();
100     void Zdaloop();
101    
102    
103     public:
104     //
105     //
106     Float_t Get_qtchi2(){ Process(); return qtchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
107     Float_t Get_qtz(){ Process(); return qtz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
108     Float_t Get_qtetot(){ Process(); return qtetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
109     Float_t Get_qtpskip(){ Process(); return qtpskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
110     Float_t Get_lpchi2(){ Process(); return lpchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
111     Float_t Get_lpz(){ Process(); return lpz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
112     Float_t Get_lpetot(){ Process(); return lpetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
113     Float_t Get_lppskip(){ Process(); return lppskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
114    
115     //
116     CaloBragg();
117     CaloBragg(PamLevel2 *L2);
118     ~CaloBragg(){ Delete(); };
119     //
120     void Draw();
121     void SetDebug(Bool_t d){ debug=d; };
122     void UseTrack(Bool_t d){ usetrack=d; };
123     //
124     void Clear();
125     void Clear(Option_t *option){Clear();};
126     void Delete();
127     void Delete(Option_t *option){Delete();};
128     //
129     void Process(); ///< Process data for track number 0
130     void Process(Int_t ntr); ///< Process data for track number ntr
131     void Print();
132     void Print(Option_t *option){Print();};
133     //
134     ClassDef(CaloBragg,2);
135     };
136    
137     #endif
138    

  ViewVC Help
Powered by ViewVC 1.1.23