ATLAS Offline Software
TauShotFinder.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 TAURECTOOLS_TAUSHOTFINDER_H
6 #define TAURECTOOLS_TAUSHOTFINDER_H
7 
9 
14 #include "GaudiKernel/ToolHandle.h"
16 
28 class CaloCell_ID;
29 
30 class TauShotFinder : public TauRecToolBase {
31 
32 public:
33 
35 
36  TauShotFinder(const std::string& name);
37  virtual ~TauShotFinder() = default;
38 
39  virtual StatusCode initialize() override;
40  virtual StatusCode executeShotFinder(xAOD::TauJet& pTau, xAOD::CaloClusterContainer& tauShotCaloClusContainer, xAOD::PFOContainer& tauShotPFOContainer) const override;
41 
42 private:
43 
44  struct ptSort
45  {
46  ptSort( const TauShotFinder& info );
48  bool operator()( const CaloCell* c1, const CaloCell* c2 );
49  };
50 
54  StatusCode selectCells(const xAOD::TauJet& tau, const CaloCellContainer& cellContainer,
55  const CaloDetDescrManager* detMgr,
56  std::vector<const CaloCell*>& cells) const;
57 
64  StatusCode selectSeedCells(const xAOD::TauJet& tau, const CaloCellContainer& cellContainer,
65  const CaloDetDescrManager* detMgr,
66  std::vector<const CaloCell*>& seedCells) const;
67 
69  bool isPhiNeighbour(IdentifierHash cell1Hash, IdentifierHash cell2Hash) const;
70 
72  const CaloCell* getPhiNeighbour(const CaloCell& seedCell, const std::vector<const CaloCell*>& seedCells) const;
73 
75  std::vector<const CaloCell*> getEtaNeighbours(const CaloCell& cell, const CaloCellContainer& cellContainer, int maxDepth) const;
76 
78  void addEtaNeighbours(const CaloCell& cell,
79  const CaloCellContainer& cellContainer,
80  std::vector<const CaloCell*>& cells,
81  int depth,
82  int maxDepth,
83  bool next) const;
84 
90  const CaloCell* phiNeighCell,
91  const CaloCellContainer& cellContainer,
92  xAOD::CaloClusterContainer* clusterContainer) const;
93 
95  int getEtaBin(float eta) const;
96 
98  int getNPhotons(float eta, float energy) const;
99 
100  Gaudi::Property<int> m_nCellsInEta {this, "NCellsInEta"};
101  Gaudi::Property<std::vector<float>> m_minPtCut {this, "MinPtCut"};
102  Gaudi::Property<std::vector<float>> m_doubleShotCut {this, "AutoDoubleShotCut"};
103  Gaudi::Property<bool> m_removeElectronCells {this, "RemoveElectronCells", false};
104 
105  SG::ReadHandleKey<CaloCellContainer> m_caloCellInputContainer{this,"Key_caloCellInputContainer", "AllCalo", "input vertex container key"};
106  SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager", "CaloDetDescrManager"};
107  ToolHandle<IHadronicCalibrationTool> m_caloWeightTool {this, "CaloWeightTool", "H1WeightToolCSC12Generic"};
108  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_removedClusterInputContainer {this,"Key_RemovedClusterInputContainer", "", "input removed cluster key"};
109 
111  const CaloCell_ID* m_calo_id = nullptr;
112 
113 };
114 
115 #endif // TAURECTOOLS_TAUSHOTFINDER_H
grepfile.info
info
Definition: grepfile.py:38
TauShotFinder::m_caloCellInputContainer
SG::ReadHandleKey< CaloCellContainer > m_caloCellInputContainer
Definition: TauShotFinder.h:105
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
TauShotFinder::m_minPtCut
Gaudi::Property< std::vector< float > > m_minPtCut
Definition: TauShotFinder.h:101
TauShotFinder::executeShotFinder
virtual StatusCode executeShotFinder(xAOD::TauJet &pTau, xAOD::CaloClusterContainer &tauShotCaloClusContainer, xAOD::PFOContainer &tauShotPFOContainer) const override
Definition: TauShotFinder.cxx:42
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
TauShotFinder::createShotCluster
xAOD::CaloCluster * createShotCluster(const CaloCell *cell, const CaloCell *phiNeighCell, const CaloCellContainer &cellContainer, xAOD::CaloClusterContainer *clusterContainer) const
Create the shot cluster Shot cluster contains 5x1 cells from the seed cell and hottestneighbour cell ...
Definition: TauShotFinder.cxx:387
TauShotFinder::initialize
virtual StatusCode initialize() override
Tool initializer.
Definition: TauShotFinder.cxx:29
extractSporadic.c1
c1
Definition: extractSporadic.py:134
TauRecToolBase.h
TauRecToolBase
The base class for all tau tools.
Definition: TauRecToolBase.h:21
TauShotFinder::~TauShotFinder
virtual ~TauShotFinder()=default
TauShotFinder::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: TauShotFinder.h:106
TauShotFinder::getPhiNeighbour
const CaloCell * getPhiNeighbour(const CaloCell &seedCell, const std::vector< const CaloCell * > &seedCells) const
Get the hottest neighbour cell in the phi direction.
Definition: TauShotFinder.cxx:307
SG::ReadHandleKey< CaloCellContainer >
TauShotFinder::addEtaNeighbours
void addEtaNeighbours(const CaloCell &cell, const CaloCellContainer &cellContainer, std::vector< const CaloCell * > &cells, int depth, int maxDepth, bool next) const
Get neighbour cells in the eta direction.
Definition: TauShotFinder.cxx:350
TauShotFinder::ptSort::ptSort
ptSort(const TauShotFinder &info)
Definition: TauShotFinder.cxx:418
TauShotFinder::m_caloWeightTool
ToolHandle< IHadronicCalibrationTool > m_caloWeightTool
Definition: TauShotFinder.h:107
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
TauShotFinder::ptSort::m_info
const TauShotFinder & m_info
Definition: TauShotFinder.h:47
TauShotFinder::m_nCellsInEta
Gaudi::Property< int > m_nCellsInEta
Definition: TauShotFinder.h:100
TauShotFinder::ptSort::operator()
bool operator()(const CaloCell *c1, const CaloCell *c2)
Definition: TauShotFinder.cxx:419
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
TauShotFinder::getNPhotons
int getNPhotons(float eta, float energy) const
Get NPhotons in shot.
Definition: TauShotFinder.cxx:166
PFOAuxContainer.h
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ReadCondHandleKey.h
TauShotFinder::isPhiNeighbour
bool isPhiNeighbour(IdentifierHash cell1Hash, IdentifierHash cell2Hash) const
Check whether two cells are neighbours in the phi direction.
Definition: TauShotFinder.cxx:285
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TauShotFinder::selectCells
StatusCode selectCells(const xAOD::TauJet &tau, const CaloCellContainer &cellContainer, const CaloDetDescrManager *detMgr, std::vector< const CaloCell * > &cells) const
Apply preselection of the cells Cells within dR < 0.4, in EM1, and pt > 100 MeV are selected.
Definition: TauShotFinder.cxx:184
TauShotFinder::getEtaBin
int getEtaBin(float eta) const
Get eta bin.
Definition: TauShotFinder.cxx:146
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
ITauToolBase
The base class for all tau tools.
Definition: ITauToolBase.h:30
TauShotFinder::m_removeElectronCells
Gaudi::Property< bool > m_removeElectronCells
Definition: TauShotFinder.h:103
SG::ReadCondHandleKey< CaloDetDescrManager >
TauShotFinder::getEtaNeighbours
std::vector< const CaloCell * > getEtaNeighbours(const CaloCell &cell, const CaloCellContainer &cellContainer, int maxDepth) const
Get neighbour cells in the eta direction.
Definition: TauShotFinder.cxx:335
TauShotFinder::ptSort
Definition: TauShotFinder.h:45
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
TauShotFinder::m_calo_id
const CaloCell_ID * m_calo_id
calo cell navigation
Definition: TauShotFinder.h:111
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
TauShotFinder::TauShotFinder
TauShotFinder(const std::string &name)
Definition: TauShotFinder.cxx:23
TauShotFinder::selectSeedCells
StatusCode selectSeedCells(const xAOD::TauJet &tau, const CaloCellContainer &cellContainer, const CaloDetDescrManager *detMgr, std::vector< const CaloCell * > &seedCells) const
Select the seed cells used to construct the shot Cells must sastisfy:
Definition: TauShotFinder.cxx:230
IHadronicCalibrationTool.h
CaloClusterContainer.h
TauShotFinder
Definition: TauShotFinder.h:30
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TauShotFinder::ASG_TOOL_CLASS2
ASG_TOOL_CLASS2(TauShotFinder, TauRecToolBase, ITauToolBase)
TauShotFinder::m_removedClusterInputContainer
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_removedClusterInputContainer
Definition: TauShotFinder.h:108
TauShotFinder::m_doubleShotCut
Gaudi::Property< std::vector< float > > m_doubleShotCut
Definition: TauShotFinder.h:102