FCCAnalyses
Loading...
Searching...
No Matches
ReconstructedParticle2MC.h
Go to the documentation of this file.
1
2#ifndef RECONSTRUCTEDPARTICLE2MC_ANALYZERS_H
3#define RECONSTRUCTEDPARTICLE2MC_ANALYZERS_H
4
5#include <cmath>
6#include <vector>
7
8#include "ROOT/RVec.hxx"
9#include "edm4hep/ReconstructedParticleData.h"
10#include "edm4hep/MCParticleData.h"
11#include "podio/ObjectID.h"
12#include "TLorentzVector.h"
13
14namespace FCCAnalyses{
15
16namespace ReconstructedParticle2MC{
17
19 struct selRP_PDG {
20 selRP_PDG(int arg_PDG, bool arg_chargedOnly);
21 int m_PDG = 13 ;
22 bool m_chargedOnly = true;
23 std::vector<edm4hep::ReconstructedParticleData> operator() (ROOT::VecOps::RVec<int> recind,
24 ROOT::VecOps::RVec<int> mcind,
25 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
26 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc) ;
27 };
28
31 selRP_PDG_index(int arg_PDG, bool arg_chargedOnly);
32 int m_PDG = 13 ;
33 bool m_chargedOnly = true;
34 ROOT::VecOps::RVec<int> operator() (ROOT::VecOps::RVec<int> recind,
35 ROOT::VecOps::RVec<int> mcind,
36 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
37 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc) ;
38 };
39
40
43 ROOT::VecOps::RVec<float> operator() (ROOT::VecOps::RVec<int> recin,
44 ROOT::VecOps::RVec<int> mcin,
45 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
46 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
47 };
48
50 ROOT::VecOps::RVec<float> getRP2MC_p (ROOT::VecOps::RVec<int> recin,
51 ROOT::VecOps::RVec<int> mcin,
52 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
53 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
54
56 ROOT::VecOps::RVec<float> getRP2MC_px (ROOT::VecOps::RVec<int> recin,
57 ROOT::VecOps::RVec<int> mcin,
58 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
59 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
60
62 ROOT::VecOps::RVec<float> getRP2MC_py (ROOT::VecOps::RVec<int> recin,
63 ROOT::VecOps::RVec<int> mcin,
64 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
65 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
66
68 ROOT::VecOps::RVec<float> getRP2MC_pz (ROOT::VecOps::RVec<int> recin,
69 ROOT::VecOps::RVec<int> mcin,
70 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
71 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
72
74 ROOT::VecOps::RVec<float> getRP2MC_mass (ROOT::VecOps::RVec<int> recin,
75 ROOT::VecOps::RVec<int> mcin,
76 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
77 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
78
80 ROOT::VecOps::RVec<float> getRP2MC_charge (ROOT::VecOps::RVec<int> recin,
81 ROOT::VecOps::RVec<int> mcin,
82 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
83 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
84
86 ROOT::VecOps::RVec<float> getRP2MC_pdg (ROOT::VecOps::RVec<int> recin,
87 ROOT::VecOps::RVec<int> mcin,
88 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
89 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
90
92 ROOT::VecOps::RVec<TLorentzVector> getRP2MC_tlv (ROOT::VecOps::RVec<int> recin,
93 ROOT::VecOps::RVec<int> mcin,
94 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
95 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
96
98 ROOT::VecOps::RVec<int> getRP2MC_index (ROOT::VecOps::RVec<int> recin,
99 ROOT::VecOps::RVec<int> mcin,
100 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco);
101
103 ROOT::VecOps::RVec<ROOT::VecOps::RVec<int>> getRP2MC_indexVec (ROOT::VecOps::RVec<int> recin,
104 ROOT::VecOps::RVec<int> mcin,
105 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco);
106
108 ROOT::VecOps::RVec<int> getRP2MC_index_test (ROOT::VecOps::RVec<int> recin,
109 ROOT::VecOps::RVec<int> mcin,
110 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
111 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc,
112 ROOT::VecOps::RVec<int> parents);
113
114
116 ROOT::VecOps::RVec<int> getRP2MC_parentid (ROOT::VecOps::RVec<int> recin,
117 ROOT::VecOps::RVec<int> mcin,
118 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
119 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc,
120 ROOT::VecOps::RVec<int> parents);
121
123 std::vector<edm4hep::ReconstructedParticleData> selRP_ChargedHadrons ( ROOT::VecOps::RVec<int> recind,
124 ROOT::VecOps::RVec<int> mcind,
125 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
126 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc) ;
127
129 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> selRP_matched_to_list( ROOT::VecOps::RVec<int> mcParticles_indices,
130 ROOT::VecOps::RVec<int> recind,
131 ROOT::VecOps::RVec<int> mcind,
132 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
133 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc) ;
134
136 int getTrack2MC_index ( int track_index,
137 ROOT::VecOps::RVec<int> recind,
138 ROOT::VecOps::RVec<int> mcind,
139 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco);
140
141}//end NS ReconstructedParticle2MC
142
143}//end NS FCCAnalyses
144#endif
ROOT::VecOps::RVec< float > getRP2MC_pdg(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:86
ROOT::VecOps::RVec< int > getRP2MC_parentid(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc, ROOT::VecOps::RVec< int > parents)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:198
ROOT::VecOps::RVec< float > getRP2MC_px(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:44
ROOT::VecOps::RVec< ROOT::VecOps::RVec< int > > getRP2MC_indexVec(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:140
ROOT::VecOps::RVec< float > getRP2MC_mass(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:114
ROOT::VecOps::RVec< int > getRP2MC_index(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:127
ROOT::VecOps::RVec< float > getRP2MC_py(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:58
std::vector< edm4hep::ReconstructedParticleData > selRP_ChargedHadrons(ROOT::VecOps::RVec< int > recind, ROOT::VecOps::RVec< int > mcind, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
select ReconstructedParticles matched with a MC charged hadrons
Definition ReconstructedParticle2MC.cc:319
ROOT::VecOps::RVec< int > getRP2MC_index_test(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc, ROOT::VecOps::RVec< int > parents)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:157
ROOT::VecOps::RVec< float > getRP2MC_pz(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:72
ROOT::VecOps::RVec< TLorentzVector > getRP2MC_tlv(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:27
ROOT::VecOps::RVec< float > getRP2MC_charge(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:100
ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > selRP_matched_to_list(ROOT::VecOps::RVec< int > mcParticles_indices, ROOT::VecOps::RVec< int > recind, ROOT::VecOps::RVec< int > mcind, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
select ReconstructedParticles matched to the (stable) MC particles whose indices are passed in a list
Definition ReconstructedParticle2MC.cc:343
int getTrack2MC_index(int track_index, ROOT::VecOps::RVec< int > recind, ROOT::VecOps::RVec< int > mcind, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco)
return the index of the MC particle that is associated to a given track (via the track-reco associati...
Definition ReconstructedParticle2MC.cc:388
ROOT::VecOps::RVec< float > getRP2MC_p(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2MC.cc:10
FCC analyzers collection.
Definition Algorithms.h:15
select ReconstructedParticles with transverse momentum greater than a minimum value [GeV]
Definition ReconstructedParticle2MC.h:42
ROOT::VecOps::RVec< float > operator()(ROOT::VecOps::RVec< int > recin, ROOT::VecOps::RVec< int > mcin, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Definition ReconstructedParticle2MC.cc:233
select ReconstructedParticles matched with a MC particle of a given PDG_id
Definition ReconstructedParticle2MC.h:30
selRP_PDG_index(int arg_PDG, bool arg_chargedOnly)
Definition ReconstructedParticle2MC.cc:289
int m_PDG
Definition ReconstructedParticle2MC.h:32
bool m_chargedOnly
Definition ReconstructedParticle2MC.h:33
ROOT::VecOps::RVec< int > operator()(ROOT::VecOps::RVec< int > recind, ROOT::VecOps::RVec< int > mcind, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Definition ReconstructedParticle2MC.cc:292
select ReconstructedParticles matched with a MC particle of a given PDG_id
Definition ReconstructedParticle2MC.h:19
int m_PDG
Definition ReconstructedParticle2MC.h:21
std::vector< edm4hep::ReconstructedParticleData > operator()(ROOT::VecOps::RVec< int > recind, ROOT::VecOps::RVec< int > mcind, ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > reco, ROOT::VecOps::RVec< edm4hep::MCParticleData > mc)
Definition ReconstructedParticle2MC.cc:268
bool m_chargedOnly
Definition ReconstructedParticle2MC.h:22
selRP_PDG(int arg_PDG, bool arg_chargedOnly)
Definition ReconstructedParticle2MC.cc:265