// -*- mode: c++ -*- // // $Id: BrC1PidModule.h,v 1.7 2002/04/08 10:43:30 ekman Exp $ // $Author: ekman $ // $Date: 2002/04/08 10:43:30 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrC1PidModule #define BRAT_BrC1PidModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrDetectorVolume #include "BrDetectorVolume.h" #endif #ifndef BRAT_BrDetectorTrack #include "BrDetectorTrack.h" #endif #ifndef BRAT_BrSpectrometerTracks #include "BrSpectrometerTracks.h" #endif #ifndef BRAT_BrChkvParameters #include "BrChkvParameters.h" #endif #ifndef BRAT_BrChkvRdo #include "BrChkvRdo.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif #ifndef BRAT_BrC1Pid #include "BrC1Pid.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef ROOT_TF1 #include "TF1.h" #endif #ifndef ROOT_TObjArray #include "TObjArray.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif class BrC1PidModule : public BrModule { private: BrDetectorVolume* fC1Volume; BrDetectorVolume* fT2Volume; BrChkvParameters* fC1Params; BrPlane3D fC1BackPlane; BrVector3D fBackPlaneOffset; Int_t fMaxNSnapshots; // max number of snapshots Int_t fNSnapshots; // number of snapshots taken Float_t fBlobRadius; // radius of light blob Bool_t fUseH1Beta; // to calculate blob radius Float_t fBetaCut; Float_t fRefractiveIndex; Float_t fPionThreshold; // pion momentum threshold Bool_t fCheckGeometry; // if on, geo check hist is created Bool_t fEstimateBackground; // if on, bg est. hist is created TDirectory* fHistDir; TH1F* fBlobEnergy; TH2F* fBlobEnergyVsP; TProfile* fBlobEnergyVsPProfile; TH2F* fTubeToHit; TH1F* fTubeToHitX; TH1F* fTubeToHitY; TH1F* fBackground; TH1F* fBackgroundToSignal; TH1F* fNTubesInBlob; TH2F* fBlobEnergyVsNTubes; TH2F* fIntWithBackPlane; TH1F* fOverlaps; TH1F* fOverlapEnergy; TH1F* fOverlapEnergyR; TH1F* fConflicts; TH1F* fConfLevel; TH1F* fStatus; TH1F* fUsedBlobRadius; TList* fSnapshots; TF1* fPionEVsP; TF1* fKaonEVsP; public: typedef struct { public: BrVector3D xy; // track projection to back plane Float_t r; // radius Int_t n; // number of tubes hit by blob Int_t t[9]; // tubenumbers Float_t e[9]; // tube signals Float_t eSum; // sum of tube signals } BLOB; protected: virtual BrVector3D PointToC1BackPlane(BrDetectorTrack* t2track); virtual void FindTubesHitByBlob(BrChkvRdo* allHits, const BrVector3D& xy, Float_t blobRadius, BLOB& blob); virtual Float_t EstimateBlobRadius(Float_t p, Float_t beta); virtual Bool_t Overlap(BLOB& blob1, BLOB& blob2); virtual Bool_t IsTubeHitByBlob(Int_t tubeNo, const BrVector3D& xy, Float_t blobRadius); virtual Int_t SeparateBlobs(BLOB& blob1, BLOB& blob2); virtual void EstimateBackground(BrChkvRdo* allHits, BLOB& blob); virtual void CheckGeometry(BrChkvRdo* allHits, const BrVector3D& xy); virtual void Snapshot(BrChkvRdo* allHits, const BrVector3D& xy, Float_t p=99); virtual BrC1Pid* CreatePid(Float_t blobE, Float_t confL, Int_t trackId); public: BrC1PidModule(); BrC1PidModule(const Char_t* name, const Char_t* title); virtual ~BrC1PidModule () {} void SetBackPlaneOffset(Float_t x=-0.307, Float_t y=-0.645) {fBackPlaneOffset = BrVector3D(x,y,0);} void SetBlobRadius(Float_t r = 3.94) {fBlobRadius = r;} void SetRefractiveIndex(Float_t n = 1.00138) {fRefractiveIndex = n;} void SetUseH1Beta(Bool_t b = kTRUE) {fUseH1Beta = b;} void SetBetaCut(Float_t b = 0.98) {fBetaCut = b;} void SetMaxNSnapshots(Int_t n = 0) {fMaxNSnapshots = n;} void SetCheckGeometry(Bool_t b = kFALSE) {fCheckGeometry=b;} void SetEstimateBackground(Bool_t b = kFALSE) {fEstimateBackground=b;} virtual void DefineHistograms(); virtual void Init(); virtual void Begin(); virtual void Event(BrEventNode* inNode, BrEventNode* outNode); virtual void End(); virtual void Finish(); virtual void Print(Option_t* option="B") const; // *MENU* ClassDef(BrC1PidModule,0) // Particle Identification with C1 }; #endif //____________________________________________________________________ // // $Log: BrC1PidModule.h,v $ // Revision 1.7 2002/04/08 10:43:30 ekman // Added status hist (Checking ffs track status). // // Revision 1.6 2002/04/05 15:58:23 ekman // Introduced fBackPlaneOffset and corresponding setter method. I've also // introduced fPionThreshold (caculated from fRefractive index). // // Revision 1.5 2001/11/19 15:03:22 ouerdane // check in Finish if histograms are booked before any actions on histograms, added TDirectory member in the C1 module // // Revision 1.4 2001/11/05 17:36:36 ekman // Major changes - new handling of rdo data, new histograms, new setter functions. // // Revision 1.3 2001/10/19 16:42:55 ekman // Fixed a bug in the check geometry. Added energy vs n hits histogram. // // Revision 1.2 2001/10/17 23:45:12 ekman // Small adjustments in the code. Deleted some histograms, and changed a few // methods. // // Revision 1.1 2001/09/03 17:53:15 ekman // Added the BrC1PidModule, BrPid and BrC1Pid classes. // //