ATLAS Offline Software
TauPi0ClusterCreator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TAURECTOOLS_TAUPI0CLUSTERCREATOR_H
6 #define TAURECTOOLS_TAUPI0CLUSTERCREATOR_H
7 
9 
10 #include "xAODPFlow/PFOContainer.h"
12 
13 #include "AsgTools/ToolHandle.h"
14 #include "GaudiKernel/SystemOfUnits.h"
15 
16 #include <string>
17 #include <vector>
18 #include <map>
19 
29 
30 public:
31 
33 
34  TauPi0ClusterCreator(const std::string& name);
35 
36  virtual ~TauPi0ClusterCreator() = default;
37 
38  virtual StatusCode executePi0ClusterCreator(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer,
39  xAOD::PFOContainer& hadronicClusterPFOContainer,
40  const xAOD::CaloClusterContainer& pi0CaloClusContainer) const override;
41 
42 private:
43 
46  const xAOD::CaloClusterContainer& pi0ClusterContainer,
47  const xAOD::TauJet& tau,
48  const std::vector<const xAOD::PFO*>& shotPFOs,
49  const std::map<unsigned, const xAOD::CaloCluster*>& shotsInCluster,
50  xAOD::PFO& neutralPFO) const;
51 
54  double clusterEnergyHad,
55  xAOD::PFO& hadronicPFO) const;
56 
57  std::map<unsigned, const xAOD::CaloCluster*> getShotToClusterMap(
58  const std::vector<const xAOD::PFO*>& shotVector,
59  const xAOD::CaloClusterContainer& pi0ClusterContainer,
60  const xAOD::TauJet &pTau) const;
61 
62  std::vector<unsigned> getShotsMatchedToCluster(
63  const std::vector<const xAOD::PFO*>& shotVector,
64  const std::map<unsigned, const xAOD::CaloCluster*>& clusterToShotMap,
65  const xAOD::CaloCluster& pi0Cluster) const;
66 
67  int getNPhotons( const std::vector<const xAOD::PFO*>& shotVector,
68  const std::vector<unsigned>& shotsInCluster) const;
69 
71  float getEM1CoreFrac(const xAOD::CaloCluster& cluster) const;
72 
74  std::vector<int> getNPosECells(const xAOD::CaloCluster& cluster) const;
75 
77  std::vector<float> get1stEtaMomWRTCluster(const xAOD::CaloCluster& cluster) const;
78 
80  std::vector<float> get2ndEtaMomWRTCluster(const xAOD::CaloCluster& cluster) const;
81 
82  Gaudi::Property<double> m_clusterEtCut {this, "ClusterEtCut", 0.5 * Gaudi::Units::GeV, "Et threshould for pi0 candidate clusters"};
83 };
84 
85 #endif // TAURECTOOLS_TAUPI0CLUSTERCREATOR_H
86 
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TauPi0ClusterCreator::get2ndEtaMomWRTCluster
std::vector< float > get2ndEtaMomWRTCluster(const xAOD::CaloCluster &cluster) const
second eta moment in PS, EM1 and EM2 w.r.t cluster eta
Definition: TauPi0ClusterCreator.cxx:341
TauPi0ClusterCreator::configureHadronicPFO
StatusCode configureHadronicPFO(const xAOD::CaloVertexedTopoCluster &cluster, double clusterEnergyHad, xAOD::PFO &hadronicPFO) const
Configure the haronic PFO.
Definition: TauPi0ClusterCreator.cxx:479
TauPi0ClusterCreator::m_clusterEtCut
Gaudi::Property< double > m_clusterEtCut
Definition: TauPi0ClusterCreator.h:82
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
TauRecToolBase.h
TauRecToolBase
The base class for all tau tools.
Definition: TauRecToolBase.h:21
PFOContainer.h
TauPi0ClusterCreator
Creates Pi0 clusters (Pi0 Finder).
Definition: TauPi0ClusterCreator.h:28
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
TauPi0ClusterCreator::TauPi0ClusterCreator
TauPi0ClusterCreator(const std::string &name)
Definition: TauPi0ClusterCreator.cxx:15
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TauPi0ClusterCreator::~TauPi0ClusterCreator
virtual ~TauPi0ClusterCreator()=default
TauPi0ClusterCreator::executePi0ClusterCreator
virtual StatusCode executePi0ClusterCreator(xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &hadronicClusterPFOContainer, const xAOD::CaloClusterContainer &pi0CaloClusContainer) const override
Definition: TauPi0ClusterCreator.cxx:21
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::PFO_v1
Class describing a particle flow object.
Definition: PFO_v1.h:35
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ITauToolBase
The base class for all tau tools.
Definition: ITauToolBase.h:30
TauPi0ClusterCreator::configureNeutralPFO
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.
Definition: TauPi0ClusterCreator.cxx:378
TauPi0ClusterCreator::getShotToClusterMap
std::map< unsigned, const xAOD::CaloCluster * > getShotToClusterMap(const std::vector< const xAOD::PFO * > &shotVector, const xAOD::CaloClusterContainer &pi0ClusterContainer, const xAOD::TauJet &pTau) const
Definition: TauPi0ClusterCreator.cxx:133
TauPi0ClusterCreator::getNPhotons
int getNPhotons(const std::vector< const xAOD::PFO * > &shotVector, const std::vector< unsigned > &shotsInCluster) const
Definition: TauPi0ClusterCreator.cxx:230
CaloClusterContainer.h
TauPi0ClusterCreator::get1stEtaMomWRTCluster
std::vector< float > get1stEtaMomWRTCluster(const xAOD::CaloCluster &cluster) const
first eta moment in PS, EM1 and EM2 w.r.t cluster eta
Definition: TauPi0ClusterCreator.cxx:304
ToolHandle.h
xAOD::CaloVertexedTopoCluster
Evaluate cluster kinematics with a different vertex / signal state.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedTopoCluster.h:38
TauPi0ClusterCreator::getEM1CoreFrac
float getEM1CoreFrac(const xAOD::CaloCluster &cluster) const
fraction of cluster enegry in central EM1 cells
Definition: TauPi0ClusterCreator.cxx:269
TauPi0ClusterCreator::getNPosECells
std::vector< int > getNPosECells(const xAOD::CaloCluster &cluster) const
number of cells from cluster with positive energy in PS, EM1 and EM2
Definition: TauPi0ClusterCreator.cxx:248
TauPi0ClusterCreator::getShotsMatchedToCluster
std::vector< unsigned > getShotsMatchedToCluster(const std::vector< const xAOD::PFO * > &shotVector, const std::map< unsigned, const xAOD::CaloCluster * > &clusterToShotMap, const xAOD::CaloCluster &pi0Cluster) const
Definition: TauPi0ClusterCreator.cxx:211