|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   34   std::unique_ptr<TFile> 
file(TFile::Open(
fullPath.c_str(), 
"READ"));
 
   37     return StatusCode::FAILURE;
 
   41   std::string 
key = 
"etaBinning";
 
   44     histo->SetDirectory(
nullptr);
 
   49     return StatusCode::FAILURE;
 
   55   TString tmpSlopKey[
s_nProngBins] = {
"slopeNPV1P", 
"slopeNPV3P"};
 
   56   TString tmpFuncBase[
s_nProngBins] = {
"OneP_Eta_", 
"MultiP_Eta_"};
 
   68     histo = 
dynamic_cast<TH1*
>(
file->Get(tmpSlopKey[
i]));  
 
   70       histo->SetDirectory(
nullptr);
 
   74       ATH_MSG_FATAL(
"Failed to get an object with  key " << tmpSlopKey[
i]);
 
   75       return StatusCode::FAILURE;
 
   79       TString 
key = tmpFuncBase[
i];
 
   81       TF1* fcn = 
dynamic_cast<TF1*
>(
file->Get(
key));
 
   87         return StatusCode::FAILURE;
 
   96   return StatusCode::SUCCESS;
 
  106   if ( tau_p4.Pt() <= 0.) {
 
  107     ATH_MSG_DEBUG(
"tau energy at LC scale is " << tau_p4.Pt()/
GeV << 
"--> set energy=0.001");
 
  108     tau.
setP4(0.001, tau_p4.Eta(), tau_p4.Phi(), tau.
m());
 
  110     return StatusCode::SUCCESS;
 
  115   if (tau.
nTracks() <= 1) prongBin = 0; 
 
  117   double absEta = std::abs( tau_p4.Eta() );
 
  118   int etaBin = std::as_const(*m_etaBinHist).GetXaxis()->FindBin(
absEta) - 1;
 
  126   if (!vertexInHandle.
isValid()) {
 
  127     ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << vertexInHandle.
key());
 
  128     return StatusCode::FAILURE;
 
  131   for (
const auto *
const vertex : *vxContainer) {
 
  138   double calibConst = 1.;
 
  144   double energyLC = tau_p4.Pt()/
GeV;
 
  146   if (energyLC - 
offset <= 0.) {
 
  147     ATH_MSG_DEBUG(
"after pile-up correction energy would be = " << energyLC - 
offset << 
" --> setting offset=0 now!");
 
  152   double energyPileupCorr = energyLC - 
offset;
 
  154   if (energyPileupCorr > 0. and energyPileupCorr < 10000.) 
 
  158       if (calibConst <= 0.) {
 
  168   double energyFinal = energyPileupCorr / calibConst;
 
  172   tau.
setP4( energyFinal * 
GeV, tau_p4.Eta(), tau_p4.Phi(), tau.
m());
 
  174   ATH_MSG_DEBUG(
"Energy at LC scale = " << energyLC << 
" pile-up offset " << 
offset << 
" calib. const. = " << calibConst << 
" final energy = " << energyFinal);
 
  176   return StatusCode::SUCCESS;
 
  
const_pointer_type cptr()
Dereference the pointer.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double m() const
The invariant mass of the particle.
Gaudi::Property< bool > m_doVertexCorrection
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
static const int s_nProngBins
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
TauCalibrateLC(const std::string &name="TauCalibrateLC")
Gaudi::Property< std::string > m_calibrationFile
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
std::unique_ptr< TH1 > m_etaBinHist
virtual StatusCode initialize() override
Tool initializer.
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexInputContainer
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a tau jet.
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execute - called for each tau candidate.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< std::unique_ptr< TH1 > > m_slopeNPVHist
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
bool absEta(const xAOD::TauJet &tau, float &out)
std::vector< std::vector< std::unique_ptr< TF1 > > > m_calibFunc