ATLAS Offline Software
LArClusterCollisionTimeAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARCLUSTERCOLLISIONTIMEALG_H
6 #define LARCLUSTERCOLLISIONTIMEALG_H
7 
8 #include "Gaudi/Property.h"
9 
12 
14 
17 
18 
20  public:
21  //LArClusterCollisionTimeAlg(const std::string& name, ISvcLocator* pSvcLocator);
22 
24 
26 
28  StatusCode initialize() override final;
30  StatusCode execute(const EventContext& ctx) const override final;
32  StatusCode finalize() override final;
33 
34  private:
35 
36  struct perSide_t {
37  float time;
38  float energy;
39  unsigned nClusters;
40  public:
41  perSide_t() : time(0.), energy(0.),nClusters(0) {} ;
42  perSide_t(const float t, const float e, const unsigned nC) : time(t),energy(e),nClusters(nC) {} ;
43  };
44 
45  perSide_t analyseClustersPerSide(std::vector<const xAOD::CaloCluster*>& clusters) const;
46 
47 
48 
49  //---------------------------------------------------
50  // Member variables
51  //---------------------------------------------------
52  mutable std::atomic<unsigned> m_nEvt{0};
53  mutable std::atomic<unsigned> m_nCollEvt{0};
54 
55  //---------------------------------------------------
56  // Properties
57  //---------------------------------------------------
58  Gaudi::Property<float> m_timeCut { this, "timeDiffCut", 2., "max |A-C| time difference tu pass the filter" };
59  Gaudi::Property<size_t> m_maxClusters { this, "maxNClusters", 3, "how many clusters taken into sum" };
60 
62  SG::WriteHandleKey<LArCollisionTime> m_outputName{this, "OutputName", "LArClusterCollTime"};
63 
64 };
65 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
LArClusterCollisionTimeAlg::finalize
StatusCode finalize() override final
standard Athena-Algorithm method
Definition: LArClusterCollisionTimeAlg.cxx:20
LArClusterCollisionTimeAlg::m_outputName
SG::WriteHandleKey< LArCollisionTime > m_outputName
Definition: LArClusterCollisionTimeAlg.h:62
LArClusterCollisionTimeAlg::perSide_t::perSide_t
perSide_t()
Definition: LArClusterCollisionTimeAlg.h:41
LArClusterCollisionTimeAlg::execute
StatusCode execute(const EventContext &ctx) const override final
standard Athena-Algorithm method
Definition: LArClusterCollisionTimeAlg.cxx:52
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< xAOD::CaloClusterContainer >
LArClusterCollisionTimeAlg::perSide_t
Definition: LArClusterCollisionTimeAlg.h:36
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LArClusterCollisionTimeAlg
Definition: LArClusterCollisionTimeAlg.h:19
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
SG::WriteHandleKey< LArCollisionTime >
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
LArClusterCollisionTimeAlg::m_timeCut
Gaudi::Property< float > m_timeCut
Definition: LArClusterCollisionTimeAlg.h:58
LArClusterCollisionTimeAlg::perSide_t::energy
float energy
Definition: LArClusterCollisionTimeAlg.h:38
LArClusterCollisionTimeAlg::analyseClustersPerSide
perSide_t analyseClustersPerSide(std::vector< const xAOD::CaloCluster * > &clusters) const
Definition: LArClusterCollisionTimeAlg.cxx:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArClusterCollisionTimeAlg::m_nEvt
std::atomic< unsigned > m_nEvt
Definition: LArClusterCollisionTimeAlg.h:52
LArClusterCollisionTimeAlg::m_nCollEvt
std::atomic< unsigned > m_nCollEvt
Definition: LArClusterCollisionTimeAlg.h:53
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
LArClusterCollisionTimeAlg::initialize
StatusCode initialize() override final
standard Athena-Algorithm method
Definition: LArClusterCollisionTimeAlg.cxx:10
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
LArClusterCollisionTimeAlg::m_maxClusters
Gaudi::Property< size_t > m_maxClusters
Definition: LArClusterCollisionTimeAlg.h:59
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
CaloClusterContainer.h
LArClusterCollisionTimeAlg::perSide_t::perSide_t
perSide_t(const float t, const float e, const unsigned nC)
Definition: LArClusterCollisionTimeAlg.h:42
LArClusterCollisionTimeAlg::m_clusterContainerName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerName
Definition: LArClusterCollisionTimeAlg.h:61
LArClusterCollisionTimeAlg::perSide_t::nClusters
unsigned nClusters
Definition: LArClusterCollisionTimeAlg.h:39
LArCollisionTime.h
LArClusterCollisionTimeAlg::perSide_t::time
float time
Definition: LArClusterCollisionTimeAlg.h:37
LArClusterCollisionTimeAlg::~LArClusterCollisionTimeAlg
~LArClusterCollisionTimeAlg()=default