// $Id$ // // File: DVertex_factory.h // Created: Tue Apr 6 17:01:54 EDT 2010 // Creator: davidl (on Darwin Amelia.local 9.8.0 i386) // #ifndef _DVertex_factory_ #define _DVertex_factory_ #include #include #include #include #include "HDGEOMETRY/DRootGeom.h" #include #include class DVertex_factory : public jana::JFactory{ public: DVertex_factory(){}; ~DVertex_factory(){}; class vertexInfo_t : public DHoughFind { public: bool is_in_group; bool is_matched_to_vertex; const DChargedTrack* dChargedTrack; double t; double sigmat; double z; double sigmaz; void Reset(void){ ResetHist(); // (from DHoughFind) is_in_group = false; is_matched_to_vertex=false; dChargedTrack = NULL; } }; virtual jerror_t MakeVertices(vector &locChargedTracks); void FillVertexInfoChargedTrack(DVertex_factory::vertexInfo_t *locVertexInfo, const DChargedTrack *locChargedTrack); virtual void AssignParticlesToGroups(vector &locVertexInfos, vector< vector > &locVertexInfoGroups); bool AllInGroups(vector &locVertexInfos); private: jerror_t init(void); ///< Called once at program start. jerror_t brun(jana::JEventLoop *locEventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(jana::JEventLoop *locEventLoop, int eventnumber); ///< Called every event. jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called. jerror_t fini(void); ///< Called after last event of last event source has been processed. vector dVertexInfoPool; float GROUP_NUM_SIGMAS_TIME; float GROUP_NUM_SIGMAS_Z; float VERTEX_AVG_CL_THRES; double dTargetCenter_Z; // Pool of memory heavy vertexInfo_t objects unsigned int MAX_VERTEXINFOS; // Values to define the histo limits unsigned int Nbinst; double tmin; double tmax; unsigned int Nbinsz; double zmin; double zmax; bool DEBUG_HISTS; TH1F *Nsigmas_t_particles; TH1F *Nsigmas_z_particles; }; #endif // _DVertex_factory_