ATLAS Offline Software
Loading...
Searching...
No Matches
EMErrorDetail.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef EGAMMAEVENT_EMERRORBUILDER_H
6#define EGAMMAEVENT_EMERRORBUILDER_H
7/********************************************************************
8NAME: EMErrorDetail.h
9PACKAGE: offline/Reconstruction/egamma/egammaEvent
10AUTHORS: T. Cuhadar Donszelmann
11CREATED: May 2009
12PURPOSE: Build track/conv. tracks/photon error matrices
13UPDATED:
14********************************************************************/
15#include <vector>
16//#include "GaudiKernel/ToolHandle.h"
18#include "egammaEvent/egamma.h"
20#include "VxVertex/RecVertex.h"
21
22class EMClusterErrorsParametrizations;
23
24namespace Trk{
25 template<int DIM, class T, class S> class ParametersT;
26 class Track;
27}
28
29class EMErrorDetail : public egDetail
30{
31 public:
32
35
37 virtual ~EMErrorDetail() = default;
38
39 //void print() const;
40 virtual const std::string& className() const;
41
43 virtual double parameter(egammaParameters::ParamDef) const ;
45 virtual int intParameter(egammaParameters::ParamDef) const ;
51 void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false) ;
52
53 // obsolete @brief Fill the details of the object. This is the main function for building the detail*/
54 //template <int DIM, class T, class S> void fillEMErrorDetail(const egamma*, const Trk::ParametersT< DIM, T, S>*,
55 // const EMClusterErrorsParametrizations*,
56 // const Amg::Vector3D&);
57
58 // obsolete: Fill and get the track covariance matrix from the method where track and cluster information are combined*/
59 //bool fillEMTrackCombinedErrorMatrix(const AmgSymMatrix(5)& combinedMatrix);
60
65
67 AmgSymMatrix(4) get4x4CombinedErrorMatrix() const;
69 AmgSymMatrix(4) get4x4UncombinedErrorMatrix() const;
70
71 /*** THE 6 FUNCTIONS BELOW ARE DEPRICATED FOR EXTERNAL USE
72 THEY ARE CALLED BY THE ABOVE FUNCTIONS ***/
73
75 AmgSymMatrix(5) getEMTrackCombinedErrorMatrix() const;
77 AmgSymMatrix(3) getEMPhotonErrorMatrix() const;
81 AmgSymMatrix(5) getEMTrackUncombinedErrorMatrix() const;
82
84 AmgSymMatrix(4) get4x4EMTrackCombinedErrorMatrix() const;
86 AmgSymMatrix(4) get4x4EMTrackUncombinedErrorMatrix() const;
88 AmgSymMatrix(4) get4x4EMPhotonErrorMatrix() const;
89
90
91 /****************************************************************/
92 /* Converted photon related parameters : Get Parameters*/
93 /****************************************************************/
94
99// double EMconvertedphoton_perigee_Eclus () const;
102
107// double EMconvertedphoton_perigee_Covd0Eclus () const;
111// double EMconvertedphoton_perigee_Covz0Eclus () const;
114// double EMconvertedphoton_perigee_CovphiEclus () const;
116// double EMconvertedphoton_perigee_CovthetaEclus () const;
117// double EMconvertedphoton_perigee_CovEclusEclus () const;
118
119
120 /****************************************************************/
121 /* Converted photon related parameters : Set Parameters*/
122 /****************************************************************/
123
125 void EMconvertedphoton_perigee_z0 (double);
126 void EMconvertedphoton_perigee_phi0 (double);
128// void EMconvertedphoton_perigee_Eclus (double);
129 void EMconvertedphoton_perigee_eta (double);
131
136// void EMconvertedphoton_perigee_Covd0Eclus (double) ;
140// void EMconvertedphoton_perigee_Covz0Eclus (double) ;
143// void EMconvertedphoton_perigee_CovphiEclus (double) ;
145// void EMconvertedphoton_perigee_CovthetaEclus (double) ;
146// void EMconvertedphoton_perigee_CovEclusEclus (double) ;
147
148
149
150 /***************************************************/
151 /* Track related parameters : Get Parameters*/
152 /***************************************************/
153
155 double EMtrack_perigee_d0 () const;
157 double EMtrack_perigee_phi0 () const;
158// /** @brief cluster energy */
159// double EMtrack_perigee_Eclus () const;
161 double EMtrack_perigee_z0 () const;
165 double EMtrack_perigee_eta () const;
168
177// /** @brief Covariance matrix item (d0,Eclus) */
178// double EMtrack_perigee_Covd0Eclus () const;
185// /** @brief Covariance matrix item (z0,Eclus) */
186// double EMtrack_perigee_Covz0Eclus () const;
191// /** @brief Covariance matrix item (phi,Eclus) */
192// double EMtrack_perigee_CovphiEclus () const;
195// /** @brief Covariance matrix item (theta,Eclus) */
196// double EMtrack_perigee_CovthetaEclus () const;
197// /** @brief Covariance matrix item (Eclus, Eclus) */
198// double EMtrack_perigee_CovEclusEclus () const;
199
200
201 /***************************************************/
202 /* Track related parameters : Set Parameters*/
203 /***************************************************/
204
205
207 void EMtrack_perigee_d0 (double) ;
209 void EMtrack_perigee_phi0 (double) ;
210// /** @brief Set the Eclus estimate according to track cluster */
211// void EMtrack_perigee_Eclus(double) ;
213 void EMtrack_perigee_z0 (double) ;
215 void EMtrack_perigee_theta (double) ;
217 void EMtrack_perigee_eta (double) ;
219 void EMtrack_perigee_momentum (double) ;
220
221
223 void EMtrack_perigee_Covd0d0 (double) ;
225 void EMtrack_perigee_Covd0z0 (double) ;
227 void EMtrack_perigee_Covd0phi (double) ;
229 void EMtrack_perigee_Covd0theta (double) ;
230// /** @brief Set the Covariance matrix item (d0,Eclus) */
231// void EMtrack_perigee_Covd0Eclus (double) ;
233 void EMtrack_perigee_Covz0z0 (double) ;
235 void EMtrack_perigee_Covz0phi (double) ;
237 void EMtrack_perigee_Covz0theta (double) ;
238// /** @brief Set the Covariance matrix item (z0,Eclus) */
239// void EMtrack_perigee_Covz0Eclus (double) ;
241 void EMtrack_perigee_Covphiphi (double) ;
243 void EMtrack_perigee_Covphitheta (double) ;
244// /** @brief Set the Covariance matrix item (phi,Eclus) */
245// void EMtrack_perigee_CovphiEclus (double) ;
247 void EMtrack_perigee_Covthetatheta (double) ;
248// /** @brief Set the Covariance matrix item (theta,Eclus) */
249// void EMtrack_perigee_CovthetaEclus (double) ;
250// /** @brief Set the Covariance matrix item (Eclus,Eclus) */
251// void EMtrack_perigee_CovEclusEclus (double) ;
252
253 /***************************************************/
254 /* Photon related parameters : Get Parameters */
255 /***************************************************/
256
258 double EMphoton_eta () const;
260 double EMphoton_phi0 () const;
262 double EMphoton_Eclus () const;
263
264
266 double EMphoton_Covetaeta () const;
268 double EMphoton_Covetaphi () const;
270 double EMphoton_CovetaEclus () const;
272 double EMphoton_Covphiphi () const;
274 double EMphoton_CovphiEclus () const;
278
279
280 /***************************************************/
281 /* Photon related parameters : Set Parameters */
282 /***************************************************/
283
285 void EMphoton_eta (double);
287 void EMphoton_phi0 (double);
289 void EMphoton_Eclus (double);
290
291
293 void EMphoton_Covetaeta (double);
295 void EMphoton_Covetaphi (double);
297 void EMphoton_CovetaEclus (double);
299 void EMphoton_Covphiphi (double);
301 void EMphoton_CovphiEclus (double);
303 void EMphoton_CovEclusEclus (double);
304
305 /***********************************************************************/
306 /* Combined track & cluster related parameters : Set Parameters */
307 /***********************************************************************/
308
309 double EMtrack_comb_Covd0d0 () const;
310 double EMtrack_comb_Covd0z0 () const;
313 double EMtrack_comb_Covd0P () const;
314 double EMtrack_comb_Covz0z0 () const;
317 double EMtrack_comb_Covz0P () const;
320 double EMtrack_comb_CovphiP () const;
322 double EMtrack_comb_CovetaP () const;
323 double EMtrack_comb_CovPP () const;
324
326 void EMtrack_comb_Covd0d0 (double) ;
327 void EMtrack_comb_Covd0z0 (double) ;
328 void EMtrack_comb_Covd0phi (double) ;
329 void EMtrack_comb_Covd0eta (double) ;
330 void EMtrack_comb_Covd0P (double) ;
331 void EMtrack_comb_Covz0z0 (double) ;
332 void EMtrack_comb_Covz0phi (double) ;
333 void EMtrack_comb_Covz0eta (double) ;
334 void EMtrack_comb_Covz0P (double) ;
335 void EMtrack_comb_Covphiphi (double) ;
336 void EMtrack_comb_Covphieta (double) ;
337 void EMtrack_comb_CovphiP (double) ;
338 void EMtrack_comb_Covetaeta (double) ;
339 void EMtrack_comb_CovetaP (double) ;
340 void EMtrack_comb_CovPP (double) ;
341
342
343 /***************************************************/
344 /* Link Index for tracks and vertices */
345 /***************************************************/
346
348 int linkIndex () const;
349
351 void set_linkIndex (int);
352
354 int hasSiliconHits() const;
356 void set_hasSiliconHits (int x);
357
358private:
359
360 void set_parameterInt(egammaParameters::ParamDef, int, bool overwrite=false) ;
361
363 static double caloEta(const egamma*, double clusterEta) ;
364
365
367 //template <int DIM, class T, class S> bool fillConvertedPhotonMatrixElements(const Trk::ParametersT< DIM, T, S>* );
368
370 //bool fillConvertedPhotonErrorMatrix(const AmgSymMatrix(5)*);
371
373 //template <int DIM, class T, class S> bool fillTrackPerigeeMatrixElements(const Trk::ParametersT< DIM, T, S>* ) ;
374
376 //bool fillTrackPerigeeErrorMatrix(const AmgSymMatrix(5)*);
377
378 /* Obsolete: Fill the photon parameter details */
379 //bool fillPhotonMatrixElements(const egamma*, const EMClusterErrorsParametrizations*,
380 // const Amg::Vector3D&, bool forcePhoton=false);
381 //Obsolete Fill the perigree error details */
382 //bool fillPhotonErrorMatrix(const egamma*, const EMClusterErrorsParametrizations*, bool);
383
384 //** @brief is it an electron? */
385 // Should maybe make it return electron, photon, or conversion in the future **/
386 static bool isElectron(const egamma*, bool forcePhoton) ;
387
388 // jacobians
389 static AmgSymMatrix(5) P5Jacobiand0z0PhiThetaE2d0z0PhiEtaE(const double phi) ;
390 static AmgSymMatrix(4) P4JacobiandEThetaPhiM2EEtaPhiM(const double theta) ;
391
394 static const std::string s_className;
395
396};
397
398#endif
399
400
Scalar phi() const
phi method
Scalar theta() const
theta method
#define x
double EMtrack_comb_Covphieta() const
double EMphoton_Covetaeta() const
Covariance matrix item (Eta,Eta)
double EMconvertedphoton_perigee_Covphiphi() const
double EMphoton_eta() const
Set the Covariance matrix item (theta,Eclus)
double EMtrack_comb_CovphiP() const
virtual int intParameter(egammaParameters::ParamDef) const
virtual const std::string & className() const
double EMtrack_perigee_d0() const
transverse impact parameter (distance of closest approach)
Amg::MatrixX getCombinedErrorMatrix() const
E/P combined error matrix, natural size.
double EMtrack_comb_Covz0P() const
virtual ~EMErrorDetail()=default
Destructor.
double EMtrack_comb_Covd0phi() const
static double caloEta(const egamma *, double clusterEta)
Get the error on cluster energy, eta and phi.
double EMconvertedphoton_perigee_Covz0theta() const
double EMtrack_comb_Covz0z0() const
double EMtrack_perigee_Covz0theta() const
Covariance matrix item (z0,theta)
std::vector< std::pair< egammaParameters::ParamDef, double > > m_parameters
double EMphoton_Eclus() const
cluster energy
double EMphoton_Covetaphi() const
Covariance matrix item (Eta,Phi)
virtual double parameter(egammaParameters::ParamDef) const
AmgSymMatrix(4) get4x4CombinedErrorMatrix() const
E/P combined error matrix, (E,eta,phi,M) representation.
int hasSiliconHits() const
Does the track of vertex have silicon hits.
double EMtrack_perigee_momentum() const
momentum of the track fit
EMErrorDetail()
Default constructor.
double EMtrack_perigee_Covd0phi() const
Covariance matrix item (d0,phi)
Amg::MatrixX getUncombinedErrorMatrix() const
E/P combined error matrix, natural size.
double EMtrack_perigee_Covd0d0() const
Covariance matrix item (d0,d0)
double EMconvertedphoton_perigee_eta() const
double EMtrack_perigee_Covz0z0() const
Covariance matrix item (d0,Eclus)
double EMconvertedphoton_perigee_Covphitheta() const
virtual bool hasParameter(egammaParameters::ParamDef) const
double EMtrack_comb_Covphiphi() const
double EMphoton_phi0() const
cluster phi
double EMconvertedphoton_perigee_Covd0z0() const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
general set method for parameters
double EMconvertedphoton_perigee_d0() const
double EMphoton_Covphiphi() const
Covariance matrix item (phi,phi)
double EMtrack_perigee_Covd0z0() const
Covariance matrix item (d0,z0)
void set_hasSiliconHits(int x)
set whether the track of vertex have silicon hits
double EMtrack_comb_Covetaeta() const
static const std::string s_className
interfaces
void set_parameterInt(egammaParameters::ParamDef, int, bool overwrite=false)
double EMtrack_perigee_Covthetatheta() const
Covariance matrix item (phi,Eclus)
double EMtrack_perigee_eta() const
eta of the track fit
double EMtrack_perigee_Covz0phi() const
Covariance matrix item (z0,phi)
double EMtrack_comb_Covd0z0() const
virtual bool hasIntParameter(egammaParameters::ParamDef) const
double EMconvertedphoton_perigee_Covd0phi() const
double EMconvertedphoton_perigee_Covthetatheta() const
static bool isElectron(const egamma *, bool forcePhoton)
Obsolete Fill the perigree parameter for converted photon.
double EMconvertedphoton_perigee_Covz0phi() const
double EMtrack_perigee_Covd0theta() const
Covariance matrix item (d0,theta)
double EMphoton_CovphiEclus() const
Covariance matrix item (phi,Eclus)
double EMconvertedphoton_perigee_Covz0z0() const
void set_linkIndex(int)
Set link index.
double EMconvertedphoton_perigee_Covd0theta() const
double EMphoton_CovEclusEclus() const
Covariance matrix item (theta,theta)
double EMtrack_comb_Covd0P() const
double EMconvertedphoton_perigee_z0() const
double EMtrack_perigee_Covphitheta() const
Covariance matrix item (phi,theta)
double EMtrack_perigee_theta() const
theta of the track fit
double EMtrack_comb_CovPP() const
double EMtrack_comb_Covd0d0() const
double EMtrack_comb_Covz0eta() const
double EMtrack_perigee_z0() const
cluster energy
double EMconvertedphoton_perigee_theta() const
int linkIndex() const
link index
double EMconvertedphoton_perigee_momentum() const
double EMtrack_comb_Covd0eta() const
double EMconvertedphoton_perigee_Covd0d0() const
std::vector< std::pair< egammaParameters::ParamDef, int > > m_parametersInt
double EMconvertedphoton_perigee_phi0() const
double EMphoton_CovetaEclus() const
Covariance matrix item (Eta,Eclus)
double EMtrack_comb_Covz0phi() const
double EMtrack_comb_CovetaP() const
double EMtrack_perigee_phi0() const
azimuth angle of the momentum at the point of closest approach
double EMtrack_perigee_Covphiphi() const
Covariance matrix item (z0,Eclus)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition ParametersT.h:49
egDetail()=default
Default constructor.
elec/gamma data class.
Definition egamma.h:58
STL class.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.
#define private