|
ATLAS Offline Software
|
#include <SiHitAnalysis.h>
|
| SiHitAnalysis (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~SiHitAnalysis () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
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 |
|
|
TH1 * | m_h_hits_x {} |
| Some variables. More...
|
|
TH1 * | m_h_hits_y {} |
|
TH1 * | m_h_hits_z {} |
|
TH1 * | m_h_hits_r {} |
|
TH2 * | m_h_xy {} |
|
TH2 * | m_h_zr {} |
|
LockedHandle< TH2 > | m_h_xy_shared {} |
|
LockedHandle< TH2 > | m_h_zr_shared {} |
|
TH1 * | m_h_hits_time {} |
|
TH1 * | m_h_hits_eloss {} |
|
TH1 * | m_h_hits_step {} |
|
TH1 * | m_h_hits_barcode {} |
|
TH2 * | m_h_time_eloss {} |
|
TH2 * | m_h_z_eloss {} |
|
TH2 * | m_h_r_eloss {} |
|
TH1 * | m_h_barrel_endcap {} |
|
TH1 * | m_h_layer_disk {} |
|
TH1 * | m_h_module_phi {} |
|
TH1 * | m_h_module_eta {} |
|
TTree * | m_tree {} |
|
std::vector< float > * | m_hits_x {} |
|
std::vector< float > * | m_hits_y {} |
|
std::vector< float > * | m_hits_z {} |
|
std::vector< float > * | m_hits_r {} |
|
std::vector< float > * | m_hits_time {} |
|
std::vector< float > * | m_hits_eloss {} |
|
std::vector< float > * | m_hits_step {} |
|
std::vector< float > * | m_hits_barcode {} |
|
std::vector< float > * | m_hits_pdgId {} |
|
std::vector< float > * | m_hits_pT {} |
|
std::vector< float > * | m_hits_eta {} |
|
std::vector< float > * | m_hits_phi {} |
|
std::vector< float > * | m_hits_prodVtx_x {} |
|
std::vector< float > * | m_hits_prodVtx_y {} |
|
std::vector< float > * | m_hits_prodVtx_z {} |
|
std::vector< int > * | m_barrel_endcap {} |
|
std::vector< int > * | m_layer_disk {} |
|
std::vector< int > * | m_module_phi {} |
|
std::vector< int > * | m_module_eta {} |
|
SG::ReadHandleKey< SiHitCollection > | m_hitsContainerKey {this, "CollectionName", "", "Input HITS collection name"} |
|
Gaudi::Property< std::string > | m_histPath {this, "HistPath", "/SiHitAnalysis/histos/", ""} |
|
Gaudi::Property< std::string > | m_ntuplePath {this, "NtuplePath", "/SiHitAnalysis/ntuples/", ""} |
|
Gaudi::Property< bool > | m_expert {this, "ExpertMode", false, ""} |
|
Gaudi::Property< bool > | m_extraTruthBranches {this, "ExtraTruthBranches", false, ""} |
|
ServiceHandle< ITHistSvc > | m_thistSvc {this, "HistSvc", "THistSvc", ""} |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 24 of file SiHitAnalysis.h.
◆ StoreGateSvc_t
◆ SiHitAnalysis()
SiHitAnalysis::SiHitAnalysis |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~SiHitAnalysis()
SiHitAnalysis::~SiHitAnalysis |
( |
| ) |
|
|
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 SiHitAnalysis::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 233 of file SiHitAnalysis.cxx.
261 if (hitCollection.isValid()) {
263 for (
const SiHit &hit : *hitCollection) {
265 HepGeom::Point3D<double>
p = ghit.getGlobalPosition();
280 double step_length = (hit.localStartPosition() - hit.localEndPosition()).
mag();
286 if (hit.getBarrelEndcap() == 0) {
308 const auto& HMPL = hit.particleLink();
309 if (HMPL.isValid()) {
310 auto part = HMPL.cptr();
337 return StatusCode::FAILURE;
342 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 SiHitAnalysis::initialize |
( |
| ) |
|
|
overridevirtual |
Histograms
now add branches and leaves to the tree
Definition at line 21 of file SiHitAnalysis.cxx.
26 std::string ntupName(
"SiPixel");
34 ntupName =
"SiITkPixel";
46 ntupName =
"SiITkStrip";
62 return StatusCode::FAILURE;
69 float bin_down = -600;
71 float radius_up = 600;
72 float radius_down = 200;
79 }
else if (
detName ==
"ITkPixel") {
85 }
else if (
detName ==
"ITkStrip") {
116 m_h_xy =
new TH2D((
"h_"+
detName+
"_xy").c_str(), (
"h_"+
detName+
"_xy").c_str(), 100,bin_down,bin_up,100, bin_down, bin_up);
119 m_h_zr =
new TH2D((
"h_"+
detName+
"_zr").c_str(), (
"h_"+
detName+
"_zr").c_str(), 100,-z_max, z_max, 100, radius_down, radius_up);
137 m_h_z_eloss =
new TH2D((
"h_"+
detName+
"_z_eloss").c_str(), (
"h_"+
detName+
" Eloss vs. z").c_str(),100, -z_max,z_max,100,0,50);
140 m_h_r_eloss =
new TH2D((
"h_"+
detName+
"_r_eloss").c_str(), (
"h_"+
detName+
" Eloss vs. r").c_str(),100, radius_down,radius_down,100,0,50);
181 if (
detName.find(
"ITk") != std::string::npos) {
182 std::string xy_name =
"h_ITk_xy";
183 auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
187 std::string zr_name =
"h_ITk_zr";
188 auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
194 m_tree =
new TTree(ntupName.c_str(), ntupName.c_str());
229 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_barrel_endcap
std::vector<int>* SiHitAnalysis::m_barrel_endcap {} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_expert
Gaudi::Property<bool> SiHitAnalysis::m_expert {this, "ExpertMode", false, ""} |
|
private |
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_extraTruthBranches
Gaudi::Property<bool> SiHitAnalysis::m_extraTruthBranches {this, "ExtraTruthBranches", false, ""} |
|
private |
◆ m_h_barrel_endcap
TH1* SiHitAnalysis::m_h_barrel_endcap {} |
|
private |
◆ m_h_hits_barcode
TH1* SiHitAnalysis::m_h_hits_barcode {} |
|
private |
◆ m_h_hits_eloss
TH1* SiHitAnalysis::m_h_hits_eloss {} |
|
private |
◆ m_h_hits_r
TH1* SiHitAnalysis::m_h_hits_r {} |
|
private |
◆ m_h_hits_step
TH1* SiHitAnalysis::m_h_hits_step {} |
|
private |
◆ m_h_hits_time
TH1* SiHitAnalysis::m_h_hits_time {} |
|
private |
◆ m_h_hits_x
TH1* SiHitAnalysis::m_h_hits_x {} |
|
private |
◆ m_h_hits_y
TH1* SiHitAnalysis::m_h_hits_y {} |
|
private |
◆ m_h_hits_z
TH1* SiHitAnalysis::m_h_hits_z {} |
|
private |
◆ m_h_layer_disk
TH1* SiHitAnalysis::m_h_layer_disk {} |
|
private |
◆ m_h_module_eta
TH1* SiHitAnalysis::m_h_module_eta {} |
|
private |
◆ m_h_module_phi
TH1* SiHitAnalysis::m_h_module_phi {} |
|
private |
◆ m_h_r_eloss
TH2* SiHitAnalysis::m_h_r_eloss {} |
|
private |
◆ m_h_time_eloss
TH2* SiHitAnalysis::m_h_time_eloss {} |
|
private |
◆ m_h_xy
TH2* SiHitAnalysis::m_h_xy {} |
|
private |
◆ m_h_xy_shared
LockedHandle<TH2> SiHitAnalysis::m_h_xy_shared {} |
|
private |
◆ m_h_z_eloss
TH2* SiHitAnalysis::m_h_z_eloss {} |
|
private |
◆ m_h_zr
TH2* SiHitAnalysis::m_h_zr {} |
|
private |
◆ m_h_zr_shared
LockedHandle<TH2> SiHitAnalysis::m_h_zr_shared {} |
|
private |
◆ m_histPath
Gaudi::Property<std::string> SiHitAnalysis::m_histPath {this, "HistPath", "/SiHitAnalysis/histos/", ""} |
|
private |
◆ m_hits_barcode
std::vector<float>* SiHitAnalysis::m_hits_barcode {} |
|
private |
◆ m_hits_eloss
std::vector<float>* SiHitAnalysis::m_hits_eloss {} |
|
private |
◆ m_hits_eta
std::vector<float>* SiHitAnalysis::m_hits_eta {} |
|
private |
◆ m_hits_pdgId
std::vector<float>* SiHitAnalysis::m_hits_pdgId {} |
|
private |
◆ m_hits_phi
std::vector<float>* SiHitAnalysis::m_hits_phi {} |
|
private |
◆ m_hits_prodVtx_x
std::vector<float>* SiHitAnalysis::m_hits_prodVtx_x {} |
|
private |
◆ m_hits_prodVtx_y
std::vector<float>* SiHitAnalysis::m_hits_prodVtx_y {} |
|
private |
◆ m_hits_prodVtx_z
std::vector<float>* SiHitAnalysis::m_hits_prodVtx_z {} |
|
private |
◆ m_hits_pT
std::vector<float>* SiHitAnalysis::m_hits_pT {} |
|
private |
◆ m_hits_r
std::vector<float>* SiHitAnalysis::m_hits_r {} |
|
private |
◆ m_hits_step
std::vector<float>* SiHitAnalysis::m_hits_step {} |
|
private |
◆ m_hits_time
std::vector<float>* SiHitAnalysis::m_hits_time {} |
|
private |
◆ m_hits_x
std::vector<float>* SiHitAnalysis::m_hits_x {} |
|
private |
◆ m_hits_y
std::vector<float>* SiHitAnalysis::m_hits_y {} |
|
private |
◆ m_hits_z
std::vector<float>* SiHitAnalysis::m_hits_z {} |
|
private |
◆ m_hitsContainerKey
◆ m_layer_disk
std::vector<int>* SiHitAnalysis::m_layer_disk {} |
|
private |
◆ m_module_eta
std::vector<int>* SiHitAnalysis::m_module_eta {} |
|
private |
◆ m_module_phi
std::vector<int>* SiHitAnalysis::m_module_phi {} |
|
private |
◆ m_ntuplePath
Gaudi::Property<std::string> SiHitAnalysis::m_ntuplePath {this, "NtuplePath", "/SiHitAnalysis/ntuples/", ""} |
|
private |
◆ m_thistSvc
ServiceHandle<ITHistSvc> SiHitAnalysis::m_thistSvc {this, "HistSvc", "THistSvc", ""} |
|
private |
◆ m_tree
TTree* SiHitAnalysis::m_tree {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_expert
std::vector< float > * m_hits_x
std::vector< int > * m_module_phi
std::vector< float > * m_hits_y
std::vector< float > * m_hits_eta
std::vector< float > * m_hits_pT
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< int > * m_barrel_endcap
std::vector< float > * m_hits_prodVtx_y
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< int > * m_module_eta
std::vector< float > * m_hits_z
Gaudi::Property< bool > m_extraTruthBranches
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< float > * m_hits_barcode
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< float > * m_hits_pdgId
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
std::vector< float > * m_hits_phi
TH1 * m_h_hits_x
Some variables.
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::vector< float > * m_hits_r
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< float > * m_hits_prodVtx_z
std::vector< float > * m_hits_eloss
std::vector< float > * m_hits_time
std::vector< int > * m_layer_disk
DataObjIDColl m_extendedExtraObjects
LockedHandle< TH2 > m_h_zr_shared
LockedHandle< TH2 > m_h_xy_shared
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< float > * m_hits_prodVtx_x
AthAlgorithm()
Default constructor:
Gaudi::Property< std::string > m_histPath
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::vector< float > * m_hits_step
Scalar mag() const
mag method
Gaudi::Property< std::string > m_ntuplePath