ATLAS Offline Software
Loading...
Searching...
No Matches
PFMatchPositions.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * PFMatchPositions.h
7 *
8 * Created on: 25.03.2014
9 * Author: tlodd
10 */
11
12#ifndef PFMATCHPOSITION_H_
13#define PFMATCHPOSITION_H_
14
15#include <vector>
16
17#include "eflowRec/eflowUtil.h"
19
20namespace PFMatch {
21/* Position classes */
22
24public:
26 EtaPhi() { }
27 virtual ~EtaPhi() { }
28};
29
31public:
33 virtual ~AllLayersEtaPhi() {
34 unsigned int nLay = m_etaphiInLayer.size();
35 for(unsigned int iLay = 0; iLay < nLay; ++iLay) { delete m_etaphiInLayer[iLay]; }
36 }
37
38 std::vector<EtaPhi*> m_etaphiInLayer;
39};
40
42public:
43 EtaPhiWithVariance(eflowEtaPhiPosition etaphi, double etaVar, double phiVar):
44 EtaPhi(etaphi), m_etaVariance(etaVar), m_phiVariance(phiVar) { }
46 virtual ~EtaPhiWithVariance() { }
47
50};
51
52
53/* Cluster position provider classes */
54
62
64public:
67
68private:
70
71 static const double m_etaPhiLowerLimit;
72};
73
74/* Track position provider classes */
75
77public:
78 TrackEtaPhiInFixedLayersProvider(LayerType barrelLayer, LayerType endcapLayer, LayerType fcalLayer):
79 m_barrelLayer(barrelLayer), m_endcapLayer(endcapLayer), m_fcalLayer(fcalLayer) { }
81
82 EtaPhi getPosition(ITrack* track) const;
83
84private:
88};
89
90
91/* The position provider factories */
92
94public:
95 static std::unique_ptr<IPositionProvider> Get(const std::string& positionType) {
96 if (positionType == "EM1EtaPhi") {
97 return std::make_unique<TrackEtaPhiInFixedLayersProvider>(TrackLayer::EMB1, TrackLayer::EME1, TrackLayer::FCAL0);
98 } else if (positionType == "EM2EtaPhi") {
99 return std::make_unique<TrackEtaPhiInFixedLayersProvider>(TrackLayer::EMB2, TrackLayer::EME2, TrackLayer::FCAL0);
100 } else {
101 std::cerr << "TrackPositionFactory\tERROR\tInvalid track position type: \"" << positionType << "\"" << std::endl;
102 assert(false);
103 return 0;
104 }
105 }
106};
107
109public:
110 static std::unique_ptr<IPositionProvider> Get(const std::string& positionType) {
111 if (positionType == "PlainEtaPhi") {
112 return std::make_unique<ClusterPlainEtaPhiProvider>();
113 } else if (positionType == "GeomCenterEtaPhi") {
114 return std::make_unique<ClusterGeometricalCenterProvider>();
115 } else {
116 std::cerr << "ClusterPositionFactory\tERROR\tInvalid cluster position type: \"" << positionType << "\"" << std::endl;
117 assert(false);
118 return 0;
119 }
120 }
121};
122
123}
124
125#endif /* PFMATCHPOSITION_H_ */
std::vector< EtaPhi * > m_etaphiInLayer
EtaPhiWithVariance getPosition(ICluster *cluster) const
EtaPhi getPosition(ICluster *cluster) const
static std::unique_ptr< IPositionProvider > Get(const std::string &positionType)
EtaPhiWithVariance(eflowEtaPhiPosition etaphi, double etaVar, double phiVar)
EtaPhi(const eflowEtaPhiPosition &etaphi)
TrackEtaPhiInFixedLayersProvider(LayerType barrelLayer, LayerType endcapLayer, LayerType fcalLayer)
static std::unique_ptr< IPositionProvider > Get(const std::string &positionType)
eflowEtaPhiPosition()=default
eflowCalo::LAYER LayerType