// -*- mode: c++ -*- // // $Id: BrVertexCalModule.h,v 1.3 2002/06/07 16:01:53 videbaek Exp $ // $Author: videbaek $ // $Date: 2002/06/07 16:01:53 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrVertexCalModule #define BRAT_BrVertexCalModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrVertexCalibration #include "BrVertexCalibration.h" #endif #ifndef ROOT_TString #include "TString.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif class BrVertexCalModule : public BrModule { protected: virtual void SaveAscii(); virtual void ReadAscii(); // parameters BrVertexCalibration* fCalibration; Bool_t fSaveAscii; // Used when saving new calibration Files Bool_t fCommitAscii; // Used when checking in into DB. Bool_t fLoadAscii; // Used when reading (at Begin). TString fCalibFile; // ascii file TString fComment; // comment string set at commit time TDirectory* fHistDir; // Pointer to histogram directory Bool_t IsValid(Float_t val) { if (val == BrVertexCalibration::kCalException) return kFALSE; return kTRUE; } public: BrVertexCalModule(); BrVertexCalModule(const Char_t* name, const Char_t* title); virtual ~BrVertexCalModule () {} virtual void Init(); void SetSaveAscii(Bool_t s = kFALSE) { fSaveAscii = s; } void SetCommitAscii(Bool_t s = kFALSE) { fCommitAscii = s; } void SetLoadAscii(Bool_t s = kFALSE) { fLoadAscii = s; } void SetCalibFile(const Char_t* name) { fCalibFile = name; } void SetComment(const Char_t* comm) { fComment = comm; } ClassDef(BrVertexCalModule,0) // Base class for a BB array calibration module }; #endif //____________________________________________________________________ // // $Log: BrVertexCalModule.h,v $ // Revision 1.3 2002/06/07 16:01:53 videbaek // Include the calibration module for the Inelastic vertex in pp. // // Revision 1.2 2002/03/21 15:04:44 ouerdane // added fComment member to base class module and method SetComment // so that the user can set comments about the calibration at commit time. // // // Revision 1.1 2001/11/02 10:58:47 ouerdane // Added new classes for automatic vertex offset finding. // The result is stored in BrVertexCalibration which corresponds // to a new entry in the SQL database called VERTEX (type BEAM) // (cf. data/calib/BrVertexCalibration for more details) // // The modules are: BrVertexCalModule (base class) // BrBbVertexCalModule for beam-beam counters // will come next: BrTpcVertexCalModule // BrZdcVertexCalModule // // The bb module uses internally the new cal hit and vertex modules with all offsets // set to 0. (of course). It only needs TPM1 tracks and a valid BB calibration // made with the wonderful BB calibration modules and stored into the SQL db :) // // Usage: once you've made a calibration and stored to the rcas0005 DB, use // the script scripts/calib/bb/BbVtxOffset.C to evaluate the BB vertices offsets // with TPM1. // The result will be stored into an ascii file that you can commit afterwards // (check first your histos !) // // The vertex module then will read these offsets so that you won't need to think about it! // //