/[PAMELA software]/DarthVader/TrackerLevel2/inc/TrkParams.h
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/inc/TrkParams.h

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

revision 1.6 by pam-fi, Tue May 15 16:22:19 2007 UTC revision 1.17 by pam-fi, Tue Nov 29 13:24:15 2011 UTC
# Line 9  Line 9 
9  #include <TString.h>  #include <TString.h>
10  #include <TSQLServer.h>  #include <TSQLServer.h>
11  #include <TSystem.h>  #include <TSystem.h>
12    #include <TROOT.h> // EMILIANO: needed to compile with ROOT > 5.16/x
13    
14  #include <GLTables.h>  #include <GLTables.h>
15  #include <TrkStruct.h>  #include <TrkStruct.h>
16  #include <TrkCalib.h>  #include <TrkCalib.h>
17    
18  #define NTYPES 10  #define NTYPES 10
19    #define NGF 14
20    
21  /**  /**
22   * \brief Class to store tracker parameter information   * \brief Class to store tracker parameter information
# Line 37  Line 39 
39   * 7     default calibration   * 7     default calibration
40   *   *
41   * Internal parameters are initialized to default values   * Internal parameters are initialized to default values
42   * (NB!! the same values set in analisysflight.f).  *
  *  
43   * TrkParams::SetCalib(...) and TrkParams::Set(...) methods allow to set   * TrkParams::SetCalib(...) and TrkParams::Set(...) methods allow to set
44   * required parameters, from an input path, from the DB (for a given input   * required parameters, from an input path, from the DB (for a given input
45   * run id) and from environment variable PAM_CALIB.   * run id) and from environment variable PAM_CALIB.
# Line 73  public: Line 74  public:
74      static TString      calibpathf; //full      static TString      calibpathf; //full
75      static Bool_t       calib104;      static Bool_t       calib104;
76      static Bool_t       calibload;      static Bool_t       calibload;
77        static TrkCalib*    calib1;
78        static TrkCalib*    calib2;
79      // ---------------------------------------------      // ---------------------------------------------
80      // variables to store loaded-parameters info      // variables to store loaded-parameters info
81      // ---------------------------------------------      // ---------------------------------------------
# Line 87  public: Line 90  public:
90      static int init__mini_trackmode;      static int init__mini_trackmode;
91      static int init__mini_istepmin;      static int init__mini_istepmin;
92      static double init__mini_fact;      static double init__mini_fact;
93            static cDbg init__dbg_mode; //debug mode (for both c++ and F77 roiutines)
94        static float init__pfa_e234ax[6]; // angle intervals for eta2-3-4
95        static float init__pfa_e234ay[6]; // angle intervals for eta2-3-4
96        static double init__deltab_0;
97        static double init__deltab_1;
98        static double init__dlt;
99    
100        // ------------------------------------------
101        // nominal z-coordinates to define acceptance
102        // ------------------------------------------
103        static int   nGF;
104        static float zGF[NGF];
105        static float xGF_min[NGF];
106        static float xGF_max[NGF];
107        static float yGF_min[NGF];
108        static float yGF_max[NGF];
109        static TString GF_element[NGF];
110    
111      TrkParams();      TrkParams();
112              
113      // ---------------------------------------------      // ---------------------------------------------
114      // calibration (PED-SIG-BAD)      // calibration (PED-SIG-BAD)
115      // ---------------------------------------------      // ---------------------------------------------
# Line 97  public: Line 117  public:
117      static Bool_t LoadCalib( );      static Bool_t LoadCalib( );
118      static Bool_t CalibIsLoaded(){ return calibload; };      static Bool_t CalibIsLoaded(){ return calibload; };
119      static UInt_t ValidateTrkCalib( CalibTrk1Event* );      static UInt_t ValidateTrkCalib( CalibTrk1Event* );
120      static void FillFCalibFrom(TFile* , Int_t , Int_t );//full  //    static void FillFCalibFrom(TFile* , Int_t , Int_t );//full
121      static void FillTCalibFrom(TFile* , Int_t , Int_t );//truncated  //    static void FillTCalibFrom(TFile* , Int_t , Int_t );//truncated
122      static void FillTCalibFrom(TString path);      static void FillTCalibFrom(TString path);
123      static void FillACalibFrom(TFile* , Int_t , Int_t );//all      static void FillACalibFrom(TFile* , Int_t , Int_t );//all
124      static void FillMask(TFile* , Int_t , Int_t );      static void FillMask(TFile* , Int_t , Int_t );
# Line 108  public: Line 128  public:
128      // ---------------------------------------------      // ---------------------------------------------
129      static Bool_t Set( GL_RUN* glrun, TSQLServer* dbc, UInt_t type);      static Bool_t Set( GL_RUN* glrun, TSQLServer* dbc, UInt_t type);
130      static Bool_t Set( GL_RUN* glrun, TSQLServer* dbc){      static Bool_t Set( GL_RUN* glrun, TSQLServer* dbc){
131          for(Int_t i=0; i<NTYPES; i++)        Bool_t result = true;
132              if( !TrkParams::Set(glrun,dbc,trkparamtype[i]) )return false;            for(Int_t i=0; i<NTYPES; i++)
133          return true;          if( !TrkParams::Set(glrun,dbc,trkparamtype[i]) )
134                    result = false;
135              return result;
136      };      };
137      static Bool_t Set( TString, UInt_t );      static Bool_t Set( TString, UInt_t );
138      static Bool_t Set( UInt_t );      static Bool_t Set( UInt_t );
# Line 120  public: Line 142  public:
142      static Bool_t IsLoaded( UInt_t type ){return glload[TrkParams::GetIndex(type)];};      static Bool_t IsLoaded( UInt_t type ){return glload[TrkParams::GetIndex(type)];};
143      static Bool_t IsLoaded( );      static Bool_t IsLoaded( );
144    
145        static GL_PARAM GetParams( UInt_t type ){ return gl[TrkParams::GetIndex(type)]; };
146    
147      // ---------------------------------------------      // ---------------------------------------------
148      // retrieve parameters      // retrieve parameters
149      // ---------------------------------------------      // ---------------------------------------------
# Line 127  public: Line 151  public:
151      static float GetBY(float*);      static float GetBY(float*);
152      static float GetBZ(float*);      static float GetBZ(float*);
153      static float GetResolution(int,float);      static float GetResolution(int,float);
154        static int   GetPFA(){return sw_.pfaid;};
155        static int GetPFA_NbinsAngle();
156        static int GetPFA_NbinsETA();
157        static int GetPFA_NbinsCharge(){return 0;};
158        static int GetPFA_AngleBin(float);
159        static float* GetPFA_ETAcorr(TString,int,int,int);
160        static float* GetPFA_ETAabs(TString,int);
161        static float  GetPFA_ETAlandi(int,int,int);
162        static float  GetPFA_ETAlandi(int nv,int nl,float ang)
163            { return TrkParams::GetPFA_ETAlandi(nv,nl,TrkParams::GetPFA_AngleBin(ang)); };
164    
165    
166    
167      // ---------------------------------------------      // ---------------------------------------------
168      // debug mode      // debug mode
169      // ---------------------------------------------      // ---------------------------------------------
     static cDbg dbg_mode; //debug mode (for both c++ and F77 roiutines)  
170    
171      static void SetDebugMode()  {dbg_mode.SetDebug();   dbg_=dbg_mode;};      static void SetDebugMode()  {init__dbg_mode.SetDebug();   dbg_=init__dbg_mode;};
172      static void SetVerboseMode(){dbg_mode.SetVerbose(); dbg_=dbg_mode;};      static void SetVerboseMode(){init__dbg_mode.SetVerbose(); dbg_=init__dbg_mode;};
173      static void SetWarningMode(){dbg_mode.SetWarning(); dbg_=dbg_mode;};          static void SetWarningMode(){init__dbg_mode.SetWarning(); dbg_=init__dbg_mode;};    
174      static Bool_t DebugMode(){return dbg_mode.debug;};      static void SetQuietMode()  {init__dbg_mode.SetNone();    dbg_=init__dbg_mode;};    
175      static Bool_t WarningMode(){return dbg_mode.warning;};      static Bool_t DebugMode(){return init__dbg_mode.debug;};
176      static Bool_t VerboseMode(){return dbg_mode.verbose;};      static Bool_t WarningMode(){return init__dbg_mode.warning;};
177        static Bool_t VerboseMode(){return init__dbg_mode.verbose;};
178    
179      // ------------------------------------------------      // ------------------------------------------------
180      // alcuni metodi che non sapevo dove mettere      // alcuni metodi che non sapevo dove mettere
# Line 148  public: Line 184  public:
184      static void SetTrackingMode()   {track_.trackmode = init__mini_trackmode;};      static void SetTrackingMode()   {track_.trackmode = init__mini_trackmode;};
185      static void SetPrecisionFactor(){track_.fact      = init__mini_fact;     };      static void SetPrecisionFactor(){track_.fact      = init__mini_fact;     };
186      static void SetStepMin()        {track_.istepmin  = init__mini_istepmin; };      static void SetStepMin()        {track_.istepmin  = init__mini_istepmin; };
187      static void SetPFA()            {sw_.pfaid        = init__pfa;           };      static void SetDeltaB()         {deltab_.delta0   = init__deltab_0;
188                                         deltab_.delta1   = init__deltab_1;};    
189        static void SetDLT()            {deltab_.dlt   = init__dlt;};
190        static void SetMiniDefault()    {
191            SetTrackingMode();
192            SetPrecisionFactor();
193            SetStepMin();
194            SetDeltaB();
195            SetDLT();
196        }; //
197        static void SetPFA();
198        
199      // set to custom values      // set to custom values
200      static void SetTrackingMode(int);      static void SetTrackingMode(int);
201      static void SetPrecisionFactor(double);      static void SetPrecisionFactor(double);
202      static void SetStepMin(int);      static void SetStepMin(int);
203        static void SetDeltaB(int,double);    
204        static void SetDLT(double);
205      static void SetPFA(int);      static void SetPFA(int);
206        static void SetPFA(float *);
207            
208        // ---------------------------------------------
209        // varie ed eventuali...
210        // ---------------------------------------------
211        static TSQLServer* SetDBConnection();
212    
213    
214      ClassDef(TrkParams,2);      ClassDef(TrkParams,2);
215    
216  };  };

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.23