ATLAS Offline Software
Loading...
Searching...
No Matches
CPMTower_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: CPMTower_v1.cxx 638578 2015-01-09 17:00:15Z morrisj $
6
7// System include(s):
8#include <cmath>
9
10// EDM includes(s):
12
13// Local include(s):
15
16namespace xAOD{
17
22
23 AUXSTORE_OBJECT_SETTER_AND_GETTER( CPMTower_v1 , std::vector<int> , emEnergyVec , setEmEnergyVec )
24 AUXSTORE_OBJECT_SETTER_AND_GETTER( CPMTower_v1 , std::vector<int> , hadEnergyVec , setHadEnergyVec )
25 AUXSTORE_OBJECT_SETTER_AND_GETTER( CPMTower_v1 , std::vector<int> , emErrorVec , setEmErrorVec )
26 AUXSTORE_OBJECT_SETTER_AND_GETTER( CPMTower_v1 , std::vector<int> , hadErrorVec , setHadErrorVec )
29 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CPMTower_v1 , int , peak , setPeak )
30
31
33 {
34 return emEnergyVec()[ peak() ];
35 }
36
38 {
39 return hadEnergyVec()[ peak() ];
40 }
41
42 int CPMTower_v1::emSliceEnergy(int slice) const
43 {
44 if( slice >= 0 && slice < (int)emEnergyVec().size() ){
45 return emEnergyVec()[ slice ];
46 }
47 return 0;
48 }
49
50 int CPMTower_v1::hadSliceEnergy(int slice) const
51 {
52 if( slice >= 0 && slice < (int)hadEnergyVec().size() ){
53 return hadEnergyVec()[ slice ];
54 }
55 return 0;
56 }
57
59 {
60 return emErrorVec()[ peak() ];
61 }
62
64 {
65 return hadErrorVec()[ peak() ];
66 }
67
68 int CPMTower_v1::emSliceError(int slice) const
69 {
70 if( slice >= 0 && slice < (int)emErrorVec().size() ){
71 return emErrorVec()[ slice ];
72 }
73 return 0;
74 }
75
76 int CPMTower_v1::hadSliceError(int slice) const
77 {
78 if( slice >= 0 && slice < (int)hadErrorVec().size() ){
79 return hadErrorVec()[ slice ];
80 }
81 return 0;
82 }
83
84} // namespace xAOD
Scalar eta() const
pseudorapidity method
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
AuxElement()
Default constructor.
Description of CPMTower_v1.
Definition CPMTower_v1.h:23
int emSliceEnergy(int slice) const
get emEnergy for emEnergyVec[slice] - time slice for arbitary slice
const std::vector< int > & emEnergyVec() const
get emEnergyVec - emEnergy for all time slices
int emEnergy() const
get emEnergy for emEnergyVec[peak] - time slice that (hopefully) contains the collision
int hadError() const
const std::vector< int > & hadErrorVec() const
get hadErrorVec - hadError for all time slices
const std::vector< int > & emErrorVec() const
get emErrorVec - emError for all time slices
int hadSliceEnergy(int slice) const
get hadEnergy for hadEnergyVec[slice] - time slice for arbitary slice
int emError() const
int emSliceError(int slice) const
get emError for emErrorVec[slice] - time slice for arbitary slice
int peak() const
int hadSliceError(int slice) const
get hadError for hadErrorVec[slice] - time slice for arbitary slice
const std::vector< int > & hadEnergyVec() const
get hadEnergyVec - hadEnergy for all time slices
int hadEnergy() const
get hadEnergy for hadEnergyVec[peak] - time slice that (hopefully) contains the collision
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setRawEt setRawPhi int