 |
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, V, H > &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, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &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 476 of file TauPi0ClusterCreator.cxx.
479 double clusterPtHad = clusterEnergyHad/std::cosh(cluster.
eta());
480 hadronicPFO.
setP4(clusterPtHad, cluster.
eta(), cluster.
phi(), 0.);
482 return StatusCode::SUCCESS;
◆ configureNeutralPFO()
Configure the neutral PFO.
Definition at line 375 of file TauPi0ClusterCreator.cxx.
396 int NHitsInEM1 =
getNPhotons(shotPFOs, shotsInCluster);
429 const std::array< std::pair<Moment, Attribute>, 12> momentAttributePairs {{
444 for (
const auto& [moment, attribute] : momentAttributePairs) {
458 std::vector<ElementLink<xAOD::IParticleContainer>> shotlinks;
462 if (!shotElementLink.isValid()) {
465 shotlinks.push_back(shotElementLink);
471 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, TauCombinedTES, MvaTESVariableDecorator, MvaTESEvaluator, TauWPDecorator, TauAxisSetter, TauGNNEvaluator, TauEleOverlapChecker, TauJetRNNEvaluator, TauCalibrateLC, TauClusterFinder, 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();
70 neutralPFOContainer.
push_back(neutralPFO);
73 neutralPFO->
setP4(clusterP4.Pt(), clusterP4.Eta(), clusterP4.Phi(), 0.);
78 tau.addProtoNeutralPFOLink(PFOElementLink);
84 std::vector<xAOD::CaloVertexedTopoCluster> vertexedClusterList = tau.vertexedClusters();
86 TLorentzVector clusterP4 = vertexedCluster.p4();
91 double clusterEnergyHad = 0.;
100 for (; cellLink != cellLinks->
end(); ++cellLink) {
103 int sampling =
cell->caloDDE()->getSampling();
104 if (sampling < 8)
continue;
107 double cellEnergy =
cell->e() * cellLink.
weight();
108 clusterEnergyHad += cellEnergy;
112 if(clusterEnergyHad <= 0.)
continue;
116 hadronicPFOContainer.push_back(hadronicPFO);
121 tau.addHadronicPFOLink( PFOElementLink );
126 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 301 of file TauPi0ClusterCreator.cxx.
302 std::vector<float> deltaEtaFirstMom (3, 0.);
303 std::vector<float> totalEnergy (3, 0.);
307 for (; cellLink != cellLinks->
end(); ++cellLink) {
311 int sampling =
cell->caloDDE()->getSampling();
312 int layer = sampling%4;
313 if (
layer >= 3)
continue;
316 float cellEnergy =
cell->e();
317 if (cellEnergy <= 0)
continue;
321 totalEnergy[
layer] += cellEnergy;
325 if (totalEnergy[
layer] != 0.) {
326 deltaEtaFirstMom[
layer]/=std::abs(totalEnergy[
layer]);
329 deltaEtaFirstMom[
layer]=0.;
333 return deltaEtaFirstMom;
◆ get2ndEtaMomWRTCluster()
second eta moment in PS, EM1 and EM2 w.r.t cluster eta
Definition at line 338 of file TauPi0ClusterCreator.cxx.
339 std::vector<float> deltaEtaSecondMom (3, 0.);
340 std::vector<float> totalEnergy (3, 0.);
344 for (; cellLink != cellLinks->
end(); ++cellLink) {
348 int sampling =
cell->caloDDE()->getSampling();
349 int layer = sampling%4;
350 if (
layer >= 3)
continue;
353 float cellEnergy=
cell->e();
354 if (cellEnergy <= 0)
continue;
358 totalEnergy[
layer] += cellEnergy;
362 if (totalEnergy[
layer] != 0.) {
363 deltaEtaSecondMom[
layer]/=std::abs(totalEnergy[
layer]);
366 deltaEtaSecondMom[
layer]=0.;
370 return deltaEtaSecondMom;
◆ getEM1CoreFrac()
fraction of cluster enegry in central EM1 cells
Definition at line 266 of file TauPi0ClusterCreator.cxx.
267 float coreEnergyEM1 = 0.;
268 float totalEnergyEM1 = 0.;
272 for (; cellLink != cellLinks->
end(); ++cellLink) {
276 int sampling =
cell->caloDDE()->getSampling();
277 if (sampling != 1 && sampling != 5)
continue;
281 float cellEnergy =
cell->e() * cellLink.
weight();
282 if (cellEnergy <= 0)
continue;
284 totalEnergyEM1 += cellEnergy;
290 if(std::abs(
deltaPhi) > 0.05 || std::abs(
deltaEta) > 2 * 0.025/8.)
continue;
292 coreEnergyEM1 += cellEnergy;
295 if (totalEnergyEM1 <= 0.)
return 0.;
296 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 245 of file TauPi0ClusterCreator.cxx.
246 std::vector<int> nPosECells(3, 0);
250 for (; cellLink != cellLinks->
end(); ++cellLink) {
252 int sampling =
cell->caloDDE()->getSampling();
255 int layer = sampling%4;
256 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 208 of file TauPi0ClusterCreator.cxx.
211 std::vector<unsigned> shotsMatchedToCluster;
216 if (
iterator == shotToClusterMap.end())
continue;
217 if (
iterator->second != &pi0Cluster)
continue;
219 shotsMatchedToCluster.push_back(
index);
222 return shotsMatchedToCluster;
◆ getShotToClusterMap()
Definition at line 131 of file TauPi0ClusterCreator.cxx.
134 std::map<unsigned, const xAOD::CaloCluster*> shotToClusterMap;
138 int seedHashInt = -1;
140 ATH_MSG_WARNING(
"Couldn't find seed hash. Set it to -1, no cluster will be associated to shot.");
150 float weightInCluster = -1.;
151 float weightInPreviousCluster = -1;
156 TLorentzVector clusterP4;
159 clusterP4 = vertexedCluster.p4();
162 clusterP4 = cluster->p4();
165 weightInCluster = -1.;
170 for (; cellLink != cellLinks->
end(); ++cellLink) {
174 if (
cell->caloDDE()->calo_hash() != seedHash)
continue;
176 weightInCluster = cellLink.
weight();
181 if (weightInCluster < 0)
continue;
184 if (weightInPreviousCluster < 0) {
187 shotToClusterMap[
index] = cluster;
188 weightInPreviousCluster = weightInCluster;
194 if (weightInCluster > weightInPreviousCluster) {
195 shotToClusterMap[
index] = cluster;
203 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, TauDecayModeNNClassifier, TauVertexFinder, TauPi0CreateROI, TauShotFinder, TauElectronVetoVariables, TauGNNEvaluator, TauJetRNNEvaluator, TauCalibrateLC, TauEleOverlapChecker, TauPi0ScoreCalculator, TauVertexVariables, TauVertexedClusterDecorator, TauCombinedTES, MvaTESVariableDecorator, MvaTESEvaluator, TauAODMuonRemovalTool, 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, LundVariablesTool, 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))
75 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
76 else if (*
type ==
typeid(
int))
78 env.GetValue(lList->At(
i )->GetName(),
int(0)));
79 else if (*
type ==
typeid(
float))
81 env.GetValue(lList->At(
i )->GetName(),
float(0)));
82 else if (*
type ==
typeid(
double))
84 env.GetValue(lList->At(
i )->GetName(),
double(0)));
85 else if (*
type ==
typeid(std::string))
87 env.GetValue(lList->At(
i )->GetName(),
""));
94 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
97 env.GetValue(lList->At(
i )->GetName(),
int(0)));
100 env.GetValue(lList->At(
i )->GetName(),
float(0)));
103 env.GetValue(lList->At(
i )->GetName(),
double(0)));
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_maxDeltaRJetClust
Gaudi::Property<double> TauPi0ClusterCreator::m_maxDeltaRJetClust {this, "MaxDeltaRJetClust", 0.4, "max DeltaR for vertexed cluster-tau association"} |
|
private |
◆ m_maxDeltaRNeutral
Gaudi::Property<double> TauPi0ClusterCreator::m_maxDeltaRNeutral {this, "MaxDeltaRNeutral", 0.2, "max DeltaR for pi0-tau association"} |
|
private |
◆ 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.
@ cellBased_firstEtaWRTClusterPosition_EM2
Gaudi::Property< double > m_maxDeltaRNeutral
@ 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
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,...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
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.
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
PFO_v1 PFO
Definition of the current "pfo version".
const PFOLinks_t & shotPFOLinks() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
@ cellBased_secondEtaWRTClusterPosition_EM2
bool CENTER_MAG(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
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.
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)
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
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.
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
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
bool empty() const noexcept
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
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
Gaudi::Property< double > m_maxDeltaRJetClust
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