// -*- mode: c++ -*- #ifndef BRAT_BrBbVertexModule #define BRAT_BrBbVertexModule // // $Id: BrBbVertexModule.h,v 1.7 2001/11/19 15:06:23 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2001/11/19 15:06:23 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrBbVertex #include "BrBbVertex.h" #endif #ifndef BRAT_BrVertexCalibration #include "BrVertexCalibration.h" #endif #ifndef ROOT_TTree #include "TTree.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef BRAT_BrBbCalHits #include "BrBbCalHits.h" #endif #ifndef BRAT_BrBbVertex #include "BrBbVertex.h" #endif class BrBbVertexModule : public BrModule { private: Int_t fUsedEvt; // some event statistics: number of events analyzed Int_t fAccEvt; // number of successful events // vertices stats Int_t fBigStat; Int_t fSmallStat; Int_t fFastestStat; BrBbCalHits* fBblHits; // left array calibrated and selected hits BrBbCalHits* fBbrHits; // right array calibrated and selected hits BrBbVertex* fVBig; // vertex object calculated with big tubes BrBbVertex* fVSmall; // vertex object calculated with small tubes BrBbVertex* fVFastest; // vertex object calculated with fastest tube TH2F* fVSB; // vertex correlation small tubes vs big tubes TH2F* fVSF; // vertex correlation small tubes vs fastest TH2F* fVBF; // vertex correlation big tubes vs fastest TH2F* fTSB; // same with time0 TH2F* fTSF; // idem TH2F* fTBF; // idem TH1F* fMethod; // statistics of vertex calculation method TH1F* fDiffSB; // diff. between Small and Big vertex TH1F* fDiffSF; // diff. between Small and Fastest vertex TH1F* fDiffBF; // diff. between Big and Fastest vertex TH1F* fZBig; // big tube vertex TH1F* fZSmall; // big tube vertex TH1F* fZFastest; // big tube vertex TH1F* fVertex; // accepted TH1F* fTBig; // big tube vertex TH1F* fTSmall; // big tube vertex TH1F* fTFastest; // big tube vertex TH1F* fTime0; // accepted TTree* fBbVtxTree; // tree containing all info (Hitss and vtxs) Bool_t fTreeOn; // switch on/off the creation of the tree Bool_t fOffsetCalib; // flag to distinguish between real recontruction // or 1st pass for offset calibration Bool_t fUseSqlOffset; // to retrieve offsets from the sql db Float_t fArrayDist; // distance between array and IR center Float_t fZOffBig; // big tube vertex offset Float_t fZOffSmall; // small tube vertex offset Float_t fZOffFastest; // fastest tube vertex offset Float_t fMaxTimeDiff; // condition on hit time inclusion in vtx evaluation BrVertexCalibration* fCalibration; void Vertex(BrBbVertex*, Int_t, Int_t, Int_t, Int_t, Float_t); // vertex BrBbVertex* SaveBestVertex(BrEventNode* outNode); public: BrBbVertexModule(); BrBbVertexModule(const Char_t* name, const Char_t* title); virtual ~BrBbVertexModule (); void SetDefaultParameters(); 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* void SetOffsetCalib(Bool_t b = kFALSE) { fOffsetCalib = b; } void SetUseSqlOffset(Bool_t b = kFALSE){ fUseSqlOffset = b; } void SetTreeOn(Bool_t b = kFALSE) { fTreeOn = b; } void SetArrayDist(Float_t d = 215) { fArrayDist = d; } void SetZOffBig(Float_t off = 0) { fZOffBig = off; } void SetZOffSmall(Float_t off = 0) { fZOffSmall = off; } void SetZOffFastest(Float_t off = 0) { fZOffFastest = off; } void SetMaxTimeDiff(Float_t dt = 0.5) { fMaxTimeDiff = dt; } ClassDef(BrBbVertexModule,0) // Beam-Beam Vertex and Time 0 Module }; #endif //____________________________________________________________________ // // $Log: BrBbVertexModule.h,v $ // Revision 1.7 2001/11/19 15:06:23 ouerdane // added histogram vtx big - vtx fastest // // Revision 1.6 2001/11/05 07:12:57 ouerdane // changed method SetUseSqlDb to SetUSeSqlOffset // // Revision 1.5 2001/11/02 11:47:13 ouerdane // added the offset calibration and a setter method SetUseSqlDb to get the offsets // // Revision 1.4 2001/11/02 10:29:10 ouerdane // Added a method SetOffsetCalib to be used with the vertex calibration module // If set to kTRUE, all the different vertices will be saved in the outputnode. // Note that the usual BB Vertex is still there. The others have an extension // to the name (BB Vertex Big | Small | Fastest) // // Revision 1.3 2001/10/19 15:37:10 videbaek // Added another diagnostic histogram (for diff) // Output summary differences. // Fixed error in calculating best mean. // // Revision 1.2 2001/09/27 08:58:47 ouerdane // Changed bb cal hits datatable names to Bb[l,r]CalHits // // Revision 1.1 2001/09/23 01:45:01 videbaek // Added the vertex module for Bb. SOmewhat like the BbRdomdoule // - tahnks to DO.. // //