// -*- mode: c++ -*- // // $Id: BrTofTimeOffsetCalModule.h,v 1.7 2002/06/13 19:24:15 videbaek Exp $ // $Author: videbaek $ // $Date: 2002/06/13 19:24:15 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrTofTimeOffsetCalModule #define BRAT_BrTofTimeOffsetCalModule #ifndef BRAT_BrTofCalModule #include "BrTofCalModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrDataTable #include "BrDataTable.h" #endif #ifndef BRAT_BrTofCalibration #include "BrTofCalibration.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef ROOT_TString #include "TString.h" #endif class BrTofTimeOffsetCalModule : public BrTofCalModule { private: Float_t fMaxDy; Float_t fMaxEnergy; Float_t fTrkOffset[3]; Float_t fTrkCut[3]; Float_t fMomentumCut; Float_t fC1Threshold; // for Pion selection Float_t fRichPionMass; // Rich mean pion mass Float_t fRichMassCut; // cut on pion mass peak (in GeV/c^2) Bool_t fUseBbVertex; Bool_t fUseTd1Time; Bool_t fUseTMrsTime; Bool_t fRequireAdc; // histograms TH1F** fOffset; TH1F* fOffsetSummary; TH1F* fSigmaSummary; TH1F* fDeltaY; TH2F* fDeltaYCut; TH1F* fhVtxCutX; TH1F* fhVtxCutY; TH1F* fhVtxCutZ; Float_t fFitWindow; virtual void SaveAscii(); virtual void ReadAscii(); public: BrTofTimeOffsetCalModule(); BrTofTimeOffsetCalModule(const Char_t* name, const Char_t* title); virtual ~BrTofTimeOffsetCalModule () {} void SetDefaultParameters(); void SetMaxDY(Float_t dy = 1.) { fMaxDy = dy; } void SetMaxEnergy(Float_t e = 1.5) { fMaxEnergy = e; } void SetFitWindow(Float_t f = 0.5) { fFitWindow = f; } void SetMomentumCut(Float_t f = 1.8) { fMomentumCut = f; } void SetC1Threshold(Float_t t = 1.) { fC1Threshold = t; } void SetRichPionMass(Float_t pi = 0.1395679) { fRichPionMass = pi; } void SetRichMassCut(Float_t cut = 0.05) { fRichMassCut = cut; } void SetTrkCuts(Float_t dx = 100000, Float_t dy = 100000, Float_t dz = 100000) { fTrkCut[0] = dx; fTrkCut[1] = dy; fTrkCut[2] = dz; } void SetTrkOffsets(Float_t x = 0, Float_t y = 0, Float_t z = 0) { fTrkOffset[0] = x; fTrkOffset[1] = y; fTrkOffset[2] = z; } void SetUseBbVertex(Bool_t b = kTRUE) {fUseBbVertex = b;} void SetUseTd1Time(Bool_t b = kFALSE) {fUseTd1Time=b;} void SetUseTMrsTime(Bool_t b = kFALSE) {fUseTMrsTime=b;} void SetRequireAdc(Bool_t b = kTRUE) {fRequireAdc=b;} virtual void DefineHistograms(); virtual void Init(); virtual void Begin(); virtual void Event(BrEventNode* inNode, BrEventNode* outNode); virtual void Finish(); virtual void Print(Option_t* option="B") const; // *MENU* ClassDef(BrTofTimeOffsetCalModule,0) // Slewing correction module for TOFs }; #endif //____________________________________________________________________ // // $Log: BrTofTimeOffsetCalModule.h,v $ // Revision 1.7 2002/06/13 19:24:15 videbaek // mny modification to timeoffset and slewing modules. // a) Offset module modified to deal with pp running and Td1, TMrsF start counters. // b) The slewing and offset mdoule now has similar cuts in pid, vertex cuts // and momentmu cut. // c) The mrs code had a momentum cut introduced to not contaminate dt spectra with // the kaon's and protons. // d) The slewing modules have added the method to fit the hits using minuit rather than // 2D histograms. the old method is kept for consistency (at least a while). As for // all slwing data correction rather large statistics is needed. // e) Note that when using slewing the timeoffsets are still important!!! the first term in the // slweing is only a relative term taking into account the offsets created by the 1/sqrt(A) terms. // This implies that the same offsets are valid w and /wo slewing being done. // // Revision 1.6 2002/02/13 17:15:36 ouerdane // Removed something conceptually wrong that in practice didn't matter so much // in the FS but did in the MRS: all reference to a mean momentum and therefore // a mean beta alignement has been removed. // // The idea is to evaluate from the real momentum, track length and assuming the track // to be a pion, the theoretical time of flight and substract the experimental one to this value. // since a large fraction of particles are pions, the result is a sharp peak corresponding to the offset. // In the FS, the cherenkov pid is done prior to this calibration to minimize the contamination with other // particle species. In the MRS, we still have a tail but doesn't really make any problem. // This procedure was compared with the previous and gives much better results for slats in the outer panels. // (low momentum particles). // // Revision 1.5 2001/11/12 18:47:24 ouerdane // modified the time offset module so that there's only one single offset per slat // // Revision 1.4 2001/11/07 10:30:56 ouerdane // updated module for H2 cal. and PID // // Revision 1.3 2001/11/05 06:59:17 ouerdane // added new classes for time offsets (without slewing) //