FCCAnalyses
Loading...
Searching...
No Matches
ReconstructedParticle2Track.h
Go to the documentation of this file.
1
2#ifndef RECONSTRUCTEDPARTICLE2TRACK_ANALYZERS_H
3#define RECONSTRUCTEDPARTICLE2TRACK_ANALYZERS_H
4
5#include <cmath>
6#include <vector>
7
8#include "ROOT/RVec.hxx"
9#include "edm4hep/Quantity.h"
10#include "edm4hep/ReconstructedParticleData.h"
11#include "edm4hep/TrackData.h"
12#include "edm4hep/TrackState.h"
13#if __has_include("edm4hep/TrackerHit3DData.h")
14#include "edm4hep/TrackerHit3DData.h"
15#else
16#include "edm4hep/TrackerHitData.h"
17namespace edm4hep {
18 using TrackerHit3DData = edm4hep::TrackerHitData;
19}
20#endif
21#include <TVectorD.h>
22#include <TVector3.h>
23#include <TLorentzVector.h>
24
25#include <TMath.h>
26#include <iostream>
27
28namespace FCCAnalyses{
29
30namespace ReconstructedParticle2Track{
31
33 ROOT::VecOps::RVec<float> getRP2TRK_mom (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
34 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
35
37 ROOT::VecOps::RVec<float> getRP2TRK_charge(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
38 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
39
40 //compute the magnetic field Bz
41 ROOT::VecOps::RVec<float> getRP2TRK_Bz(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& rps,
42 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks); //here computed for all particles passed
43
44 float Bz(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& rps,
45 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks); //here only computed for the first charged particle encountered
46
47 ROOT::VecOps::RVec<float> XPtoPar_dxy(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& in,
48 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks,
49 const TLorentzVector& V, // primary vertex
50 const float& Bz);
51
52 ROOT::VecOps::RVec<float> XPtoPar_dz(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& in,
53 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks,
54 const TLorentzVector& V, // primary vertex
55 const float& Bz);
56
57 ROOT::VecOps::RVec<float> XPtoPar_phi(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& in,
58 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks,
59 const TLorentzVector& V, // primary vertex
60 const float& Bz);
61
62 ROOT::VecOps::RVec<float> XPtoPar_C(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& in,
63 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks,
64 const float& Bz);
65
66 ROOT::VecOps::RVec<float> XPtoPar_ct(const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>& in,
67 const ROOT::VecOps::RVec<edm4hep::TrackState>& tracks,
68 const float& Bz);
69
71 ROOT::VecOps::RVec<float> getRP2TRK_D0 (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
72 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
73
75 ROOT::VecOps::RVec<float> getRP2TRK_Z0 (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
76 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
77
79 ROOT::VecOps::RVec<float> getRP2TRK_phi (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
80 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
81
83 ROOT::VecOps::RVec<float> getRP2TRK_omega (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
84 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
85
87 ROOT::VecOps::RVec<float> getRP2TRK_tanLambda (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
88 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
89
91 ROOT::VecOps::RVec<float> getRP2TRK_D0_sig (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
92 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
93
95 ROOT::VecOps::RVec<float> getRP2TRK_Z0_sig (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
96 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
97
98
100 ROOT::VecOps::RVec<float> getRP2TRK_D0_cov (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
101 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
102
104 ROOT::VecOps::RVec<float> getRP2TRK_Z0_cov (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
105 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
106
108 ROOT::VecOps::RVec<float> getRP2TRK_phi_cov (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
109 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
110
112 ROOT::VecOps::RVec<float> getRP2TRK_omega_cov (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
113 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
114
116 ROOT::VecOps::RVec<float> getRP2TRK_tanLambda_cov (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
117 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
118
120 ROOT::VecOps::RVec<float> getRP2TRK_d0_phi0_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
121 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
122
124 ROOT::VecOps::RVec<float> getRP2TRK_d0_omega_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
125 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
126
128 ROOT::VecOps::RVec<float> getRP2TRK_d0_z0_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
129 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
130
132 ROOT::VecOps::RVec<float> getRP2TRK_d0_tanlambda_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
133 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
134
136 ROOT::VecOps::RVec<float> getRP2TRK_phi0_omega_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
137 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
138
140 ROOT::VecOps::RVec<float> getRP2TRK_phi0_z0_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
141 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
142
144 ROOT::VecOps::RVec<float> getRP2TRK_phi0_tanlambda_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
145 ROOT::VecOps::RVec<edm4hep::TrackState> tracks) ;
146
148 ROOT::VecOps::RVec<float> getRP2TRK_omega_z0_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
149 ROOT::VecOps::RVec<edm4hep::TrackState> tracks) ;
150
152 ROOT::VecOps::RVec<float> getRP2TRK_omega_tanlambda_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
153 ROOT::VecOps::RVec<edm4hep::TrackState> tracks) ;
154
156 ROOT::VecOps::RVec<float> getRP2TRK_z0_tanlambda_cov(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
157 ROOT::VecOps::RVec<edm4hep::TrackState> tracks);
158
159
161 ROOT::VecOps::RVec<edm4hep::TrackState> getRP2TRK( ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
162 ROOT::VecOps::RVec<edm4hep::TrackState> tracks ) ;
163
165 ROOT::VecOps::RVec<int> get_recoindTRK( ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in,
166 ROOT::VecOps::RVec<edm4hep::TrackState> tracks ) ;
167
169 int getTK_n(ROOT::VecOps::RVec<edm4hep::TrackState> x) ;
170
172 ROOT::VecOps::RVec<bool> hasTRK( ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> in ) ;
173
174}//end NS ReconstructedParticle2Track
175
176}//end NS FCCAnalyses
177#endif
ROOT::VecOps::RVec< float > getRP2TRK_tanLambda_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the variance (not the sigma) of the tanLambda of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:379
ROOT::VecOps::RVec< float > XPtoPar_ct(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &in, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks, const float &Bz)
Definition ReconstructedParticle2Track.cc:219
float Bz(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &rps, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks)
Definition ReconstructedParticle2Track.cc:49
ROOT::VecOps::RVec< float > getRP2TRK_omega(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the omega of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:343
ROOT::VecOps::RVec< float > getRP2TRK_tanLambda(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the tanLambda of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:367
ROOT::VecOps::RVec< float > getRP2TRK_mom(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the momentum of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:9
ROOT::VecOps::RVec< float > getRP2TRK_omega_tanlambda_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (omega,tanlambda) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:487
ROOT::VecOps::RVec< float > XPtoPar_dz(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &in, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks, const TLorentzVector &V, const float &Bz)
Definition ReconstructedParticle2Track.cc:108
ROOT::VecOps::RVec< float > getRP2TRK_d0_z0_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (d0,z0) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:415
ROOT::VecOps::RVec< float > getRP2TRK_phi0_z0_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (phi0,z0) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:451
ROOT::VecOps::RVec< float > getRP2TRK_Z0(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the Z0 of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:282
ROOT::VecOps::RVec< float > getRP2TRK_d0_tanlambda_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (d0,tanlambda) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:427
ROOT::VecOps::RVec< float > getRP2TRK_phi0_omega_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (phi0,omega) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:439
ROOT::VecOps::RVec< float > getRP2TRK_d0_omega_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (d0, omega) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:403
ROOT::VecOps::RVec< int > get_recoindTRK(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the reco indices of particles that have tracks.
Definition ReconstructedParticle2Track.cc:528
ROOT::VecOps::RVec< float > XPtoPar_dxy(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &in, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks, const TLorentzVector &V, const float &Bz)
Definition ReconstructedParticle2Track.cc:64
ROOT::VecOps::RVec< float > getRP2TRK_D0(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:246
ROOT::VecOps::RVec< float > getRP2TRK_phi_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the variance (not the sigma) of the the Phi of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:330
ROOT::VecOps::RVec< float > getRP2TRK_D0_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the variance (not the sigma) of the the D0 of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:258
int getTK_n(ROOT::VecOps::RVec< edm4hep::TrackState > x)
Return the size of a collection of TrackStates.
Definition ReconstructedParticle2Track.cc:541
ROOT::VecOps::RVec< edm4hep::TrackState > getRP2TRK(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the tracks associated to reco'ed particles.
Definition ReconstructedParticle2Track.cc:511
ROOT::VecOps::RVec< float > getRP2TRK_d0_phi0_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (d0, phi0) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:391
ROOT::VecOps::RVec< float > getRP2TRK_Bz(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &rps, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks)
Definition ReconstructedParticle2Track.cc:32
ROOT::VecOps::RVec< float > getRP2TRK_phi(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the Phi of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:318
ROOT::VecOps::RVec< float > getRP2TRK_Z0_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the variance (not the sigma) of the the Z0 of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:294
ROOT::VecOps::RVec< float > getRP2TRK_charge(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the charge of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:21
ROOT::VecOps::RVec< float > getRP2TRK_D0_sig(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the D0 significance of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:270
ROOT::VecOps::RVec< float > XPtoPar_phi(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &in, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks, const TLorentzVector &V, const float &Bz)
Definition ReconstructedParticle2Track.cc:156
ROOT::VecOps::RVec< float > getRP2TRK_Z0_sig(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the Z0 significance of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:306
ROOT::VecOps::RVec< float > XPtoPar_C(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &in, const ROOT::VecOps::RVec< edm4hep::TrackState > &tracks, const float &Bz)
Definition ReconstructedParticle2Track.cc:194
ROOT::VecOps::RVec< float > getRP2TRK_z0_tanlambda_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (z0,tanlambda) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:499
ROOT::VecOps::RVec< float > getRP2TRK_phi0_tanlambda_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (phi0,tanlambda) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:463
ROOT::VecOps::RVec< bool > hasTRK(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in)
Return if a Reco particle have an associated track.
Definition ReconstructedParticle2Track.cc:548
ROOT::VecOps::RVec< float > getRP2TRK_omega_z0_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the off-diag term (omega,z0) of the covariance matrix.
Definition ReconstructedParticle2Track.cc:475
ROOT::VecOps::RVec< float > getRP2TRK_omega_cov(ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > in, ROOT::VecOps::RVec< edm4hep::TrackState > tracks)
Return the variance (not the sigma) of the omega of a track to a reconstructed particle.
Definition ReconstructedParticle2Track.cc:355
FCC analyzers collection.
Definition Algorithms.h:15
Definition JetConstituentsUtils.h:12
edm4hep::TrackerHitData TrackerHit3DData
Definition JetConstituentsUtils.h:13