Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RequireParticlesInAcc.h
Go to the documentation of this file.
1 #ifndef _REQUIRE_PARTICLES_IN_ACC__H_
2 #define _REQUIRE_PARTICLES_IN_ACC__H_
3 #include <map>
4 #include <fun4all/SubsysReco.h>
5 class PHG4HitContainer;
6 
9  int m_npl_per_par; //< Min number of hit planes per particle in order to regard particle good.
10  int m_npar_per_evt; //< Min number of particles per event in order to regard event good.
11 
12  PHG4HitContainer *g4hc_h1t;
13  PHG4HitContainer *g4hc_h1b;
14  PHG4HitContainer *g4hc_h2t;
15  PHG4HitContainer *g4hc_h2b;
16  PHG4HitContainer *g4hc_h3t;
17  PHG4HitContainer *g4hc_h3b;
18  PHG4HitContainer *g4hc_h4t;
19  PHG4HitContainer *g4hc_h4b;
20 
21  public:
22  RequireParticlesInAcc(const std::string& name = "ACCEPTANCE");
23  virtual ~RequireParticlesInAcc();
24  int Init(PHCompositeNode *topNode);
25  int InitRun(PHCompositeNode *topNode);
26  int process_event(PHCompositeNode *topNode);
27  int End(PHCompositeNode *topNode);
28 
29  void SetNumHitPlanesPerParticle(const int val) { m_npl_per_par = val; }
30  void SetNumParticlesPerEvent (const int val) { m_npar_per_evt = val; }
31 
32  private:
33  int GetNodes(PHCompositeNode *topNode);
34  void ExtractParticleID(const PHG4HitContainer* g4hc, std::vector<int>& vec_par_id);
35  std::vector<int> ExtractParticleID(const PHG4HitContainer* g4hc_t, const PHG4HitContainer* g4hc_b);
36  void CountHitPlanesPerParticle(const std::vector<int> vec_id, std::map<int, int>& map_nhit);
37 };
38 
39 #endif /* _REQUIRE_PARTICLES_IN_ACC__H_ */
void SetNumHitPlanesPerParticle(const int val)
void SetNumParticlesPerEvent(const int val)
RequireParticlesInAcc(const std::string &name="ACCEPTANCE")
An SubsysReco module to select in-acceptance events.
int InitRun(PHCompositeNode *topNode)
int Init(PHCompositeNode *topNode)
int End(PHCompositeNode *topNode)
Called at the end of all processing.
int process_event(PHCompositeNode *topNode)