ATLAS Offline Software
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 
9 HIJetSubtractorToolBase::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 
23 void HIJetSubtractorToolBase::setSubtractedEtaPhi(float E, float& eta, float& phi, float eta0, float phi0, float sig) const
24 {
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);
42  setIndex(index);
43  setModulator(modulator);
44  return StatusCode::SUCCESS;
45 
46 }
HIJetSubtractorToolBase::minEnergyForMoments
float minEnergyForMoments() const
Definition: HIJetSubtractorToolBase.h:30
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
index
Definition: index.py:1
HIJetSubtractorToolBase::HIJetSubtractorToolBase
HIJetSubtractorToolBase(const std::string &myname)
Definition: HIJetSubtractorToolBase.cxx:9
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
HIJetRec::inTowerBoundary
bool inTowerBoundary(float eta0, float phi0, float eta, float phi)
Definition: HIJetRecDefs.h:29
asg
Definition: DataHandleTestTool.h:28
HIJetSubtractorToolBase::setIndex
void setIndex(const HIEventShapeIndex *ind)
Definition: HIJetSubtractorToolBase.h:39
Phi_mpi_pi
__HOSTDEV__ double Phi_mpi_pi(double)
Definition: GeoRegion.cxx:7
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HIJetSubtractorToolBase::setModulator
void setModulator(const IHIUEModulatorTool *mod)
Definition: HIJetSubtractorToolBase.h:40
python.BuildSignatureFlags.sig
sig
Definition: BuildSignatureFlags.py:221
HIJetSubtractorToolBase.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
HIEventShapeIndex
Definition: HIEventShapeIndex.h:16
HIJetSubtractorToolBase::minEnergySigForMoments
float minEnergySigForMoments() const
Definition: HIJetSubtractorToolBase.h:31
IHIUEModulatorTool
Abstract interface for tools that can provide UE modulation given an HIEventShape.
Definition: IHIUEModulatorTool.h:25
HIJetSubtractorToolBase::setSubtractedEtaPhi
void setSubtractedEtaPhi(float E, float &eta, float &phi, float eta0, float phi0, float sig) const
Definition: HIJetSubtractorToolBase.cxx:23
HIJetRecDefs.h
HIJetSubtractorToolBase::configureEvent
virtual StatusCode configureEvent(const xAOD::HIEventShapeContainer *shape, const HIEventShapeIndex *index, const IHIUEModulatorTool *modulator)
Definition: HIJetSubtractorToolBase.cxx:39
HIJetSubtractorToolBase::setShape
void setShape(const xAOD::HIEventShapeContainer *s)
Definition: HIJetSubtractorToolBase.h:38