12 #pragma GCC diagnostic push
13 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
23 #include <Math/Vector3D.h>
34 #include <calobase/RawCluster.h>
35 #include <calobase/RawClusterUtility.h>
36 #include <calobase/RawClusterContainer.h>
38 #include <HepMC/GenEvent.h>
39 #include <HepMC/GenVertex.h>
40 #include <HepMC/GenParticle.h>
54 #pragma GCC diagnostic pop
58 using namespace findNode;
62 namespace SColdQcdCorrelatorAnalysis {
63 namespace SCorrelatorUtilities {
80 int nTrks = numeric_limits<int>::max();
81 double pSumTrks = numeric_limits<double>::max();
82 double eSumEMCal = numeric_limits<double>::max();
83 double eSumIHCal = numeric_limits<double>::max();
84 double eSumOHCal = numeric_limits<double>::max();
85 double vx = numeric_limits<double>::max();
86 double vy = numeric_limits<double>::max();
87 double vz = numeric_limits<double>::max();
88 double vr = numeric_limits<double>::max();
100 ROOT::Math::XYZVector vtx =
GetRecoVtx(topNode);
109 nTrks = numeric_limits<int>::max();
110 pSumTrks = numeric_limits<double>::max();
111 eSumEMCal = numeric_limits<double>::max();
112 eSumIHCal = numeric_limits<double>::max();
113 eSumOHCal = numeric_limits<double>::max();
114 vx = numeric_limits<double>::max();
115 vy = numeric_limits<double>::max();
116 vz = numeric_limits<double>::max();
117 vr = numeric_limits<double>::max();
122 vector<string> members = {
154 int nChrgPar = numeric_limits<int>::max();
155 int nNeuPar = numeric_limits<int>::max();
156 bool isEmbed =
false;
157 double eSumChrg = numeric_limits<double>::max();
158 double eSumNeu = numeric_limits<double>::max();
171 partons.first =
GetPartonInfo(topNode, SubEvt::EmbedSignal, HardScatterStatus::First);
172 partons.second =
GetPartonInfo(topNode, SubEvt::EmbedSignal, HardScatterStatus::Second);
175 partons.first =
GetPartonInfo(topNode, SubEvt::NotEmbedSignal, HardScatterStatus::First);
176 partons.second =
GetPartonInfo(topNode, SubEvt::NotEmbedSignal, HardScatterStatus::Second);
188 nChrgPar = numeric_limits<int>::max();
189 nNeuPar = numeric_limits<int>::max();
191 eSumChrg = numeric_limits<double>::max();
192 eSumNeu = numeric_limits<double>::max();
197 vector<string> members = {
204 AddLeavesToVector<ParInfo>(members,
"PartonA");
205 AddLeavesToVector<ParInfo>(members,
"PartonB");
215 SetInfo(topNode, embed, evtsToGrab);
227 return mapTrks ->
size();
237 for (
const int evtToGrab : evtsToGrab) {
240 HepMC::GenEvent* genEvt =
GetGenEvent(topNode, evtToGrab);
242 HepMC::GenEvent::particle_const_iterator
particle = genEvt -> particles_begin();
243 particle != genEvt -> particles_end();
252 if (chargeToGrab.has_value()) {
253 if (charge == chargeToGrab.value()) {
265 case Subset::Charged:
272 case Subset::Neutral:
300 itTrk != mapTrks ->
end();
306 if (!track)
continue;
309 const double pTrk = std::hypot(track -> get_px(), track -> get_py(), track -> get_pz());
327 itClust != clusters.second;
332 const RawCluster* cluster = itClust -> second;
336 eSum += cluster -> get_energy();
349 for (
const int evtToGrab : evtsToGrab) {
351 HepMC::GenEvent* genEvt =
GetGenEvent(topNode, evtToGrab);
353 HepMC::GenEvent::particle_const_iterator
particle = genEvt -> particles_begin();
354 particle != genEvt -> particles_end();
364 if (chargeToGrab.has_value()) {
365 if (charge == chargeToGrab.value()) {
377 case Subset::Charged:
384 case Subset::Neutral:
406 HepMC::GenEvent* genEvt =
GetGenEvent(topNode, event);
411 HepMC::GenEvent::particle_const_iterator
particle = genEvt -> particles_begin();
412 particle != genEvt -> particles_end();
417 if (!
IsParton((*particle) -> pdg_id()))
continue;
420 if (((*particle) -> status()) ==
status) {