25 namespace JetConstituentsUtils {
26 namespace rv = ROOT::VecOps;
31 rv::RVec<FCCAnalysesJetConstituents>
build_constituents(
const rv::RVec<edm4hep::ReconstructedParticleData>&,
32 const rv::RVec<edm4hep::ReconstructedParticleData>&);
35 const std::vector<std::vector<int>>& indices);
40 rv::RVec<FCCAnalysesJetConstituents>
get_constituents(
const rv::RVec<FCCAnalysesJetConstituents>&,
41 const rv::RVec<int>&);
45 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
jets_sorting_on_nconst(
const rv::RVec<edm4hep::ReconstructedParticleData>&);
46 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
jets_sorting_on_energy(
const rv::RVec<edm4hep::ReconstructedParticleData>&);
49 rv::RVec<FCCAnalysesJetConstituentsData>
get_Bz(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
50 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
52 rv::RVec<FCCAnalysesJetConstituentsData>
get_pt(
const rv::RVec<FCCAnalysesJetConstituents>&);
53 rv::RVec<FCCAnalysesJetConstituentsData>
get_p(
const rv::RVec<FCCAnalysesJetConstituents>&);
54 rv::RVec<FCCAnalysesJetConstituentsData>
get_e(
const rv::RVec<FCCAnalysesJetConstituents>&);
55 rv::RVec<FCCAnalysesJetConstituentsData>
get_theta(
const rv::RVec<FCCAnalysesJetConstituents>&);
56 rv::RVec<FCCAnalysesJetConstituentsData>
get_phi(
const rv::RVec<FCCAnalysesJetConstituents>&);
57 rv::RVec<FCCAnalysesJetConstituentsData>
get_type(
const rv::RVec<FCCAnalysesJetConstituents>&);
58 rv::RVec<FCCAnalysesJetConstituentsData>
get_charge(
const rv::RVec<FCCAnalysesJetConstituents>&);
61 rv::RVec<FCCAnalysesJetConstituentsData>
get_d0(
const rv::RVec<FCCAnalysesJetConstituents>&,
62 const ROOT::VecOps::RVec<edm4hep::TrackState>&);
64 rv::RVec<FCCAnalysesJetConstituentsData>
get_z0(
const rv::RVec<FCCAnalysesJetConstituents>& ,
65 const ROOT::VecOps::RVec<edm4hep::TrackState>&);
67 rv::RVec<FCCAnalysesJetConstituentsData>
get_phi0(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
68 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
70 rv::RVec<FCCAnalysesJetConstituentsData>
get_omega(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
71 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
73 rv::RVec<FCCAnalysesJetConstituentsData>
get_tanLambda(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
74 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
77 rv::RVec<FCCAnalysesJetConstituentsData>
XPtoPar_dxy(
const rv::RVec<FCCAnalysesJetConstituents>&,
78 const ROOT::VecOps::RVec<edm4hep::TrackState>&,
79 const TLorentzVector& V,
81 rv::RVec<FCCAnalysesJetConstituentsData>
XPtoPar_dz(
const rv::RVec<FCCAnalysesJetConstituents>&,
82 const ROOT::VecOps::RVec<edm4hep::TrackState>&,
83 const TLorentzVector& V,
85 rv::RVec<FCCAnalysesJetConstituentsData>
XPtoPar_phi(
const rv::RVec<FCCAnalysesJetConstituents>&,
86 const ROOT::VecOps::RVec<edm4hep::TrackState>&,
87 const TLorentzVector& V,
89 rv::RVec<FCCAnalysesJetConstituentsData>
XPtoPar_C(
const rv::RVec<FCCAnalysesJetConstituents>&,
90 const ROOT::VecOps::RVec<edm4hep::TrackState>&,
92 rv::RVec<FCCAnalysesJetConstituentsData>
XPtoPar_ct(
const rv::RVec<FCCAnalysesJetConstituents>&,
93 const ROOT::VecOps::RVec<edm4hep::TrackState>&,
98 rv::RVec<FCCAnalysesJetConstituentsData>
get_omega_cov(
const rv::RVec<FCCAnalysesJetConstituents>&,
99 const ROOT::VecOps::RVec<edm4hep::TrackState>&);
101 rv::RVec<FCCAnalysesJetConstituentsData>
get_d0_cov(
const rv::RVec<FCCAnalysesJetConstituents>&,
102 const ROOT::VecOps::RVec<edm4hep::TrackState>& );
104 rv::RVec<FCCAnalysesJetConstituentsData>
get_z0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
105 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
107 rv::RVec<FCCAnalysesJetConstituentsData>
get_phi0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
108 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
110 rv::RVec<FCCAnalysesJetConstituentsData>
get_tanlambda_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
111 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
113 rv::RVec<FCCAnalysesJetConstituentsData>
get_d0_z0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
114 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
116 rv::RVec<FCCAnalysesJetConstituentsData>
get_phi0_d0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
117 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
119 rv::RVec<FCCAnalysesJetConstituentsData>
get_phi0_z0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
120 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
122 rv::RVec<FCCAnalysesJetConstituentsData>
get_tanlambda_phi0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
123 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
125 rv::RVec<FCCAnalysesJetConstituentsData>
get_tanlambda_d0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
126 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
128 rv::RVec<FCCAnalysesJetConstituentsData>
get_tanlambda_z0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
129 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
131 rv::RVec<FCCAnalysesJetConstituentsData>
get_omega_tanlambda_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
132 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
134 rv::RVec<FCCAnalysesJetConstituentsData>
get_omega_phi0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
135 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
137 rv::RVec<FCCAnalysesJetConstituentsData>
get_omega_d0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
138 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
140 rv::RVec<FCCAnalysesJetConstituentsData>
get_omega_z0_cov(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
141 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
144 rv::RVec<FCCAnalysesJetConstituentsData>
get_dndx(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
145 const rv::RVec<edm4hep::Quantity>& dNdx,
146 const rv::RVec<edm4hep::TrackData>& trackdata,
147 const rv::RVec<FCCAnalysesJetConstituentsData> JetsConstituents_isChargedHad);
149 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip2dVal(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
150 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
151 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
153 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip2dVal_cluster(
const rv::RVec<fastjet::PseudoJet>& jets,
154 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
155 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
158 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip2dVal_clusterV(
const rv::RVec<fastjet::PseudoJet>& jets,
159 const rv::RVec<FCCAnalysesJetConstituentsData>& D0,
160 const rv::RVec<FCCAnalysesJetConstituentsData>& phi0,
164 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip2dSig(
const rv::RVec<FCCAnalysesJetConstituentsData>& Sip2dVals,
165 const rv::RVec<FCCAnalysesJetConstituentsData>& err2_D0);
167 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip3dVal(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
168 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
169 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
172 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip3dVal_cluster(
const rv::RVec<fastjet::PseudoJet>& jets,
173 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
174 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
176 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip3dVal_clusterV(
const rv::RVec<fastjet::PseudoJet>& jets,
177 const rv::RVec<FCCAnalysesJetConstituentsData>& D0,
178 const rv::RVec<FCCAnalysesJetConstituentsData>& Z0,
179 const rv::RVec<FCCAnalysesJetConstituentsData>& phi0,
182 rv::RVec<FCCAnalysesJetConstituentsData>
get_Sip3dSig(
const rv::RVec<FCCAnalysesJetConstituentsData>& Sip3dVals,
183 const rv::RVec<FCCAnalysesJetConstituentsData>& err2_D0,
184 const rv::RVec<FCCAnalysesJetConstituentsData>& err2_Z0);
186 rv::RVec<FCCAnalysesJetConstituentsData>
get_JetDistVal(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
187 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
188 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
191 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
192 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks);
195 const rv::RVec<FCCAnalysesJetConstituents>& jcs,
196 const rv::RVec<FCCAnalysesJetConstituentsData>& D0,
197 const rv::RVec<FCCAnalysesJetConstituentsData>& Z0,
198 const rv::RVec<FCCAnalysesJetConstituentsData>& phi0,
201 rv::RVec<FCCAnalysesJetConstituentsData>
get_JetDistSig(
const rv::RVec<FCCAnalysesJetConstituentsData>& JetDistVal,
202 const rv::RVec<FCCAnalysesJetConstituentsData>& err2_D0,
203 const rv::RVec<FCCAnalysesJetConstituentsData>& err2_Z0);
205 rv::RVec<FCCAnalysesJetConstituentsData>
get_mtof(
const rv::RVec<FCCAnalysesJetConstituents>& jcs,
206 const rv::RVec<float>& track_L,
207 const rv::RVec<edm4hep::TrackData>& trackdata,
208 const rv::RVec<edm4hep::TrackerHit3DData>& trackerhits,
209 const rv::RVec<edm4hep::ClusterData>& gammadata,
210 const rv::RVec<edm4hep::ClusterData>& nhdata,
211 const rv::RVec<edm4hep::CalorimeterHitData>& calohits,
212 const TLorentzVector& V
216 rv::RVec<FCCAnalysesJetConstituentsData>
get_PIDs(
const ROOT::VecOps::RVec< int > recin,
217 const ROOT::VecOps::RVec< int > mcin,
218 const rv::RVec<edm4hep::ReconstructedParticleData>& RecPart,
219 const rv::RVec<edm4hep::MCParticleData>& Particle,
220 const rv::RVec<edm4hep::ReconstructedParticleData>& Jets);
222 rv::RVec<FCCAnalysesJetConstituentsData>
get_PIDs_cluster(
const ROOT::VecOps::RVec< int > recin,
223 const ROOT::VecOps::RVec< int > mcin,
224 const rv::RVec<edm4hep::ReconstructedParticleData>& RecPart,
225 const rv::RVec<edm4hep::MCParticleData>& Particle,
226 const std::vector<std::vector<int>>& indices);
228 rv::RVec<FCCAnalysesJetConstituentsData>
get_isMu(
const rv::RVec<FCCAnalysesJetConstituents>& jcs);
229 rv::RVec<FCCAnalysesJetConstituentsData>
get_isEl(
const rv::RVec<FCCAnalysesJetConstituents>& jcs);
230 rv::RVec<FCCAnalysesJetConstituentsData>
get_isChargedHad(
const rv::RVec<FCCAnalysesJetConstituents>& jcs);
231 rv::RVec<FCCAnalysesJetConstituentsData>
get_isGamma(
const rv::RVec<FCCAnalysesJetConstituents>& jcs);
232 rv::RVec<FCCAnalysesJetConstituentsData>
get_isNeutralHad(
const rv::RVec<FCCAnalysesJetConstituents>& jcs);
235 int count_jets(rv::RVec<FCCAnalysesJetConstituents> jets);
236 rv::RVec<int>
count_consts(rv::RVec<FCCAnalysesJetConstituents> jets);
237 rv::RVec<int>
count_type(
const rv::RVec<FCCAnalysesJetConstituentsData>& isType);
241 rv::RVec<FCCAnalysesJetConstituentsData>
get_erel(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
242 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
243 rv::RVec<FCCAnalysesJetConstituentsData>
get_erel_cluster(
const rv::RVec<fastjet::PseudoJet>& jets,
244 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
246 rv::RVec<FCCAnalysesJetConstituentsData>
get_erel_log(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
247 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
248 rv::RVec<FCCAnalysesJetConstituentsData>
get_erel_log_cluster(
const rv::RVec<fastjet::PseudoJet>& jets,
249 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
251 rv::RVec<FCCAnalysesJetConstituentsData>
get_thetarel(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
252 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
253 rv::RVec<FCCAnalysesJetConstituentsData>
get_thetarel_cluster(
const rv::RVec<fastjet::PseudoJet>& jets,
254 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
256 rv::RVec<FCCAnalysesJetConstituentsData>
get_phirel(
const rv::RVec<edm4hep::ReconstructedParticleData>& jets,
257 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
258 rv::RVec<FCCAnalysesJetConstituentsData>
get_phirel_cluster(
const rv::RVec<fastjet::PseudoJet>& jets,
259 const rv::RVec<FCCAnalysesJetConstituents>& jcs);
262 rv::RVec<TLorentzVector>
compute_tlv_jets(
const rv::RVec<fastjet::PseudoJet>& jets);
263 rv::RVec<TLorentzVector>
sum_tlv_constituents(
const rv::RVec<FCCAnalysesJetConstituents>& jets);
264 float InvariantMass(
const TLorentzVector& tlv1,
const TLorentzVector& tlv2);
271 const rv::RVec<TLorentzVector>& sum_tlv_jcs);
273 const rv::RVec<TLorentzVector>& sum_tlv_jcs);
275 const rv::RVec<TLorentzVector>& sum_tlv_jcs);
277 const rv::RVec<TLorentzVector>& sum_tlv_jcs);
278 rv::RVec<double>
compute_residue_px(
const rv::RVec<TLorentzVector>& tlv_jet,
const rv::RVec<TLorentzVector>& sum_tlv_jcs);
279 rv::RVec<double>
compute_residue_py(
const rv::RVec<TLorentzVector>& tlv_jet,
const rv::RVec<TLorentzVector>& sum_tlv_jcs);
280 rv::RVec<double>
compute_residue_pz(
const rv::RVec<TLorentzVector>& tlv_jet,
const rv::RVec<TLorentzVector>& sum_tlv_jcs);