test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
 
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &c) const
 
 EgammaHcalExtractor (const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
 
 EgammaHcalExtractor (const edm::ParameterSet &par, edm::ConsumesCollector &iC)
 
virtual void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks)
 
virtual ~EgammaHcalExtractor ()
 
- 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::EDGetTokenT
< HBHERecHitCollection
hcalRecHitProducerToken_
 
double intRadius_
 

Detailed Description

Definition at line 39 of file EgammaHcalExtractor.h.

Constructor & Destructor Documentation

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

Definition at line 41 of file EgammaHcalExtractor.h.

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

Definition at line 35 of file EgammaHcalExtractor.cc.

35  :
36  extRadius_(par.getParameter<double>("extRadius")),
37  intRadius_(par.getParameter<double>("intRadius")),
38  etLow_(par.getParameter<double>("etMin")),
40 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< HBHERecHitCollection > hcalRecHitProducerToken_
EgammaHcalExtractor::~EgammaHcalExtractor ( )
virtual

Definition at line 42 of file EgammaHcalExtractor.cc.

42 {}

Member Function Documentation

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

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

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 49 of file EgammaHcalExtractor.h.

References Exception, and mergeVDriftHistosByStation::name.

Referenced by deposit().

50  {
51  throw cms::Exception("Configuration Error") <<
52  "This extractor " << (typeid(this).name()) << " is not made for tracks";
53  }
reco::IsoDeposit EgammaHcalExtractor::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Candidate track 
) const
virtual

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

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

45  {
46 
47  //Get MetaRecHit collection
48  edm::Handle<HBHERecHitCollection> hcalRecHitHandle;
49  iEvent.getByToken(hcalRecHitProducerToken_, hcalRecHitHandle);
50 
51  //Get Calo Geometry
53  iSetup.get<CaloGeometryRecord>().get(pG);
54  const CaloGeometry* caloGeom = pG.product();
56 
57  //Take the SC position
59  math::XYZPoint caloPosition = sc->position();
60  GlobalPoint point(caloPosition.x(), caloPosition.y() , caloPosition.z());
61  // needed: coneSel.select(eta,phi,hits) is not the same!
62 
63  Direction candDir(caloPosition.eta(), caloPosition.phi());
64  reco::IsoDeposit deposit( candDir );
66  double sinTheta = sin(2*atan(exp(-sc->eta())));
67  deposit.addCandEnergy(sc->energy()*sinTheta);
68 
69  //Compute the HCAL energy behind ECAL
70  coneSel.selectCallback(point, *hcalRecHitHandle, [&](const HBHERecHit& i) {
71  const GlobalPoint & hcalHit_position = caloGeom->getPosition(i.detid());
72  double hcalHit_eta = hcalHit_position.eta();
73  double hcalHit_Et = i.energy()*sin(2*atan(exp(-hcalHit_eta)));
74  if ( hcalHit_Et > etLow_) {
75  deposit.addDeposit( Direction(hcalHit_eta, hcalHit_position.phi()), hcalHit_Et);
76  }
77  });
78 
79  return deposit;
80 }
int i
Definition: DBlmapReader.cc:9
void setVeto(const Veto &aVeto)
Set veto.
Definition: IsoDeposit.h:80
const DetId & detid() const
Definition: CaloRecHit.h:20
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
edm::EDGetTokenT< HBHERecHitCollection > hcalRecHitProducerToken_
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
Definition: IsoDeposit.cc:23
int iEvent
Definition: GenABIO.cc:230
float energy() const
Definition: CaloRecHit.h:17
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
Definition: IsoDeposit.h:139
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:68
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:244
virtual reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
T const * product() const
Definition: ESHandle.h:86
T eta() const
Definition: PV3DBase.h:76
*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
virtual void egammaisolation::EgammaHcalExtractor::fillVetos ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackCollection tracks 
)
inlinevirtual

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

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 47 of file EgammaHcalExtractor.h.

48  { }

Member Data Documentation

double egammaisolation::EgammaHcalExtractor::etLow_
private

Definition at line 60 of file EgammaHcalExtractor.h.

Referenced by deposit().

double egammaisolation::EgammaHcalExtractor::extRadius_
private

Definition at line 58 of file EgammaHcalExtractor.h.

Referenced by deposit().

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

Definition at line 62 of file EgammaHcalExtractor.h.

Referenced by deposit().

double egammaisolation::EgammaHcalExtractor::intRadius_
private

Definition at line 59 of file EgammaHcalExtractor.h.

Referenced by deposit().