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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Tue Dec 4 12:42:50 2007 UTC (17 years ago) by mocchiut
Branch: MAIN
Changes since 1.1: +2 -0 lines
File MIME type: text/plain
AGH! GRRRR....

1 mocchiut 1.1 /**
2     * \file CaloFranzini.h
3     * \author Emiliano Mocchiutti (2007/12/03)
4     */
5     #ifndef calofranzini_h
6     #define calofranzini_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     #include <TMatrixD.h>
20     #include <TArrayI.h>
21     #include <TArrayF.h>
22    
23     #include <iostream>
24    
25     using namespace std;
26    
27     /**
28     *
29     * Class to store and calculate variables useful for analysis with the Franzini method
30     */
31     class CaloFranzini : public TObject {
32    
33     private:
34     //
35     PamLevel2 *L2;
36     Bool_t debug;
37     TFile *file;
38     Int_t nbin;
39     TArrayF *brig;
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 sntr;
47     Float_t estrip[2][22][96];
48     Float_t qplane[44];
49     //
50     Bool_t dofull;
51     Bool_t dolong;
52     Int_t degfre;
53     //
54     Float_t longtzeta; ///< longitudinal covariance parameter used for event selection
55     Float_t fulltzeta; ///< full calorimeter covariance parameter used for event selection
56     //
57    
58     public:
59     //
60     CaloFranzini();
61     CaloFranzini(PamLevel2 *L2);
62     ~CaloFranzini(){ Delete(); };
63     //
64     Float_t GetLongTZeta(){Process(); return longtzeta;}; ///< Returns longitudinal covariance parameter used for event selection
65     Float_t GetFullTZeta(){Process(); return fulltzeta;}; ///< Returns full calorimeter covariance parameter used for event selection
66     //
67     Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection
68     Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection
69     //
70 mocchiut 1.2 Int_t GetDegreeOfFreedom(){return degfre;};
71     //
72 mocchiut 1.1 TArrayF *LoadLongAverage(Float_t rig);
73     TMatrixD *LoadCovarianceMatrix(Float_t rig);
74     //
75     Bool_t Open(TString matrixfile);
76     //
77     Bool_t CreateMatrixFile(TString matrixfile);
78     void WriteNumBin(Int_t numbin);
79     void WriteRigBin(TArrayF *rigbin);
80     void WriteLongMean(TArrayF *qpl, Int_t bin);
81     void WriteLongMatrix(TMatrixD *matrix, Int_t bin);
82     void CloseMatrixFile();
83     //
84     void CalculateLongTZeta(){ dofull = false; dolong=true; };
85     void CalculateFullTZeta(){ dolong = false; dofull=true; };
86     void SetDebug(Bool_t d){ debug=d; };
87     //
88     void Clear();
89     void Clear(Option_t *option){Clear();};
90     void Delete();
91     void Delete(Option_t *option){Delete();};
92     //
93     void Process(Int_t ntrack); ///< Process data track number ntrack
94     void Process(); ///< Process data
95     void Print();
96     void Print(Option_t *option){Print();};
97     //
98     ClassDef(CaloFranzini,1);
99     };
100    
101     #endif
102    

  ViewVC Help
Powered by ViewVC 1.1.23