|
ATLAS Offline Software
|
Creates Pi0 clusters (Pi0 Finder).
More...
#include <TauPi0ClusterCreator.h>
|
| TauPi0ClusterCreator (const std::string &name) |
|
virtual | ~TauPi0ClusterCreator ()=default |
|
virtual StatusCode | executePi0ClusterCreator (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &hadronicClusterPFOContainer, const xAOD::CaloClusterContainer &pi0CaloClusContainer) const override |
|
virtual StatusCode | initialize () override |
| Tool initializer. More...
|
|
virtual StatusCode | eventInitialize () override |
| Event initializer - called at the beginning of each event. More...
|
|
virtual StatusCode | execute (xAOD::TauJet &pTau) const override |
| Execute - called for each tau candidate. More...
|
|
virtual StatusCode | executePi0CreateROI (xAOD::TauJet &pTau, CaloConstCellContainer &caloCellContainer, boost::dynamic_bitset<> &map) const override |
|
virtual StatusCode | executeVertexFinder (xAOD::TauJet &pTau, const xAOD::VertexContainer *vertexContainer=nullptr) const override |
|
virtual StatusCode | executeTrackFinder (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackContainer) const override |
|
virtual StatusCode | executeTrackClassifier (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackContainer) const override |
|
virtual StatusCode | executeShotFinder (xAOD::TauJet &pTau, xAOD::CaloClusterContainer &shotClusterContainer, xAOD::PFOContainer &PFOContainer) const override |
|
virtual StatusCode | executeVertexVariables (xAOD::TauJet &pTau, xAOD::VertexContainer &vertexContainer) const override |
|
virtual StatusCode | executePi0ClusterScaler (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &chargedPFOContainer) const override |
|
virtual StatusCode | executePi0nPFO (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer) const override |
|
virtual StatusCode | executePanTau (xAOD::TauJet &pTau, xAOD::ParticleContainer &particleContainer, xAOD::PFOContainer &neutralPFOContainer) const override |
|
virtual StatusCode | eventFinalize () override |
| Event finalizer - called at the end of each event. More...
|
|
virtual StatusCode | finalize () override |
| Finalizer. More...
|
|
std::string | find_file (const std::string &fname) const |
|
virtual StatusCode | readConfig () override |
|
virtual void | print () const |
| Print the state of the tool. 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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
|
Gaudi::Property< bool > | m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"} |
|
Gaudi::Property< bool > | m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"} |
|
Gaudi::Property< bool > | m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"} |
|
Gaudi::Property< std::string > | m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"} |
|
|
StatusCode | configureNeutralPFO (const xAOD::CaloCluster &cluster, const xAOD::CaloClusterContainer &pi0ClusterContainer, const xAOD::TauJet &tau, const std::vector< const xAOD::PFO * > &shotPFOs, const std::map< unsigned, const xAOD::CaloCluster * > &shotsInCluster, xAOD::PFO &neutralPFO) const |
| Configure the neutral PFO. More...
|
|
StatusCode | configureHadronicPFO (const xAOD::CaloVertexedTopoCluster &cluster, double clusterEnergyHad, xAOD::PFO &hadronicPFO) const |
| Configure the haronic PFO. More...
|
|
std::map< unsigned, const xAOD::CaloCluster * > | getShotToClusterMap (const std::vector< const xAOD::PFO * > &shotVector, const xAOD::CaloClusterContainer &pi0ClusterContainer, const xAOD::TauJet &pTau) const |
|
std::vector< unsigned > | getShotsMatchedToCluster (const std::vector< const xAOD::PFO * > &shotVector, const std::map< unsigned, const xAOD::CaloCluster * > &clusterToShotMap, const xAOD::CaloCluster &pi0Cluster) const |
|
int | getNPhotons (const std::vector< const xAOD::PFO * > &shotVector, const std::vector< unsigned > &shotsInCluster) const |
|
float | getEM1CoreFrac (const xAOD::CaloCluster &cluster) const |
| fraction of cluster enegry in central EM1 cells More...
|
|
std::vector< int > | getNPosECells (const xAOD::CaloCluster &cluster) const |
| number of cells from cluster with positive energy in PS, EM1 and EM2 More...
|
|
std::vector< float > | get1stEtaMomWRTCluster (const xAOD::CaloCluster &cluster) const |
| first eta moment in PS, EM1 and EM2 w.r.t cluster eta More...
|
|
std::vector< float > | get2ndEtaMomWRTCluster (const xAOD::CaloCluster &cluster) const |
| second eta moment in PS, EM1 and EM2 w.r.t cluster eta More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
◆ StoreGateSvc_t
◆ TauPi0ClusterCreator()
TauPi0ClusterCreator::TauPi0ClusterCreator |
( |
const std::string & |
name | ) |
|
◆ ~TauPi0ClusterCreator()
virtual TauPi0ClusterCreator::~TauPi0ClusterCreator |
( |
| ) |
|
|
virtualdefault |
◆ configureHadronicPFO()
Configure the haronic PFO.
Definition at line 479 of file TauPi0ClusterCreator.cxx.
482 double clusterPtHad = clusterEnergyHad/std::cosh(cluster.
eta());
483 hadronicPFO.
setP4(clusterPtHad, cluster.
eta(), cluster.
phi(), 0.);
485 return StatusCode::SUCCESS;
◆ configureNeutralPFO()
Configure the neutral PFO.
Definition at line 378 of file TauPi0ClusterCreator.cxx.
399 int NHitsInEM1 =
getNPhotons(shotPFOs, shotsInCluster);
432 const std::array< std::pair<Moment, Attribute>, 12> momentAttributePairs {{
447 for (
const auto& [moment, attribute] : momentAttributePairs) {
461 std::vector<ElementLink<xAOD::IParticleContainer>> shotlinks;
465 if (!shotElementLink.isValid()) {
468 shotlinks.push_back(shotElementLink);
474 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);
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()
◆ eventFinalize()
StatusCode TauRecToolBase::eventFinalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ eventInitialize()
StatusCode TauRecToolBase::eventInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TauRecToolBase::execute |
( |
xAOD::TauJet & |
pTau | ) |
const |
|
overridevirtualinherited |
Execute - called for each tau candidate.
Implements ITauToolBase.
Reimplemented in TauDecayModeNNClassifier, MvaTESVariableDecorator, TauCombinedTES, MvaTESEvaluator, TauWPDecorator, TauAxisSetter, TauEleOverlapChecker, TauJetRNNEvaluator, TauClusterFinder, TauCalibrateLC, TauGNNEvaluator, TauSubstructureVariables, TauVertexedClusterDecorator, TauAODSelector, TauElectronVetoVariables, JetSeedBuilder, TauCellVariables, TauCommonCalcVars, TauIDVarCalculator, and TauAODMuonRemovalTool.
Definition at line 138 of file TauRecToolBase.cxx.
140 return StatusCode::FAILURE;
◆ executePanTau()
◆ executePi0ClusterCreator()
Reimplemented from TauRecToolBase.
Definition at line 21 of file TauPi0ClusterCreator.cxx.
26 std::vector<ElementLink<xAOD::PFOContainer>>
empty;
27 tau.setProtoNeutralPFOLinks(empty);
28 tau.setHadronicPFOLinks(empty);
32 return StatusCode::SUCCESS;
36 std::vector<const xAOD::PFO*> shotPFOs;
38 unsigned nShots = tau.nShotPFOs();
41 shotPFOs.push_back(shotPFO);
45 std::map<unsigned, const xAOD::CaloCluster*> shotToClusterMap =
getShotToClusterMap(shotPFOs, pi0ClusterContainer, tau);
56 TLorentzVector clusterP4;
59 clusterP4 = vertexedCluster.p4();
62 clusterP4 = cluster->p4();
67 if (clusterP4.DeltaR(tauAxis) > 0.4)
continue;
71 neutralPFOContainer.
push_back(neutralPFO);
74 neutralPFO->
setP4(clusterP4.Pt(), clusterP4.Eta(), clusterP4.Phi(), 0.);
79 tau.addProtoNeutralPFOLink(PFOElementLink);
85 std::vector<xAOD::CaloVertexedTopoCluster> vertexedClusterList = tau.vertexedClusters();
87 TLorentzVector clusterP4 = vertexedCluster.p4();
90 if(clusterP4.E()<=0.)
continue;
91 if(clusterP4.DeltaR(tauAxis) > 0.2)
continue;
93 double clusterEnergyHad = 0.;
102 for (; cellLink != cellLinks->
end(); ++cellLink) {
105 int sampling =
cell->caloDDE()->getSampling();
106 if (sampling < 8)
continue;
109 double cellEnergy =
cell->e() * cellLink.
weight();
110 clusterEnergyHad += cellEnergy;
114 if(clusterEnergyHad <= 0.)
continue;
118 hadronicPFOContainer.push_back(hadronicPFO);
123 tau.addHadronicPFOLink( PFOElementLink );
128 return StatusCode::SUCCESS;
◆ executePi0ClusterScaler()
◆ executePi0CreateROI()
◆ executePi0nPFO()
◆ executeShotFinder()
◆ executeTrackClassifier()
◆ executeTrackFinder()
◆ executeVertexFinder()
◆ executeVertexVariables()
◆ 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
◆ finalize()
StatusCode TauRecToolBase::finalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ find_file()
std::string TauRecToolBase::find_file |
( |
const std::string & |
fname | ) |
const |
|
inherited |
◆ get1stEtaMomWRTCluster()
first eta moment in PS, EM1 and EM2 w.r.t cluster eta
Definition at line 304 of file TauPi0ClusterCreator.cxx.
305 std::vector<float> deltaEtaFirstMom (3, 0.);
306 std::vector<float> totalEnergy (3, 0.);
310 for (; cellLink != cellLinks->
end(); ++cellLink) {
314 int sampling =
cell->caloDDE()->getSampling();
315 int layer = sampling%4;
316 if (
layer >= 3)
continue;
319 float cellEnergy =
cell->e();
320 if (cellEnergy <= 0)
continue;
324 totalEnergy[
layer] += cellEnergy;
328 if (totalEnergy[
layer] != 0.) {
329 deltaEtaFirstMom[
layer]/=std::abs(totalEnergy[
layer]);
332 deltaEtaFirstMom[
layer]=0.;
336 return deltaEtaFirstMom;
◆ get2ndEtaMomWRTCluster()
second eta moment in PS, EM1 and EM2 w.r.t cluster eta
Definition at line 341 of file TauPi0ClusterCreator.cxx.
342 std::vector<float> deltaEtaSecondMom (3, 0.);
343 std::vector<float> totalEnergy (3, 0.);
347 for (; cellLink != cellLinks->
end(); ++cellLink) {
351 int sampling =
cell->caloDDE()->getSampling();
352 int layer = sampling%4;
353 if (
layer >= 3)
continue;
356 float cellEnergy=
cell->e();
357 if (cellEnergy <= 0)
continue;
361 totalEnergy[
layer] += cellEnergy;
365 if (totalEnergy[
layer] != 0.) {
366 deltaEtaSecondMom[
layer]/=std::abs(totalEnergy[
layer]);
369 deltaEtaSecondMom[
layer]=0.;
373 return deltaEtaSecondMom;
◆ getEM1CoreFrac()
fraction of cluster enegry in central EM1 cells
Definition at line 269 of file TauPi0ClusterCreator.cxx.
270 float coreEnergyEM1 = 0.;
271 float totalEnergyEM1 = 0.;
275 for (; cellLink != cellLinks->
end(); ++cellLink) {
279 int sampling =
cell->caloDDE()->getSampling();
280 if (sampling != 1 && sampling != 5)
continue;
284 float cellEnergy =
cell->e() * cellLink.
weight();
285 if (cellEnergy <= 0)
continue;
287 totalEnergyEM1 += cellEnergy;
293 if(std::abs(
deltaPhi) > 0.05 || std::abs(
deltaEta) > 2 * 0.025/8.)
continue;
295 coreEnergyEM1 += cellEnergy;
298 if (totalEnergyEM1 <= 0.)
return 0.;
299 return coreEnergyEM1/totalEnergyEM1;
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getNPhotons()
int TauPi0ClusterCreator::getNPhotons |
( |
const std::vector< const xAOD::PFO * > & |
shotVector, |
|
|
const std::vector< unsigned > & |
shotsInCluster |
|
) |
| const |
|
private |
◆ getNPosECells()
number of cells from cluster with positive energy in PS, EM1 and EM2
Definition at line 248 of file TauPi0ClusterCreator.cxx.
249 std::vector<int> nPosECells(3, 0);
253 for (; cellLink != cellLinks->
end(); ++cellLink) {
255 int sampling =
cell->caloDDE()->getSampling();
258 int layer = sampling%4;
259 if (layer < 3 && cell->
e() > 0) {
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ getShotsMatchedToCluster()
Definition at line 211 of file TauPi0ClusterCreator.cxx.
214 std::vector<unsigned> shotsMatchedToCluster;
219 if (
iterator == shotToClusterMap.end())
continue;
220 if (
iterator->second != &pi0Cluster)
continue;
222 shotsMatchedToCluster.push_back(
index);
225 return shotsMatchedToCluster;
◆ getShotToClusterMap()
Definition at line 133 of file TauPi0ClusterCreator.cxx.
136 std::map<unsigned, const xAOD::CaloCluster*> shotToClusterMap;
140 int seedHashInt = -1;
142 ATH_MSG_WARNING(
"Couldn't find seed hash. Set it to -1, no cluster will be associated to shot.");
152 float weightInCluster = -1.;
153 float weightInPreviousCluster = -1;
158 TLorentzVector clusterP4;
161 clusterP4 = vertexedCluster.p4();
164 clusterP4 = cluster->p4();
167 weightInCluster = -1.;
169 if (clusterP4.DeltaR(tauAxis) > 0.4)
continue;
173 for (; cellLink != cellLinks->
end(); ++cellLink) {
177 if (
cell->caloDDE()->calo_hash() != seedHash)
continue;
179 weightInCluster = cellLink.
weight();
184 if (weightInCluster < 0)
continue;
187 if (weightInPreviousCluster < 0) {
190 shotToClusterMap[
index] = cluster;
191 weightInPreviousCluster = weightInCluster;
197 if (weightInCluster > weightInPreviousCluster) {
198 shotToClusterMap[
index] = cluster;
206 return shotToClusterMap;
◆ inAOD()
bool TauRecToolBase::inAOD |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ inEleRM()
bool TauRecToolBase::inEleRM |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ initialize()
StatusCode TauRecToolBase::initialize |
( |
| ) |
|
|
overridevirtualinherited |
Tool initializer.
Reimplemented from asg::AsgTool.
Reimplemented in tauRecTools::TrackRNN, TauTrackFinder, tauRecTools::TauTrackRNNClassifier, TauWPDecorator, TauVertexFinder, TauDecayModeNNClassifier, TauPi0CreateROI, TauShotFinder, TauElectronVetoVariables, TauEleOverlapChecker, TauJetRNNEvaluator, TauCalibrateLC, TauGNNEvaluator, TauPi0ScoreCalculator, TauVertexVariables, TauVertexedClusterDecorator, MvaTESVariableDecorator, TauAODMuonRemovalTool, TauCombinedTES, MvaTESEvaluator, and PanTau::PanTauProcessor.
Definition at line 129 of file TauRecToolBase.cxx.
130 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.
◆ inTrigger()
bool TauRecToolBase::inTrigger |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ 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.
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ readConfig()
StatusCode TauRecToolBase::readConfig |
( |
| ) |
|
|
overridevirtualinherited |
Implements ITauToolBase.
Definition at line 27 of file TauRecToolBase.cxx.
32 #ifndef XAOD_STANDALONE
33 bool configPathDeclared =
false;
34 for (Gaudi::Details::PropertyBase* property : getProperties())
36 if (property->name() ==
"ConfigPath")
38 configPathDeclared =
true;
42 if (!configPathDeclared)
43 #elif defined(XAOD_STANDALONE)
44 PropertyMgr::PropMap_t property_map = getPropertyMgr()->getProperties();
45 if (property_map.find(
"ConfigPath") == property_map.end())
47 # error "What environment are we in?!?"
48 #endif // XAOD_STANDALONE
50 ATH_MSG_INFO(
"No config file path property declared yet, this is not recommended");
51 return StatusCode::SUCCESS;
55 const std::string* config_file_path_property;
58 config_file_path_property = getProperty<std::string>(
"ConfigPath");
59 std::string config_file_path =
find_file(*config_file_path_property);
63 THashList* lList =
env.GetTable();
64 for( Int_t
i = 0; lList &&
i < lList->GetEntries(); ++
i )
68 #ifndef XAOD_STANDALONE
70 const std::type_info*
type =
getProperty(lList->At(
i )->GetName()).type_info();
73 if (*
type ==
typeid(
bool))
74 sc = this->setProperty(lList->At(
i )->GetName(),
75 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
76 else if (*
type ==
typeid(
int))
77 sc = this->setProperty(lList->At(
i )->GetName(),
78 env.GetValue(lList->At(
i )->GetName(),
int(0)));
79 else if (*
type ==
typeid(
float))
80 sc = this->setProperty(lList->At(
i )->GetName(),
81 env.GetValue(lList->At(
i )->GetName(),
float(0)));
82 else if (*
type ==
typeid(
double))
83 sc = this->setProperty(lList->At(
i )->GetName(),
84 env.GetValue(lList->At(
i )->GetName(),
double(0)));
85 else if (*
type ==
typeid(std::string))
86 sc = this->setProperty(lList->At(
i )->GetName(),
87 env.GetValue(lList->At(
i )->GetName(),
""));
93 sc = this->setProperty(lList->At(
i )->GetName(),
94 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
96 sc = this->setProperty(lList->At(
i )->GetName(),
97 env.GetValue(lList->At(
i )->GetName(),
int(0)));
99 sc = this->setProperty(lList->At(
i )->GetName(),
100 env.GetValue(lList->At(
i )->GetName(),
float(0)));
102 sc = this->setProperty(lList->At(
i )->GetName(),
103 env.GetValue(lList->At(
i )->GetName(),
double(0)));
105 sc = this->setProperty(lList->At(
i )->GetName(),
106 env.GetValue(lList->At(
i )->GetName(),
""));
107 #endif // XAOD_STANDALONE
110 #ifndef XAOD_STANDALONE
111 ATH_MSG_FATAL(
"there was a problem to find the correct type enum: "<<
type->name());
114 #endif // XAOD_STANDALONE
115 return StatusCode::FAILURE;
117 if (!
sc.isSuccess()) {
118 ATH_MSG_FATAL(
"failed to set property: " << lList->At(
i )->GetName());
119 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ 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_clusterEtCut
Gaudi::Property<double> TauPi0ClusterCreator::m_clusterEtCut {this, "ClusterEtCut", 0.5 * Gaudi::Units::GeV, "Et threshould for pi0 candidate clusters"} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_in_AOD
Gaudi::Property<bool> TauRecToolBase::m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"} |
|
protectedinherited |
◆ m_in_EleRM
Gaudi::Property<bool> TauRecToolBase::m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"} |
|
protectedinherited |
◆ m_in_trigger
Gaudi::Property<bool> TauRecToolBase::m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"} |
|
protectedinherited |
◆ m_tauRecToolsTag
Gaudi::Property<std::string> TauRecToolBase::m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"} |
|
protectedinherited |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
virtual double phi() const
The azimuthal angle ( ) of the particle.
Type
Property type enumeration.
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
@ cellBased_firstEtaWRTClusterPosition_EM2
@ cellBased_NPosECells_EM1
std::vector< float > get2ndEtaMomWRTCluster(const xAOD::CaloCluster &cluster) const
second eta moment in PS, EM1 and EM2 w.r.t cluster eta
StatusCode configureHadronicPFO(const xAOD::CaloVertexedTopoCluster &cluster, double clusterEnergyHad, xAOD::PFO &hadronicPFO) const
Configure the haronic PFO.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Gaudi::Property< double > m_clusterEtCut
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
bool attribute(PFODetails::PFOAttributes AttributeType, T &anAttribute) const
get a PFO Variable via enum
@ cellBased_NPosECells_PS
const_iterator begin() const
const begin method
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual double phi() const final
The azimuthal angle ( ) of the particle.
virtual double eta() const final
The pseudorapidity ( ) of the particle.
bool setAssociatedParticleLinks(PFODetails::PFOParticleType ParticleType, const std::vector< ElementLink< IParticleContainer > > &theParticles)
Set a vector of PFO constituent particle types via enum - overwrite is allowed.
@ cellBased_secondEtaWRTClusterPosition_EM1
weight_t weight() const
Accessor for weight associated to this cell.
virtual void setOwner(IDataHandleHolder *o)=0
@ cellBased_firstEtaWRTClusterPosition_EM1
MomentType
Enums to identify different moments.
bool setClusterLink(const ElementLink< xAOD::CaloClusterContainer > &theCluster)
Set a cluster constituent - does NOT append to existing container
@ cellBased_SECOND_LAMBDA
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
virtual double eta() const
The pseudorapidity ( ) of the particle.
PFO_v1 PFO
Definition of the current "pfo version".
const PFOLinks_t & shotPFOLinks() const
::StatusCode StatusCode
StatusCode definition for legacy code.
@ cellBased_secondEtaWRTClusterPosition_EM2
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ cellBased_FIRST_ETA
These variables belong to the cell-based particle flow algorithm.
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
void setBDTPi0Score(float BDTPi0Score)
set BDT Score used to classify clusters as Pi0 like or not
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
Class describing a particle flow object.
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const
const end method
@ cellBased_ENG_FRAC_CORE
bool CENTER_MAG(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
void setP4(const FourMom_t &vec)
set the 4-vec
void setCharge(float charge)
set charge of PFO
@ cellBased_SECOND_ENG_DENS
@ cellBased_NPosECells_EM2
float eSample(const CaloSample sampling) const
Class describing a Vertex.
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
@ cellBased_CENTER_LAMBDA
StatusCode configureNeutralPFO(const xAOD::CaloCluster &cluster, const xAOD::CaloClusterContainer &pi0ClusterContainer, const xAOD::TauJet &tau, const std::vector< const xAOD::PFO * > &shotPFOs, const std::map< unsigned, const xAOD::CaloCluster * > &shotsInCluster, xAOD::PFO &neutralPFO) const
Configure the neutral PFO.
std::map< unsigned, const xAOD::CaloCluster * > getShotToClusterMap(const std::vector< const xAOD::PFO * > &shotVector, const xAOD::CaloClusterContainer &pi0ClusterContainer, const xAOD::TauJet &pTau) const
int getNPhotons(const std::vector< const xAOD::PFO * > &shotVector, const std::vector< unsigned > &shotsInCluster) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< float > get1stEtaMomWRTCluster(const xAOD::CaloCluster &cluster) const
first eta moment in PS, EM1 and EM2 w.r.t cluster eta
Evaluate cluster kinematics with a different vertex / signal state.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
float getEM1CoreFrac(const xAOD::CaloCluster &cluster) const
fraction of cluster enegry in central EM1 cells
void setAttribute(PFODetails::PFOAttributes AttributeType, const T &anAttribute)
Set a PFO Variable via enum - overwrite is allowed.
std::vector< int > getNPosECells(const xAOD::CaloCluster &cluster) const
number of cells from cluster with positive energy in PS, EM1 and EM2
const_iterator to loop over cells belonging to a cluster
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::vector< unsigned > getShotsMatchedToCluster(const std::vector< const xAOD::PFO * > &shotVector, const std::map< unsigned, const xAOD::CaloCluster * > &clusterToShotMap, const xAOD::CaloCluster &pi0Cluster) const
void setCenterMag(float CenterMag)
set CenterMag moment needed for vertex correction