ATLAS Offline Software
Loading...
Searching...
No Matches
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
23 using AthReentrantAlgorithm::AthReentrantAlgorithm;
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
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
StatusCode execute(const EventContext &ctx) const override final
standard Athena-Algorithm method
perSide_t analyseClustersPerSide(std::vector< const xAOD::CaloCluster * > &clusters) const
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerName
SG::WriteHandleKey< LArCollisionTime > m_outputName
StatusCode initialize() override final
standard Athena-Algorithm method
~LArClusterCollisionTimeAlg()=default
Gaudi::Property< size_t > m_maxClusters
StatusCode finalize() override final
standard Athena-Algorithm method
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
perSide_t(const float t, const float e, const unsigned nC)
#define private