ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArClusterRec
LArClusterRec
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
10
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
11
#include "
xAODCaloEvent/CaloClusterContainer.h
"
12
13
#include "
LArRecEvent/LArCollisionTime.h
"
14
15
#include "
StoreGate/ReadHandleKey.h
"
16
#include "
StoreGate/WriteHandleKey.h
"
17
18
19
class
LArClusterCollisionTimeAlg
:
public
AthReentrantAlgorithm
{
20
public
:
21
//LArClusterCollisionTimeAlg(const std::string& name, ISvcLocator* pSvcLocator);
22
23
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
24
25
~LArClusterCollisionTimeAlg
() =
default
;
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
61
SG::ReadHandleKey<xAOD::CaloClusterContainer>
m_clusterContainerName
{
this
,
"InputName"
,
"LArClusterEM"
};
62
SG::WriteHandleKey<LArCollisionTime>
m_outputName
{
this
,
"OutputName"
,
"LArClusterCollTime"
};
63
64
};
65
#endif
AthReentrantAlgorithm.h
CaloClusterContainer.h
LArCollisionTime.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
LArClusterCollisionTimeAlg
Definition
LArClusterCollisionTimeAlg.h:19
LArClusterCollisionTimeAlg::execute
StatusCode execute(const EventContext &ctx) const override final
standard Athena-Algorithm method
Definition
LArClusterCollisionTimeAlg.cxx:56
LArClusterCollisionTimeAlg::analyseClustersPerSide
perSide_t analyseClustersPerSide(std::vector< const xAOD::CaloCluster * > &clusters) const
Definition
LArClusterCollisionTimeAlg.cxx:29
LArClusterCollisionTimeAlg::m_clusterContainerName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerName
Definition
LArClusterCollisionTimeAlg.h:61
LArClusterCollisionTimeAlg::m_outputName
SG::WriteHandleKey< LArCollisionTime > m_outputName
Definition
LArClusterCollisionTimeAlg.h:62
LArClusterCollisionTimeAlg::m_nCollEvt
std::atomic< unsigned > m_nCollEvt
Definition
LArClusterCollisionTimeAlg.h:53
LArClusterCollisionTimeAlg::initialize
StatusCode initialize() override final
standard Athena-Algorithm method
Definition
LArClusterCollisionTimeAlg.cxx:11
LArClusterCollisionTimeAlg::~LArClusterCollisionTimeAlg
~LArClusterCollisionTimeAlg()=default
LArClusterCollisionTimeAlg::m_nEvt
std::atomic< unsigned > m_nEvt
Definition
LArClusterCollisionTimeAlg.h:52
LArClusterCollisionTimeAlg::m_maxClusters
Gaudi::Property< size_t > m_maxClusters
Definition
LArClusterCollisionTimeAlg.h:59
LArClusterCollisionTimeAlg::m_timeCut
Gaudi::Property< float > m_timeCut
Definition
LArClusterCollisionTimeAlg.h:58
LArClusterCollisionTimeAlg::finalize
StatusCode finalize() override final
standard Athena-Algorithm method
Definition
LArClusterCollisionTimeAlg.cxx:21
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
const
LArClusterCollisionTimeAlg::perSide_t::time
float time
Definition
LArClusterCollisionTimeAlg.h:37
LArClusterCollisionTimeAlg::perSide_t::perSide_t
perSide_t(const float t, const float e, const unsigned nC)
Definition
LArClusterCollisionTimeAlg.h:42
LArClusterCollisionTimeAlg::perSide_t::nClusters
unsigned nClusters
Definition
LArClusterCollisionTimeAlg.h:39
LArClusterCollisionTimeAlg::perSide_t::energy
float energy
Definition
LArClusterCollisionTimeAlg.h:38
LArClusterCollisionTimeAlg::perSide_t::perSide_t
perSide_t()
Definition
LArClusterCollisionTimeAlg.h:41
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0