|
ATLAS Offline Software
|
#include <CalibrationNtupleMakerTool.h>
|
| CalibrationNtupleMakerTool (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Athena-Algorithm Constructor. More...
|
|
virtual | ~CalibrationNtupleMakerTool () |
| Default Destructor. More...
|
|
StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
StatusCode | execute () |
| standard Athena-Algorithm method More...
|
|
StatusCode | finalize () |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | bookTree () |
|
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 |
|
◆ StoreGateSvc_t
◆ CalibrationNtupleMakerTool()
CalibrationNtupleMakerTool::CalibrationNtupleMakerTool |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~CalibrationNtupleMakerTool()
CalibrationNtupleMakerTool::~CalibrationNtupleMakerTool |
( |
| ) |
|
|
virtualdefault |
◆ bookTree()
StatusCode CalibrationNtupleMakerTool::bookTree |
( |
| ) |
|
|
virtual |
Definition at line 93 of file CalibrationNtupleMakerTool.cxx.
133 ITHistSvc* tHistSvc =
nullptr;
134 if (service(
"THistSvc",tHistSvc).isFailure()) {
135 ATH_MSG_ERROR(
"initialize() Could not find Hist Service!" );
136 return StatusCode::FAILURE;
142 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree!" );
143 return StatusCode::FAILURE;
153 return StatusCode::FAILURE;
156 ATH_MSG_INFO(
"Calibration Tree booked and registered successfully!");
158 return StatusCode::SUCCESS;
◆ 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);
◆ 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.
◆ 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.
◆ 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]
◆ DetectorEta()
float CalibrationNtupleMakerTool::DetectorEta |
( |
const xAOD::Jet * |
jet | ) |
|
|
private |
Definition at line 302 of file CalibrationNtupleMakerTool.cxx.
306 const auto& partLinks =
jet->constituentLinks();
309 if (not link.isValid()) {
317 float det_eta = tcc->
eta();
319 if (acc_detEta.isAvailable(*tcc)) {
320 det_eta = acc_detEta(*tcc);
322 ATH_MSG_WARNING(
"DetectorEta decoration not found for TCCs! Using eta...");
324 double pt = tcc->
p4().P()/cosh(det_eta);
327 p4CorrCl.SetPtEtaPhiE(
pt, det_eta, tcc->
p4().Phi(), tcc->
p4().E());
328 if(tcc->
p4().E() < 0.) p4CorrCl*=-1.;
◆ detStore()
◆ DRmin()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode CalibrationNtupleMakerTool::execute |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 162 of file CalibrationNtupleMakerTool.cxx.
170 float ev_weight =
evt->mcEventWeight();
173 if (not truths)
return StatusCode::FAILURE;
176 if (not vertices)
return StatusCode::FAILURE;
179 float mu=
evt->averageInteractionsPerCrossing();
184 for (
const auto&
vertex : *vertices) {
185 if (
vertex->nTrackParticles()>=2)
190 const auto *
const jets = getContainer<xAOD::JetContainer>(
name);
208 for (
const auto& truth: *truths) {
212 std::vector<const xAOD::Jet*>
matched = {};
217 if (Nmatches==0)
continue;
262 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();
◆ finalize()
StatusCode CalibrationNtupleMakerTool::finalize |
( |
| ) |
|
◆ getContainer()
template<class T >
const T * CalibrationNtupleMakerTool::getContainer |
( |
const std::string & |
containerName | ) |
|
|
inlineprivate |
◆ initialize()
StatusCode CalibrationNtupleMakerTool::initialize |
( |
| ) |
|
◆ 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.
◆ Matched()
◆ 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_collectionNames
std::vector< std::string > CalibrationNtupleMakerTool::m_collectionNames |
|
private |
◆ m_detStore
◆ m_eCalo
std::vector< double >* CalibrationNtupleMakerTool::m_eCalo |
|
private |
◆ m_eCorr
std::vector< double >* CalibrationNtupleMakerTool::m_eCorr |
|
private |
◆ m_etaCalo
std::vector< double >* CalibrationNtupleMakerTool::m_etaCalo |
|
private |
◆ m_etaCorr
std::vector< double >* CalibrationNtupleMakerTool::m_etaCorr |
|
private |
◆ m_etaDetCalo
std::vector< double >* CalibrationNtupleMakerTool::m_etaDetCalo |
|
private |
◆ m_etaDetCorr
std::vector< double >* CalibrationNtupleMakerTool::m_etaDetCorr |
|
private |
◆ m_etaTrue
std::vector< double >* CalibrationNtupleMakerTool::m_etaTrue |
|
private |
◆ m_eTrue
std::vector< double >* CalibrationNtupleMakerTool::m_eTrue |
|
private |
◆ m_eventWeight
float CalibrationNtupleMakerTool::m_eventWeight = 0.0F |
|
private |
◆ m_evt
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_h_events
TH1* CalibrationNtupleMakerTool::m_h_events |
|
private |
◆ m_index
std::vector< int >* CalibrationNtupleMakerTool::m_index |
|
private |
◆ m_matchingCut
double CalibrationNtupleMakerTool::m_matchingCut |
|
private |
◆ m_mCalo
std::vector< double >* CalibrationNtupleMakerTool::m_mCalo |
|
private |
◆ m_mCorr
std::vector< double >* CalibrationNtupleMakerTool::m_mCorr |
|
private |
◆ m_mTrue
std::vector< double >* CalibrationNtupleMakerTool::m_mTrue |
|
private |
◆ m_mu
float CalibrationNtupleMakerTool::m_mu = 0.0F |
|
private |
◆ m_npv
float CalibrationNtupleMakerTool::m_npv = 0.0F |
|
private |
◆ m_phiCalo
std::vector< double >* CalibrationNtupleMakerTool::m_phiCalo |
|
private |
◆ m_phiCorr
std::vector< double >* CalibrationNtupleMakerTool::m_phiCorr |
|
private |
◆ m_phiTrue
std::vector< double >* CalibrationNtupleMakerTool::m_phiTrue |
|
private |
◆ m_recoIsoDR
double CalibrationNtupleMakerTool::m_recoIsoDR |
|
private |
◆ m_recoIsoPtCut
double CalibrationNtupleMakerTool::m_recoIsoPtCut |
|
private |
◆ m_treeDescription
std::string CalibrationNtupleMakerTool::m_treeDescription |
|
private |
◆ m_treeFolder
std::string CalibrationNtupleMakerTool::m_treeFolder |
|
private |
◆ m_trees
std::map< std::string, TTree* > CalibrationNtupleMakerTool::m_trees |
|
private |
◆ m_trueIsoDR
double CalibrationNtupleMakerTool::m_trueIsoDR |
|
private |
◆ m_trueIsoPtCut
double CalibrationNtupleMakerTool::m_trueIsoPtCut |
|
private |
◆ m_truthJetContainerName
std::string CalibrationNtupleMakerTool::m_truthJetContainerName |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vertexContainerName
std::string CalibrationNtupleMakerTool::m_vertexContainerName |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Class describing a TrackCaloCluster.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual void setOwner(IDataHandleHolder *o)=0
TLorentzVector FourMom_t
Definition of the 4-momentum type.
virtual double eta() const
The pseudorapidity ( ) of the particle.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
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.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DataObjIDColl m_extendedExtraObjects
virtual FourMom_t p4() const
The full 4-momentum of the particle.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>