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
muonisolation::ExtractorFromDeposits Class Reference

#include <ExtractorFromDeposits.h>

Inheritance diagram for muonisolation::ExtractorFromDeposits:
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::TrackRef &track) const
 
 ExtractorFromDeposits ()
 
 ExtractorFromDeposits (const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
 
virtual void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks)
 
virtual ~ExtractorFromDeposits ()
 
- 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::Candidate &track) const
 
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 ~IsoDepositExtractor ()
 Destructor. More...
 

Private Attributes

edm::EDGetTokenT
< reco::IsoDepositMap
theCollectionToken
 

Detailed Description

Definition at line 16 of file ExtractorFromDeposits.h.

Constructor & Destructor Documentation

muonisolation::ExtractorFromDeposits::ExtractorFromDeposits ( )
inline

Definition at line 20 of file ExtractorFromDeposits.h.

20 {};
ExtractorFromDeposits::ExtractorFromDeposits ( const edm::ParameterSet par,
edm::ConsumesCollector &&  iC 
)

Definition at line 13 of file ExtractorFromDeposits.cc.

13  :
14  theCollectionToken(iC.consumes<reco::IsoDepositMap>(par.getParameter<edm::InputTag>("IsolationCollectionTag")))
15 { }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::IsoDepositMap > theCollectionToken
virtual muonisolation::ExtractorFromDeposits::~ExtractorFromDeposits ( )
inlinevirtual

Definition at line 23 of file ExtractorFromDeposits.h.

23 {}

Member Function Documentation

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

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

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 21 of file ExtractorFromDeposits.cc.

References reco::TrackBase::eta(), metname, reco::TrackBase::phi(), AlCaHLTBitMon_QueryRunRegistry::string, and theCollectionToken.

23 {
24  static const std::string metname = "RecoMuon|ExtractorFromDeposits";
26  event.getByToken(theCollectionToken, depMap);
27 
28  LogWarning(metname)<<"Call this method only if the original muon track collection is lost";
29 
30  // double vtx_z = muon.vz();
31  reco::isodeposit::Direction muonDir(muon.eta(), muon.phi());
32 
33  typedef reco::IsoDepositMap::const_iterator iterator_i;
34  typedef reco::IsoDepositMap::container::const_iterator iterator_ii;
35  iterator_i depI = depMap->begin();
36  iterator_i depIEnd = depMap->end();
37  for (; depI != depIEnd; ++depI){
38  iterator_ii depII = depI.begin();
39  iterator_ii depIIEnd = depI.end();
40  for (; depII != depIIEnd; ++depII){
41  reco::isodeposit::Direction depDir(depII->direction());
42  if (muonDir.deltaR(depDir) < 1.e-6) return *depII;
43  }
44  }
45 
46  return IsoDeposit();
47 }
const std::string metname
edm::EDGetTokenT< reco::IsoDepositMap > theCollectionToken
reco::IsoDeposit IsoDeposit
Definition: Isolation.h:7
IsoDeposit ExtractorFromDeposits::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackRef track 
) const
virtual

Definition at line 49 of file ExtractorFromDeposits.cc.

References trackingTruthProducerFastSim_cfi::muon, and theCollectionToken.

51 {
53  event.getByToken(theCollectionToken, depMap);
54 
55  return (*depMap)[muon];
56 }
edm::EDGetTokenT< reco::IsoDepositMap > theCollectionToken
void ExtractorFromDeposits::fillVetos ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackCollection tracks 
)
virtual

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

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 17 of file ExtractorFromDeposits.cc.

19 { }

Member Data Documentation

edm::EDGetTokenT<reco::IsoDepositMap> muonisolation::ExtractorFromDeposits::theCollectionToken
private

Definition at line 33 of file ExtractorFromDeposits.h.

Referenced by deposit().