238 : ptMin_(iConfig.getUntrackedParameter<double>(
"PTMin", 1.0)),
239 etaMax_(iConfig.getUntrackedParameter<double>(
"MaxChargedHadronEta", 2.5)),
240 pCutIsolate_(iConfig.getUntrackedParameter<double>(
"PMaxIsolation", 20.0)),
241 a_Isolation_(iConfig.getUntrackedParameter<
bool>(
"UseConeIsolation",
false)),
242 genSrc_(iConfig.getUntrackedParameter(
"GenSrc",
std::
string(
"generatorSmeared"))),
243 useHepMC_(iConfig.getUntrackedParameter<
bool>(
"UseHepMC",
false)),
244 a_coneR_(iConfig.getUntrackedParameter<double>(
"ConeRadius", 34.98)),
245 a_mipR_(iConfig.getUntrackedParameter<double>(
"ConeRadiusMIP", 14.0)),
246 verbosity_(iConfig.getUntrackedParameter<
int>(
"Verbosity", 0)) {
255 if (!strcmp(
"Dummy",
genSrc_.c_str())) {
270 desc.addUntracked<
bool>(
"UseHepMC",
false);
271 desc.addUntracked<
double>(
"ChargedHadronSeedP", 1.0);
272 desc.addUntracked<
double>(
"PTMin", 1.0);
273 desc.addUntracked<
double>(
"MaxChargedHadronEta", 2.5);
274 desc.addUntracked<
double>(
"ConeRadius", 34.98);
275 desc.addUntracked<
double>(
"ConeRadiusMIP", 14.0);
276 desc.addUntracked<
bool>(
"UseConeIsolation",
true);
277 desc.addUntracked<
double>(
"PMaxIsolation", 5.0);
278 desc.addUntracked<
int>(
"Verbosity", 0);
279 descriptions.
add(
"studyCaloGen",
desc);
323 for (
unsigned int indx = 0; indx < trackIDs.size(); ++indx) {
324 int charge = trackIDs[indx].charge;
325 HepMC::GenEvent::particle_const_iterator
p = trackIDs[indx].trkItr;
327 (*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
329 edm::LogVerbatim(
"IsoTrack") <<
"trkIndx " << indx <<
" pdgid " << trackIDs[indx].pdgId <<
" charge " <<
charge
330 <<
" momVec " << momVec;
335 posVec =
GlobalPoint(0.1 * (*p)->production_vertex()->position().x(),
336 0.1 * (*p)->production_vertex()->position().y(),
337 0.1 * (*p)->production_vertex()->position().z());
338 posECAL = trackIDs[indx].pointECAL;
339 fillTrack(posVec, momVec, posECAL, trackIDs[indx].
pdgId, trackIDs[indx].okECAL,
true);
341 edm::LogVerbatim(
"IsoTrack") <<
"posECAL " << posECAL <<
" okECAL " << trackIDs[indx].okECAL <<
"okHCAL "
342 << trackIDs[indx].okHCAL;
343 if (trackIDs[indx].okECAL) {
360 trackIDs[indx].directionECAL,
369 trackIDs[indx].directionECAL,
372 if (trackIDs[indx].okHCAL) {
383 trackIDs[indx].directionHCAL,
392 trackIDs[indx].directionHCAL,
397 bool saveTrack =
true;
407 fillTrack(posVec, momVec, posECAL, 0,
false,
false);
413 HepMC::GenEvent::particle_const_iterator
p;
414 for (
p = myGenEvent->particles_begin(), indx = 0;
p != myGenEvent->particles_end(); ++
p, ++indx) {
415 int pdgId = ((*p)->pdg_id());
418 double pp = (*p)->momentum().rho();
419 double eta = (*p)->momentum().eta();
424 std::vector<spr::propagatedGenParticleID> trackIDs =
427 for (
unsigned int indx = 0; indx < trackIDs.size(); ++indx) {
428 int charge = trackIDs[indx].charge;
429 reco::GenParticleCollection::const_iterator
p = trackIDs[indx].trkItr;
433 edm::LogVerbatim(
"IsoTrack") <<
"trkIndx " << indx <<
" pdgid " << trackIDs[indx].pdgId <<
" charge " <<
charge
434 <<
" momVec " << momVec;
439 edm::LogVerbatim(
"IsoTrack") <<
" pt " << momVec.Pt() <<
" eta " << momVec.eta();
441 posVec =
GlobalPoint(
p->vertex().x(),
p->vertex().y(),
p->vertex().z());
442 posECAL = trackIDs[indx].pointECAL;
444 edm::LogVerbatim(
"IsoTrack") <<
"posECAL " << posECAL <<
" okECAL " << trackIDs[indx].okECAL <<
"okHCAL "
445 << trackIDs[indx].okHCAL;
446 fillTrack(posVec, momVec, posECAL, trackIDs[indx].
pdgId, trackIDs[indx].okECAL,
true);
447 if (trackIDs[indx].okECAL) {
473 trackIDs[indx].directionECAL,
482 trackIDs[indx].directionECAL,
485 if (trackIDs[indx].okHCAL) {
500 trackIDs[indx].directionHCAL,
509 trackIDs[indx].directionHCAL,
514 bool saveTrack =
true;
524 fillTrack(posVec, momVec, posECAL, 0,
false,
false);
530 reco::GenParticleCollection::const_iterator
p;
535 double pp = (
p->momentum()).
R();
536 double eta = (
p->momentum()).Eta();
550 double tempgen_TH[
NPBins_ + 1] = {0.0, 5.0, 12.0, 300.0};
554 double tempgen_Eta[
NEtaBins_ + 1] = {0.0, 0.5, 1.1, 1.7, 2.3};
570 double phi1 = momVec.phi();
571 double phi2 = (posECAL - posVec).
phi();
573 double deta = momVec.eta() - (posECAL - posVec).
eta();
771 h_NEventProc = fs->
make<TH1I>(
"h_NEventProc",
"h_NEventProc", 2, -0.5, 0.5);
773 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,
774 70.0, 80.0, 90.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0,
775 500.0, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0, 900.0, 950.0, 1000.0};
776 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,
777 -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,
778 -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,
779 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,
780 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0};
782 "electron",
"positron",
"#gamma",
"#pi^+",
"#pi^-",
"K^+",
"K^-",
"p",
"n",
"pbar",
"nbar",
"K^0_L"};
786 sprintf(
name,
"pEta%d",
i);
787 sprintf(
title,
"#eta vs momentum for %s", particle[
i].c_str());
792 tree_ = fs->
make<TTree>(
"StudyCaloGen",
"StudyCaloGen");
949 t_muEneR =
new std::vector<double>();
1136 tree_->Branch(
"t_muEneR",
"std::vector<double>", &
t_muEneR);
1362 int partID[
Particles] = {11, -11, 21, 211, -211, 321, -321, 2212, 2112, -2212, -2112, 130};
1364 for (
int ik = 0; ik <
Particles; ++ik) {
1365 if (
pdgId == partID[ik]) {