ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
DerivationFramework::MbtsToVectorsTool Class Reference

#include <MbtsToVectorsTool.h>

Inheritance diagram for DerivationFramework::MbtsToVectorsTool:
Collaboration diagram for DerivationFramework::MbtsToVectorsTool:

Public Member Functions

 MbtsToVectorsTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor with parameters: More...
 
virtual StatusCode addBranches (const EventContext &ctx) const override final
 
virtual StatusCode initialize () override final
 

Private Attributes

Gaudi::Property< std::string > m_prefix {this, "Prefix", "mbts_"}
 
Gaudi::Property< bool > m_saveEtaPhi {this, "SaveEtaPhiInfo", true}
 
SG::ReadHandleKey< TileCellContainerm_cellContainerKey {this, "CellContainer", "MBTSContainer"}
 
SG::WriteHandleKey< std::vector< float > > m_energyKey {this, "Energy", "energy"}
 
SG::WriteHandleKey< std::vector< float > > m_timeKey {this, "Time", "time"}
 
SG::WriteHandleKey< std::vector< float > > m_etaKey {this, "Eta", "eta"}
 
SG::WriteHandleKey< std::vector< float > > m_phiKey {this, "Phi", "phi"}
 
SG::WriteHandleKey< std::vector< int > > m_qualityKey {this, "Quality", "quality"}
 
SG::WriteHandleKey< std::vector< int > > m_typeKey {this, "Type", "type"}
 
SG::WriteHandleKey< std::vector< int > > m_moduleKey {this, "Module", "module"}
 
SG::WriteHandleKey< std::vector< int > > m_channelKey {this, "Channel", "channel"}
 
const TileTBIDm_tileTBID = nullptr
 

Static Private Attributes

static const unsigned int MAX_MBTS_COUNTER {32}
 

Detailed Description

Definition at line 31 of file MbtsToVectorsTool.h.

Constructor & Destructor Documentation

◆ MbtsToVectorsTool()

DerivationFramework::MbtsToVectorsTool::MbtsToVectorsTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructor with parameters:

Definition at line 25 of file MbtsToVectorsTool.cxx.

26  : base_class ( type, name, parent )
27  {
28  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::MbtsToVectorsTool::addBranches ( const EventContext &  ctx) const
finaloverridevirtual

Definition at line 63 of file MbtsToVectorsTool.cxx.

63  {
64 
65 
67  ATH_CHECK( energy.record(std::make_unique<std::vector<float> >()) );
68  energy->reserve(MAX_MBTS_COUNTER);
69 
71  ATH_CHECK( time.record(std::make_unique<std::vector<float> >()) );
72  time->reserve(MAX_MBTS_COUNTER);
73 
75  ATH_CHECK( quality.record(std::make_unique<std::vector<int> >()) );
76  quality->reserve(MAX_MBTS_COUNTER);
77 
79  ATH_CHECK( module.record(std::make_unique<std::vector<int> >()) );
80  module->reserve(MAX_MBTS_COUNTER);
81 
83  ATH_CHECK( type.record(std::make_unique<std::vector<int> >()) );
84  type->reserve(MAX_MBTS_COUNTER);
85 
87  ATH_CHECK( channel.record(std::make_unique<std::vector<int> >()) );
88  channel->reserve(MAX_MBTS_COUNTER);
89 
91  ATH_CHECK( tileCells.isValid() );
92 
93  if (m_saveEtaPhi) {
95  ATH_CHECK( eta.record(std::make_unique<std::vector<float> >()) );
96  eta->reserve(MAX_MBTS_COUNTER);
97 
99  ATH_CHECK( phi.record(std::make_unique<std::vector<float> >()) );
100  phi->reserve(MAX_MBTS_COUNTER);
101 
102  for ( const TileCell* cell : *tileCells ){
103  energy->push_back( cell->energy() );
104  eta->push_back( cell->eta() );
105  phi->push_back( cell->phi() );
106  time->push_back( cell->time() );
107  quality->push_back(cell->quality() );
108  module->push_back(m_tileTBID->module( cell->ID() ) );
109  type->push_back(m_tileTBID->type( cell->ID() ) );
110  channel->push_back(m_tileTBID->channel( cell->ID() ) );
111  }
112 
113  } else {
114 
115  for ( const TileCell* cell : *tileCells ){
116  energy->push_back( cell->energy() );
117  time->push_back( cell->time() );
118  quality->push_back(cell->quality() );
119  module->push_back(m_tileTBID->module( cell->ID() ) );
120  type->push_back(m_tileTBID->type( cell->ID() ) );
121  channel->push_back(m_tileTBID->channel( cell->ID() ) );
122  }
123 
124  }
125 
126  return StatusCode::SUCCESS;
127  }

◆ initialize()

StatusCode DerivationFramework::MbtsToVectorsTool::initialize ( )
finaloverridevirtual

Definition at line 30 of file MbtsToVectorsTool.cxx.

30  {
31 
32  ATH_CHECK( m_cellContainerKey.initialize() );
33 
36 
39 
42 
45 
48 
51 
54 
57 
59 
60  return StatusCode::SUCCESS;
61  }

Member Data Documentation

◆ m_cellContainerKey

SG::ReadHandleKey<TileCellContainer> DerivationFramework::MbtsToVectorsTool::m_cellContainerKey {this, "CellContainer", "MBTSContainer"}
private

Definition at line 47 of file MbtsToVectorsTool.h.

◆ m_channelKey

SG::WriteHandleKey<std::vector<int> > DerivationFramework::MbtsToVectorsTool::m_channelKey {this, "Channel", "channel"}
private

Definition at line 56 of file MbtsToVectorsTool.h.

◆ m_energyKey

SG::WriteHandleKey<std::vector<float> > DerivationFramework::MbtsToVectorsTool::m_energyKey {this, "Energy", "energy"}
private

Definition at line 49 of file MbtsToVectorsTool.h.

◆ m_etaKey

SG::WriteHandleKey<std::vector<float> > DerivationFramework::MbtsToVectorsTool::m_etaKey {this, "Eta", "eta"}
private

Definition at line 51 of file MbtsToVectorsTool.h.

◆ m_moduleKey

SG::WriteHandleKey<std::vector<int> > DerivationFramework::MbtsToVectorsTool::m_moduleKey {this, "Module", "module"}
private

Definition at line 55 of file MbtsToVectorsTool.h.

◆ m_phiKey

SG::WriteHandleKey<std::vector<float> > DerivationFramework::MbtsToVectorsTool::m_phiKey {this, "Phi", "phi"}
private

Definition at line 52 of file MbtsToVectorsTool.h.

◆ m_prefix

Gaudi::Property<std::string> DerivationFramework::MbtsToVectorsTool::m_prefix {this, "Prefix", "mbts_"}
private

Definition at line 44 of file MbtsToVectorsTool.h.

◆ m_qualityKey

SG::WriteHandleKey<std::vector<int> > DerivationFramework::MbtsToVectorsTool::m_qualityKey {this, "Quality", "quality"}
private

Definition at line 53 of file MbtsToVectorsTool.h.

◆ m_saveEtaPhi

Gaudi::Property<bool> DerivationFramework::MbtsToVectorsTool::m_saveEtaPhi {this, "SaveEtaPhiInfo", true}
private

Definition at line 45 of file MbtsToVectorsTool.h.

◆ m_tileTBID

const TileTBID* DerivationFramework::MbtsToVectorsTool::m_tileTBID = nullptr
private

Definition at line 58 of file MbtsToVectorsTool.h.

◆ m_timeKey

SG::WriteHandleKey<std::vector<float> > DerivationFramework::MbtsToVectorsTool::m_timeKey {this, "Time", "time"}
private

Definition at line 50 of file MbtsToVectorsTool.h.

◆ m_typeKey

SG::WriteHandleKey<std::vector<int> > DerivationFramework::MbtsToVectorsTool::m_typeKey {this, "Type", "type"}
private

Definition at line 54 of file MbtsToVectorsTool.h.

◆ MAX_MBTS_COUNTER

const unsigned int DerivationFramework::MbtsToVectorsTool::MAX_MBTS_COUNTER {32}
staticprivate

Definition at line 60 of file MbtsToVectorsTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileCell
Definition: TileCell.h:57
DerivationFramework::MbtsToVectorsTool::m_timeKey
SG::WriteHandleKey< std::vector< float > > m_timeKey
Definition: MbtsToVectorsTool.h:50
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
DerivationFramework::MbtsToVectorsTool::m_typeKey
SG::WriteHandleKey< std::vector< int > > m_typeKey
Definition: MbtsToVectorsTool.h:54
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
DerivationFramework::MbtsToVectorsTool::m_qualityKey
SG::WriteHandleKey< std::vector< int > > m_qualityKey
Definition: MbtsToVectorsTool.h:53
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
TileTBID::type
int type(const Identifier &id) const
extract type field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:146
DerivationFramework::MbtsToVectorsTool::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: MbtsToVectorsTool.h:44
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
TileTBID::module
int module(const Identifier &id) const
extract module field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:150
DerivationFramework::MbtsToVectorsTool::m_etaKey
SG::WriteHandleKey< std::vector< float > > m_etaKey
Definition: MbtsToVectorsTool.h:51
python.PyAthena.module
module
Definition: PyAthena.py:131
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
DerivationFramework::MbtsToVectorsTool::MAX_MBTS_COUNTER
static const unsigned int MAX_MBTS_COUNTER
Definition: MbtsToVectorsTool.h:60
DerivationFramework::MbtsToVectorsTool::m_saveEtaPhi
Gaudi::Property< bool > m_saveEtaPhi
Definition: MbtsToVectorsTool.h:45
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DerivationFramework::MbtsToVectorsTool::m_tileTBID
const TileTBID * m_tileTBID
Definition: MbtsToVectorsTool.h:58
TileTBID::channel
int channel(const Identifier &id) const
extract channel field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:154
DerivationFramework::MbtsToVectorsTool::m_energyKey
SG::WriteHandleKey< std::vector< float > > m_energyKey
Definition: MbtsToVectorsTool.h:49
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
DerivationFramework::MbtsToVectorsTool::m_channelKey
SG::WriteHandleKey< std::vector< int > > m_channelKey
Definition: MbtsToVectorsTool.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
DerivationFramework::MbtsToVectorsTool::m_cellContainerKey
SG::ReadHandleKey< TileCellContainer > m_cellContainerKey
Definition: MbtsToVectorsTool.h:47
DerivationFramework::MbtsToVectorsTool::m_moduleKey
SG::WriteHandleKey< std::vector< int > > m_moduleKey
Definition: MbtsToVectorsTool.h:55
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.TrackLeptonConfig.quality
quality
Definition: TrackLeptonConfig.py:16
DerivationFramework::MbtsToVectorsTool::m_phiKey
SG::WriteHandleKey< std::vector< float > > m_phiKey
Definition: MbtsToVectorsTool.h:52