/[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.3 - (hide annotations) (download)
Tue Oct 14 13:08:28 2008 UTC (16 years, 2 months ago) by pamelats
Branch: MAIN
Changes since 1.2: +10 -8 lines
File MIME type: text/plain
main bugs found, only loop method, optimized for Z less than 4

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 pamelats 1.3 /* Float_t qtchi2; */
76     /* Float_t qtz; */
77     /* Float_t qtetot; */
78     /* Float_t qtpskip; */
79 pamelats 1.1 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 pamelats 1.2 /* void SWAP(Float_t*,Float_t*); */
92 pamelats 1.1 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 pamelats 1.2 void Enetrack(Int_t *, Float_t *, Float_t *,Float_t *,Float_t * );
97 pamelats 1.1 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 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)
107     Float_t Get_lastplane(){ Process(); return estremi[1][0];}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
108     /* Float_t Get_qtchi2(){ Process(); return qtchi2;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
109     /* Float_t Get_qtz(){ Process(); return qtz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
110     /* Float_t Get_qtetot(){ Process(); return qtetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
111     /* Float_t Get_qtpskip(){ Process(); return qtpskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) */
112 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)
113     Float_t Get_lpz(){ Process(); return lpz;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
114     Float_t Get_lpetot(){ Process(); return lpetot;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
115     Float_t Get_lppskip(){ Process(); return lppskip;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane)
116    
117     //
118     CaloBragg();
119     CaloBragg(PamLevel2 *L2);
120     ~CaloBragg(){ Delete(); };
121     //
122     void Draw();
123     void SetDebug(Bool_t d){ debug=d; };
124     void UseTrack(Bool_t d){ usetrack=d; };
125     //
126     void Clear();
127     void Clear(Option_t *option){Clear();};
128     void Delete();
129     void Delete(Option_t *option){Delete();};
130     //
131     void Process(); ///< Process data for track number 0
132     void Process(Int_t ntr); ///< Process data for track number ntr
133     void Print();
134     void Print(Option_t *option){Print();};
135     //
136     ClassDef(CaloBragg,2);
137     };
138    
139     #endif
140    

  ViewVC Help
Powered by ViewVC 1.1.23