ATLAS Offline Software
Loading...
Searching...
No Matches
MDTSimHitFillerTool.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: MDTSimHitFillerTool.cxx 503989 2012-06-05 16:07:54Z ssnyder $
6
7// Gaudi/Athena include(s):
9
10// Local include(s):
11#include "MDTSimHitFillerTool.h"
12
13namespace D3PD {
14
16 const std::string& name,
17 const IInterface* parent )
18 : BlockFillerTool< MDTSimHit >( type, name, parent )
19 {
20 MDTSimHitFillerTool::book().ignore(); // Avoid coverity warnings.
21 }
22
24
25 CHECK( addVariable( "globalTime", m_globalTime,
26 "Add description here..." ) );
27 CHECK( addVariable( "driftRadius", m_driftRadius,
28 "Add description here..." ) );
29 CHECK( addVariable( "stepLength", m_stepLength,
30 "Add description here..." ) );
31 CHECK( addVariable( "energyDeposit", m_energyDeposit,
32 "Add description here..." ) );
33 CHECK( addVariable( "particleEncoding", m_particleEncoding,
34 "Add description here..." ) );
35 CHECK( addVariable( "kineticEnergy", m_kineticEnergy,
36 "Add description here..." ) );
37 CHECK( addVariable( "MDTid", m_MDTid,
38 "Add description here..." ) );
39 CHECK( addVariable( "trackNumber", m_trackNumber,
40 "Number of track which released this energy" ) );
41
42 return StatusCode::SUCCESS;
43 }
44
45 StatusCode MDTSimHitFillerTool::fill( const MDTSimHit& obj ) {
46
47 *m_globalTime = obj.globalTime();
48 *m_driftRadius = obj.driftRadius();
49 *m_stepLength = obj.stepLength();
50 *m_energyDeposit = obj.energyDeposit();
51 *m_particleEncoding = obj.particleEncoding();
52 *m_kineticEnergy = obj.kineticEnergy();
53 *m_MDTid = obj.MDTid();
54 *m_trackNumber = obj.truthBarcode();
55
56 return StatusCode::SUCCESS;
57 }
58
59} // namespace D3PD
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Type-safe wrapper for block filler tools.
int * m_trackNumber
Number of track which released this energy.
virtual StatusCode fill(const MDTSimHit &obj)
Function filling the ntuple variables for a single object.
MDTSimHitFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular Gaudi AlgTool constructor.
virtual StatusCode book()
Function booking the ntuple variables.
Block filler tool for noisy FEB information.