ATLAS Offline Software
Loading...
Searching...
No Matches
CMMCPHits_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: CMMCPHits_v1.cxx 638578 2015-01-09 17:00:15Z morrisj $
6
7// EDM includes(s):
9
10// Local include(s):
12
13namespace xAOD{
14
19
21 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CMMCPHits_v1, int, dataID, setDataID )
23 AUXSTORE_OBJECT_SETTER_AND_GETTER( CMMCPHits_v1, std::vector<unsigned int>, hitsVec0, setHitsVec0 )
24 AUXSTORE_OBJECT_SETTER_AND_GETTER( CMMCPHits_v1, std::vector<unsigned int>, hitsVec1, setHitsVec1 )
25 AUXSTORE_OBJECT_SETTER_AND_GETTER( CMMCPHits_v1, std::vector<int>, errorVec0, setErrorVec0 )
26 AUXSTORE_OBJECT_SETTER_AND_GETTER( CMMCPHits_v1, std::vector<int>, errorVec1, setErrorVec1 )
27
28 void CMMCPHits_v1::addHits(const std::vector<unsigned int>& hits0,
29 const std::vector<unsigned int>& hits1,
30 const std::vector<int>& error0,
31 const std::vector<int>& error1)
32 {
33 setHitsVec0( hits0 );
34 setHitsVec1( hits1 );
37 }
38
39 unsigned int CMMCPHits_v1::hitWord0() const
40 {
41 return hitsVec0()[ peak() ];
42 }
43
44 unsigned int CMMCPHits_v1::hitWord1() const
45 {
46 return hitsVec1()[ peak() ];
47 }
48
50 {
51 return errorVec0()[ peak() ];
52 }
53
55 {
56 return errorVec1()[ peak() ];
57 }
58
59} // namespace xAOD
#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 CMMCPHits_v1.
void setHitsVec0(const std::vector< unsigned int > &)
set hitsVec0 - hits for all time slices
const std::vector< int > & errorVec1() const
get errorVec1 - errors for all time slices
int peak() const
get peak
int error0() const
get error for errorVec0[peak] - time slice that (hopefully) contains the collision
void setErrorVec0(const std::vector< int > &)
set errorVec0 - errors for all time slices
const std::vector< unsigned int > & hitsVec0() const
get hitsVec0 - hits for all time slices
void setErrorVec1(const std::vector< int > &)
set errorVec1 - errors for all time slices
unsigned int hitWord0() const
get hit word0 for hitsVec0[peak] - time slice that (hopefully) contains the collision
unsigned int hitWord1() const
get hit word1 for hitsVec1[peak] - time slice that (hopefully) contains the collision
int error1() const
get error for errorVec1[peak] - time slice that (hopefully) contains the collision
void addHits(const std::vector< unsigned int > &hits0, const std::vector< unsigned int > &hits1, const std::vector< int > &error0, const std::vector< int > &error1)
add hits. Internally calls setHitsVecX(hitsX) and setErrorVecX(errorX)
const std::vector< unsigned int > & hitsVec1() const
get hitsVec1 - hits for all time slices
const std::vector< int > & errorVec0() const
get errorVec0 - errors for all time slices
void setHitsVec1(const std::vector< unsigned int > &)
set hitsVec1 - hits for all time slices
Forward declaration.
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.