CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexClassifier.h
Go to the documentation of this file.
1 
2 #ifndef VertexClassifier_h
3 #define VertexClassifier_h
4 
7 
9 
11 
14 
17 {
18 
19 public:
20 
23 
25  VertexClassifier(edm::ParameterSet const & pset);
26 
27  virtual ~VertexClassifier() {}
28 
30  virtual void newEvent(edm::Event const &, edm::EventSetup const &);
31 
34 
37 
39  VertexClassifier const & evaluate (reco::VertexRef const & vertex)
40  {
41  return evaluate( reco::VertexBaseRef(vertex) );
42  }
43 
45  VertexHistory const & history() const
46  {
47  return tracer_;
48  }
49 
50 private:
51 
53 
55 
58 
59  struct G4
60  {
61  enum Process
62  {
63  Undefined = 0,
80  };
81  };
82 
84 
86 
89 
91  void simulationInformation();
92 
94  void processesAtGenerator();
95 
97  void processesAtSimulation();
98 
100  void vertexInformation();
101 
104  {
105  GeneratedPrimaryVertex(double x1,double y1,double z1): x(x1), y(y1), z(z1), ptsq(0), nGenTrk(0) {}
106 
108  {
109  return ptsq < reference.ptsq;
110  }
111 
112  double x, y, z;
113  double ptsq;
114  int nGenTrk;
115 
116  HepMC::FourVector ptot;
117 
118  std::vector<int> finalstateParticles;
119  std::vector<int> simTrackIndex;
120  std::vector<int> genVertex;
121  };
122 
123  std::vector<GeneratedPrimaryVertex> genpvs_;
124 
125  // Auxiliary function to get the generated primary vertex
127  bool isCharged(const HepMC::GenParticle *);
128  void genPrimaryVertices();
129 
130 };
131 
132 #endif
edm::Handle< edm::HepMCProduct > mcInformation_
This class traces the simulated and generated history of a given track.
Definition: VertexHistory.h:17
VertexHistory tracer_
VertexHistory const & history() const
Returns a reference to the vertex history used in the classification.
void vertexInformation()
Get geometrical information about the vertices.
std::vector< GeneratedPrimaryVertex > genpvs_
GeneratedPrimaryVertex(double x1, double y1, double z1)
const edm::InputTag hepMCLabel_
bool isCharged(const HepMC::GenParticle *)
Get track history and classify it in function of their .
VertexCategories Categories
Type to the associate category.
bool isFinalstateParticle(const HepMC::GenParticle *)
void reconstructionInformation(reco::TrackBaseRef const &)
Get reconstruction information.
VertexClassifier(edm::ParameterSet const &pset)
Constructor by ParameterSet.
double longLivedDecayLength_
edm::ESHandle< ParticleDataTable > particleDataTable_
virtual ~VertexClassifier()
VertexClassifier const & evaluate(reco::VertexRef const &vertex)
Classify the RecoVertex in categories.
void processesAtGenerator()
Get all the information related to decay process.
bool operator<(GeneratedPrimaryVertex const &reference) const
VertexClassifier const & evaluate(reco::VertexBaseRef const &)
Classify the RecoVertex in categories.
double vertexClusteringDistance_
virtual void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
void processesAtSimulation()
Get information about conversion and other interactions.
Auxiliary class holding simulated primary vertices.
void simulationInformation()
Get all the information related to the simulation details.