ATLAS Offline Software
HLTCaloCellMaker.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  * */
6 
17 #ifndef TRIGCALOREC_HLTCALOCELLMAKER_H
18 #define TRIGCALOREC_HLTCALOCELLMAKER_H
19 
20 #include <string>
22 #include "GaudiKernel/ToolHandle.h"
23 #include "GaudiKernel/ServiceHandle.h"
24 
36 
37 
41  public:
42  HLTCaloCellMaker(const std::string & name, ISvcLocator* pSvcLocator);
43 
44  virtual StatusCode execute(const EventContext& context ) const override;
45  virtual StatusCode initialize() override;
46  private:
47 
48  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey { this, "RoIs", "OutputRoIs", "RoIs to read in" };
49  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
50 
51  SG::WriteHandleKey<ConstDataVector<CaloCellContainerVector> > m_cellContainerVKey { this, "CellsVName", "CellsVClusters", "Calo cells container" };
52  SG::WriteHandleKey<CaloConstCellContainer > m_cellContainerKey { this, "CellsName", "CellsClusters", "Calo cells container" };
53 
55  SG::ReadCondHandleKey<TileEMScale> m_tileEMScaleKey { this, "TileEMSCaleKey", "TileEMScale", "" };
56 
58  { this, "TrigDataAccessMT", "TrigCaloDataAccessSvc/TrigCaloDataAccessSvc", "Data Access for LVL2 Calo Algorithms in MT" };
59 
60  ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
61 
62  Gaudi::Property<bool> m_roiMode { this, "roiMode", true, "RoiMode roi->CaloCellCollection" };
63  Gaudi::Property<bool> m_monCells { this, "monitorCells", false ,"monitorCells" };
64  Gaudi::Property<bool> m_tileCellsInROI { this, "TileCellsInROI", false, "Require tile cells to be within ROI" };
65 
66 
67  // just to help with monitoring
68  static inline double getCellPt(const CaloCell* aCell){
69  if(!aCell) return -999.0;
70  return aCell->et();
71  }
72 
73  // check if tile cell is within the eta boundaries of the ROI, let RegSelCondAlg_Tile handle phi boundaries
74  static inline bool tileCellEtaInRoi(const CaloCell* cell, const TrigRoiDescriptor* roi) {
75  if (cell->eta() < roi->etaMinus() || cell->eta() > roi->etaPlus()) return false;
76  return true;
77  }
78 
79 };
80 
81 #endif
82 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TileEMScale.h
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
HLTCaloCellMaker::HLTCaloCellMaker
HLTCaloCellMaker(const std::string &name, ISvcLocator *pSvcLocator)
Definition: HLTCaloCellMaker.cxx:20
HLTCaloCellMaker::tileCellEtaInRoi
static bool tileCellEtaInRoi(const CaloCell *cell, const TrigRoiDescriptor *roi)
Definition: HLTCaloCellMaker.h:74
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
SG::ReadHandleKey< TrigRoiDescriptorCollection >
HLTCaloCellMaker::m_tileEMScaleKey
SG::ReadCondHandleKey< TileEMScale > m_tileEMScaleKey
FIXME: Temporary (i hope) to get dependency needed by BS converter.
Definition: HLTCaloCellMaker.h:55
HLTCaloCellMaker::m_tileCellsInROI
Gaudi::Property< bool > m_tileCellsInROI
Definition: HLTCaloCellMaker.h:64
HLTCaloCellMaker::execute
virtual StatusCode execute(const EventContext &context) const override
Definition: HLTCaloCellMaker.cxx:37
HLTCaloCellMaker::m_cellContainerKey
SG::WriteHandleKey< CaloConstCellContainer > m_cellContainerKey
Definition: HLTCaloCellMaker.h:52
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
HLTCaloCellMaker::getCellPt
static double getCellPt(const CaloCell *aCell)
Definition: HLTCaloCellMaker.h:68
HLTCaloCellMaker::m_monCells
Gaudi::Property< bool > m_monCells
Definition: HLTCaloCellMaker.h:63
GenericMonitoringTool.h
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell::et
virtual double et() const override final
get et
Definition: CaloCell.h:407
HLTCaloCellMaker::m_dataAccessSvc
ServiceHandle< ITrigCaloDataAccessSvc > m_dataAccessSvc
Definition: HLTCaloCellMaker.h:58
HLTCaloCellMaker::initialize
virtual StatusCode initialize() override
Definition: HLTCaloCellMaker.cxx:25
HLTCaloCellMaker::m_roiCollectionKey
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
Definition: HLTCaloCellMaker.h:48
HLTCaloCellMaker::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: HLTCaloCellMaker.h:60
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
ITrigCaloDataAccessSvc.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
HLTCaloCellMaker
NAME: HLTCaloCellMaker.h PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloCommon.
Definition: HLTCaloCellMaker.h:40
HLTCaloCellMaker::m_roiMode
Gaudi::Property< bool > m_roiMode
Definition: HLTCaloCellMaker.h:62
CaloBCIDAverage.h
SG::ReadCondHandleKey< TileEMScale >
CaloCellContainerVector.h
RoiDescriptor::etaPlus
virtual double etaPlus() const override final
gets eta at zedPlus
Definition: RoiDescriptor.h:115
HLTCaloCellMaker::m_bcidAvgKey
SG::ReadHandleKey< CaloBCIDAverage > m_bcidAvgKey
Definition: HLTCaloCellMaker.h:49
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
HLTCaloCellMaker::m_cellContainerVKey
SG::WriteHandleKey< ConstDataVector< CaloCellContainerVector > > m_cellContainerVKey
Definition: HLTCaloCellMaker.h:51
CaloConstCellContainer.h
CaloCellContainer that can accept const cell pointers.
RoiDescriptor::etaMinus
virtual double etaMinus() const override final
gets eta at zMinus
Definition: RoiDescriptor.h:116
TrigRoiDescriptorCollection.h
ServiceHandle< ITrigCaloDataAccessSvc >