ATLAS Offline Software
RingerReFex.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 #ifndef TRIGT2CALOEGAMMA_RINGERREFEX_H
7 #define TRIGT2CALOEGAMMA_RINGERREFEX_H
8 
9 
10 #include <string>
11 #include "CaloGeoHelpers/CaloSampling.h"
12 #include "CaloEvent/CaloCell.h"
20 #include "../src/helpers/PhiComps.h"
22 
23 
25 {
26 
27  public:
28  class RingSet {
29 
30  public:
31  RingSet( unsigned int maxRings , double deta, double dphi,
32  const std::vector<int> &detectors,
33  const std::vector<int> &samplings,
34  const std::vector<int> &samples,
35  bool doQuarter, bool doEtaAxesDivision, bool doPhiAxesDivision);
36 
37  ~RingSet()=default;
38 
39  void buildRings( const double eta_hot, const double phi_hot,const CaloNoise* noiseCDO, const double m_noiseFactor, const bool m_doNoiseThrRings);
40 
41  const std::vector<double>& rings() const;
42  const std::vector<std::pair<int,int>> detectors() const;
43  bool isValid( const CaloCell * ) const;
44  void push_back( const CaloCell * );
45  void clear();
46  void fill_cells_info(std::vector<float> &cells_eta, std::vector<float> &cells_phi, std::vector<float> &cells_et, std::vector<int> &cells_sampling, std::vector<int> &cells_size, std::vector < double > &rings_sum, std::vector <int> &cells_id, std::vector <float> &cells_gain);
47 
48  private:
49 
51  std::vector<int> m_detectors, m_samplings, m_samples;
53 
54  std::vector<const CaloCell*> m_cells;
55  std::vector<double> m_rings;
56  };
57 
58 
59  public:
60 
61  RingerReFex(const std::string& type, const std::string& name, const IInterface* parent);
62  virtual ~RingerReFex () { };
63 
65 
66  virtual StatusCode initialize() override;
67 
68  virtual StatusCode execute(xAOD::TrigEMCluster &emCluster,
69  const IRoiDescriptor& roi,
70  const CaloDetDescrElement*& /*caloDDE*/,
71  const EventContext& context) const override;
72 
73  StatusCode prepareRinger(std::vector<RingerReFex::RingSet>& vec_rs,
74  const xAOD::TrigEMCluster& emCluster,
75  const IRoiDescriptor& roi,
76  const EventContext& context) const;
77 
78  private:
79 
80 
81  bool configurationInvalid();
82 
83  inline bool maxCell ( const CaloCell* cell, double &energy, const double eta_ref, const double phi_ref ) const;
84 
85  void printRings( std::vector<RingSet> &, const xAOD::TrigEMCluster & ) const;
86 
87 
88 
89  ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool"};
90  SG::WriteHandleKey<xAOD::TrigRingerRingsContainer> m_ringerContainerKey {this, "RingerKey", "HLT_FastCaloRinger", "TrigRingerRings container key"};
91  SG::ReadHandleKey<xAOD::TrigEMClusterContainer> m_clusterContainerKey {this, "ClustersName", "HLT_FastCaloEMClusters", "TrigEMCluster container key"};
92  SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
93 
94  Gaudi::Property<double> m_etaSearchWindowSize {this, "EtaSearchWindowSize", 0.1, ""};
95  Gaudi::Property<double> m_phiSearchWindowSize {this, "PhiSearchWindowSize", 0.1, ""};
96  Gaudi::Property<std::vector<float>> m_deltaEta {this, "DeltaEta" , {} , "Eta step for each layer" };
97  Gaudi::Property<std::vector<float>> m_deltaPhi {this, "DeltaPhi" , {} , "Phi step for each layer" };
98  Gaudi::Property<std::vector<unsigned int>> m_nRings {this, "NRings" , {} , "Number of rings for each layer" };
99  Gaudi::Property<std::vector<float>> m_etaBins {this, "EtaBins" , {} , "Eta bins range cover by the reconstruction."};
100  Gaudi::Property<std::vector<std::vector<int>>> m_detectors {this, "Detectors" , {} , "" };
101  Gaudi::Property<std::vector<std::vector<int>>> m_samplings {this, "Samplings" , {} , "" };
102  Gaudi::Property<std::vector<std::vector<int>>> m_samples {this, "Samples" , {} , "samples per layer" };
103 
104  Gaudi::Property<bool> m_useTile {this, "UseTile" , true , "Use tile cells" };
105  Gaudi::Property<bool> m_dumpCells {this, "DumpCells" , false , "Dump Ringer Cells Information" };
106  Gaudi::Property<bool> m_doNoiseThrRings {this, "DoNoiseThrRings" , false , "Building rings with noise threshold" };
107  Gaudi::Property<double> m_noiseFactor {this, "NoiseFactor" , 2.0, "Building rings above a factor sigma noise" };
108  Gaudi::Property<bool> m_globalCenter{this, "GlobalCenter", false, "Use cluster position as center" };
109  Gaudi::Property<std::vector<bool>> m_doQuarter {this, "DoQuarter", {} , "Do Quarter Rings" };
110  Gaudi::Property<std::vector<bool>> m_doEtaAxesDivision{this, "DoEtaAxesDivision", {} , "Do Eta axes division" };
111  Gaudi::Property<std::vector<bool>> m_doPhiAxesDivision{this, "DoPhiAxesDivision",{}, "Do Phi axes division" };
112 
113 
114 
115 };
116 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TrigRingerRingsContainer.h
RingerReFex::RingSet::buildRings
void buildRings(const double eta_hot, const double phi_hot, const CaloNoise *noiseCDO, const double m_noiseFactor, const bool m_doNoiseThrRings)
=================================================================================
Definition: RingerReFex.cxx:460
RingerReFex::prepareRinger
StatusCode prepareRinger(std::vector< RingerReFex::RingSet > &vec_rs, const xAOD::TrigEMCluster &emCluster, const IRoiDescriptor &roi, const EventContext &context) const
Definition: RingerReFex.cxx:94
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
RingerReFex::m_noiseFactor
Gaudi::Property< double > m_noiseFactor
Definition: RingerReFex.h:107
RingerReFex::m_phiSearchWindowSize
Gaudi::Property< double > m_phiSearchWindowSize
Definition: RingerReFex.h:95
IReAlgToolCalo::execute
virtual StatusCode execute(xAOD::TrigEMCluster &ptrigEMCluster, const IRoiDescriptor &roi, const CaloDetDescrElement *&caloDDE, const EventContext &context) const =0
This is the execute method for Egamma Algorithms.
RingerReFex::m_doPhiAxesDivision
Gaudi::Property< std::vector< bool > > m_doPhiAxesDivision
Definition: RingerReFex.h:111
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
RingerReFex::RingSet::m_samples
std::vector< int > m_samples
Definition: RingerReFex.h:51
RingerReFex::RingSet::push_back
void push_back(const CaloCell *)
=================================================================================
Definition: RingerReFex.cxx:447
RingerReFex::m_doNoiseThrRings
Gaudi::Property< bool > m_doNoiseThrRings
Definition: RingerReFex.h:106
CaloCell.h
RingerReFex::m_doQuarter
Gaudi::Property< std::vector< bool > > m_doQuarter
Definition: RingerReFex.h:109
RingerReFex::RingSet::m_cells
std::vector< const CaloCell * > m_cells
Definition: RingerReFex.h:54
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
RingerReFex::RingSet::m_doEtaAxesDivision
bool m_doEtaAxesDivision
Definition: RingerReFex.h:52
TrigRingerRings.h
RingerReFex::RingSet::RingSet
RingSet(unsigned int maxRings, double deta, double dphi, const std::vector< int > &detectors, const std::vector< int > &samplings, const std::vector< int > &samples, bool doQuarter, bool doEtaAxesDivision, bool doPhiAxesDivision)
Definition: RingerReFex.cxx:384
RingerReFex::RingSet::rings
const std::vector< double > & rings() const
=================================================================================
Definition: RingerReFex.cxx:440
RingerReFex::m_etaSearchWindowSize
Gaudi::Property< double > m_etaSearchWindowSize
Definition: RingerReFex.h:94
RingerReFex
Definition: RingerReFex.h:25
RingerReFex::maxCell
bool maxCell(const CaloCell *cell, double &energy, const double eta_ref, const double phi_ref) const
Definition: RingerReFex.cxx:323
GenericMonitoringTool.h
RingerReFex::printRings
void printRings(std::vector< RingSet > &, const xAOD::TrigEMCluster &) const
=================================================================================
Definition: RingerReFex.cxx:355
TrigRingerRingsAuxContainer.h
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
RingerReFex::m_detectors
Gaudi::Property< std::vector< std::vector< int > > > m_detectors
Definition: RingerReFex.h:100
RingerReFex::RingSet::m_doPhiAxesDivision
bool m_doPhiAxesDivision
Definition: RingerReFex.h:52
RingerReFex::m_globalCenter
Gaudi::Property< bool > m_globalCenter
Definition: RingerReFex.h:108
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IRoiDescriptor
Describes the API of the Region of Ineterest geometry.
Definition: IRoiDescriptor.h:23
RingerReFex::RingSet::m_samplings
std::vector< int > m_samplings
Definition: RingerReFex.h:51
RingerReFex::execute
virtual StatusCode execute(xAOD::TrigEMCluster &emCluster, const IRoiDescriptor &roi, const CaloDetDescrElement *&, const EventContext &context) const override
=================================================================================
Definition: RingerReFex.cxx:209
IReAlgToolCalo.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
RingerReFex::m_dumpCells
Gaudi::Property< bool > m_dumpCells
Definition: RingerReFex.h:105
RingerReFex::configurationInvalid
bool configurationInvalid()
=================================================================================
Definition: RingerReFex.cxx:44
RingerReFex::m_ringerContainerKey
SG::WriteHandleKey< xAOD::TrigRingerRingsContainer > m_ringerContainerKey
Definition: RingerReFex.h:90
RingerReFex::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: RingerReFex.h:89
CaloNoise
Definition: CaloNoise.h:16
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
RingerReFex::RingSet::m_doQuarter
bool m_doQuarter
Definition: RingerReFex.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
RingerReFex::m_samplings
Gaudi::Property< std::vector< std::vector< int > > > m_samplings
Definition: RingerReFex.h:101
CaloNoise.h
RingerReFex::RingSet::fill_cells_info
void fill_cells_info(std::vector< float > &cells_eta, std::vector< float > &cells_phi, std::vector< float > &cells_et, std::vector< int > &cells_sampling, std::vector< int > &cells_size, std::vector< double > &rings_sum, std::vector< int > &cells_id, std::vector< float > &cells_gain)
=================================================================================
Definition: RingerReFex.cxx:307
RingerReFex::RingSet::m_deltaPhi
double m_deltaPhi
Definition: RingerReFex.h:50
RingerReFex::m_etaBins
Gaudi::Property< std::vector< float > > m_etaBins
Definition: RingerReFex.h:99
IReAlgToolCalo
Base Class for Tools used for Egamma and Tau Feature Extraction Algorithms.
Definition: IReAlgToolCalo.h:37
SG::ReadCondHandleKey< CaloNoise >
RingerReFex::~RingerReFex
virtual ~RingerReFex()
Definition: RingerReFex.h:62
RingerReFex::RingSet
Definition: RingerReFex.h:28
RingerReFex::RingSet::~RingSet
~RingSet()=default
RingerReFex::m_deltaPhi
Gaudi::Property< std::vector< float > > m_deltaPhi
Definition: RingerReFex.h:97
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
RingerReFex::RingSet::m_rings
std::vector< double > m_rings
Definition: RingerReFex.h:55
RingerReFex::m_clusterContainerKey
SG::ReadHandleKey< xAOD::TrigEMClusterContainer > m_clusterContainerKey
Definition: RingerReFex.h:91
RingerReFex::RingSet::clear
void clear()
=================================================================================
Definition: RingerReFex.cxx:453
RingerReFex::RingerReFex
RingerReFex(const std::string &type, const std::string &name, const IInterface *parent)
=================================================================================
Definition: RingerReFex.cxx:38
RingerReFex::m_useTile
Gaudi::Property< bool > m_useTile
Definition: RingerReFex.h:104
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RingerReFex::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Definition: RingerReFex.h:92
RingerReFex::RingSet::isValid
bool isValid(const CaloCell *) const
=================================================================================
Definition: RingerReFex.cxx:427
RingerReFex::m_deltaEta
Gaudi::Property< std::vector< float > > m_deltaEta
Definition: RingerReFex.h:96
RingerReFex::m_samples
Gaudi::Property< std::vector< std::vector< int > > > m_samples
Definition: RingerReFex.h:102
xAOD::TrigEMCluster_v1
Description of a trigger EM cluster.
Definition: TrigEMCluster_v1.h:28
RingerReFex::m_nRings
Gaudi::Property< std::vector< unsigned int > > m_nRings
Definition: RingerReFex.h:98
RingerReFex::RingSet::detectors
const std::vector< std::pair< int, int > > detectors() const
=================================================================================
Definition: RingerReFex.cxx:417
RingerReFex::initialize
virtual StatusCode initialize() override
=================================================================================
Definition: RingerReFex.cxx:55
RingerReFex::m_doEtaAxesDivision
Gaudi::Property< std::vector< bool > > m_doEtaAxesDivision
Definition: RingerReFex.h:110
RingerReFex::RingSet::m_detectors
std::vector< int > m_detectors
Definition: RingerReFex.h:51
RingerReFex::RingSet::m_deltaEta
double m_deltaEta
Definition: RingerReFex.h:50