ATLAS Offline Software
Loading...
Searching...
No Matches
HIJetSubtractorToolBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include <TVector2.h>
8
9HIJetSubtractorToolBase::HIJetSubtractorToolBase(const std::string& myname) : asg::AsgTool(myname),
10 m_shape(nullptr),
11 m_index(nullptr),
12 m_modulator(nullptr)
13{
14#ifndef XAOD_STANDALONE
15 //should not need this due to ASG_TOOL_CLASS macro since
16 //athena only calls 3 arg constructor which explicitly declares athena interface?
17 declareInterface<IHISubtractorTool>(this);
18#endif
19
20}
21
22
23void HIJetSubtractorToolBase::setSubtractedEtaPhi(float E, float& eta, float& phi, float eta0, float phi0, float sig) const
24{
25 phi=TVector2::Phi_mpi_pi(phi);
26 if(!HIJetRec::inTowerBoundary(eta0,phi0,eta,phi))
27 {
28 eta=eta0;
29 phi=phi0;
30 }
31 else if( E < minEnergyForMoments() || ( (sig > 0) && sig < minEnergySigForMoments() ) )
32 {
33 eta=eta0;
34 phi=phi0;
35 }
36
37}
38
40{
41 setShape(shape);
43 setModulator(modulator);
44 return StatusCode::SUCCESS;
45
46}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
void setSubtractedEtaPhi(float E, float &eta, float &phi, float eta0, float phi0, float sig) const
void setModulator(const IHIUEModulatorTool *mod)
HIJetSubtractorToolBase(const std::string &myname)
const HIEventShapeIndex * m_index
const xAOD::HIEventShapeContainer * m_shape
void setIndex(const HIEventShapeIndex *ind)
const IHIUEModulatorTool * m_modulator
virtual StatusCode configureEvent(const xAOD::HIEventShapeContainer *shape, const HIEventShapeIndex *index, const IHIUEModulatorTool *modulator)
void setShape(const xAOD::HIEventShapeContainer *s)
Abstract interface for tools that can provide UE modulation given an HIEventShape.
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
bool inTowerBoundary(float eta0, float phi0, float eta, float phi)
Definition index.py:1
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.