ATLAS Offline Software
TileL2FillerTool.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: TileL2FillerTool.cxx
7  * Author: Stephen Cole <stephen.cole@cern.ch>
8  *
9  * Created on January 12, 2012, 4:50 PM
10  */
11 
12 #include "TileL2FillerTool.h"
13 #include "GaudiKernel/MsgStream.h"
14 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/StatusCode.h"
17 
18 using namespace std;
19 
20 namespace D3PD{
21 
22 TileL2FillerTool::TileL2FillerTool(const string& type,
23  const string& name, const IInterface* parent):
25 {
26  m_saveL2 = true;
27  m_saveMuROD = true;
28  TileL2FillerTool::book().ignore(); // Avoid coverity warnings
29 
30  declareProperty("SaveL2Details", m_saveL2 = true);
31  declareProperty("SaveMuRODDetails", m_saveMuROD = false);
32 }
33 
35 }
36 
38  if(m_saveL2){
39  CHECK(addVariable("Ex",m_Ex));
40  CHECK(addVariable("Ey",m_Ey));
41  CHECK(addVariable("Ez",m_Ez));
42  CHECK(addVariable("ScalarEt",m_sumEt));
43  CHECK(addVariable("ScalarEz",m_sumEz));
44  CHECK(addVariable("ScalarE",m_sumE));
45  }
46  if(m_saveMuROD){
47  CHECK(addVariable("ROD_Eta",m_eta));
48  CHECK(addVariable("ROD_Phi",m_phi));
49  CHECK(addVariable("ROD_EnergyDep0",m_energy0));
50  CHECK(addVariable("ROD_EnergyDep1",m_energy1));
51  CHECK(addVariable("ROD_EnergyDep2",m_energy2));
52  CHECK(addVariable("ROD_EnergyDepNeighbors",m_energy3));
53  CHECK(addVariable("ROD_Quality",m_quality));
54  }
55 
56  return StatusCode::SUCCESS;
57 }
58 
60  if(m_saveL2){
61  *m_Ex=p.Ex();
62  *m_Ey=p.Ey();
63  *m_Ez=p.Ez();
64  *m_sumEt=p.sumEt();
65  *m_sumEz=p.sumEz();
66  *m_sumE=p.sumE();
67  }
68  if(m_saveMuROD){
69  for(size_t i=0;i<p.NMuons();++i){
70  m_eta->push_back(p.eta(i));
71  m_phi->push_back(p.phi(i));
72  m_energy0->push_back(p.enemu0(i));
73  m_energy1->push_back(p.enemu1(i));
74  m_energy2->push_back(p.enemu2(i));
75  m_quality->push_back(p.qual(i));
76  }
77  }
78 
79  return StatusCode::SUCCESS;
80 }
81 
82 }
D3PD::TileL2FillerTool::m_sumEt
float * m_sumEt
Definition: TileL2FillerTool.h:56
D3PD::TileL2FillerTool::m_sumE
float * m_sumE
Definition: TileL2FillerTool.h:58
D3PD::TileL2FillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition: TileL2FillerTool.cxx:37
D3PD::TileL2FillerTool::m_eta
std::vector< float > * m_eta
Definition: TileL2FillerTool.h:60
D3PD::TileL2FillerTool::m_energy1
std::vector< float > * m_energy1
Definition: TileL2FillerTool.h:63
D3PD::TileL2FillerTool::m_Ez
float * m_Ez
Definition: TileL2FillerTool.h:55
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::TileL2FillerTool::m_Ex
float * m_Ex
Definition: TileL2FillerTool.h:53
D3PD::TileL2FillerTool::m_quality
std::vector< unsigned int > * m_quality
Definition: TileL2FillerTool.h:66
D3PD::TileL2FillerTool::m_energy3
std::vector< float > * m_energy3
Definition: TileL2FillerTool.h:65
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
D3PD::TileL2FillerTool::m_saveMuROD
bool m_saveMuROD
Definition: TileL2FillerTool.h:50
lumiFormat.i
int i
Definition: lumiFormat.py:85
D3PD::TileL2FillerTool::m_energy0
std::vector< float > * m_energy0
Definition: TileL2FillerTool.h:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileL2FillerTool.h
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::TileL2FillerTool::m_sumEz
float * m_sumEz
Definition: TileL2FillerTool.h:57
D3PD::TileL2FillerTool::m_Ey
float * m_Ey
Definition: TileL2FillerTool.h:54
D3PD::TileL2FillerTool::m_energy2
std::vector< float > * m_energy2
Definition: TileL2FillerTool.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
D3PD::TileL2FillerTool::m_saveL2
bool m_saveL2
Definition: TileL2FillerTool.h:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::TileL2FillerTool::m_phi
std::vector< float > * m_phi
Definition: TileL2FillerTool.h:61
D3PD::TileL2FillerTool::fill
virtual StatusCode fill(const TileL2 &p)
Fill one block — type-safe version.
Definition: TileL2FillerTool.cxx:59
TileL2
Class to store TileMuId and Et quantities computed at the TileCal ROD DSPs.
Definition: TileL2.h:33
D3PD::TileL2FillerTool::~TileL2FillerTool
virtual ~TileL2FillerTool()
Definition: TileL2FillerTool.cxx:34