ATLAS Offline Software
EventPropertyNtupleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // EventPropertyNtupleTool.h
7 // Header file for EventPropertyNtupleTool
9 // (c) ATLAS Detector software
11 // Wolfgang.Liebig -at- cern.ch
13 
14 #ifndef TRK_EVENTPROPERTYNTUPLETOOL_H
15 #define TRK_EVENTPROPERTYNTUPLETOOL_H
16 
18 
19 #include "GaudiKernel/ToolHandle.h"
21 #include <vector>
28 namespace Trk {
29 
31  public:
32  // standard AlgToolmethods
33  EventPropertyNtupleTool(const std::string&,const std::string&,const IInterface*);
35 
36  // standard Athena methods
39 
41  virtual void registerTrackCollections( std::vector<std::string>, bool);
43  virtual void setTrackTreeIndices( unsigned int, int, int);
45  virtual void setGenParticleTreeIndices( int, int);
46 
50  virtual StatusCode addNtupleItems ( TTree*, const std::string );
51 
53  virtual StatusCode fillEventData ( );
54 
56  virtual StatusCode resetVariables ( );
57 
59  inline virtual bool isTrackLinkTool( ) const;
61  inline virtual bool isTrkParticleLinkTool( ) const;
63  inline virtual bool isTrkParticleTrigLinkTool( ) const;
65  inline virtual bool isInDetTrackTrigLinkTool( ) const;
67  inline virtual bool isEvtPropertyTool( ) const;
68 
69  private:
70  bool m_doTriggerInfo; //<! job option toggling if to fill trigger bits
71  bool m_doTrtPhase; //<! job option toggling if to fill TRT phase (cosmics)
72  std::string m_comTimeName;
73 
74  // --- ntuple items ---
77  float m_tdc_phase;
78 
79  // more information about level1 trigger 2008 under Atlas.LevelOneCentralTriggerData
81  std::vector<unsigned int>* m_trigLvl1TAV;
84  int m_bCID;
85  };
86 }
87 
89 ( std::vector<std::string>, bool) { }
90 
91 inline void Trk::EventPropertyNtupleTool::setTrackTreeIndices( unsigned int, int, int) { }
92 
94 
95 inline bool Trk::EventPropertyNtupleTool::isTrackLinkTool( ) const { return false; }
96 
97 inline bool Trk::EventPropertyNtupleTool::isTrkParticleLinkTool( ) const { return false; }
98 
99 inline bool Trk::EventPropertyNtupleTool::isTrkParticleTrigLinkTool( ) const{ return false; }
100 
101 inline bool Trk::EventPropertyNtupleTool::isInDetTrackTrigLinkTool( ) const{ return false; }
102 
103 inline bool Trk::EventPropertyNtupleTool::isEvtPropertyTool( ) const { return true; }
104 
105 #endif // TRK_EVENTPROPERTYNTUPLETOOL_H
Trk::EventPropertyNtupleTool::isEvtPropertyTool
virtual bool isEvtPropertyTool() const
is True if instance is EventPropertyTool
Definition: EventPropertyNtupleTool.h:103
Trk::EventPropertyNtupleTool::isTrackLinkTool
virtual bool isTrackLinkTool() const
is True if instance is Tool which links events property to Trk::Tracks
Definition: EventPropertyNtupleTool.h:95
Trk::EventPropertyNtupleTool::m_trigLvl1TAV
std::vector< unsigned int > * m_trigLvl1TAV
level 1 trigger-after-veto info (256 bits in vector) UNIT:bitted
Definition: EventPropertyNtupleTool.h:81
Trk::EventPropertyNtupleTool::resetVariables
virtual StatusCode resetVariables()
reset ntuple variables (mainly for vectors which need to be cleared)
Definition: EventPropertyNtupleTool.cxx:141
Trk::EventPropertyNtupleTool::registerTrackCollections
virtual void registerTrackCollections(std::vector< std::string >, bool)
method not active in this tool
Definition: EventPropertyNtupleTool.h:89
IEventPropertyNtupleTool.h
Trk::EventPropertyNtupleTool::~EventPropertyNtupleTool
~EventPropertyNtupleTool()
Trk::EventPropertyNtupleTool::isTrkParticleLinkTool
virtual bool isTrkParticleLinkTool() const
is True if instance is Tool which links events property to Rec::TrkParticle
Definition: EventPropertyNtupleTool.h:97
Trk::EventPropertyNtupleTool::m_runNumber
int m_runNumber
run number this event belongs to
Definition: EventPropertyNtupleTool.h:75
Trk::EventPropertyNtupleTool::isTrkParticleTrigLinkTool
virtual bool isTrkParticleTrigLinkTool() const
is True if instance is Tool which links events property to Rec::TrkParticle recieved useing TrigDecTo...
Definition: EventPropertyNtupleTool.h:99
Trk::EventPropertyNtupleTool::m_doTriggerInfo
bool m_doTriggerInfo
Definition: EventPropertyNtupleTool.h:70
Trk::EventPropertyNtupleTool::m_timeStamp
int m_timeStamp
time stamp of current event
Definition: EventPropertyNtupleTool.h:83
Trk::EventPropertyNtupleTool::fillEventData
virtual StatusCode fillEventData()
calculate event-wide data and copy into TTree branches, but don't write the record yet.
Definition: EventPropertyNtupleTool.cxx:87
Trk::EventPropertyNtupleTool::m_eventNumber
int m_eventNumber
event number
Definition: EventPropertyNtupleTool.h:76
Trk::EventPropertyNtupleTool::m_lumiBlock
int m_lumiBlock
lumi block number of current event
Definition: EventPropertyNtupleTool.h:82
Trk::IEventPropertyNtupleTool
Definition: IEventPropertyNtupleTool.h:34
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::EventPropertyNtupleTool::m_trigLvl1Type
int m_trigLvl1Type
level 1 trigger type bitted word (2008: equivalent with stream) UNIT:8-bit
Definition: EventPropertyNtupleTool.h:80
Trk::EventPropertyNtupleTool::m_comTimeName
std::string m_comTimeName
Definition: EventPropertyNtupleTool.h:72
AthAlgTool.h
Trk::EventPropertyNtupleTool::setGenParticleTreeIndices
virtual void setGenParticleTreeIndices(int, int)
method not active in this tool
Definition: EventPropertyNtupleTool.h:93
Trk::EventPropertyNtupleTool::m_tdc_phase
float m_tdc_phase
event phase in cosmic events (optional) UNIT:nsec
Definition: EventPropertyNtupleTool.h:77
Trk::EventPropertyNtupleTool::addNtupleItems
virtual StatusCode addNtupleItems(TTree *, const std::string)
add branches to the tree Should be called once dunring the initialisation phase by the calling algori...
Definition: EventPropertyNtupleTool.cxx:68
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::EventPropertyNtupleTool::EventPropertyNtupleTool
EventPropertyNtupleTool(const std::string &, const std::string &, const IInterface *)
Definition: EventPropertyNtupleTool.cxx:28
Trk::EventPropertyNtupleTool::initialize
StatusCode initialize()
Definition: EventPropertyNtupleTool.cxx:55
Trk::EventPropertyNtupleTool::m_bCID
int m_bCID
bunch crossing ID for current event
Definition: EventPropertyNtupleTool.h:84
Trk::EventPropertyNtupleTool::isInDetTrackTrigLinkTool
virtual bool isInDetTrackTrigLinkTool() const
is True if instance is Tool which links events property to Rec::TrkParticle recieved useing TrigDecTo...
Definition: EventPropertyNtupleTool.h:101
Trk::EventPropertyNtupleTool::m_doTrtPhase
bool m_doTrtPhase
Definition: EventPropertyNtupleTool.h:71
AthAlgTool
Definition: AthAlgTool.h:26
Trk::EventPropertyNtupleTool::finalize
StatusCode finalize()
Definition: EventPropertyNtupleTool.cxx:61
Trk::EventPropertyNtupleTool::setTrackTreeIndices
virtual void setTrackTreeIndices(unsigned int, int, int)
method not active in this tool
Definition: EventPropertyNtupleTool.h:91
Trk::EventPropertyNtupleTool
Definition: EventPropertyNtupleTool.h:30