ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
src
CaloSwTime.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/********************************************************************
6
7
NAME: CaloSwTime.cxx
8
PACKAGE: offline/Calorimeter/CaloSwTime
9
10
AUTHORS: G.Unal
11
CREATED: December 2008
12
13
PURPOSE: Refined time estimate from SW EM clusters
14
15
********************************************************************/
16
17
#include "
CaloSwTime.h
"
18
#include "
CaloEvent/CaloCell.h
"
19
20
21
void
CaloSwTime::makeCorrection
(
const
Context&
/*myctx*/
,
22
xAOD::CaloCluster
* cluster)
const
23
{
24
25
26
double
emax=-9999.;
27
double
time=0.;
28
29
xAOD::CaloCluster::cell_iterator
cellIter = cluster->
cell_begin
();
30
xAOD::CaloCluster::cell_iterator
cellIterEnd = cluster->
cell_end
();
31
for
(;cellIter!=cellIterEnd;cellIter++) {
32
const
CaloCell
* cell = (*cellIter);
33
CaloCell_ID::CaloSample
sampling = cell->caloDDE()->getSampling();
34
if
(sampling== CaloCell_ID::EMB2 || sampling== CaloCell_ID::EME2) {
35
if
( (cell->provenance() & 0x2000) ) {
36
if
(cell->e() > emax) {
37
emax=cell->e();
38
time = cell->time();
39
}
40
}
41
}
42
}
43
44
ATH_MSG_DEBUG
(
" Cluster: emax,time "
<< emax <<
" "
<< time <<
endmsg
);
45
46
if
(emax>0.) cluster->
setTime
(time);
47
48
}
49
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CaloCell.h
CaloSwTime.h
CaloCell_ID::CaloSample
CaloSampling::CaloSample CaloSample
Definition
CaloCell_ID.h:53
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
CaloSwTime::makeCorrection
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
Definition
CaloSwTime.cxx:21
xAOD::CaloCluster_v1::setTime
void setTime(flt_t)
Set cluster time.
xAOD::CaloCluster_v1::cell_iterator
CaloClusterCellLink::iterator cell_iterator
Iterator of the underlying CaloClusterCellLink (non-const version).
Definition
CaloCluster_v1.h:819
xAOD::CaloCluster_v1::cell_end
const_cell_iterator cell_end() const
Definition
CaloCluster_v1.h:816
xAOD::CaloCluster_v1::cell_begin
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version).
Definition
CaloCluster_v1.h:815
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
Generated on
for ATLAS Offline Software by
1.17.0