ATLAS Offline Software
Loading...
Searching...
No Matches
D3PD::TileCellFillerTool Class Reference

#include <TileCellFillerTool.h>

Inheritance diagram for D3PD::TileCellFillerTool:
Collaboration diagram for D3PD::TileCellFillerTool:

Public Member Functions

 TileCellFillerTool (const std::string &type, const std::string &name, const IInterface *parent)
 ~TileCellFillerTool ()
virtual StatusCode initialize ()
virtual StatusCode book ()
 Declare tuple variables.
virtual StatusCode fill (const CaloCell &p)
 Fill one block — type-safe version.
virtual StatusCode finalize ()
 BlockFillerToolImpl (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Gaudi tool constructor.
virtual StatusCode configureD3PD (IAddVariable *tree, const std::type_info &ti)
 Configure during initialization: type-check.
StatusCode configureD3PD (IAddVariable *tree)
 Configure the parent tree.
virtual StatusCode fillUntyped (const void *p, bool again=false)
 Fill one block.
virtual StatusCode fillAgain (const CaloCell &p)
 Fill one block, after AGAIN has been returned (type-safe).
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.
StatusCode addVariable (const std::string &name, CaloCell *&ptr, const std::string &docstring="")
 Make the template implementation from IAddVariable visible.
StatusCode addVariable (const std::string &name, CaloCell *&ptr, const std::string &docstring, const U &defval)
 Make the template implementation from IAddVariable visible.
virtual StatusCode addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)
 Add a variable to the tuple.
StatusCode addDimensionedVariable (const std::string &name, CaloCell *&ptr, const std::string &dim, const std::string &docstring="")
 Add a variable to the tuple.
StatusCode addDimensionedVariable (const std::string &name, CaloCell *&ptr, const std::string &dim, const std::string &docstring, const U &defval)
 Add a variable to the tuple.

Protected Member Functions

StatusCode configureImpl (IAddVariable *tree, const std::type_info &ti, const std::type_info &fill_ti)
 Configure during initialization: type-check.
StatusCode configureImpl (IAddVariable *tree, const std::type_info &ti, const std::vector< const std::type_info * > &tis, size_t &which)
 Configure during initialization: type-check.
StatusCode convert (void const *&p) const
 Do type conversion.

Protected Attributes

ObjectMetadata m_metadata
 Metadata about the variables created by this object.

Private Attributes

short m_LevelOfDetails
std::string m_standalone
short m_trackType
std::string m_muonContainerName
float * m_cellEnergy
float * m_cellEt
int m_filterConfiguration
float * m_pmt1Energy
float * m_pmt2Energy
float * m_pmt1Time
float * m_pmt2Time
unsigned short * m_pmt1Quality
unsigned short * m_pmt2Quality
unsigned short * m_pmt1Qbit
unsigned short * m_pmt2Qbit
bool * m_pmt1Bad
bool * m_pmt2Bad
short * m_pmt1Gain
short * m_pmt2Gain
short * m_pmt1Ros
short * m_pmt2Ros
short * m_pmt1Drawer
short * m_pmt2Drawer
short * m_pmt1Channel
short * m_pmt2Channel
float * m_cellEta
float * m_cellPhi
float * m_cellSinTh
float * m_cellCosTh
float * m_cellCotTh
float * m_cellX
float * m_cellY
float * m_cellZ
float * m_cellR
float * m_celldX
float * m_celldY
float * m_celldZ
float * m_celldR
float * m_cellV
float * m_celldPhi
float * m_celldEta
unsigned short * m_muN
std::vector< float > * m_to_muon_dx
std::vector< float > * m_to_muon_dy
std::vector< float > * m_to_muon_dz
std::vector< float > * m_to_muon_dEta
std::vector< float > * m_to_muon_dPhi
std::vector< short > * m_mutype
std::vector< short > * m_muonAuthor
std::vector< float > * m_muptcone40
std::vector< float > * m_mularcone40
std::vector< float > * m_mup
std::vector< short > * m_muNsiliconhits
std::vector< float > * m_muonX
std::vector< float > * m_muonY
std::vector< float > * m_muonZ
std::vector< float > * m_muonEta
std::vector< float > * m_muonPhi
std::vector< float > * m_dx
std::vector< float > * m_dEdx
int * m_cellGain
bool * m_badCell
float * m_time
uint16_t * m_quality
unsigned int * m_samplingID
float * m_subcalo
ToolHandle< ITrackToolsm_trackInCalo
const TileIDm_tileID
const TileHWIDm_tileHWID
short * m_side
short * m_section
short * m_module
short * m_tower
short * m_sample
short * m_eta_index
std::string m_prefix
 Property: the variable prefix for this block.
std::string m_suffix
 Property: the variable prefix for this block.
std::string m_blockName
 Property: the name of this block.
TypeConverter m_converter
 Helper to do type conversions.
IAddVariablem_tree
 Reference to the block name.

Static Private Attributes

static const std::string s_emptyString
 Used to provide a default value for blockName.

Detailed Description

Definition at line 44 of file TileCellFillerTool.h.

Constructor & Destructor Documentation

◆ TileCellFillerTool()

D3PD::TileCellFillerTool::TileCellFillerTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 26 of file TileCellFillerTool.cxx.

26 :
27BlockFillerTool<CaloCell> (type, name, parent),
28m_trackInCalo("TrackInCaloTools/extrapolMuonInCaloTool"){
29//=======================================================================================================================
30
31 // TRACK EXTRAPOLATOR TOOL
32 declareProperty("TrackTools", m_trackInCalo);
33 declareProperty("LevelOfDetails", m_LevelOfDetails = 1);
34 declareProperty("TryStandAloneMuons", m_standalone = "no");
35 declareProperty("FilterConfiguration", m_filterConfiguration = 0);
36 declareProperty("TrackType", m_trackType = 0);
37 declareProperty("MuonContainerName", m_muonContainerName="Muons");
38
39 TileCellFillerTool::book().ignore(); // AVOID COVERITY WARNINGS
40
41} // TileCellFillerTool::TileCellFillerTool
virtual StatusCode book()
Declare tuple variables.
ToolHandle< ITrackTools > m_trackInCalo

◆ ~TileCellFillerTool()

D3PD::TileCellFillerTool::~TileCellFillerTool ( )
inline

Definition at line 50 of file TileCellFillerTool.h.

50{;};

Member Function Documentation

◆ addDimensionedVariable() [1/3]

StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string & name,
CaloCell *& ptr,
const std::string & dim,
const std::string & docstring,
const U & defval )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [2/3]

StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string & name,
CaloCell *& ptr,
const std::string & dim,
const std::string & docstring = "" )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [3/3]

StatusCode D3PD::AddVariable::addDimensionedVariable ( const std::string & name,
const std::type_info & ti,
void *& ptr,
const std::string & dim,
const std::string & docstring = "",
const void * defval = 0 )
virtualinherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

Definition at line 119 of file AddVariable.cxx.

129{
130 if (!m_tree) {
131 // Called from constructor --- just initialize pointer.
132 ptr = 0;
133 return StatusCode::SUCCESS;
134 }
135
137 ti, ptr, dim,
138 docstring, defval ) );
140 ti, ptr, dim,
142}
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addDimensionedVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Type-safe wrapper for block filler tools.

◆ addVariable() [1/3]

StatusCode D3PD::IAddVariable::addVariable ( const std::string & name,
CaloCell *& ptr,
const std::string & docstring,
const U & defval )
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [2/3]

StatusCode D3PD::IAddVariable::addVariable ( const std::string & name,
CaloCell *& ptr,
const std::string & docstring = "" )
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [3/3]

StatusCode D3PD::AddVariable::addVariable ( const std::string & name,
const std::type_info & ti,
void *& ptr,
const std::string & docstring = "",
const void * defval = 0 )
virtualinherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

Definition at line 93 of file AddVariable.cxx.

90{
91 if (!m_tree) {
92 // Called from constructor --- just initialize pointer.
93 ptr = 0;
95 }
96
98 ti, ptr, docstring, defval ) );
101}
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.

◆ BlockFillerToolImpl()

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

Standard Gaudi tool constructor.

Parameters
typeThe name of the tool type.
nameThe tool name.
parentThe tool's Gaudi parent.

◆ book()

StatusCode D3PD::TileCellFillerTool::book ( )
virtual

Declare tuple variables.

This is called at the start of the first event.

Implements D3PD::BlockFillerTool< CaloCell >.

Definition at line 75 of file TileCellFillerTool.cxx.

75 {
76//========================================
77 if(m_LevelOfDetails > 0){
78 // CELL ENERGY AND ETA/PHI
80 CHECK( addVariable ("Et", m_cellEt));
81 CHECK( addVariable ("eta", m_cellEta));
82 CHECK( addVariable ("phi", m_cellPhi));
83 } // IF
84
85 if(m_LevelOfDetails > 1){
86 CHECK( addVariable ("gain", m_cellGain));
87 CHECK( addVariable ("badCell", m_badCell));
88 CHECK( addVariable ("samplingID", m_samplingID));
89 CHECK( addVariable ("time", m_time));
90 CHECK( addVariable ("quality", m_quality));
91 CHECK( addVariable ("subcalo", m_subcalo));
92 } // IF
93
94 if(m_LevelOfDetails > 2){
95 // GLOBAL CELL POSITIONING AND QUALITY
96 CHECK( addVariable ("sinTh", m_cellSinTh));
97 CHECK( addVariable ("cosTh", m_cellCosTh));
98 CHECK( addVariable ("cotTh", m_cellCotTh));
99 CHECK( addVariable ("x", m_cellX));
100 CHECK( addVariable ("y", m_cellY));
101 CHECK( addVariable ("z", m_cellZ));
102
103 // CELL DIMENSIONS
104 CHECK( addVariable ("R", m_cellR));
105 CHECK( addVariable ("dR", m_celldR));
106 CHECK( addVariable ("dx", m_celldX));
107 CHECK( addVariable ("dy", m_celldY));
108 CHECK( addVariable ("dz", m_celldZ));
109 CHECK( addVariable ("V", m_cellV));
110 CHECK( addVariable ("dPhi", m_celldPhi));
111 CHECK( addVariable ("dEta", m_celldEta));
112
113 // TILECAL CELL POSITIONING
114 CHECK( addVariable ("side", m_side , "",-2));
115 CHECK( addVariable ("section", m_section , "",-2));
116 CHECK( addVariable ("module", m_module , "",-2));
117 CHECK( addVariable ("tower", m_tower , "",-2));
118 CHECK( addVariable ("sample", m_sample , "",-2));
119 CHECK( addVariable ("eta_index", m_eta_index, "",-2));
120 } // IF
121
122 if(m_LevelOfDetails > 3){
123 // PMT INFORMATION
124 CHECK( addVariable ("PMT1_energy", m_pmt1Energy, "",0.));
125 CHECK( addVariable ("PMT1_time", m_pmt1Time, "",0.));
126 CHECK( addVariable ("PMT1_quality", m_pmt1Quality, "",0));
127 CHECK( addVariable ("PMT1_qbit", m_pmt1Qbit, "",0));
128 CHECK( addVariable ("PMT1_bad", m_pmt1Bad, "",false));
129 CHECK( addVariable ("PMT1_gain", m_pmt1Gain, "",0));
130 CHECK( addVariable ("PMT1_ros", m_pmt1Ros, "",-1));
131 CHECK( addVariable ("PMT1_drawer", m_pmt1Drawer, "",-1));
132 CHECK( addVariable ("PMT1_channel", m_pmt1Channel, "",-1));
133
134 CHECK( addVariable ("PMT2_energy", m_pmt2Energy, "",0.));
135 CHECK( addVariable ("PMT2_time", m_pmt2Time, "",0.));
136 CHECK( addVariable ("PMT2_quality", m_pmt2Quality, "",0));
137 CHECK( addVariable ("PMT2_qbit", m_pmt2Qbit, "",0));
138 CHECK( addVariable ("PMT2_bad", m_pmt2Bad, "",false));
139 CHECK( addVariable ("PMT2_gain", m_pmt2Gain, "",0));
140 CHECK( addVariable ("PMT2_ros", m_pmt2Ros, "",-1));
141 CHECK( addVariable ("PMT2_drawer", m_pmt2Drawer, "",-1));
142 CHECK( addVariable ("PMT2_channel", m_pmt2Channel, "",-1));
143 } // IF
144
145 if(m_LevelOfDetails > 4){
146 // PATH LENGTH AND CELL RESPONSE
147 CHECK( addVariable ("muon_N", m_muN, "", 0));
148 CHECK( addVariable ("muon_dx", m_dx));
149 CHECK( addVariable ("muon_dEdx", m_dEdx));
150 CHECK( addVariable ("muon_type", m_mutype));
151 CHECK( addVariable ("muon_author", m_muonAuthor));
152 CHECK( addVariable ("muon_ptcone40", m_muptcone40));
153 CHECK( addVariable ("muon_larcone40", m_mularcone40));
154 CHECK( addVariable ("muon_p", m_mup));
155 CHECK( addVariable ("muon_Nsiliconhits", m_muNsiliconhits));
156 CHECK( addVariable ("muon_x", m_muonX));
157 CHECK( addVariable ("muon_y", m_muonY));
158 CHECK( addVariable ("muon_z", m_muonZ));
159 CHECK( addVariable ("muon_phi", m_muonPhi));
160 CHECK( addVariable ("muon_eta", m_muonEta));
161 CHECK( addVariable ("to_muon_dx", m_to_muon_dx));
162 CHECK( addVariable ("to_muon_dy", m_to_muon_dy));
163 CHECK( addVariable ("to_muon_dz", m_to_muon_dz));
164 CHECK( addVariable ("to_muon_dPhi", m_to_muon_dPhi));
165 CHECK( addVariable ("to_muon_dEta", m_to_muon_dEta));
166 } // IF
167
168 return StatusCode::SUCCESS;
169} // TileCellFillerTool::book
StatusCode addVariable(const std::string &name, T *&ptr, const std::string &docstring="")
Add a variable to the tuple.
std::vector< float > * m_muonX
std::vector< float > * m_muonPhi
std::vector< float > * m_to_muon_dEta
std::vector< float > * m_to_muon_dz
std::vector< float > * m_muonY
std::vector< float > * m_dEdx
std::vector< float > * m_muptcone40
std::vector< short > * m_muonAuthor
std::vector< float > * m_mularcone40
std::vector< float > * m_mup
std::vector< float > * m_dx
std::vector< short > * m_mutype
std::vector< short > * m_muNsiliconhits
std::vector< float > * m_muonZ
std::vector< float > * m_to_muon_dy
std::vector< float > * m_muonEta
std::vector< float > * m_to_muon_dPhi
std::vector< float > * m_to_muon_dx

◆ configureD3PD() [1/2]

StatusCode D3PD::AddVariable::configureD3PD ( IAddVariable * tree)
inherited

Configure the parent tree.

Parameters
treeThe parent IAddVariable instance.

Definition at line 69 of file AddVariable.cxx.

62{
63 m_tree = tree;
64 m_metadata.clear();
66}

◆ configureD3PD() [2/2]

virtual StatusCode D3PD::BlockFillerTool< CaloCell >::configureD3PD ( IAddVariable * tree,
const std::type_info & ti )
virtualinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.

configureD3PD should check that the type of the object coming as input is compatible with what it expects, and raise an error otherwise.

◆ configureImpl() [1/2]

StatusCode D3PD::BlockFillerToolImpl::configureImpl ( IAddVariable * tree,
const std::type_info & ti,
const std::type_info & fill_ti )
protectedinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.
fill_tiis the type of object that the user code will expect.

This is the common implementation for the configureD3PD method of IBlockFillerTool. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.

Definition at line 70 of file BlockFillerToolImpl.cxx.

58{
60 CHECK( m_converter.init (ti, fill_ti) );
61
63}

◆ configureImpl() [2/2]

StatusCode D3PD::BlockFillerToolImpl::configureImpl ( IAddVariable * tree,
const std::type_info & ti,
const std::vector< const std::type_info * > & tis,
size_t & which )
protectedinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.
tisList of possible input types that we can accept.
[out]whichIndex of the accepted type.

This is the common implementation for the configureD3PD method of IBlockFillerTool. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.

This version allows for one of a set of types to match. If successful, WHICH is set to the index (0-based) of the matching type.

Definition at line 91 of file BlockFillerToolImpl.cxx.

87{
89 CHECK( m_converter.init (ti, tis, which) );
91}

◆ convert()

StatusCode D3PD::BlockFillerToolImpl::convert ( void const *& p) const
protectedinherited

Do type conversion.

Parameters
p[in,out]Pointer to convert.

On entry, p is a pointer to an object of the type that was passed into configureImpl as ti. Convert the pointer to point to an object of the type that was given as fill_ti. If the conversion fails, the pointer is set to 0 (and FAILURE is returned).

Definition at line 107 of file BlockFillerToolImpl.cxx.

106{
107 p = m_converter.convertUntyped (p);
108 if (!p) {
110 << "Pointer conversion from " << m_converter.srcName() << " to "
111 << m_converter.dstName() << "failed.";
112 return StatusCode::FAILURE;
113 }
114 return StatusCode::SUCCESS;
115}
#define REPORT_MESSAGE(LVL)
Report a message.

◆ fill()

StatusCode D3PD::TileCellFillerTool::fill ( const CaloCell & p)
virtual

Fill one block — type-safe version.

Parameters
pThe input object.

This is called once per object. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.

primaryTrackParticle() Returns a pointer (which should not usually be NULL, but might be if the muon has been stripped of information) to the primary TrackParticle corresponding to the MuonType of this muon. This is determined in the following order:

  1. CombinedTrackParticle
  2. InnerDetectorTrackParticle
  3. MuonSpectrometerTrackParticle

Implements D3PD::BlockFillerTool< CaloCell >.

Definition at line 172 of file TileCellFillerTool.cxx.

172 {
173//==========================================================
174 ATH_MSG_DEBUG("TileCellFillerTool::fill()");
175
176 const CaloDetDescrElement *dde = p.caloDDE();
177
178 if(m_LevelOfDetails > 0){
179 // DEPOSITED ENERGY
180 *m_cellEnergy = p.energy();
181 *m_cellEt = p.et();
182
183 // CELL POSITION
184 *m_cellEta = p.eta();
185 *m_cellPhi = p.phi();
186 } // IF
187
188 if(m_LevelOfDetails > 1){
189 *m_cellGain = p.gain();
190 *m_badCell = p.badcell();
191 *m_time = p.time();
192 *m_quality = p.provenance();
193 *m_samplingID = dde->getSampling();
194 *m_subcalo = dde->getSubCalo();
195
196 } // IF
197
198 if(m_LevelOfDetails > 2){
199 *m_cellSinTh = p.sinTh();
200 *m_cellCosTh = p.cosTh();
201 *m_cellCotTh = p.cotTh();
202
203 // CELL DIMENSIONS
204 *m_cellX = dde->x();
205 *m_cellY = dde->y();
206 *m_cellZ = dde->z();
207 *m_cellR = dde->r();
208 *m_celldX = dde->dx();
209 *m_celldY = dde->dy();
210 *m_celldZ = dde->dz();
211 *m_celldR = dde->dr();
212 *m_cellV = dde->volume();
213 *m_celldPhi = dde->dphi();
214 *m_celldEta = dde->deta();
215
216
217 // RAW CHANNEL INFORMATION
218 const CaloCell* cell=&p;
219 const TileCell* tilecell = dynamic_cast<const TileCell*> (cell);
220
221 if(tilecell){
222 *m_side = m_tileID->side(cell->ID());
223 *m_section = m_tileID->section(cell->ID());
224 *m_module = m_tileID->module(cell->ID());
225 *m_tower = m_tileID->tower(cell->ID());
226 *m_sample = m_tileID->sample(cell->ID());
227 *m_eta_index = m_trackInCalo->retrieveIndex(*m_samplingID,*m_cellEta);
228
229 if(m_LevelOfDetails > 3){
230 *m_pmt1Energy = tilecell->ene1();
231 *m_pmt2Energy = tilecell->ene2();
232 *m_pmt1Time = tilecell->time1();
233 *m_pmt2Time = tilecell->time2();
234 *m_pmt1Quality = tilecell->qual1();
235 *m_pmt2Quality = tilecell->qual2();
236 *m_pmt1Qbit = tilecell->qbit1();
237 *m_pmt2Qbit = tilecell->qbit2();
238 *m_pmt1Bad = tilecell->badch1();
239 *m_pmt2Bad = tilecell->badch2();
240 *m_pmt1Gain = tilecell->gain1();
241 *m_pmt2Gain = tilecell->gain2();
242
243 *m_pmt1Ros = m_tileHWID->ros(m_tileHWID->adc_id(dde->onl1(),tilecell->gain1()));
244 *m_pmt2Ros = m_tileHWID->ros(m_tileHWID->adc_id(dde->onl2(),tilecell->gain2()));
245 *m_pmt1Drawer = m_tileHWID->drawer(m_tileHWID->adc_id(dde->onl1(),tilecell->gain1()));
246 *m_pmt2Drawer = m_tileHWID->drawer(m_tileHWID->adc_id(dde->onl2(),tilecell->gain2()));
247 *m_pmt1Channel = m_tileHWID->channel(m_tileHWID->adc_id(dde->onl1(),tilecell->gain1()));
248 *m_pmt2Channel = m_tileHWID->channel(m_tileHWID->adc_id(dde->onl2(),tilecell->gain2()));
249 } // IF
250 } // ELSE
251 } // IF
252
253 if(m_LevelOfDetails > 4){
254 // RETRIEVE APPROPRIATE POINTERS
255 // GET HANDLE ON MUON CONTAINER
256 const MUONCONTAINER* muons = 0;
257
258 // MUONS
259 CHECK( evtStore()->retrieve( muons, m_muonContainerName ) );
260
261 MUONCONTAINER::const_iterator muonItr = muons->begin();
262 MUONCONTAINER::const_iterator muonEnd = muons->end();
263 for(; muonItr != muonEnd; ++muonItr ){
264 const MUON* muon = *muonItr;
265 // MUON COUNTER AND TYPES
266 *m_muN = *m_muN + 1;
267 m_mutype->push_back(m_trackType); // NO MUON
268 m_muonAuthor->push_back( muon->author() );
269
276 const TRACK* muon_track = 0;
277 switch(m_trackType)
278 {
279 case 0: muon_track = muon->trackParticle(xAOD::Muon::CombinedTrackParticle); break;
280 case 1: muon_track = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); break;
281 case 2: muon_track = muon->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle); break;
282 default: muon_track = muon->primaryTrackParticle(); break;
283 } // SWITCH
284 if(!muon_track) continue;
285
286 std::vector<double> coordinates = m_trackInCalo->getXYZEtaPhiInCellSampling(muon_track,&p);
287
288 if(coordinates.size() == 5 )
289 {
290 // CALCULATE PATH LENGTHS USING EXTRAPOLATOR TOOL
291 float path = m_trackInCalo->getPathInsideCell(muon_track,&p);
292 float ptcone40 = 0.;
293 if (!muon->isolation(ptcone40, Iso::IsolationType::ptcone40 ))
294 ptcone40 = 0;
295 m_muptcone40 ->push_back(ptcone40);
296 m_mularcone40 ->push_back(0.); //FIXME
297 m_mup ->push_back(muon->p4().P());
298
299 uint8_t NumberOfPixelHits=0;
301 if( !muon->summaryValue(NumberOfPixelHits,xAOD::numberOfPixelHits) )
302 {
303 ATH_MSG_INFO("Can not get the value of numberOfPixelHits");
304 }
305 if( !muon->summaryValue(NumberOfSCTHits,xAOD::numberOfSCTHits) )
306 {
307 ATH_MSG_INFO("Can not get the value of numberOfSCTHits");
308 }
309
310 m_muNsiliconhits->push_back( int(NumberOfPixelHits + NumberOfSCTHits) );
311
312 m_muonX ->push_back(coordinates[0]);
313 m_muonY ->push_back(coordinates[1]);
314 m_muonZ ->push_back(coordinates[2]);
315 m_muonEta->push_back(coordinates[3]);
316 m_muonPhi->push_back(coordinates[4]);
317
318 m_to_muon_dx ->push_back(*m_cellX - coordinates[0]);
319 m_to_muon_dy ->push_back(*m_cellY - coordinates[1]);
320 m_to_muon_dz ->push_back(*m_cellZ - coordinates[2]);
321 m_to_muon_dEta->push_back(*m_cellEta - coordinates[3]);
322 m_to_muon_dPhi->push_back( KinematicUtils::deltaPhi(coordinates[4],*m_cellPhi) );
323
324 m_dx->push_back(path);
325 m_dEdx->push_back(path > 0 ? p.energy() / path : -1.);
326 } // IF
327 } // FOR
328 } // IF
329
330 return StatusCode::SUCCESS;
331} // TileCellFillerTool::fill
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
xAOD::TrackParticle TRACK
xAOD::MuonContainer MUONCONTAINER
xAOD::Muon MUON
D3PD INCLUDES.
CaloCell_ID::CaloSample getSampling() const
cell sampling
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition TileCell.h:197
float time1(void) const
get time of first PMT
Definition TileCell.h:192
int gain2(void) const
get gain of second PMT
Definition TileCell.cxx:175
bool badch1(void) const
check if first PMT is in bad channel list and masked
Definition TileCell.h:209
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
Definition TileCell.h:206
int gain1(void) const
get gain of first PMT
Definition TileCell.cxx:168
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition TileCell.h:200
float ene1(void) const
get energy of first PMT
Definition TileCell.h:187
bool badch2(void) const
check if second PMT is in bad channel list and masked
Definition TileCell.h:212
float time2(void) const
get time of second PMT
Definition TileCell.h:194
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
Definition TileCell.h:203
float ene2(void) const
get energy of second PMT
Definition TileCell.h:189
double deltaPhi(double phi1, double phi2)
@ NumberOfSCTHits
Definition VarHolder.h:49
path
python interpreter configuration --------------------------------------—
Definition athena.py:128
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].

◆ fillAgain()

virtual StatusCode D3PD::BlockFillerTool< CaloCell >::fillAgain ( const CaloCell & p)
virtualinherited

Fill one block, after AGAIN has been returned (type-safe).

Parameters
pThe input object.

Once fill returns AGAIN, the parent should call fillAgain with the same arguments. This continues until fillAgain returns something other than AGAIN.

By default, this just calls fill().

◆ fillUntyped()

virtual StatusCode D3PD::BlockFillerTool< CaloCell >::fillUntyped ( const void * p,
bool again = false )
virtualinherited

Fill one block.

Parameters
pThe input object.
againSet if this is a subsequent call requested by an AGAIN return

This is called once per object. The type of the object at which p points is given by the ti argument to configureD3PD. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.

If the return status is the special code AGAIN (defined above), then this filler tool wants to make multiple entries. The parent should set up to capture a new ‘row’ and run through the list of block filler tools again, but for this tool call fillAgainUntyped instead of fillUntyped. This should be repeated as long as fillAgainUntyped returns AGAIN.

Once fillUntyped returns AGAIN, the parent should call fillUntyped with the same p argument and again set to true. This continues until fillUntyped returns something other than AGAIN.

Not all parents may support this. In that case, returning AGAIN will be treated as an error.

◆ finalize()

StatusCode D3PD::TileCellFillerTool::finalize ( )
virtual

Definition at line 66 of file TileCellFillerTool.cxx.

66 {
67//============================================
68
69 ATH_MSG_DEBUG("TileCellFillerTool::finalize()");
70 return StatusCode::SUCCESS;
71
72} // TileCellFillerTool::finalize

◆ initialize()

StatusCode D3PD::TileCellFillerTool::initialize ( )
virtual

Definition at line 45 of file TileCellFillerTool.cxx.

45 {
46//==============================================
47
48 ATH_MSG_DEBUG("TileCellFillerTool::initialize()");
49
50 if(m_LevelOfDetails > 1){
51 // RETRIEVE CALORIMETER EXTRAPOLATOR TOOLS
52 CHECK(m_trackInCalo.retrieve());
53 } // IF
54
55 // RETRIEVE SERVICES
56 if(m_LevelOfDetails > 2){
59 } // IF
60
61 return StatusCode::SUCCESS;
62
63} // TileCellFillerTool::initialize

Member Data Documentation

◆ m_badCell

bool* D3PD::TileCellFillerTool::m_badCell
private

Definition at line 141 of file TileCellFillerTool.h.

◆ m_blockName

std::string D3PD::BlockFillerToolImpl::m_blockName
privateinherited

Property: the name of this block.

Definition at line 118 of file BlockFillerToolImpl.h.

◆ m_cellCosTh

float* D3PD::TileCellFillerTool::m_cellCosTh
private

Definition at line 98 of file TileCellFillerTool.h.

◆ m_cellCotTh

float* D3PD::TileCellFillerTool::m_cellCotTh
private

Definition at line 99 of file TileCellFillerTool.h.

◆ m_celldEta

float* D3PD::TileCellFillerTool::m_celldEta
private

Definition at line 112 of file TileCellFillerTool.h.

◆ m_celldPhi

float* D3PD::TileCellFillerTool::m_celldPhi
private

Definition at line 111 of file TileCellFillerTool.h.

◆ m_celldR

float* D3PD::TileCellFillerTool::m_celldR
private

Definition at line 109 of file TileCellFillerTool.h.

◆ m_celldX

float* D3PD::TileCellFillerTool::m_celldX
private

Definition at line 106 of file TileCellFillerTool.h.

◆ m_celldY

float* D3PD::TileCellFillerTool::m_celldY
private

Definition at line 107 of file TileCellFillerTool.h.

◆ m_celldZ

float* D3PD::TileCellFillerTool::m_celldZ
private

Definition at line 108 of file TileCellFillerTool.h.

◆ m_cellEnergy

float* D3PD::TileCellFillerTool::m_cellEnergy
private

Definition at line 67 of file TileCellFillerTool.h.

◆ m_cellEt

float* D3PD::TileCellFillerTool::m_cellEt
private

Definition at line 68 of file TileCellFillerTool.h.

◆ m_cellEta

float* D3PD::TileCellFillerTool::m_cellEta
private

Definition at line 95 of file TileCellFillerTool.h.

◆ m_cellGain

int* D3PD::TileCellFillerTool::m_cellGain
private

Definition at line 140 of file TileCellFillerTool.h.

◆ m_cellPhi

float* D3PD::TileCellFillerTool::m_cellPhi
private

Definition at line 96 of file TileCellFillerTool.h.

◆ m_cellR

float* D3PD::TileCellFillerTool::m_cellR
private

Definition at line 105 of file TileCellFillerTool.h.

◆ m_cellSinTh

float* D3PD::TileCellFillerTool::m_cellSinTh
private

Definition at line 97 of file TileCellFillerTool.h.

◆ m_cellV

float* D3PD::TileCellFillerTool::m_cellV
private

Definition at line 110 of file TileCellFillerTool.h.

◆ m_cellX

float* D3PD::TileCellFillerTool::m_cellX
private

Definition at line 102 of file TileCellFillerTool.h.

◆ m_cellY

float* D3PD::TileCellFillerTool::m_cellY
private

Definition at line 103 of file TileCellFillerTool.h.

◆ m_cellZ

float* D3PD::TileCellFillerTool::m_cellZ
private

Definition at line 104 of file TileCellFillerTool.h.

◆ m_converter

TypeConverter D3PD::BlockFillerToolImpl::m_converter
privateinherited

Helper to do type conversions.

Definition at line 121 of file BlockFillerToolImpl.h.

◆ m_dEdx

std::vector<float>* D3PD::TileCellFillerTool::m_dEdx
private

Definition at line 137 of file TileCellFillerTool.h.

◆ m_dx

std::vector<float>* D3PD::TileCellFillerTool::m_dx
private

Definition at line 136 of file TileCellFillerTool.h.

◆ m_eta_index

short* D3PD::TileCellFillerTool::m_eta_index
private

Definition at line 159 of file TileCellFillerTool.h.

◆ m_filterConfiguration

int D3PD::TileCellFillerTool::m_filterConfiguration
private

Definition at line 71 of file TileCellFillerTool.h.

◆ m_LevelOfDetails

short D3PD::TileCellFillerTool::m_LevelOfDetails
private

Definition at line 60 of file TileCellFillerTool.h.

◆ m_metadata

ObjectMetadata D3PD::AddVariable::m_metadata
protectedinherited

Metadata about the variables created by this object.

Definition at line 129 of file AddVariable.h.

◆ m_module

short* D3PD::TileCellFillerTool::m_module
private

Definition at line 156 of file TileCellFillerTool.h.

◆ m_mularcone40

std::vector<float>* D3PD::TileCellFillerTool::m_mularcone40
private

Definition at line 125 of file TileCellFillerTool.h.

◆ m_muN

unsigned short* D3PD::TileCellFillerTool::m_muN
private

Definition at line 115 of file TileCellFillerTool.h.

◆ m_muNsiliconhits

std::vector<short>* D3PD::TileCellFillerTool::m_muNsiliconhits
private

Definition at line 127 of file TileCellFillerTool.h.

◆ m_muonAuthor

std::vector<short>* D3PD::TileCellFillerTool::m_muonAuthor
private

Definition at line 123 of file TileCellFillerTool.h.

◆ m_muonContainerName

std::string D3PD::TileCellFillerTool::m_muonContainerName
private

Definition at line 63 of file TileCellFillerTool.h.

◆ m_muonEta

std::vector<float>* D3PD::TileCellFillerTool::m_muonEta
private

Definition at line 132 of file TileCellFillerTool.h.

◆ m_muonPhi

std::vector<float>* D3PD::TileCellFillerTool::m_muonPhi
private

Definition at line 133 of file TileCellFillerTool.h.

◆ m_muonX

std::vector<float>* D3PD::TileCellFillerTool::m_muonX
private

Definition at line 129 of file TileCellFillerTool.h.

◆ m_muonY

std::vector<float>* D3PD::TileCellFillerTool::m_muonY
private

Definition at line 130 of file TileCellFillerTool.h.

◆ m_muonZ

std::vector<float>* D3PD::TileCellFillerTool::m_muonZ
private

Definition at line 131 of file TileCellFillerTool.h.

◆ m_mup

std::vector<float>* D3PD::TileCellFillerTool::m_mup
private

Definition at line 126 of file TileCellFillerTool.h.

◆ m_muptcone40

std::vector<float>* D3PD::TileCellFillerTool::m_muptcone40
private

Definition at line 124 of file TileCellFillerTool.h.

◆ m_mutype

std::vector<short>* D3PD::TileCellFillerTool::m_mutype
private

Definition at line 122 of file TileCellFillerTool.h.

◆ m_pmt1Bad

bool* D3PD::TileCellFillerTool::m_pmt1Bad
private

Definition at line 82 of file TileCellFillerTool.h.

◆ m_pmt1Channel

short* D3PD::TileCellFillerTool::m_pmt1Channel
private

Definition at line 91 of file TileCellFillerTool.h.

◆ m_pmt1Drawer

short* D3PD::TileCellFillerTool::m_pmt1Drawer
private

Definition at line 89 of file TileCellFillerTool.h.

◆ m_pmt1Energy

float* D3PD::TileCellFillerTool::m_pmt1Energy
private

Definition at line 74 of file TileCellFillerTool.h.

◆ m_pmt1Gain

short* D3PD::TileCellFillerTool::m_pmt1Gain
private

Definition at line 84 of file TileCellFillerTool.h.

◆ m_pmt1Qbit

unsigned short* D3PD::TileCellFillerTool::m_pmt1Qbit
private

Definition at line 80 of file TileCellFillerTool.h.

◆ m_pmt1Quality

unsigned short* D3PD::TileCellFillerTool::m_pmt1Quality
private

Definition at line 78 of file TileCellFillerTool.h.

◆ m_pmt1Ros

short* D3PD::TileCellFillerTool::m_pmt1Ros
private

Definition at line 87 of file TileCellFillerTool.h.

◆ m_pmt1Time

float* D3PD::TileCellFillerTool::m_pmt1Time
private

Definition at line 76 of file TileCellFillerTool.h.

◆ m_pmt2Bad

bool* D3PD::TileCellFillerTool::m_pmt2Bad
private

Definition at line 83 of file TileCellFillerTool.h.

◆ m_pmt2Channel

short* D3PD::TileCellFillerTool::m_pmt2Channel
private

Definition at line 92 of file TileCellFillerTool.h.

◆ m_pmt2Drawer

short* D3PD::TileCellFillerTool::m_pmt2Drawer
private

Definition at line 90 of file TileCellFillerTool.h.

◆ m_pmt2Energy

float* D3PD::TileCellFillerTool::m_pmt2Energy
private

Definition at line 75 of file TileCellFillerTool.h.

◆ m_pmt2Gain

short* D3PD::TileCellFillerTool::m_pmt2Gain
private

Definition at line 85 of file TileCellFillerTool.h.

◆ m_pmt2Qbit

unsigned short* D3PD::TileCellFillerTool::m_pmt2Qbit
private

Definition at line 81 of file TileCellFillerTool.h.

◆ m_pmt2Quality

unsigned short* D3PD::TileCellFillerTool::m_pmt2Quality
private

Definition at line 79 of file TileCellFillerTool.h.

◆ m_pmt2Ros

short* D3PD::TileCellFillerTool::m_pmt2Ros
private

Definition at line 88 of file TileCellFillerTool.h.

◆ m_pmt2Time

float* D3PD::TileCellFillerTool::m_pmt2Time
private

Definition at line 77 of file TileCellFillerTool.h.

◆ m_prefix

std::string D3PD::BlockFillerToolImpl::m_prefix
privateinherited

Property: the variable prefix for this block.

Definition at line 112 of file BlockFillerToolImpl.h.

◆ m_quality

uint16_t* D3PD::TileCellFillerTool::m_quality
private

Definition at line 143 of file TileCellFillerTool.h.

◆ m_sample

short* D3PD::TileCellFillerTool::m_sample
private

Definition at line 158 of file TileCellFillerTool.h.

◆ m_samplingID

unsigned int* D3PD::TileCellFillerTool::m_samplingID
private

Definition at line 145 of file TileCellFillerTool.h.

◆ m_section

short* D3PD::TileCellFillerTool::m_section
private

Definition at line 155 of file TileCellFillerTool.h.

◆ m_side

short* D3PD::TileCellFillerTool::m_side
private

Definition at line 154 of file TileCellFillerTool.h.

◆ m_standalone

std::string D3PD::TileCellFillerTool::m_standalone
private

Definition at line 61 of file TileCellFillerTool.h.

◆ m_subcalo

float* D3PD::TileCellFillerTool::m_subcalo
private

Definition at line 146 of file TileCellFillerTool.h.

◆ m_suffix

std::string D3PD::BlockFillerToolImpl::m_suffix
privateinherited

Property: the variable prefix for this block.

Definition at line 115 of file BlockFillerToolImpl.h.

◆ m_tileHWID

const TileHWID* D3PD::TileCellFillerTool::m_tileHWID
private

Definition at line 153 of file TileCellFillerTool.h.

◆ m_tileID

const TileID* D3PD::TileCellFillerTool::m_tileID
private

Definition at line 152 of file TileCellFillerTool.h.

◆ m_time

float* D3PD::TileCellFillerTool::m_time
private

Definition at line 142 of file TileCellFillerTool.h.

◆ m_to_muon_dEta

std::vector<float>* D3PD::TileCellFillerTool::m_to_muon_dEta
private

Definition at line 119 of file TileCellFillerTool.h.

◆ m_to_muon_dPhi

std::vector<float>* D3PD::TileCellFillerTool::m_to_muon_dPhi
private

Definition at line 120 of file TileCellFillerTool.h.

◆ m_to_muon_dx

std::vector<float>* D3PD::TileCellFillerTool::m_to_muon_dx
private

Definition at line 116 of file TileCellFillerTool.h.

◆ m_to_muon_dy

std::vector<float>* D3PD::TileCellFillerTool::m_to_muon_dy
private

Definition at line 117 of file TileCellFillerTool.h.

◆ m_to_muon_dz

std::vector<float>* D3PD::TileCellFillerTool::m_to_muon_dz
private

Definition at line 118 of file TileCellFillerTool.h.

◆ m_tower

short* D3PD::TileCellFillerTool::m_tower
private

Definition at line 157 of file TileCellFillerTool.h.

◆ m_trackInCalo

ToolHandle<ITrackTools> D3PD::TileCellFillerTool::m_trackInCalo
private

Definition at line 149 of file TileCellFillerTool.h.

◆ m_trackType

short D3PD::TileCellFillerTool::m_trackType
private

Definition at line 62 of file TileCellFillerTool.h.

◆ m_tree

IAddVariable* D3PD::AddVariable::m_tree
privateinherited

Reference to the block name.

The parent IAddVariable instance.

Definition at line 143 of file AddVariable.h.

◆ s_emptyString

const std::string D3PD::AddVariable::s_emptyString
staticprivateinherited

Used to provide a default value for blockName.

Definition at line 41 of file AddVariable.h.


The documentation for this class was generated from the following files: