// -*- mode: c++ -*- // // $Id: BrFfsTofMatchingModule.h,v 1.3 2001/10/19 15:54:52 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2001/10/19 15:54:52 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrFfsTofMatchingModule #define BRAT_BrFfsTofMatchingModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrDataTable #include "BrDataTable.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TNtuple #include "TNtuple.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif #ifndef BRAT_BrDetectorVolume #include "BrDetectorVolume.h" #endif #ifndef BRAT_BrDetectorParamsTof #include "BrDetectorParamsTof.h" #endif #ifndef BRAT_BrMagnetVolume #include "BrMagnetVolume.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif #ifndef BRAT_BrTofCalibration #include "BrTofCalibration.h" #endif #ifndef BRAT_BrDetectorTrack #include "BrDetectorTrack.h" #endif #ifndef BRAT_BrTofDig #include "BrTofDig.h" #endif #ifndef BRAT_BrTofTrackMatch #include "BrTofTrackMatch.h" #endif #ifndef BRAT_BrTofTrackMatch #include "BrTofTrackMatch.h" #endif class BrFfsTofMatchingModule : public BrModule { private: enum ETofId { kH1 = 0, kH2 = 1 }; // matching parameters Float_t fMaxDX[2]; Float_t fXOffset[2]; // tof parameters & volumes BrTofCalibration* fCalib[2]; // calibration parameter elements BrDetectorVolume* fT2Vol; // tracking chamber volumes BrDetectorVolume* fTofVol[2]; // tof volumes BrDetectorParamsTof* fTofPar[2]; // detector parameters BrMagnetVolume* fD3Vol; // magnet volumes BrMagnetVolume* fD4Vol; // magnet volumes Double_t fNoPedWidth; // for matching between hit and tracks only Double_t fMaxAdc; // for hit selection Double_t fMaxTdc; // idem Double_t fMinTdc; // idem Double_t fD3PScale; // scale factor for FFS momentum in D3 Double_t fD4PScale; // scale factor for FFS momentum in D4 Bool_t fNtuple; Bool_t* fValidSlat[2]; Bool_t fUseH2; // if ffs and bfs are aligned // histograms TNtuple* fNtMatch[2]; TH1F* fDxAll[2]; TH1F* fDxMatch[2]; TH2F* f2dXAll[2]; TH2F* f2dXMatch[2]; TH1F* fMatchStat[2]; TH1F** fTopEff; TH1F** fBotEff; TH1F* fTrkEff; TH1F* fSlatCheck; TDirectory* fHistDir[2]; void InitParams(); void InitGeo(); void CheckTofCal(); Bool_t SetMagnetFields(); BrVector3D SwimToH2(BrDetectorTrack* trk, Double_t p); Int_t SelectHits(ETofId, BrDataTable*, BrTofDig**); Int_t MatchTof(ETofId, BrDataTable*, BrDataTable*, Int_t*, BrTofDig**, Int_t* id = 0); // check calibration parameter validity Bool_t IsValid(Double_t x) { if (x == BrTofCalibration::kCalException) return kFALSE; return kTRUE; } void CheckEfficiency(BrDataTable* trks, BrDataTable* hits); public: BrFfsTofMatchingModule(); BrFfsTofMatchingModule(const Char_t* name, const Char_t* title); virtual ~BrFfsTofMatchingModule () {} void SetDefaultParameters(); void SetTdcRange(Double_t min = 10, Double_t max = 4000) { fMinTdc = min; fMaxTdc = max; } void SetUseH2(Bool_t b = kFALSE) { fUseH2 = b; } void SetNoPedWidth(Int_t n = 50) { fNoPedWidth = n; } void SetNtuple(Bool_t b = kFALSE) { fNtuple = b; } void SetMaxAdc(Double_t max = 100000) { fMaxAdc = max; } void SetD3PScale(Double_t s = 0.95) { fD3PScale = s; } void SetD4PScale(Double_t s = 0.9) { fD4PScale = s; } void SetMaxH1DX(Float_t dx = 0.5) { fMaxDX[kH1] = dx; } void SetMaxH2DX(Float_t dx = 0.5) { fMaxDX[kH2] = dx; } void SetT2H1XOffset(Float_t x = 0) { fXOffset[kH1] = x; } void SetT2H2XOffset(Float_t x = 0) { fXOffset[kH2] = x; } virtual void DefineHistograms(); virtual void Init(); virtual void Begin(); virtual void Event(BrEventNode* inNode, BrEventNode* outNode); virtual void Print(Option_t* option="B") const; // *MENU* ClassDef(BrFfsTofMatchingModule,0) // module getting glb tracks for tof cal }; #endif //____________________________________________________________________ // // $Log: BrFfsTofMatchingModule.h,v $ // Revision 1.3 2001/10/19 15:54:52 ouerdane // added histos for TOF1 efficiency, fixed a couple of things in the slat pos // // Revision 1.2 2001/10/02 20:20:40 ouerdane // remove member fNoPanels and setter method since it is now part of the // tof detector parameter class. // Corrected errors due to fast rewriting of the modules. should be ok now. // // Revision 1.1 2001/10/02 02:05:25 ouerdane // Added modules combining and saving Tracks and Tof hits // //