ATLAS Offline Software
TriggerTowerThinningAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 // ***************************************************************************
5 // * Author: John Morris (john.morris@cern.ch) *
6 // * Queen Mary University of London *
7 // * *
8 
9 #ifndef TRIGT1CALOCALIBTOOLS_TRIGGERTOWERTHINNINGALG_H
10 #define TRIGT1CALOCALIBTOOLS_TRIGGERTOWERTHINNINGALG_H
11 
34 #include "GaudiKernel/ServiceHandle.h"
35 
36 #include <vector>
37 
38 
39 namespace DerivationFramework {
40 
41  class TriggerTowerThinningAlg : public extends<AthAlgTool, IThinningTool> {
42 
43  public:
44  TriggerTowerThinningAlg(const std::string& t, const std::string& n, const IInterface* p);
45  virtual ~TriggerTowerThinningAlg();
46 
47  virtual StatusCode initialize() override;
48  virtual StatusCode finalize() override;
49  virtual StatusCode doThinning() const override;
50 
51  private:
52  StringProperty m_streamName
53  { this, "StreamName", "", "Name of the stream being thinned" };
54 
56  { this, "TriggerTowerLocation", LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation, "" };
57 
59  { this, "CaloCellETByLayerKey", m_triggerTowerLocation.key()+".CaloCellETByLayer", "" };
60 
61  // python configurables
63  int m_minADC;
65  double m_minRandom;
66 
67  // Counters
68  mutable std::atomic<unsigned long> m_nEventsProcessed;
69  mutable std::atomic<unsigned long> m_nEventsAllTriggerTowersKeptByRandom;
70  mutable std::atomic<unsigned long> m_nTriggerTowersProcessed;
71  mutable std::atomic<unsigned long> m_nTriggerTowersKept;
72  mutable std::atomic<unsigned long> m_nTriggerTowersRejected;
73 
74  // Tools and random number generator
76  { this, "RndmSvc", "AthRNGSvc", "" };
77  };
78 } // namespace
79 
80 #endif
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
DerivationFramework::TriggerTowerThinningAlg::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: TriggerTowerThinningAlg.h:76
DerivationFramework::TriggerTowerThinningAlg::m_minCaloCellET
double m_minCaloCellET
Definition: TriggerTowerThinningAlg.h:62
DerivationFramework::TriggerTowerThinningAlg::m_nEventsProcessed
std::atomic< unsigned long > m_nEventsProcessed
Definition: TriggerTowerThinningAlg.h:68
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
DerivationFramework::TriggerTowerThinningAlg::m_nEventsAllTriggerTowersKeptByRandom
std::atomic< unsigned long > m_nEventsAllTriggerTowersKeptByRandom
Definition: TriggerTowerThinningAlg.h:69
TriggerTowerContainer.h
IThinningTool.h
DerivationFramework::TriggerTowerThinningAlg::~TriggerTowerThinningAlg
virtual ~TriggerTowerThinningAlg()
Definition: TriggerTowerThinningAlg.cxx:52
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::TriggerTowerThinningAlg::m_minRandom
double m_minRandom
Definition: TriggerTowerThinningAlg.h:65
DerivationFramework::TriggerTowerThinningAlg::m_nTriggerTowersRejected
std::atomic< unsigned long > m_nTriggerTowersRejected
Definition: TriggerTowerThinningAlg.h:72
DerivationFramework::TriggerTowerThinningAlg::m_useRandom
bool m_useRandom
Definition: TriggerTowerThinningAlg.h:64
DerivationFramework::TriggerTowerThinningAlg::m_minADC
int m_minADC
Definition: TriggerTowerThinningAlg.h:63
DerivationFramework::TriggerTowerThinningAlg::m_nTriggerTowersKept
std::atomic< unsigned long > m_nTriggerTowersKept
Definition: TriggerTowerThinningAlg.h:71
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::TriggerTowerThinningAlg::initialize
virtual StatusCode initialize() override
Definition: TriggerTowerThinningAlg.cxx:56
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IParticleContainer.h
DerivationFramework::TriggerTowerThinningAlg
Definition: TriggerTowerThinningAlg.h:41
AthAlgTool.h
DerivationFramework::TriggerTowerThinningAlg::m_nTriggerTowersProcessed
std::atomic< unsigned long > m_nTriggerTowersProcessed
Definition: TriggerTowerThinningAlg.h:70
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::TriggerTowerThinningAlg::m_streamName
StringProperty m_streamName
Definition: TriggerTowerThinningAlg.h:53
DerivationFramework::TriggerTowerThinningAlg::TriggerTowerThinningAlg
TriggerTowerThinningAlg(const std::string &t, const std::string &n, const IInterface *p)
Definition: TriggerTowerThinningAlg.cxx:34
LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation
static const std::string xAODTriggerTowerLocation
Definition: TrigT1CaloDefs.h:36
TrigT1CaloDefs.h
DerivationFramework::TriggerTowerThinningAlg::m_caloCellETByLayerKey
SG::ReadDecorHandleKey< xAOD::TriggerTowerContainer > m_caloCellETByLayerKey
Definition: TriggerTowerThinningAlg.h:59
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
DerivationFramework::TriggerTowerThinningAlg::doThinning
virtual StatusCode doThinning() const override
Definition: TriggerTowerThinningAlg.cxx:67
DerivationFramework::TriggerTowerThinningAlg::m_triggerTowerLocation
SG::ThinningHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerLocation
Definition: TriggerTowerThinningAlg.h:56
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
DerivationFramework::TriggerTowerThinningAlg::finalize
virtual StatusCode finalize() override
Definition: TriggerTowerThinningAlg.cxx:162
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >