CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
egammaisolation::EgammaHcalExtractor Class Reference
Inheritance diagram for egammaisolation::EgammaHcalExtractor:
reco::isodeposit::IsoDepositExtractor

Public Member Functions

reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
 
reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &c) 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::TrackBaseRef &track) const
 make single IsoDeposit based on trackRef as input More...
 
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 std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
 
virtual std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 
virtual std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &track) const
 
virtual std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &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::ESGetToken< CaloGeometry,
CaloGeometryRecord
geometryToken_
 
edm::EDGetTokenT
< HBHERecHitCollection
hcalRecHitProducerToken_
 
double intRadius_
 

Detailed Description

Definition at line 41 of file EgammaHcalExtractor.cc.

Constructor & Destructor Documentation

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

Definition at line 43 of file EgammaHcalExtractor.cc.

43 : EgammaHcalExtractor(par, iC) {}
EgammaHcalExtractor(const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
EgammaHcalExtractor::EgammaHcalExtractor ( const edm::ParameterSet par,
edm::ConsumesCollector iC 
)

Definition at line 79 of file EgammaHcalExtractor.cc.

80  : extRadius_(par.getParameter<double>("extRadius")),
81  intRadius_(par.getParameter<double>("intRadius")),
82  etLow_(par.getParameter<double>("etMin")),
84  geometryToken_(iC.esConsumes()) {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< HBHERecHitCollection > hcalRecHitProducerToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EgammaHcalExtractor::~EgammaHcalExtractor ( )
override

Definition at line 86 of file EgammaHcalExtractor.cc.

86 {}

Member Function Documentation

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 50 of file EgammaHcalExtractor.cc.

References Exception, and mergeVDriftHistosByStation::name.

Referenced by deposit().

52  {
53  throw cms::Exception("Configuration Error")
54  << "This extractor " << (typeid(this).name()) << " is not made for tracks";
55  }
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 88 of file EgammaHcalExtractor.cc.

References deposit(), CaloRecHit::detid(), CaloRecHit::energy(), PV3DBase< T, PVType, FrameType >::eta(), etLow_, funct::exp(), extRadius_, geometryToken_, edm::Event::get(), reco::Candidate::get(), edm::EventSetup::getData(), CaloGeometry::getPosition(), DetId::Hcal, hcalRecHitProducerToken_, mps_fire::i, intRadius_, PV3DBase< T, PVType, FrameType >::phi(), point, CaloDualConeSelector< T >::selectCallback(), and funct::sin().

90  {
91  //Get MetaRecHit collection
92  auto const& hcalRecHits = iEvent.get(hcalRecHitProducerToken_);
93 
94  //Get Calo Geometry
95  const CaloGeometry* caloGeom = &iSetup.getData(geometryToken_);
97 
98  //Take the SC position
100  math::XYZPoint caloPosition = sc->position();
101  GlobalPoint point(caloPosition.x(), caloPosition.y(), caloPosition.z());
102  // needed: coneSel.select(eta,phi,hits) is not the same!
103 
104  Direction candDir(caloPosition.eta(), caloPosition.phi());
105  reco::IsoDeposit deposit(candDir);
107  double sinTheta = sin(2 * atan(exp(-sc->eta())));
108  deposit.addCandEnergy(sc->energy() * sinTheta);
109 
110  //Compute the HCAL energy behind ECAL
111  coneSel.selectCallback(point, hcalRecHits, [&](const HBHERecHit& i) {
112  const GlobalPoint& hcalHit_position = caloGeom->getPosition(i.detid());
113  double hcalHit_eta = hcalHit_position.eta();
114  double hcalHit_Et = i.energy() * sin(2 * atan(exp(-hcalHit_eta)));
115  if (hcalHit_Et > etLow_) {
116  deposit.addDeposit(Direction(hcalHit_eta, hcalHit_position.phi()), hcalHit_Et);
117  }
118  });
119 
120  return deposit;
121 }
constexpr float energy() const
Definition: CaloRecHit.h:29
void setVeto(const Veto &aVeto)
Set veto.
Definition: IsoDeposit.h:82
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
edm::EDGetTokenT< HBHERecHitCollection > hcalRecHitProducerToken_
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
Definition: IsoDeposit.cc:19
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
int iEvent
Definition: GenABIO.cc:224
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
Definition: IsoDeposit.h:132
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
T eta() const
Definition: PV3DBase.h:73
*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
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 48 of file EgammaHcalExtractor.cc.

48  {
49  }

Member Data Documentation

double egammaisolation::EgammaHcalExtractor::etLow_
private

Definition at line 63 of file EgammaHcalExtractor.cc.

Referenced by deposit().

double egammaisolation::EgammaHcalExtractor::extRadius_
private

Definition at line 61 of file EgammaHcalExtractor.cc.

Referenced by deposit().

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> egammaisolation::EgammaHcalExtractor::geometryToken_
private

Definition at line 66 of file EgammaHcalExtractor.cc.

Referenced by deposit().

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

Definition at line 65 of file EgammaHcalExtractor.cc.

Referenced by deposit().

double egammaisolation::EgammaHcalExtractor::intRadius_
private

Definition at line 62 of file EgammaHcalExtractor.cc.

Referenced by deposit().