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_useCells(true),
11  m_shape(nullptr),
12  m_index(nullptr),
13  m_modulator(nullptr)
14 {
15 #ifndef XAOD_STANDALONE
16  //should not need this due to ASG_TOOL_CLASS macro since
17  //athena only calls 3 arg constructor which explicitly declares athena interface?
18  declareInterface<IHISubtractorTool>(this);
19 #endif
20 
21 }
22 
23 
24 void HIJetSubtractorToolBase::setSubtractedEtaPhi(float E, float& eta, float& phi, float eta0, float phi0, float sig) const
25 {
28  {
29  eta=eta0;
30  phi=phi0;
31  }
32  else if( E < minEnergyForMoments() || ( (sig > 0) && sig < minEnergySigForMoments() ) )
33  {
34  eta=eta0;
35  phi=phi0;
36  }
37 
38 }
39 
41 {
42  setShape(shape);
43  setIndex(index);
44  setModulator(modulator);
45  return StatusCode::SUCCESS;
46 
47 }
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:218
HIJetSubtractorToolBase.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
HIEventShapeIndex
Definition: HIEventShapeIndex.h:17
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:24
HIJetRecDefs.h
HIJetSubtractorToolBase::configureEvent
virtual StatusCode configureEvent(const xAOD::HIEventShapeContainer *shape, const HIEventShapeIndex *index, const IHIUEModulatorTool *modulator)
Definition: HIJetSubtractorToolBase.cxx:40
HIJetSubtractorToolBase::setShape
void setShape(const xAOD::HIEventShapeContainer *s)
Definition: HIJetSubtractorToolBase.h:38