Go to the documentation of this file.00001
00002 #ifndef VertexClassifier_h
00003 #define VertexClassifier_h
00004
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 #include "FWCore/Utilities/interface/InputTag.h"
00007
00008 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00009
00010 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00011
00012 #include "SimTracker/TrackHistory/interface/VertexCategories.h"
00013 #include "SimTracker/TrackHistory/interface/VertexHistory.h"
00014
00016 class VertexClassifier : public VertexCategories
00017 {
00018
00019 public:
00020
00022 typedef VertexCategories Categories;
00023
00025 VertexClassifier(edm::ParameterSet const & pset);
00026
00027 virtual ~VertexClassifier() {}
00028
00030 virtual void newEvent(edm::Event const &, edm::EventSetup const &);
00031
00033 VertexClassifier const & evaluate (reco::VertexBaseRef const &);
00034
00036 VertexClassifier const & evaluate (TrackingVertexRef const &);
00037
00039 VertexClassifier const & evaluate (reco::VertexRef const & vertex)
00040 {
00041 return evaluate( reco::VertexBaseRef(vertex) );
00042 }
00043
00045 VertexHistory const & history() const
00046 {
00047 return tracer_;
00048 }
00049
00050 private:
00051
00052 VertexHistory tracer_;
00053
00054 const edm::InputTag hepMCLabel_;
00055
00056 double longLivedDecayLength_;
00057 double vertexClusteringDistance_;
00058
00059 struct G4
00060 {
00061 enum Process
00062 {
00063 Undefined = 0,
00064 Unknown,
00065 Primary,
00066 Hadronic,
00067 Decay,
00068 Compton,
00069 Annihilation,
00070 EIoni,
00071 HIoni,
00072 MuIoni,
00073 Photon,
00074 MuPairProd,
00075 Conversions,
00076 EBrem,
00077 SynchrotronRadiation,
00078 MuBrem,
00079 MuNucl
00080 };
00081 };
00082
00083 edm::Handle<edm::HepMCProduct> mcInformation_;
00084
00085 edm::ESHandle<ParticleDataTable> particleDataTable_;
00086
00088 void reconstructionInformation(reco::TrackBaseRef const &);
00089
00091 void simulationInformation();
00092
00094 void processesAtGenerator();
00095
00097 void processesAtSimulation();
00098
00100 void vertexInformation();
00101
00103 struct GeneratedPrimaryVertex
00104 {
00105 GeneratedPrimaryVertex(double x1,double y1,double z1): x(x1), y(y1), z(z1), ptsq(0), nGenTrk(0) {}
00106
00107 bool operator< ( GeneratedPrimaryVertex const & reference) const
00108 {
00109 return ptsq < reference.ptsq;
00110 }
00111
00112 double x, y, z;
00113 double ptsq;
00114 int nGenTrk;
00115
00116 HepMC::FourVector ptot;
00117
00118 std::vector<int> finalstateParticles;
00119 std::vector<int> simTrackIndex;
00120 std::vector<int> genVertex;
00121 };
00122
00123 std::vector<GeneratedPrimaryVertex> genpvs_;
00124
00125
00126 bool isFinalstateParticle(const HepMC::GenParticle *);
00127 bool isCharged(const HepMC::GenParticle *);
00128 void genPrimaryVertices();
00129
00130 };
00131
00132 #endif