ATLAS Offline Software
TowerFillerTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6  * File: TowerFillerTool.cxx
7  * Author: stephen
8  *
9  * Created on August 26, 2011, 1:36 PM
10  */
11 
12 #include "TowerFillerTool.h"
14 
15 namespace D3PD{
16 
18  const std::string& name,
19  const IInterface* parent): BlockFillerTool<CaloTower>(type,name,parent)
20 {
21  m_SaveConstituents = false;
22  declareProperty("SaveNCellConstituents",m_SaveConstituents=true);
23  TowerFillerTool::book().ignore();
24 }
25 
26 
28  if (m_SaveConstituents) {
29  CHECK(addVariable("tower_nCaloCells",m_nCaloCells));
30  CHECK(addVariable("tower_CellWeights",m_cellWeights));
31  CHECK(addVariable("tower_statusWord",m_statWord));
32  }
33  else {
34  CHECK(addVariable("tower_pT",m_pT));
35  CHECK(addVariable("tower_eta",m_eta));
36  CHECK(addVariable("tower_phi",m_phi));
37  CHECK(addVariable("tower_E",m_E));
38  }
39  return StatusCode::SUCCESS;
40 }
41 
42 
43 
45  if(m_SaveConstituents){
46  *m_nCaloCells=p.getNumberOfCells();
47  *m_statWord=p.getRecoStatus().getStatusWord();
49  for(;it!=p.cell_end();++it){
50  double weight=p.getCellWeight(it);
51  m_cellWeights->push_back(weight);
52  }
53  }
54  else{
55  *m_pT=p.pt();
56  *m_eta=p.eta();
57  *m_phi=p.phi();
58  *m_E=p.energy();
59  }
60 
61  return StatusCode::SUCCESS;
62 }
63 
64 }
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
D3PD::TowerFillerTool::m_phi
float * m_phi
Definition: TowerFillerTool.h:61
D3PD::TowerFillerTool::m_eta
float * m_eta
Definition: TowerFillerTool.h:59
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TowerFillerTool.h
D3PD::TowerFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition: TowerFillerTool.cxx:27
D3PD::TowerFillerTool::m_E
float * m_E
Definition: TowerFillerTool.h:63
D3PD::AddVariable::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Definition: AddVariable.cxx:85
D3PD::TowerFillerTool::m_SaveConstituents
bool m_SaveConstituents
Definition: TowerFillerTool.h:47
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
D3PD::TowerFillerTool::m_cellWeights
std::vector< float > * m_cellWeights
Definition: TowerFillerTool.h:50
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition: BlockFillerTool.h:68
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::TowerFillerTool::m_nCaloCells
unsigned int * m_nCaloCells
Definition: TowerFillerTool.h:52
CaloTower
Data class for calorimeter cell towers.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTower.h:55
D3PD::TowerFillerTool::m_pT
float * m_pT
Definition: TowerFillerTool.h:57
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
Navigable
Navigable template generalization to handle navigation.
Definition: Navigable.h:93
D3PD::TowerFillerTool::fill
virtual StatusCode fill(const CaloTower &p)
Fill one block — type-safe version.
Definition: TowerFillerTool.cxx:44
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
D3PD::TowerFillerTool::m_statWord
unsigned int * m_statWord
Definition: TowerFillerTool.h:54
D3PD::TowerFillerTool::TowerFillerTool
TowerFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TowerFillerTool.cxx:17