|
ATLAS Offline Software
|
#include <TrackRecordAnalysis.h>
|
| TrackRecordAnalysis (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~TrackRecordAnalysis () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 24 of file TrackRecordAnalysis.h.
◆ StoreGateSvc_t
◆ TrackRecordAnalysis()
TrackRecordAnalysis::TrackRecordAnalysis |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TrackRecordAnalysis()
TrackRecordAnalysis::~TrackRecordAnalysis |
( |
| ) |
|
|
inline |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TrackRecordAnalysis::execute |
( |
| ) |
|
|
virtual |
Definition at line 200 of file TrackRecordAnalysis.cxx.
224 CLHEP::Hep3Vector
p =(*track).GetPosition();
234 CLHEP::Hep3Vector
mom = (*track).GetMomentum();
239 m_h_edep->Fill((*track).GetEnergy());
241 m_h_pdg->Fill((*track).GetPDGCode());
243 m_x->push_back(
p.x());
244 m_y->push_back(
p.y());
245 m_z->push_back(
p.z());
246 m_r->push_back(
p.perp());
247 m_eta->push_back(
p.eta());
248 m_phi->push_back(
p.phi());
253 m_edep->push_back((*track).GetEnergy());
254 m_time->push_back((*track).GetTime());
255 m_pdg->push_back((*track).GetPDGCode());
261 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ initialize()
StatusCode TrackRecordAnalysis::initialize |
( |
| ) |
|
|
virtual |
Histograms
now add branches and leaves to the tree
Definition at line 66 of file TrackRecordAnalysis.cxx.
69 std::string
detName(
"CaloEntry");
70 std::string ntupName(
"TrackRecordCaloEntry");
74 ntupName=
"TrackRecordCaloEntry";
78 ntupName=
"TrackRecordMuonEntry";
82 ntupName=
"TrackRecordMuonExit";
86 return StatusCode::FAILURE;
89 std::cout <<
"Name " <<
name() << std::endl;
97 float eta_down = -5.8;
128 m_h_xy =
new TH2D((
detName+
"_xy").c_str(),
"xy", 100,x_down,x_up,100, x_down, x_up);
168 m_h_pdg =
new TH1D((
detName+
"_pdg").c_str(),
"pdg", 100,-1000,1000);
173 m_tree =
new TTree(ntupName.c_str(), ntupName.c_str());
196 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_collection
std::string TrackRecordAnalysis::m_collection |
|
private |
◆ m_detStore
◆ m_edep
std::vector<float>* TrackRecordAnalysis::m_edep |
|
private |
◆ m_eta
std::vector<float>* TrackRecordAnalysis::m_eta |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_h_edep
TH1* TrackRecordAnalysis::m_h_edep |
|
private |
◆ m_h_hits_eta
TH1* TrackRecordAnalysis::m_h_hits_eta |
|
private |
◆ m_h_hits_phi
TH1* TrackRecordAnalysis::m_h_hits_phi |
|
private |
◆ m_h_hits_pt
TH1* TrackRecordAnalysis::m_h_hits_pt |
|
private |
◆ m_h_hits_px
TH1* TrackRecordAnalysis::m_h_hits_px |
|
private |
◆ m_h_hits_py
TH1* TrackRecordAnalysis::m_h_hits_py |
|
private |
◆ m_h_hits_pz
TH1* TrackRecordAnalysis::m_h_hits_pz |
|
private |
◆ m_h_hits_r
TH1* TrackRecordAnalysis::m_h_hits_r |
|
private |
◆ m_h_hits_x
TH1* TrackRecordAnalysis::m_h_hits_x |
|
private |
◆ m_h_hits_y
TH1* TrackRecordAnalysis::m_h_hits_y |
|
private |
◆ m_h_hits_z
TH1* TrackRecordAnalysis::m_h_hits_z |
|
private |
◆ m_h_pdg
TH1* TrackRecordAnalysis::m_h_pdg |
|
private |
◆ m_h_time
TH1* TrackRecordAnalysis::m_h_time |
|
private |
◆ m_h_xy
TH2* TrackRecordAnalysis::m_h_xy |
|
private |
◆ m_h_zr
TH2* TrackRecordAnalysis::m_h_zr |
|
private |
◆ m_ntupleFileName
std::string TrackRecordAnalysis::m_ntupleFileName |
|
private |
◆ m_path
std::string TrackRecordAnalysis::m_path |
|
private |
◆ m_pdg
std::vector<float>* TrackRecordAnalysis::m_pdg |
|
private |
◆ m_phi
std::vector<float>* TrackRecordAnalysis::m_phi |
|
private |
◆ m_pt
std::vector<float>* TrackRecordAnalysis::m_pt |
|
private |
◆ m_px
std::vector<float>* TrackRecordAnalysis::m_px |
|
private |
◆ m_py
std::vector<float>* TrackRecordAnalysis::m_py |
|
private |
◆ m_pz
std::vector<float>* TrackRecordAnalysis::m_pz |
|
private |
◆ m_r
std::vector<float>* TrackRecordAnalysis::m_r |
|
private |
◆ m_thistSvc
◆ m_time
std::vector<float>* TrackRecordAnalysis::m_time |
|
private |
◆ m_tree
TTree* TrackRecordAnalysis::m_tree |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_x
std::vector<float>* TrackRecordAnalysis::m_x |
|
private |
◆ m_y
std::vector<float>* TrackRecordAnalysis::m_y |
|
private |
◆ m_z
std::vector<float>* TrackRecordAnalysis::m_z |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< float > * m_pt
std::vector< float > * m_z
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< float > * m_x
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< float > * m_pdg
std::vector< float > * m_time
const_iterator begin() const
std::vector< float > * m_py
CONT::const_iterator const_iterator
ServiceHandle< ITHistSvc > m_thistSvc
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< float > * m_edep
std::vector< float > * m_phi
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< float > * m_eta
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::string m_ntupleFileName
std::vector< float > * m_px
std::vector< float > * m_y
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
const_iterator end() const
std::vector< float > * m_r
TH1 * m_h_hits_x
Some variables.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< float > * m_pz
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>