#ifndef __HPARTICLEBOOKER_H__ #define __HPARTICLEBOOKER_H__ #include "hparticlecand.h" #include #include using namespace std; class HParticleBooker; class HTofHit; class HTofCluster; class HRpcCluster; class HShowerHit; class HEmcCluster; class HMdcSeg; class HRichHit; class HTofHitSim; class HTofClusterSim; class HRpcClusterSim; class HShowerHitSim; class HEmcClusterSim; class HMdcSegSim; class HRichHitSim; class HParticleCandSim; class HCategory; R__EXTERN HParticleBooker *gParticleBooker; class HParticleBooker : public TObject { private: //------------------------------------------------------- // indices user in candidates map > mTofHittoCand; //! TOF hit lookup detector hit ind -> list of candidates using this hit map > mTofClsttoCand; //! TOF cluster lookup detector hit ind -> list of candidates using this hit map > mRpcClsttoCand; //! RPC cluster lookup detector hit ind -> list of candidates using this hit map > mShowertoCand; //! SHOWER hit lookup detector hit ind -> list of candidates using this hit map > mEmctoCand; //! EMC cluster lookup detector hit ind -> list of candidates using this hit map > mInnerMdctoCand; //! inner Seg lookup detector hit ind -> list of candidates using this hit map > mOuterMdctoCand; //! outer Seg lookup detector hit ind -> list of candidates using this hit map > mRichtoCand; //! RICH hit lookup detector hit ind -> list of candidates using this hit //------------------------------------------------------- // indices user in candidates vector vTofHitInd; //! vector vTofClstInd; //! vector vRpcClstInd; //! vector vShowerInd; //! vector vEmcInd; //! vector vInnerMdcInd; //! vector vOuterMdcInd; //! vector vRichInd; //! //------------------------------------------------------- //------------------------------------------------------- // objects user in candidates vector vTofHit; //! vector vTofClst; //! vector vRpcClst; //! vector vShower; //! vector vEmc; //! vector vInnerMdc; //! vector vOuterMdc; //! vector vRich; //! //------------------------------------------------------- //------------------------------------------------------- // all objects in event vector vTofHitAll; //! vector vTofClstAll; //! vector vRpcClstAll; //! vector vShowerAll; //! vector vEmcAll; //! vector vInnerMdcAll; //! vector vOuterMdcAll; //! vector vRichAll; //! //------------------------------------------------------- //------------------------------------------------------- // SIMULATION INFO //------------------------------------------------------- //------------------------------------------------------- map > mTracktoCand; //! Geant Track lookup geant track (assigned track) -> list of candidates using this track map > mTracktoAnyCand; //! Geant Track lookup geant track (in any detector) -> list of candidates using this track map > mTracktoTofHit; //! Geant Track lookup geant track -> list of TofHits using this track map > mTracktoTofCluster; //! Geant Track lookup geant track -> list of TofCluster using this track map > mTracktoRpcCluster; //! Geant Track lookup geant track -> list of RpcCluster using this track map > mTracktoShowerHit; //! Geant Track lookup geant track -> list of ShowerHit using this track map > mTracktoEmcCluster; //! Geant Track lookup geant track -> list of EmcCluster using this track map > mTracktoInnerMdc; //! Geant Track lookup geant track -> list of inner MdcSeg using this track map > mTracktoOuterMdc; //! Geant Track lookup geant track -> list of outer MdcSeg using this track map > mTracktoRichHit; //! Geant Track lookup geant track -> list of RichHit using this track map > mTracktoCandInd; //! Geant Track lookup geant track (assigned track) -> list of candidates indices using this track map > mTracktoAnyCandInd; //! Geant Track lookup geant track (in any detector) -> list of candidates indicesusing this track map > mTracktoTofHitInd; //! Geant Track lookup geant track -> list of TofHits indices using this track map > mTracktoTofClusterInd; //! Geant Track lookup geant track -> list of TofCluster indices using this track map > mTracktoRpcClusterInd; //! Geant Track lookup geant track -> list of RpcCluster indices using this track map > mTracktoShowerHitInd; //! Geant Track lookup geant track -> list of ShowerHit indices using this track map > mTracktoEmcClusterInd; //! Geant Track lookup geant track -> list of EmcCluster indices using this track map > mTracktoInnerMdcInd; //! Geant Track lookup geant track -> list of inner MdcSeg indices using this track map > mTracktoOuterMdcInd; //! Geant Track lookup geant track -> list of outer MdcSeg indices using this track map > mTracktoRichHitInd; //! Geant Track lookup geant track -> list of RichHit using indices this track //------------------------------------------------------- //------------------------------------------------------- // helpers HCategory* richhitCat; //! HCategory* tofhitCat; //! HCategory* tofclstCat; //! HCategory* rpcclstCat; //! HCategory* showerhitCat; //! HCategory* emcclusterCat; //! HCategory* mdcsegCat; //! HCategory* candCat; //! //------------------------------------------------------- void bookHits(HParticleCand* cand1); public: HParticleBooker(); ~HParticleBooker(); void nextEvent(); vector& getTofHitIndices() { return vTofHitInd; } vector& getTofClstIndices() { return vTofClstInd; } vector& getRpcClstIndices() { return vRpcClstInd; } vector& getShowerIndices() { return vShowerInd; } vector& getEmcIndices() { return vEmcInd; } vector& getInnerMdcIndices() { return vInnerMdcInd; } vector& getOuterMdcIndices() { return vOuterMdcInd; } vector& getRichIndices() { return vRichInd; } map >& getTofHitMap() { return mTofHittoCand; } map >& getTofClstMap() { return mTofClsttoCand; } map >& getRpcClstMap() { return mRpcClsttoCand; } map >& getShowerHitMap(){ return mShowertoCand; } map >& getEmcClusterMap(){ return mEmctoCand; } map >& getInnerMdcMap() { return mInnerMdctoCand; } map >& getOuterMdcMap() { return mOuterMdctoCand; } map >& getRichMap() { return mRichtoCand; } Int_t getCandidatesForTofHit (Int_t index,vector& cands); Int_t getCandidatesForTofCluster(Int_t index,vector& cands); Int_t getCandidatesForRpcCluster(Int_t index,vector& cands); Int_t getCandidatesForShower (Int_t index,vector& cands); Int_t getCandidatesForEmc (Int_t index,vector& cands); Int_t getCandidatesForInnerMdc (Int_t index,vector& cands); Int_t getCandidatesForOuterMdc (Int_t index,vector& cands); Int_t getCandidatesForRich (Int_t index,vector& cands); Int_t getCandidatesAnyDetectorForTrack(Int_t track,vector& cands); Int_t getCandidatesForTrack (Int_t track,vector& cands); Int_t getTofHitForTrack (Int_t track,vector& cands); Int_t getTofClusterForTrack (Int_t track,vector& cands); Int_t getRpcClusterForTrack (Int_t track,vector& cands); Int_t getShowerHitForTrack (Int_t track,vector& cands); Int_t getEmcClusterForTrack (Int_t track,vector& cands); Int_t getInnerMdcSegForTrack (Int_t track,vector& cands); Int_t getOuterMdcSegForTrack (Int_t track,vector& cands); Int_t getRichHitForTrack (Int_t track,vector& cands); Int_t getCandidatesIndAnyDetectorForTrack(Int_t track,vector& cands); Int_t getCandidatesIndForTrack (Int_t track,vector& cands); Int_t getTofHitIndForTrack (Int_t track,vector& cands); Int_t getTofClusterIndForTrack (Int_t track,vector& cands); Int_t getRpcClusterIndForTrack (Int_t track,vector& cands); Int_t getShowerHitIndForTrack (Int_t track,vector& cands); Int_t getEmcClusterIndForTrack (Int_t track,vector& cands); Int_t getInnerMdcSegIndForTrack (Int_t track,vector& cands); Int_t getOuterMdcSegIndForTrack (Int_t track,vector& cands); Int_t getRichHitIndForTrack (Int_t track,vector& cands); vector& getTofHits () { return vTofHit; } vector& getTofClusters () { return vTofClst; } vector& getRpcClusters () { return vRpcClst; } vector& getShowerHits () { return vShower; } vector& getEmcClusters () { return vEmc; } vector& getInnerMdcSegs() { return vInnerMdc;} vector& getOuterMdcSegs() { return vOuterMdc;} vector& getRichHits () { return vRich; } vector& getAllTofHits () { return vTofHitAll; } vector& getAllTofClusters () { return vTofClstAll; } vector& getAllRpcClusters () { return vRpcClstAll; } vector& getAllShowerHits () { return vShowerAll; } vector& getAllEmcClusters () { return vEmcAll; } vector& getAllInnerMdcSegs() { return vInnerMdcAll;} vector& getAllOuterMdcSegs() { return vOuterMdcAll;} vector& getAllRichHits () { return vRichAll; } Int_t getSameRich (HParticleCand* cand,vector& candidates,UInt_t flag=0,Bool_t isReference=kTRUE); Int_t getSameInnerMdc(HParticleCand* cand,vector& candidates,UInt_t flag=0,Bool_t isReference=kTRUE); Int_t getSameOuterMdc(HParticleCand* cand,vector& candidates,UInt_t flag=0,Bool_t isReference=kTRUE); Int_t getSameMeta (HParticleCand* cand,vector& candidates,UInt_t flag=0,Bool_t isReference=kTRUE); Int_t getSameAny (HParticleCand* cand,vector& candidates,UInt_t flag=0,UInt_t detswitch=0,Bool_t isReference=kTRUE); ClassDef(HParticleBooker,0) }; #endif