242 : ptMin_(iConfig.getUntrackedParameter<double>(
"PTMin", 1.0)),
243 etaMax_(iConfig.getUntrackedParameter<double>(
"MaxChargedHadronEta", 2.5)),
244 pCutIsolate_(iConfig.getUntrackedParameter<double>(
"PMaxIsolation", 20.0)),
245 a_Isolation_(iConfig.getUntrackedParameter<
bool>(
"UseConeIsolation",
false)),
246 genSrc_(iConfig.getUntrackedParameter(
"GenSrc",
std::
string(
"generatorSmeared"))),
247 useHepMC_(iConfig.getUntrackedParameter<
bool>(
"UseHepMC",
false)),
248 a_coneR_(iConfig.getUntrackedParameter<double>(
"ConeRadius", 34.98)),
249 a_mipR_(iConfig.getUntrackedParameter<double>(
"ConeRadiusMIP", 14.0)),
250 verbosity_(iConfig.getUntrackedParameter<
int>(
"Verbosity", 0)) {
259 if (!strcmp(
"Dummy",
genSrc_.c_str())) {
270 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
272 tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
273 tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
274 tok_pdt_ = esConsumes<HepPDT::ParticleDataTable, PDTRecord>();
280 desc.addUntracked<
bool>(
"UseHepMC",
false);
281 desc.addUntracked<
double>(
"ChargedHadronSeedP", 1.0);
282 desc.addUntracked<
double>(
"PTMin", 1.0);
283 desc.addUntracked<
double>(
"MaxChargedHadronEta", 2.5);
284 desc.addUntracked<
double>(
"ConeRadius", 34.98);
285 desc.addUntracked<
double>(
"ConeRadiusMIP", 14.0);
286 desc.addUntracked<
bool>(
"UseConeIsolation",
true);
287 desc.addUntracked<
double>(
"PMaxIsolation", 5.0);
288 desc.addUntracked<
int>(
"Verbosity", 0);
289 descriptions.
add(
"studyCaloGen",
desc);
321 for (
unsigned int indx = 0; indx < trackIDs.size(); ++indx) {
322 int charge = trackIDs[indx].charge;
323 HepMC::GenEvent::particle_const_iterator
p = trackIDs[indx].trkItr;
325 (*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
327 edm::LogVerbatim(
"IsoTrack") <<
"trkIndx " << indx <<
" pdgid " << trackIDs[indx].pdgId <<
" charge " <<
charge 328 <<
" momVec " << momVec;
333 posVec =
GlobalPoint(0.1 * (*p)->production_vertex()->position().x(),
334 0.1 * (*p)->production_vertex()->position().y(),
335 0.1 * (*p)->production_vertex()->position().z());
336 posECAL = trackIDs[indx].pointECAL;
337 fillTrack(posVec, momVec, posECAL, trackIDs[indx].
pdgId, trackIDs[indx].okECAL,
true);
339 edm::LogVerbatim(
"IsoTrack") <<
"posECAL " << posECAL <<
" okECAL " << trackIDs[indx].okECAL <<
"okHCAL " 340 << trackIDs[indx].okHCAL;
341 if (trackIDs[indx].okECAL) {
358 trackIDs[indx].directionECAL,
367 trackIDs[indx].directionECAL,
370 if (trackIDs[indx].okHCAL) {
381 trackIDs[indx].directionHCAL,
390 trackIDs[indx].directionHCAL,
395 bool saveTrack =
true;
405 fillTrack(posVec, momVec, posECAL, 0,
false,
false);
411 HepMC::GenEvent::particle_const_iterator
p;
412 for (
p = myGenEvent->particles_begin(), indx = 0;
p != myGenEvent->particles_end(); ++
p, ++indx) {
413 int pdgId = ((*p)->pdg_id());
416 double pp = (*p)->momentum().rho();
417 double eta = (*p)->momentum().eta();
422 std::vector<spr::propagatedGenParticleID> trackIDs =
425 for (
unsigned int indx = 0; indx < trackIDs.size(); ++indx) {
426 int charge = trackIDs[indx].charge;
427 reco::GenParticleCollection::const_iterator
p = trackIDs[indx].trkItr;
431 edm::LogVerbatim(
"IsoTrack") <<
"trkIndx " << indx <<
" pdgid " << trackIDs[indx].pdgId <<
" charge " <<
charge 432 <<
" momVec " << momVec;
437 edm::LogVerbatim(
"IsoTrack") <<
" pt " << momVec.Pt() <<
" eta " << momVec.eta();
439 posVec =
GlobalPoint(
p->vertex().x(),
p->vertex().y(),
p->vertex().z());
440 posECAL = trackIDs[indx].pointECAL;
442 edm::LogVerbatim(
"IsoTrack") <<
"posECAL " << posECAL <<
" okECAL " << trackIDs[indx].okECAL <<
"okHCAL " 443 << trackIDs[indx].okHCAL;
444 fillTrack(posVec, momVec, posECAL, trackIDs[indx].
pdgId, trackIDs[indx].okECAL,
true);
445 if (trackIDs[indx].okECAL) {
471 trackIDs[indx].directionECAL,
480 trackIDs[indx].directionECAL,
483 if (trackIDs[indx].okHCAL) {
498 trackIDs[indx].directionHCAL,
507 trackIDs[indx].directionHCAL,
512 bool saveTrack =
true;
522 fillTrack(posVec, momVec, posECAL, 0,
false,
false);
528 reco::GenParticleCollection::const_iterator
p;
533 double pp = (
p->momentum()).
R();
534 double eta = (
p->momentum()).Eta();
548 double tempgen_TH[
NPBins_ + 1] = {0.0, 5.0, 12.0, 300.0};
552 double tempgen_Eta[
NEtaBins_ + 1] = {0.0, 0.5, 1.1, 1.7, 2.3};
568 double phi1 = momVec.phi();
569 double phi2 = (posECAL - posVec).
phi();
571 double deta = momVec.eta() - (posECAL - posVec).
eta();
769 h_NEventProc =
fs->make<TH1I>(
"h_NEventProc",
"h_NEventProc", 2, -0.5, 0.5);
771 double pBin[
PBins_ + 1] = {0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0,
772 70.0, 80.0, 90.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0,
773 500.0, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0, 900.0, 950.0, 1000.0};
774 double etaBin[
EtaBins_ + 1] = {-3.0, -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8,
775 -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6, -0.5,
776 -0.4, -0.3, -0.2, -0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
777 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1,
778 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0};
780 "electron",
"positron",
"#gamma",
"#pi^+",
"#pi^-",
"K^+",
"K^-",
"p",
"n",
"pbar",
"nbar",
"K^0_L"};
784 sprintf(
name,
"pEta%d",
i);
785 sprintf(
title,
"#eta vs momentum for %s", particle[
i].c_str());
790 tree_ =
fs->make<TTree>(
"StudyCaloGen",
"StudyCaloGen");
947 t_muEneR =
new std::vector<double>();
1134 tree_->Branch(
"t_muEneR",
"std::vector<double>", &
t_muEneR);
1360 int partID[
Particles] = {11, -11, 21, 211, -211, 321, -321, 2212, 2112, -2212, -2112, 130};
1362 for (
int ik = 0; ik <
Particles; ++ik) {
1363 if (
pdgId == partID[ik]) {
std::vector< double > * t_cHadronEne25x25
std::vector< double > * t_eleEneHC3x3
static const std::string kSharedResource
std::vector< double > * t_cHadronEne3x3_1
std::vector< double > * t_muEne9x9
constexpr double deltaPhi(double phi1, double phi2)
Log< level::Info, true > LogVerbatim
std::vector< double > * t_cHadronEneHCR
std::vector< double > * t_cHadronEne11x11_1
std::vector< double > * t_cHadronEneHC7x7_1
std::vector< double > * t_photonEneHC1x1
std::vector< double > * t_cHadronEne21x21_1
std::vector< double > * t_nHadronEne3x3
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
std::vector< double > * t_eleEne3x3
std::vector< double > * t_cHadronEne7x7
double genPartPBins_[NPBins_+1]
std::vector< double > * t_cHadronEneHC3x3_1
std::vector< double > * t_photonEne7x7
std::vector< double > * t_maxNearPHC1x1
std::vector< double > * t_isoTrkPhiAll
std::vector< double > * t_eleEne1x1
std::vector< double > * t_cHadronEne25x25_1
std::vector< double > * t_nHadronEneHC3x3
static constexpr int Particles
std::vector< double > * t_photonEne25x25
std::vector< double > * t_cHadronEne31x31_3
HepPDT::ParticleDataTable ParticleDataTable
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< double > * t_cHadronEneIsoHCR_3
std::vector< double > * t_cHadronEneHC5x5_3
std::vector< double > * t_cHadronEneHC3x3
std::vector< double > * t_muEne11x11
spr::genSimInfo isoinfoHC3x3
#define DEFINE_FWK_MODULE(type)
std::vector< double > * t_eleEneR
std::vector< double > * t_photonEne9x9
std::vector< double > * t_muEneIsoR
Geom::Phi< T > phi() const
std::vector< double > * t_nHadronEneHC7x7
std::vector< double > * t_maxNearP1x1
std::vector< double > * t_nHadronEne21x21
std::vector< double > * t_cHadronEne31x31_1
std::vector< double > * t_cHadronEne15x15_1
std::vector< double > * t_cHadronEneHC3x3_3
Global3DPoint GlobalPoint
std::vector< double > * t_cHadronEneIsoHCR_1
std::vector< double > * t_cHadronEne7x7_3
std::vector< double > * t_eleEne31x31
std::vector< double > * t_cHadronEne11x11
spr::genSimInfo isoinfoIsoR
std::vector< double > * t_cHadronEneHCR_1
std::vector< double > * t_photonEne11x11
std::vector< double > * t_cHadronEne3x3
std::vector< double > * t_cHadronEneHC5x5
static constexpr int NEtaBins_
std::vector< double > * t_cHadronEneHC7x7
std::vector< double > * t_muEneR
std::vector< double > * t_muEne21x21
std::vector< double > * t_cHadronEneHC1x1_3
std::vector< double > * t_nHadronEneIsoR
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< double > * t_muEneIsoHCR
std::vector< double > * t_muEneHCR
std::vector< double > * t_maxNearPIsoHCR
std::vector< double > * t_isoTrkPdgIdAll
std::vector< double > * t_muEne31x31
std::vector< double > * t_isoTrkPAll
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< double > * t_nHadronEneR
std::vector< double > * t_muEne1x1
std::vector< double > * t_cHadronEneR_3
std::vector< double > * t_isoTrkEta
edm::ESGetToken< HepPDT::ParticleDataTable, PDTRecord > tok_pdt_
std::vector< double > * t_cHadronEneHC1x1_1
std::vector< double > * t_cHadronEneHC5x5_2
std::vector< double > * t_photonEneHC5x5
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::vector< double > * t_maxNearPHC7x7
std::vector< double > * t_eleEneHCR
std::vector< double > * t_nHadronEne31x31
std::vector< double > * t_isoTrkDEtaAll
std::vector< double > * t_isoTrkEtaEC
std::vector< double > * t_cHadronEneIsoR_3
std::vector< double > * t_nHadronEneHC5x5
std::vector< double > * t_muEneHC5x5
std::vector< double > * t_nHadronEne7x7
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< double > * t_maxNearP7x7
std::vector< double > * t_cHadronEne1x1
std::vector< double > * t_cHadronEne15x15_3
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
std::vector< double > * t_cHadronEne31x31_2
std::vector< double > * t_nHadronEneHCR
void fillIsolatedTrack(math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId)
std::vector< double > * t_cHadronEne15x15
std::vector< double > * t_nHadronEneHC1x1
std::vector< double > * t_photonEneHC3x3
std::vector< double > * t_nHadronEne15x15
spr::genSimInfo isoinfo31x31
std::vector< double > * t_cHadronEne1x1_2
StudyCaloGen(const edm::ParameterSet &)
std::vector< double > * t_photonEne3x3
std::vector< double > * t_isoTrkPtAll
std::vector< double > * t_cHadronEneHC7x7_3
spr::genSimInfo isoinfo25x25
std::vector< double > * t_cHadronEne9x9
std::vector< double > * t_nHadronEne25x25
std::vector< double > * t_isoTrkP
std::vector< double > * t_cHadronEne21x21
std::vector< double > * t_eleEneHC5x5
std::vector< double > * t_photonEneIsoHCR
std::vector< double > * t_cHadronEneR_1
spr::genSimInfo isoinfo9x9
std::vector< double > * t_maxNearP21x21
std::vector< double > * t_muEne25x25
std::vector< double > * t_cHadronEne9x9_2
std::vector< double > * t_eleEne9x9
std::vector< double > * t_cHadronEneIsoR_1
std::vector< double > * t_photonEneR
std::vector< double > * t_cHadronEneR
Abs< T >::type abs(const T &t)
std::vector< double > * t_cHadronEne11x11_2
void eGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, spr::genSimInfo &info, bool debug=false)
std::vector< double > * t_maxNearP25x25
std::vector< double > * t_cHadronEne1x1_1
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
std::vector< double > * t_photonEneHC7x7
std::vector< double > * t_nHadronEne9x9
static constexpr int EtaBins_
bool getData(T &iHolder) const
std::vector< double > * t_cHadronEne25x25_3
std::vector< double > * t_eleEne25x25
std::vector< double > * t_maxNearPHC5x5
std::vector< double > * t_maxNearP15x15
spr::genSimInfo isoinfo1x1
std::vector< double > * t_cHadronEne15x15_2
std::vector< double > * t_photonEneIsoR
std::vector< double > * t_cHadronEneHC1x1
const HepMC::GenEvent * GetEvent() const
std::vector< double > * t_cHadronEneIsoR_2
std::vector< double > * t_muEne15x15
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
std::vector< double > * t_isoTrkDPhiAll
std::vector< double > * t_muEneHC3x3
std::vector< double > * t_isoTrkPt
std::vector< double > * t_cHadronEne21x21_2
spr::genSimInfo isoinfoHCR
std::vector< double > * t_maxNearPHC3x3
std::vector< double > * t_muEne7x7
std::vector< double > * t_cHadronEne11x11_3
std::vector< double > * t_cHadronEneR_2
spr::genSimInfo isoinfoHC1x1
std::vector< double > * t_cHadronEneIsoHCR
static constexpr int NPBins_
std::vector< double > * t_cHadronEneHC5x5_1
std::vector< double > * t_eleEne7x7
spr::genSimInfo isoinfo21x21
std::vector< double > * t_eleEneIsoHCR
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > * t_eleEne11x11
std::vector< double > * t_maxNearP3x3
std::vector< double > * t_photonEne15x15
spr::genSimInfo isoinfoIsoHCR
std::vector< double > * t_eleEneHC1x1
std::vector< double > * t_cHadronEne7x7_1
std::vector< double > * t_muEne3x3
std::vector< double > * t_isoTrkPdgId
std::vector< double > * t_eleEne15x15
std::vector< double > * t_isoTrkEne
std::vector< double > * t_eleEneHC7x7
std::vector< double > * t_cHadronEne9x9_1
std::vector< double > * t_cHadronEne3x3_3
std::vector< double > * t_maxNearPR
std::vector< double > * t_cHadronEneHC7x7_2
std::vector< double > * t_cHadronEneHC3x3_2
spr::genSimInfo isoinfo3x3
std::vector< double > * t_cHadronEne7x7_2
void fillTrack(GlobalPoint &posVec, math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId, bool okECAL, bool accpet)
edm::EDGetTokenT< reco::GenParticleCollection > tok_genParticles_
std::vector< double > * t_maxNearP9x9
std::vector< double > * t_eleEne21x21
spr::genSimInfo isoinfo7x7
std::vector< double > * t_cHadronEne9x9_3
std::vector< double > * t_cHadronEneIsoHCR_2
std::vector< double > * t_maxNearP31x31
std::vector< double > * t_cHadronEne25x25_2
double genPartEtaBins_[NEtaBins_+1]
void hGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const HcalTopology *topology, int ieta, int iphi, spr::genSimInfo &info, bool includeHO=false, bool debug=false)
std::vector< double > * t_cHadronEne3x3_2
std::vector< double > * t_isoTrkPhi
std::vector< double > * t_nHadronEne1x1
std::vector< double > * t_photonEne1x1
static constexpr int PBins_
std::vector< double > * t_nHadronEne11x11
spr::genSimInfo isoinfo15x15
std::vector< double > * t_photonEne31x31
spr::genSimInfo isoinfoHC7x7
std::vector< double > * t_maxNearPHCR
std::vector< double > * t_cHadronEneHCR_2
std::vector< double > * t_cHadronEneIsoR
edm::EDGetTokenT< edm::HepMCProduct > tok_hepmc_
std::vector< double > * t_muEneHC1x1
std::vector< double > * t_cHadronEneHCR_3
spr::genSimInfo isoinfo11x11
std::vector< double > * t_nHadronEneIsoHCR
std::vector< double > * t_maxNearPIsoR
std::vector< double > * t_photonEneHCR
spr::genSimInfo isoinfoHC5x5
std::vector< double > * t_cHadronEne21x21_3
std::vector< double > * t_cHadronEne1x1_3
int etaBin(const l1t::HGCalMulticluster *cl)
std::vector< double > * t_muEneHC7x7
std::vector< double > * t_maxNearP11x11
std::vector< double > * t_isoTrkEtaAll
std::vector< double > * t_cHadronEne31x31
std::vector< double > * t_eleEneIsoR
std::vector< double > * t_photonEne21x21
std::vector< double > * t_cHadronEneHC1x1_2
std::vector< double > * t_isoTrkPhiEC