--- DarthVader/TrackerLevel2/inc/TrkParams.h 2007/03/19 17:24:54 1.3 +++ DarthVader/TrackerLevel2/inc/TrkParams.h 2007/05/15 16:22:19 1.6 @@ -19,10 +19,12 @@ /** * \brief Class to store tracker parameter information * - * Tracker parameters include calibration parameters (PED, SIG and BAD) and - * other parameters. - * The first can be either those evaluated online or default values. - * The second are labelled according to the DB convention: + * Tracker parameters include calibration parameters (PED, SIG and BAD), + * parameters loaded from DB (alignment, ADC-to-mip, etc. ) and some parameters + * to configure tracker processing (PFA, ecc...). + * + * Calibrations can be either those evaluated online or default values. + * External parameter are labelled according to the DB convention: * * type description * ----------------- @@ -34,6 +36,9 @@ * 6 VA1 mask * 7 default calibration * + * Internal parameters are initialized to default values + * (NB!! the same values set in analisysflight.f). + * * TrkParams::SetCalib(...) and TrkParams::Set(...) methods allow to set * required parameters, from an input path, from the DB (for a given input * run id) and from environment variable PAM_CALIB. @@ -41,7 +46,7 @@ * F77 common. * * Tracker libraries (TrkLevel0, TrkLevel1 and TrkLevel2) implement automatic - * setting (eother from DB or from environment variables) and loading of parameters. + * setting (either from DB or from environment variables) and loading of parameters. * If one needs to load custom parameters, it is enough to call TrkParams::Set(...) * with proper arguments. All the methods are static, and can be used as standalone functions. * @@ -75,6 +80,13 @@ static GL_PARAM gl[NTYPES]; static TString glpath[NTYPES]; static Bool_t glload[NTYPES]; + // ----------------------------------------------- + // some parameters to configure tracker processing + // ----------------------------------------------- + static int init__pfa; + static int init__mini_trackmode; + static int init__mini_istepmin; + static double init__mini_fact; TrkParams(); @@ -108,7 +120,42 @@ static Bool_t IsLoaded( UInt_t type ){return glload[TrkParams::GetIndex(type)];}; static Bool_t IsLoaded( ); - ClassDef(TrkParams,1); + // --------------------------------------------- + // retrieve parameters + // --------------------------------------------- + static float GetBX(float*); + static float GetBY(float*); + static float GetBZ(float*); + static float GetResolution(int,float); + + // --------------------------------------------- + // debug mode + // --------------------------------------------- + static cDbg dbg_mode; //debug mode (for both c++ and F77 roiutines) + + static void SetDebugMode() {dbg_mode.SetDebug(); dbg_=dbg_mode;}; + static void SetVerboseMode(){dbg_mode.SetVerbose(); dbg_=dbg_mode;}; + static void SetWarningMode(){dbg_mode.SetWarning(); dbg_=dbg_mode;}; + static Bool_t DebugMode(){return dbg_mode.debug;}; + static Bool_t WarningMode(){return dbg_mode.warning;}; + static Bool_t VerboseMode(){return dbg_mode.verbose;}; + + // ------------------------------------------------ + // alcuni metodi che non sapevo dove mettere + // per inizializzare alcune variabili in F77 common + // ------------------------------------------------ + // set to default values + static void SetTrackingMode() {track_.trackmode = init__mini_trackmode;}; + static void SetPrecisionFactor(){track_.fact = init__mini_fact; }; + static void SetStepMin() {track_.istepmin = init__mini_istepmin; }; + static void SetPFA() {sw_.pfaid = init__pfa; }; + // set to custom values + static void SetTrackingMode(int); + static void SetPrecisionFactor(double); + static void SetStepMin(int); + static void SetPFA(int); + + ClassDef(TrkParams,2); };