29 :
SubsysReco(
"MyJetAnalysis_" + recojetname +
"_" + truthjetname)
30 , m_recoJetName(recojetname)
32 , m_outputFileName(outputfilename)
35 , m_trackJetMatchingRadius(.7)
37 m_trackdR.fill(std::numeric_limits<float>::signaling_NaN());
38 m_trackpT.fill(std::numeric_limits<float>::signaling_NaN());
44 std::cout <<
"MyJetAnalysis::Init - Outoput to " <<
m_outputFileName << std::endl;
51 TString(
m_recoJetName) +
" inclusive jet E;Total jet energy (GeV)", 100, 0, 100);
56 TString(
m_recoJetName) +
" inclusive jet #eta;#eta;Jet energy density", 50, -1, 1);
60 TString(
m_recoJetName) +
" inclusive jet #phi;#phi;Jet energy density", 50, -M_PI, M_PI);
63 m_T =
new TTree(
"T",
"MyJetAnalysis Tree");
68 m_T->Branch(
"id", &
m_id,
"id/I");
76 m_T->Branch(
"e", &
m_e,
"e/F");
78 m_T->Branch(
"pt", &
m_pt,
"pt/F");
97 m_T->Branch(
"id",
m_trackdR.data(),
"trackdR[nMatchedTrack]/F");
99 m_T->Branch(
"id",
m_trackpT.data(),
"trackpT[nMatchedTrack]/F");
106 std::cout <<
"MyJetAnalysis::End - Output to " <<
m_outputFileName << std::endl;
127 std::cout <<
"MyJetAnalysis::process_event() entered" << std::endl;
138 <<
"MyJetAnalysis::process_event - Error can not find DST JetMap node "
144 SvtxTrackMap* trackmap = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
147 trackmap = findNode::getClass<SvtxTrackMap>(topNode,
"TrackMap");
151 <<
"MyJetAnalysis::process_event - Error can not find DST trackmap node SvtxTrackMap" << std::endl;
157 Jet* jet = iter->second;
162 if ((not eta_cut) or (not pt_cut))
166 std::cout <<
"MyJetAnalysis::process_event() - jet failed acceptance cut: ";
167 std::cout <<
"eta cut: " << eta_cut <<
", ptcut: " << pt_cut << std::endl;
168 std::cout <<
"jet eta: " << jet->
get_eta() <<
", jet pt: " << jet->
get_pt() << std::endl;
213 iter != trackmap->
end();
219 const double dEta =
v.Eta() -
m_eta;
221 const double dR = sqrt(dEta * dEta + dPhi * dPhi);
237 std::cout <<
"MyJetAnalysis::process_event() - reached max track that matching a jet. Quit iterating tracks" << std::endl;