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 
8 
10 
12 
16 
19 {
20 
21 public:
22 
25 
29 
30  virtual ~VertexClassifier() {}
31 
33  virtual void newEvent(edm::Event const &, edm::EventSetup const &);
34 
37 
40 
42  VertexClassifier const & evaluate (reco::VertexRef const & vertex)
43  {
44  return evaluate( reco::VertexBaseRef(vertex) );
45  }
46 
48  VertexHistory const & history() const
49  {
50  return tracer_;
51  }
52 
53 private:
54 
56 
58 
60 
63 
65 
67 
70 
72  void simulationInformation();
73 
75  void processesAtGenerator();
76 
78  void processesAtSimulation();
79 
81  void vertexInformation();
82 
85  {
86  GeneratedPrimaryVertex(double x1,double y1,double z1): x(x1), y(y1), z(z1), ptsq(0), nGenTrk(0) {}
87 
89  {
90  return ptsq < reference.ptsq;
91  }
92 
93  double x, y, z;
94  double ptsq;
95  int nGenTrk;
96 
97  HepMC::FourVector ptot;
98 
99  std::vector<int> finalstateParticles;
100  std::vector<int> simTrackIndex;
101  std::vector<int> genVertex;
102  };
103 
104  std::vector<GeneratedPrimaryVertex> genpvs_;
105 
106  // Auxiliary function to get the generated primary vertex
108  bool isCharged(const HepMC::GenParticle *);
109  void genPrimaryVertices();
110 
111 };
112 
113 #endif
edm::Handle< edm::HepMCProduct > mcInformation_
This class traces the simulated and generated history of a given track.
Definition: VertexHistory.h:18
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)
Class that maps the native Geant4 process types to the legacy CMS process types.
Definition: Utils.h:33
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.
double longLivedDecayLength_
edm::ESHandle< ParticleDataTable > particleDataTable_
const G4toCMSLegacyProcTypeMap g4toCMSProcMap_
virtual ~VertexClassifier()
VertexClassifier(edm::ParameterSet const &pset, edm::ConsumesCollector &&)
Constructor by ParameterSet.
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.