File indexing completed on 2024-04-06 11:59:10
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CalibrationIsolatedParticlesGenSimInfo_h
0009 #define CalibrationIsolatedParticlesGenSimInfo_h
0010
0011
0012 #include <memory>
0013 #include <map>
0014 #include <vector>
0015 #include <string>
0016
0017
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019
0020 #include "FWCore/Framework/interface/Event.h"
0021
0022 #include "DataFormats/Common/interface/Handle.h"
0023 #include "DataFormats/DetId/interface/DetId.h"
0024 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0025 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0026 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0027 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0028
0029 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0030 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0031 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0032
0033 #include "Calibration/IsolatedParticles/interface/CaloPropagateTrack.h"
0034
0035 namespace spr {
0036
0037 struct genSimInfo {
0038 genSimInfo() {
0039 maxNearP = -1.0;
0040 cHadronEne = nHadronEne = eleEne = muEne = photonEne = 0.0;
0041 isChargedIso = true;
0042 for (int i = 0; i < 3; ++i)
0043 cHadronEne_[i] = 0.0;
0044 }
0045 double maxNearP;
0046 double cHadronEne, nHadronEne, eleEne, muEne, photonEne;
0047 bool isChargedIso;
0048 double cHadronEne_[3];
0049 };
0050
0051 void eGenSimInfo(const DetId& coreDet,
0052 HepMC::GenEvent::particle_const_iterator trkItr,
0053 std::vector<spr::propagatedGenTrackID>& trackIds,
0054 const CaloGeometry* geo,
0055 const CaloTopology* caloTopology,
0056 int ieta,
0057 int iphi,
0058 spr::genSimInfo& info,
0059 bool debug = false);
0060
0061 void eGenSimInfo(const DetId& coreDet,
0062 HepMC::GenEvent::particle_const_iterator trkItr,
0063 std::vector<spr::propagatedGenTrackID>& trackIds,
0064 const CaloGeometry* geo,
0065 const CaloTopology* caloTopology,
0066 double dR,
0067 const GlobalVector& trackMom,
0068 spr::genSimInfo& info,
0069 bool debug = false);
0070
0071 void eGenSimInfo(const DetId& coreDet,
0072 reco::GenParticleCollection::const_iterator trkItr,
0073 std::vector<spr::propagatedGenParticleID>& trackIds,
0074 const CaloGeometry* geo,
0075 const CaloTopology* caloTopology,
0076 int ieta,
0077 int iphi,
0078 spr::genSimInfo& info,
0079 bool debug = false);
0080
0081 void eGenSimInfo(const DetId& coreDet,
0082 reco::GenParticleCollection::const_iterator trkItr,
0083 std::vector<spr::propagatedGenParticleID>& trackIds,
0084 const CaloGeometry* geo,
0085 const CaloTopology* caloTopology,
0086 double dR,
0087 const GlobalVector& trackMom,
0088 spr::genSimInfo& info,
0089 bool debug = false);
0090
0091 void hGenSimInfo(const DetId& coreDet,
0092 HepMC::GenEvent::particle_const_iterator trkItr,
0093 std::vector<spr::propagatedGenTrackID>& trackIds,
0094 const HcalTopology* topology,
0095 int ieta,
0096 int iphi,
0097 spr::genSimInfo& info,
0098 bool includeHO = false,
0099 bool debug = false);
0100
0101 void hGenSimInfo(const DetId& coreDet,
0102 HepMC::GenEvent::particle_const_iterator trkItr,
0103 std::vector<spr::propagatedGenTrackID>& trackIds,
0104 const CaloGeometry* geo,
0105 const HcalTopology* topology,
0106 double dR,
0107 const GlobalVector& trackMom,
0108 spr::genSimInfo& info,
0109 bool includeHO = false,
0110 bool debug = false);
0111
0112 void hGenSimInfo(const DetId& coreDet,
0113 reco::GenParticleCollection::const_iterator trkItr,
0114 std::vector<spr::propagatedGenParticleID>& trackIds,
0115 const HcalTopology* topology,
0116 int ieta,
0117 int iphi,
0118 spr::genSimInfo& info,
0119 bool includeHO = false,
0120 bool debug = false);
0121
0122 void hGenSimInfo(const DetId& coreDet,
0123 reco::GenParticleCollection::const_iterator trkItr,
0124 std::vector<spr::propagatedGenParticleID>& trackIds,
0125 const CaloGeometry* geo,
0126 const HcalTopology* topology,
0127 double dR,
0128 const GlobalVector& trackMom,
0129 spr::genSimInfo& info,
0130 bool includeHO = false,
0131 bool debug = false);
0132
0133 void cGenSimInfo(std::vector<DetId>& vdets,
0134 HepMC::GenEvent::particle_const_iterator trkItr,
0135 std::vector<spr::propagatedGenTrackID>& trackIds,
0136 bool ifECAL,
0137 spr::genSimInfo& info,
0138 bool debug = false);
0139
0140 void cGenSimInfo(std::vector<DetId>& vdets,
0141 reco::GenParticleCollection::const_iterator trkItr,
0142 std::vector<spr::propagatedGenParticleID>& trackIds,
0143 bool ifECAL,
0144 spr::genSimInfo& info,
0145 bool debug = false);
0146
0147 void cGenSimInfo(int charge, int pdgid, double p, spr::genSimInfo& info, bool debug = false);
0148 }
0149
0150 #endif