CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
egammaisolation::EgammaHcalExtractor Class Reference

#include <EgammaHcalExtractor.h>

Inheritance diagram for egammaisolation::EgammaHcalExtractor:
reco::isodeposit::IsoDepositExtractor

Public Member Functions

reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &c) const override
 
reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
 
 EgammaHcalExtractor (const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
 
 EgammaHcalExtractor (const edm::ParameterSet &par, edm::ConsumesCollector &iC)
 
void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks) override
 
 ~EgammaHcalExtractor () override
 
- Public Member Functions inherited from reco::isodeposit::IsoDepositExtractor
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &track) const
 make single IsoDeposit based on a CandidateBaseRef as input More...
 
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 make single IsoDeposit based on trackRef as input More...
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 
virtual void initEvent (const edm::Event &, const edm::EventSetup &)
 perform some constly initialization More...
 
virtual ~IsoDepositExtractor ()
 Destructor. More...
 

Private Attributes

double etLow_
 
double extRadius_
 
edm::EDGetTokenT< HBHERecHitCollectionhcalRecHitProducerToken_
 
double intRadius_
 

Detailed Description

Definition at line 36 of file EgammaHcalExtractor.h.

Constructor & Destructor Documentation

◆ EgammaHcalExtractor() [1/2]

egammaisolation::EgammaHcalExtractor::EgammaHcalExtractor ( const edm::ParameterSet par,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 38 of file EgammaHcalExtractor.h.

38 : EgammaHcalExtractor(par, iC) {}

◆ EgammaHcalExtractor() [2/2]

EgammaHcalExtractor::EgammaHcalExtractor ( const edm::ParameterSet par,
edm::ConsumesCollector iC 
)

Definition at line 34 of file EgammaHcalExtractor.cc.

35  : extRadius_(par.getParameter<double>("extRadius")),
36  intRadius_(par.getParameter<double>("intRadius")),
37  etLow_(par.getParameter<double>("etMin")),

◆ ~EgammaHcalExtractor()

EgammaHcalExtractor::~EgammaHcalExtractor ( )
override

Definition at line 40 of file EgammaHcalExtractor.cc.

40 {}

Member Function Documentation

◆ deposit() [1/2]

reco::IsoDeposit EgammaHcalExtractor::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Candidate track 
) const
overridevirtual

make single IsoDeposit based on a candidate as input purely virtual: have to implement in concrete implementations

Reimplemented from reco::isodeposit::IsoDepositExtractor.

Definition at line 42 of file EgammaHcalExtractor.cc.

44  {
45  //Get MetaRecHit collection
46  edm::Handle<HBHERecHitCollection> hcalRecHitHandle;
47  iEvent.getByToken(hcalRecHitProducerToken_, hcalRecHitHandle);
48 
49  //Get Calo Geometry
51  iSetup.get<CaloGeometryRecord>().get(pG);
52  const CaloGeometry* caloGeom = pG.product();
54 
55  //Take the SC position
57  math::XYZPoint caloPosition = sc->position();
58  GlobalPoint point(caloPosition.x(), caloPosition.y(), caloPosition.z());
59  // needed: coneSel.select(eta,phi,hits) is not the same!
60 
61  Direction candDir(caloPosition.eta(), caloPosition.phi());
62  reco::IsoDeposit deposit(candDir);
64  double sinTheta = sin(2 * atan(exp(-sc->eta())));
65  deposit.addCandEnergy(sc->energy() * sinTheta);
66 
67  //Compute the HCAL energy behind ECAL
68  coneSel.selectCallback(point, *hcalRecHitHandle, [&](const HBHERecHit& i) {
69  const GlobalPoint& hcalHit_position = caloGeom->getPosition(i.detid());
70  double hcalHit_eta = hcalHit_position.eta();
71  double hcalHit_Et = i.energy() * sin(2 * atan(exp(-hcalHit_eta)));
72  if (hcalHit_Et > etLow_) {
73  deposit.addDeposit(Direction(hcalHit_eta, hcalHit_position.phi()), hcalHit_Et);
74  }
75  });
76 
77  return deposit;
78 }

References reco::IsoDeposit::addCandEnergy(), reco::IsoDeposit::addDeposit(), deposit(), PV3DBase< T, PVType, FrameType >::eta(), etLow_, JetChargeProducer_cfi::exp, extRadius_, edm::EventSetup::get(), get, reco::Candidate::get(), CaloGeometry::getPosition(), DetId::Hcal, hcalRecHitProducerToken_, mps_fire::i, iEvent, intRadius_, PV3DBase< T, PVType, FrameType >::phi(), point, edm::ESHandle< T >::product(), CaloDualConeSelector< T >::selectCallback(), reco::IsoDeposit::setVeto(), and funct::sin().

◆ deposit() [2/2]

reco::IsoDeposit egammaisolation::EgammaHcalExtractor::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Track track 
) const
inlineoverridevirtual

make single IsoDeposit based on track as input purely virtual: have to implement in concrete implementations

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 45 of file EgammaHcalExtractor.h.

47  {
48  throw cms::Exception("Configuration Error")
49  << "This extractor " << (typeid(this).name()) << " is not made for tracks";
50  }

References Exception, and Skims_PA_cff::name.

Referenced by deposit().

◆ fillVetos()

void egammaisolation::EgammaHcalExtractor::fillVetos ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackCollection tracks 
)
inlineoverridevirtual

fill vetoes: to exclude deposits at IsoDeposit creation stage check concrete extractors if it's no-op !

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 43 of file EgammaHcalExtractor.h.

43  {
44  }

Member Data Documentation

◆ etLow_

double egammaisolation::EgammaHcalExtractor::etLow_
private

Definition at line 58 of file EgammaHcalExtractor.h.

Referenced by deposit().

◆ extRadius_

double egammaisolation::EgammaHcalExtractor::extRadius_
private

Definition at line 56 of file EgammaHcalExtractor.h.

Referenced by deposit().

◆ hcalRecHitProducerToken_

edm::EDGetTokenT<HBHERecHitCollection> egammaisolation::EgammaHcalExtractor::hcalRecHitProducerToken_
private

Definition at line 60 of file EgammaHcalExtractor.h.

Referenced by deposit().

◆ intRadius_

double egammaisolation::EgammaHcalExtractor::intRadius_
private

Definition at line 57 of file EgammaHcalExtractor.h.

Referenced by deposit().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
HBHERecHit
Definition: HBHERecHit.h:13
reco::IsoDeposit::addDeposit
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
Definition: IsoDeposit.cc:19
DetId::Hcal
Definition: DetId.h:28
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
egammaisolation::EgammaHcalExtractor::hcalRecHitProducerToken_
edm::EDGetTokenT< HBHERecHitCollection > hcalRecHitProducerToken_
Definition: EgammaHcalExtractor.h:60
edm::SortedCollection
Definition: SortedCollection.h:49
egammaisolation::EgammaHcalExtractor::intRadius_
double intRadius_
Definition: EgammaHcalExtractor.h:57
reco::IsoDeposit::Veto
Definition: IsoDeposit.h:59
edm::Handle
Definition: AssociativeIterator.h:50
egammaisolation::EgammaHcalExtractor::etLow_
double etLow_
Definition: EgammaHcalExtractor.h:58
edm::Ref< SuperClusterCollection >
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
CaloGeometry
Definition: CaloGeometry.h:21
edm::ESHandle< CaloGeometry >
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
Point3DBase< float, GlobalTag >
egammaisolation::EgammaHcalExtractor::EgammaHcalExtractor
EgammaHcalExtractor(const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
Definition: EgammaHcalExtractor.h:38
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
iEvent
int iEvent
Definition: GenABIO.cc:224
egammaisolation::EgammaHcalExtractor::deposit
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
Definition: EgammaHcalExtractor.h:45
CaloDualConeSelector< HBHERecHit >
get
#define get
reco::IsoDeposit::addCandEnergy
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
Definition: IsoDeposit.h:132
reco::isodeposit::Direction
Definition: IsoDepositDirection.h:19
Exception
Definition: hltDiff.cc:246
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
reco::IsoDeposit
Definition: IsoDeposit.h:49
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::InputTag
Definition: InputTag.h:15
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
reco::IsoDeposit::setVeto
void setVeto(const Veto &aVeto)
Set veto.
Definition: IsoDeposit.h:82
egammaisolation::EgammaHcalExtractor::extRadius_
double extRadius_
Definition: EgammaHcalExtractor.h:56