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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Tue Dec 4 12:05:29 2007 UTC revision 1.7 by mocchiut, Mon Jan 21 10:24:08 2008 UTC
# Line 5  Line 5 
5  #ifndef calofranzini_h  #ifndef calofranzini_h
6  #define calofranzini_h  #define calofranzini_h
7    
8  #include <PamLevel2.h>  #include <iostream>
9    
10  #include <TTree.h>  #include <TTree.h>
11  #include <TFriendElement.h>  #include <TFriendElement.h>
# Line 17  Line 17 
17  #include <TSystemDirectory.h>  #include <TSystemDirectory.h>
18  #include <TSQLServer.h>  #include <TSQLServer.h>
19  #include <TMatrixD.h>  #include <TMatrixD.h>
20    #include <TMatrixF.h>
21  #include <TArrayI.h>  #include <TArrayI.h>
22  #include <TArrayF.h>  #include <TArrayF.h>
23    #include <TStyle.h>
24    #include <TCanvas.h>
25    #include <TStyle.h>
26    #include <TH1F.h>
27    #include <TDecompSVD.h>
28    //
29    
30  #include <iostream>  #include <PamLevel2.h>
31    
32  using namespace std;  using namespace std;
33    
# Line 37  class CaloFranzini : public TObject { Line 44  class CaloFranzini : public TObject {
44      TFile *file;      TFile *file;
45      Int_t nbin;      Int_t nbin;
46      TArrayF *brig;      TArrayF *brig;
47        TArrayF *brigm;
48        TArrayF *qplmean[17];
49        TMatrixD *hmat[17];
50        TMatrixF *hfmat[17];
51        TMatrixD *fqplmean[17];
52        Int_t N;
53        Int_t NC;
54      //      //
55      // needed to avoid reprocessing the same event over and over to obtain the variables;      // needed to avoid reprocessing the same event over and over to obtain the variables;
56      //      //
# Line 45  class CaloFranzini : public TObject { Line 59  class CaloFranzini : public TObject {
59      UInt_t atime;      UInt_t atime;
60      Int_t sntr;      Int_t sntr;
61      Float_t estrip[2][22][96];      Float_t estrip[2][22][96];
62      Float_t qplane[44];      Float_t qplane[43];
63        Bool_t sel;
64        Bool_t cont;
65        Bool_t crig;
66      //      //
67        Int_t mask18b;
68      Bool_t dofull;      Bool_t dofull;
69      Bool_t dolong;      Bool_t dolong;
70      Int_t degfre;      Int_t degfre;
# Line 67  class CaloFranzini : public TObject { Line 85  class CaloFranzini : public TObject {
85      Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection      Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection
86      Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection      Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection
87      //      //
88      TArrayF *LoadLongAverage(Float_t rig);      void Selection(){sel = true; cont = false;}; ///< Set selection mode: planes from 1 to 22-N are used, plane 18 - N is masked if "emulate18" variable is true (DEFAULT);
89        void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used.
90        Int_t GetDegreeOfFreedom(){return degfre;};
91        //
92        TArrayF *LoadLongAverage(Float_t rig);
93      TMatrixD *LoadCovarianceMatrix(Float_t rig);      TMatrixD *LoadCovarianceMatrix(Float_t rig);
94      //      //
95        Float_t GetAverageAt(Int_t plane, Float_t rig);
96        Float_t GetHmatrixAt(Int_t i, Int_t j, Float_t rig);
97        //
98        Float_t GetFullAverageAt(Int_t plane, Int_t strip, Float_t rig);
99        Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig);
100        Float_t GetFullAverageAt(Int_t plane, Int_t strip, Float_t rig, Int_t rigbin);
101        Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig, Int_t rigbin);
102        //
103      Bool_t Open(TString matrixfile);      Bool_t Open(TString matrixfile);
104        Bool_t LoadBin();
105        Bool_t LoadLong();
106        Bool_t LoadFull();
107        Bool_t LoadMatrices();
108        Bool_t LoadFullMatrices();
109        TFile *GetFile(){return file;};
110        //
111        TMatrixD *LoadFullAverage(Int_t rigbin);
112        TMatrixD *LoadFullNAverage(Int_t rigbin);
113        void UnLoadFullAverage(Int_t rigbin);
114        void UnLoadFullNAverage(Int_t rigbin);
115        TMatrixF *LoadFullMatrix(Int_t rigbin);
116        void LoadFullMatrix(Int_t rigbin, TMatrixF *&fmatri);
117        TMatrixF *LoadFullNMatrix(Int_t rigbin);
118        void UnLoadFullMatrix(Int_t rigbin);
119        void UnLoadFullNMatrix(Int_t rigbin);
120        //
121        Int_t ConvertStrip(Int_t mstrip);
122      //      //
123      Bool_t CreateMatrixFile(TString matrixfile);      Bool_t CreateMatrixFile(TString matrixfile);
124        Bool_t UpdateMatrixFile(TString matrixfile);
125      void WriteNumBin(Int_t numbin);      void WriteNumBin(Int_t numbin);
126      void WriteRigBin(TArrayF *rigbin);      void WriteRigBin(TArrayF *rigbin);
127      void WriteLongMean(TArrayF *qpl, Int_t bin);      void WriteLongMean(TArrayF *qpl, Int_t bin);
128      void WriteLongMatrix(TMatrixD *matrix, Int_t bin);      void WriteLongMatrix(TMatrixD *matrix, Int_t bin);
129        void WriteFullMatrix(TMatrixD *matrix, Int_t bin);
130        void WriteFullNMatrix(TMatrixF *matrix, Int_t bin);
131        void WriteFullMean(TMatrixD *matrix, Int_t bin);
132        void WriteFullNMean(TMatrixD *matrix, Int_t bin);
133        void WriteInvertedLongMatrix(TMatrixD matrix, Int_t bin);
134        void WriteInvertedFullMatrix(TMatrixD matrix, Int_t bin);
135      void CloseMatrixFile();      void CloseMatrixFile();
136      //      //
137      void CalculateLongTZeta(){ dofull = false; dolong=true; };      void CalculateLongTZeta(){ dofull = false; dolong=true; };
138      void CalculateFullTZeta(){ dolong = false; dofull=true; };      void CalculateFullTZeta(){ dolong = false; dofull=true; };
139      void SetDebug(Bool_t d){ debug=d; };      void SetDebug(Bool_t d){ debug=d; };
140        void SetNoWpreSampler(Int_t n);
141        void SetNoWcalo(Int_t n);
142        Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler.
143        Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter.
144        void DrawLongAverage(Float_t rig);
145        void DrawLongAverage(Int_t bin);
146        void UseCaloRig(){crig=true;};
147      //      //
148      void Clear();      void Clear();
149      void Clear(Option_t *option){Clear();};      void Clear(Option_t *option){Clear();};

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23