// $Id$ // // File: DParticleID.h // Created: Mon Feb 28 13:47:49 EST 2011 // Creator: staylor (on Linux ifarml1 2.6.18-128.el5 x86_64) // #ifndef _DParticleID_ #define _DParticleID_ #include #include #include #include "HDGEOMETRY/DRootGeom.h" #include #include //#include #include #include #include #include #include #include #include #include class DTrackTimeBased; class DCDCTrackHit; class DParticleID:public jana::JObject{ public: JOBJECT_PUBLIC(DParticleID); // Constructor and destructor DParticleID(JEventLoop *loop); // require JEventLoop in constructor virtual ~DParticleID(); class dedx_t{ public: dedx_t(double dE,double dx, double p):dE(dE),dx(dx),p(p){dEdx = dE/dx;} double dE; // energy loss in layer double dx; // path length in layer double dEdx; // ratio dE/dx double p; // momentum at this dE/dx measurement }; virtual jerror_t CalcDCdEdxChiSq(const DChargedTrackHypothesis *locChargedTrackHypothesis, double &locChiSq, unsigned int& locNDF) = 0; jerror_t GetDCdEdxHits(const DTrackTimeBased *track, vector& dEdxHits_CDC, vector& dEdxHits_FDC); jerror_t CalcDCdEdx(const DTrackTimeBased *locTrackTimeBased, double& locdEdx_FDC, double& locdx_FDC, double& locdEdx_CDC, double& locdx_CDC, unsigned int& locNumHitsUsedFordEdx_FDC, unsigned int& locNumHitsUsedFordEdx_CDC); jerror_t CalcDCdEdx(const DTrackTimeBased *locTrackTimeBased, const vector& locdEdxHits_CDC, const vector& locdEdxHits_FDC, double& locdEdx_FDC, double& locdx_FDC, double& locdEdx_CDC, double& locdx_CDC, unsigned int& locNumHitsUsedFordEdx_FDC, unsigned int& locNumHitsUsedFordEdx_CDC); jerror_t CalcdEdxHit(const DVector3 &mom, const DVector3 &pos, const DCDCTrackHit *hit, pair &dedx); jerror_t GroupTracks(vector &tracks, vector >&grouped_tracks); jerror_t MatchToTOF(const DReferenceTrajectory *rt, DTrackFitter::fit_type_t fit_type, vector&tof_points, double &tproj, unsigned int &tof_match_id, double &locPathLength, double &locFlightTime); jerror_t MatchToBCAL(const DReferenceTrajectory *rt, DTrackFitter::fit_type_t fit_type, vector&bcal_showers, double &tproj, unsigned int &bcal_match_id, double &locPathLength, double &locFlightTime); jerror_t MatchToFCAL(const DReferenceTrajectory *rt, DTrackFitter::fit_type_t fit_type, vector&fcal_showers, double &tproj, unsigned int &fcal_match_id, double &locPathLength, double &locFlightTime); jerror_t MatchToSC(const DReferenceTrajectory *rt, DTrackFitter::fit_type_t fit_type, vector&sc_hits, double &tproj,unsigned int &sc_match_id, double &locPathLength, double &locFlightTime); jerror_t MatchToSC(const DKinematicData &parms, vector&sc_hits, double &tproj,unsigned int &sc_match_id); virtual Particle_t IDTrack(float locCharge, float locMass); protected: // gas material properties double dKRhoZoverA_FDC, dRhoZoverA_FDC, dLnI_FDC; double dKRhoZoverA_CDC, dRhoZoverA_CDC, dLnI_CDC; double dDensity_FDC; double dDensity_CDC; double dA_CDC; double dA_FDC; private: //< DGeometry pointer used to access materials through calibDB maps for eloss const DRootGeom *RootGeom; int DEBUG_LEVEL; // Prohibit default constructor DParticleID(); const DGeometry *geom; const DMagneticFieldMap *bfield; DMagneticFieldStepper *stepper; // start counter geometry parameters double sc_leg_tcor; double sc_angle_cor; vectorsc_pos; vectorsc_norm; }; #endif // _DParticleID_