46 #include "TDirectory.h"
81 : debug_(iConfig.getUntrackedParameter<
bool>(
"Debug",
false)),
89 desc.addUntracked<
bool>(
"Debug",
true);
92 descriptions.
add(
"isolatedParticlesGeneratedJets",
desc);
108 std::vector<std::vector<const reco::GenParticle *> > genJetConstituents(
genJets->size());
111 for (
unsigned iGenJet = 0; iGenJet <
genJets->size(); ++iGenJet) {
114 double genJetE = genJet.
energy();
115 double genJetPt = genJet.
pt();
116 double genJetEta = genJet.
eta();
117 double genJetPhi = genJet.
phi();
119 if (genJetPt > 30.0 &&
std::abs(genJetEta) < 3.0) {
122 std::vector<const reco::GenParticle *> genJetConstituents =
jetMatching.getGenParticles((*
genJets)[iGenJet]);
123 std::vector<double> v_trkP, v_trkPt, v_trkEta, v_trkPhi, v_trkPdg, v_trkCharge;
126 edm::LogVerbatim(
"IsoTrack") <<
"Jet(pt,Eta,Phi) " << genJetPt <<
" " << genJetEta <<
" " << genJetPhi;
127 for (
unsigned int ic = 0; ic < genJetConstituents.size(); ic++) {
129 edm::LogVerbatim(
"IsoTrack") <<
"p,pt,eta,phi " << genJetConstituents[ic]->p() <<
" "
130 << genJetConstituents[ic]->pt() <<
" " << genJetConstituents[ic]->eta() <<
" "
131 << genJetConstituents[ic]->phi();
133 v_trkP.push_back(genJetConstituents[ic]->
p());
134 v_trkPt.push_back(genJetConstituents[ic]->
pt());
135 v_trkEta.push_back(genJetConstituents[ic]->
eta());
136 v_trkPhi.push_back(genJetConstituents[ic]->
phi());
137 v_trkPdg.push_back(genJetConstituents[ic]->
pdgId());
138 v_trkCharge.push_back(genJetConstituents[ic]->
charge());
161 unsigned int indx = 0;
162 reco::GenParticleCollection::const_iterator ig =
genParticles->begin();
164 edm::LogVerbatim(
"IsoTrack") <<
"Track " << indx <<
" Status " << ig->status() <<
" charge " << ig->charge()
165 <<
" pdgId " << ig->pdgId() <<
" mass " << ig->mass() <<
" P " << ig->momentum()
166 <<
" E " << ig->energy() <<
" Origin " << ig->vertex();
194 t_gjetN =
new std::vector<int>();
195 t_gjetE =
new std::vector<double>();
196 t_gjetPt =
new std::vector<double>();
200 t_jetTrkP =
new std::vector<std::vector<double> >();
201 t_jetTrkPt =
new std::vector<std::vector<double> >();
202 t_jetTrkEta =
new std::vector<std::vector<double> >();
203 t_jetTrkPhi =
new std::vector<std::vector<double> >();
204 t_jetTrkPdg =
new std::vector<std::vector<double> >();
208 tree_->Branch(
"t_gjetE",
"std::vector<double>", &
t_gjetE);
213 tree_->Branch(
"t_jetTrkP",
"std::vector<vector<double> >", &
t_jetTrkP);
214 tree_->Branch(
"t_jetTrkPt",
"std::vector<vector<double> >", &
t_jetTrkPt);