/[PAMELA software]/DarthVader/CalorimeterLevel2/inc/CaloLevel0.h
ViewVC logotype

Diff of /DarthVader/CalorimeterLevel2/inc/CaloLevel0.h

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

revision 1.1 by mocchiut, Sun Mar 18 20:22:50 2007 UTC revision 1.13 by mocchiut, Tue Nov 5 14:02:05 2013 UTC
# Line 12  Line 12 
12  #include <PamelaRun.h>  #include <PamelaRun.h>
13  #include <physics/calorimeter/CalorimeterEvent.h>  #include <physics/calorimeter/CalorimeterEvent.h>
14  #include <CalibCalPedEvent.h>  #include <CalibCalPedEvent.h>
15    #include <CalibCalPulse1Event.h>
16    #include <CalibCalPulse2Event.h>
17  //  //
18  #include <CaloCore.h>  #include <CaloCore.h>
19  #include <CaloLevel1.h>  #include <CaloLevel1.h>
# Line 32  class CaloLevel0 : public TObject { Line 34  class CaloLevel0 : public TObject {
34   public:   public:
35      Bool_t debug; ///< debugging flag      Bool_t debug; ///< debugging flag
36      Bool_t verbose; ///< verbose flag      Bool_t verbose; ///< verbose flag
37      Bool_t crosst;      Bool_t crosst; ///< Cross talk correction flag (true apply false do not apply)
38        Bool_t ctground; ///< Cross talk correction type (true ground, false flight)
39        Bool_t noselfct; ///< Pre cross talk correction do not applied to the strip itself
40      //      //
41        Bool_t mask18; ///< Mask plane 18X flag
42      // variables in which it is stored the calibration information for the four sections      // variables in which it is stored the calibration information for the four sections
43      //      //
44      UInt_t idcalib[4]; ///< ID of root file containing calibrations (one per section)      UInt_t idcalib[4]; ///< ID of root file containing calibrations (one per section)
# Line 50  class CaloLevel0 : public TObject { Line 55  class CaloLevel0 : public TObject {
55    
56      void Set(){ de = new CalorimeterEvent(); };          void Set(){ de = new CalorimeterEvent(); };    
57    
58      void Clear(){};      void Clear(Option_t *t=""){};
59      void* GetPointerToCalorimeterEvent(){ return &de; };      void* GetPointerToCalorimeterEvent(){ return &de; };
60      CalorimeterEvent* GetCalorimeterEvent(){ return de; };      CalorimeterEvent* GetCalorimeterEvent(){ return de; };
61      //      //
# Line 72  class CaloLevel0 : public TObject { Line 77  class CaloLevel0 : public TObject {
77      Float_t dexyc[2][22][96]; ///< RAW ADC data      Float_t dexyc[2][22][96]; ///< RAW ADC data
78      Float_t base[2][22][6]; ///< baselines for this event      Float_t base[2][22][6]; ///< baselines for this event
79      Float_t sbase[2][22][6]; ///< saved baselines from previous events      Float_t sbase[2][22][6]; ///< saved baselines from previous events
80        Float_t ctprecor[2][22][6]; ///< 'cross-talk' correction factor for each pre from pulse calibration or table file
81        Float_t ctneigcor[2][22][6]; ///< 'cross-talk' correction factor for each pre, neighbour strips from pulse calibration or table file
82        Float_t ctsicor[2][22][9]; ///< 'cross-talk' correction factor for each silicon detector
83        Int_t maxrms[2][22]; ///< max rms for each plane, strip with higher values are masked
84      //      //
85      // Energy vector      // Energy vector
86      //      //
# Line 83  class CaloLevel0 : public TObject { Line 92  class CaloLevel0 : public TObject {
92      Bool_t calopar1; ///< boolean, is true if parameter set number 101 has already been loaded      Bool_t calopar1; ///< boolean, is true if parameter set number 101 has already been loaded
93      Bool_t calopar2; ///< boolean, is true if parameter set number 102 has already been loaded      Bool_t calopar2; ///< boolean, is true if parameter set number 102 has already been loaded
94      Bool_t calopar3; ///< boolean, is true if parameter set number 103 has already been loaded      Bool_t calopar3; ///< boolean, is true if parameter set number 103 has already been loaded
95        Bool_t calopar4; ///< boolean, is true if parameter set number 103 has already been loaded
96        Bool_t calopar5; ///< boolean, is true if parameter set number 103 has already been loaded
97      UInt_t ftcalopar1; ///< parameter set 101 lower limit validity      UInt_t ftcalopar1; ///< parameter set 101 lower limit validity
98      UInt_t ttcalopar1; ///< parameter set 101 upper limit validity      UInt_t ttcalopar1; ///< parameter set 101 upper limit validity
99      UInt_t ftcalopar2; ///< parameter set 102 lower limit validity      UInt_t ftcalopar2; ///< parameter set 102 lower limit validity
100      UInt_t ttcalopar2; ///< parameter set 102 upper limit validity      UInt_t ttcalopar2; ///< parameter set 102 upper limit validity
101      UInt_t ftcalopar3; ///< parameter set 103 lower limit validity      UInt_t ftcalopar3; ///< parameter set 103 lower limit validity
102      UInt_t ttcalopar3; ///< parameter set 103 upper limit validity      UInt_t ttcalopar3; ///< parameter set 103 upper limit validity
103        UInt_t ftcalopar4; ///< parameter set 103 lower limit validity
104        UInt_t ttcalopar4; ///< parameter set 103 upper limit validity
105        UInt_t ftcalopar5; ///< parameter set 103 lower limit validity
106        UInt_t ttcalopar5; ///< parameter set 103 upper limit validity
107      //      //
     // private methods  
     //  
 /**  
  * \param s calorimeter section.  
 **/  
108      void ClearCalibVals(Int_t s); ///< clear calibration values for section s      void ClearCalibVals(Int_t s); ///< clear calibration values for section s
109      void ClearCommonVar(); ///< clear common variables      void ClearCommonVar(); ///< clear common variables
110      void ClearTrkVar();  ///< clear track-related variables      void ClearTrkVar();  ///< clear track-related variables
111      void FindBaseRaw(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from RAW data      void FindBaseRaw(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from RAW data
112      Int_t Update(TSQLServer *dbc, UInt_t atime, Int_t s); ///< update calibration for this event      void FindBaseCompress(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from COMPRESS data
113        void FindBaseRaw(Int_t l, Int_t m, Int_t pre,Int_t &nst, Float_t &qp); ///< calculate baselines starting from RAW data
114        void FindBaseCompress(Int_t l, Int_t m, Int_t pre,Int_t &nst, Float_t &qp); ///< calculate baselines starting from COMPRESS data
115        Int_t Update(GL_TABLES *glt, UInt_t atime, Int_t s); ///< update calibration for this event
116      Int_t LoadCalib(Int_t s); ///< load calibrations      Int_t LoadCalib(Int_t s); ///< load calibrations
117    
118      //      //
# Line 107  class CaloLevel0 : public TObject { Line 120  class CaloLevel0 : public TObject {
120      //      //
121      Float_t mip[2][22][96]; ///< ADC to MIP conversion values      Float_t mip[2][22][96]; ///< ADC to MIP conversion values
122      Int_t obadmask[2][22][96]; ///< Offline mask of bad strips (not used to calculate baselines and calorimeter variables)            Int_t obadmask[2][22][96]; ///< Offline mask of bad strips (not used to calculate baselines and calorimeter variables)      
123        Int_t obadpulsemask[2][22][96]; ///< Offline mask of bad pulser (not used to calculate crosstalk corrections)      
124      Float_t emin; ///< Offline threshold to separate noise from signal      Float_t emin; ///< Offline threshold to separate noise from signal
125        Float_t memin[2][22][96]; ///< Offline threshold to separate noise from signal
126      //      //
127      // Structures to pass data from/to F77      // Structures to pass data from/to F77
128      //      //
129      struct FlCaLevel1 *clevel1; ///< input structure      struct FlCaLevel1 *clevel1; ///< input structure
130      struct FlCaLevel2 *clevel2; ///< output structure      struct FlCaLevel2 *clevel2; ///< output structure
131    /*      // */
132    /*      struct FlEventi *eventi; */
133    /*      struct FlGruppo *gruppo; */
134    /*      struct FlGruppo2 *gruppo2; */
135    /*      struct FlGruppo4 *gruppo4; */
136    /*      struct FlTaglioen *taglioen; */
137    /*      struct FlAngolo *angolo; */
138    /*      struct FlWhere *where; */
139    /*      struct FlGeneral *general; */
140    /*      struct FlCh *ch; */
141    /*      struct FlCalofit *calofit; */
142    /*      struct FlPawcd *pawcd; */
143    /*      struct FlQuestd *questd; */
144    /*      // */
145      //      //
146      //      //
147      //      //
# Line 120  class CaloLevel0 : public TObject { Line 149  class CaloLevel0 : public TObject {
149      //      //
150      // useful methods      // useful methods
151      //      //
152      Int_t ChkParam(TSQLServer *dbc, UInt_t runheader); ///< check and load parameters data      Int_t ChkParam(GL_TABLES *glt, UInt_t runheader, Bool_t mech); ///< check and load parameters data
153      Int_t ChkCalib(TSQLServer *dbc, UInt_t atime); ///< check and load calibration data      Int_t ChkParam(TSQLServer *dbc, UInt_t runheader, Bool_t mech); ///< check and load parameters data
154        Int_t ChkParamDo(TSQLServer *dbc, UInt_t runheader, Bool_t mech); ///< check and load parameters data
155        Int_t ChkCalib(GL_TABLES *glt, UInt_t atime); ///< check and load calibration data
156        Int_t CalcCrossTalkCorr(GL_TABLES *glt, UInt_t runheader); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations
157        Int_t CalcCrossTalkCorr(TSQLServer *dbc, UInt_t runheader); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations
158        Int_t CalcCrossTalkCorr(GL_TABLES *glt, UInt_t runheader, Bool_t usetable); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations
159        Int_t CalcCrossTalkCorr(TSQLServer *dbc, UInt_t runheader, Bool_t usetable); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations
160        Int_t CalcCrossTalkCorrDo(TSQLServer *dbc, UInt_t runheader, Bool_t usetable); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations
161      Int_t Calibrate(Int_t ei); ///< perform data calibration      Int_t Calibrate(Int_t ei); ///< perform data calibration
162      void GetCommonVar(); ///< call fortran common variables program      void GetCommonVar(); ///< call fortran common variables program
163      void GetTrkVar(); ///< call fortran track-related variables program      void GetTrkVar(); ///< call fortran track-related variables program
164      void ClearStructs(); ///< clear input and output structures      void ClearStructs(); ///< clear input and output structures
165        void FillCommonVar(CaloLevel1 *c1); ///< copy common variables from structure to class, level1 only
166      void FillCommonVar(CaloLevel1 *c1, CaloLevel2 *ca); ///< copy common variables from structure to class      void FillCommonVar(CaloLevel1 *c1, CaloLevel2 *ca); ///< copy common variables from structure to class
167      void FillTrkVar(CaloLevel2 *ca, Int_t nutrk); ///< copy track-related variables from structure to class      void FillTrkVar(CaloLevel2 *ca, Int_t nutrk); ///< copy track-related variables from structure to class
168      void RunClose(); ///< clear variables which could change from one run to another      void RunClose(); ///< clear variables which could change from one run to another
169      void SetCrossTalk(Bool_t ct);      void SetCrossTalk(Bool_t ct);
170        void SetCrossTalkType(Bool_t ct);
171        void SetCrossTalkType(Int_t ct);
172      void SetVerbose(Bool_t ct);      void SetVerbose(Bool_t ct);
173        void MaskPlane18X(){ mask18 = true;};
174        void UnMaskPlane18X(){ mask18 = false;};
175      //      //
176      // constructor      // constructor
177      //      //
178      CaloLevel0(); ///< contructor      CaloLevel0(); ///< contructor
179        void Delete(Option_t *t=""); //ELENA
180        void ProcessingInit(GL_TABLES *glt, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object
181      void ProcessingInit(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object      void ProcessingInit(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object
182        void InitDo(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object
183      //      //
184      // destructor      // destructor
185      //      //
186      ~CaloLevel0();///< destructor      ~CaloLevel0();///< destructor
187      //      //
188      ClassDef(CaloLevel0,1);      ClassDef(CaloLevel0,5);
189  };  };
190    
191  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.23