CMS 3D CMS Logo

Public Member Functions | Private Attributes

muonisolation::ExtractorFromDeposits Class Reference

#include <ExtractorFromDeposits.h>

Inheritance diagram for muonisolation::ExtractorFromDeposits:
reco::isodeposit::IsoDepositExtractor

List of all members.

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 (const edm::ParameterSet &par)
 ExtractorFromDeposits ()
virtual void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks)
virtual ~ExtractorFromDeposits ()

Private Attributes

edm::InputTag theCollectionTag

Detailed Description

Definition at line 13 of file ExtractorFromDeposits.h.


Constructor & Destructor Documentation

muonisolation::ExtractorFromDeposits::ExtractorFromDeposits ( ) [inline]

Definition at line 17 of file ExtractorFromDeposits.h.

{};
ExtractorFromDeposits::ExtractorFromDeposits ( const edm::ParameterSet par)

Definition at line 16 of file ExtractorFromDeposits.cc.

                                                                      :
  theCollectionTag(par.getParameter<edm::InputTag>("IsolationCollectionTag"))
{ }
virtual muonisolation::ExtractorFromDeposits::~ExtractorFromDeposits ( ) [inline, virtual]

Definition at line 20 of file ExtractorFromDeposits.h.

{}

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 24 of file ExtractorFromDeposits.cc.

References reco::TrackBase::eta(), metname, reco::TrackBase::phi(), and theCollectionTag.

{ 
  static std::string metname = "RecoMuon|ExtractorFromDeposits";
  Handle<reco::IsoDepositMap> depMap;
  event.getByLabel(theCollectionTag, depMap);

  LogWarning(metname)<<"Call this method only if the original muon track collection is lost";

  // double vtx_z = muon.vz();
  reco::isodeposit::Direction muonDir(muon.eta(), muon.phi());

  typedef reco::IsoDepositMap::const_iterator iterator_i;
  typedef reco::IsoDepositMap::container::const_iterator iterator_ii;
  iterator_i depI = depMap->begin();
  iterator_i depIEnd = depMap->end();
  for (; depI != depIEnd; ++depI){
    iterator_ii depII = depI.begin();
    iterator_ii depIIEnd = depI.end();
    for (; depII != depIIEnd; ++depII){
      reco::isodeposit::Direction depDir(depII->direction());
      if (muonDir.deltaR(depDir) < 1.e-6) return *depII;
    }
  }

  return IsoDeposit();
}
IsoDeposit ExtractorFromDeposits::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackRef track 
) const [virtual]

Definition at line 52 of file ExtractorFromDeposits.cc.

References metname, metsig::muon, and theCollectionTag.

{ 
  static std::string metname = "RecoMuon|ExtractorFromDeposits";
  Handle<reco::IsoDepositMap> depMap;
  event.getByLabel(theCollectionTag, depMap);

  return (*depMap)[muon];
}
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 20 of file ExtractorFromDeposits.cc.

{ }

Member Data Documentation

Definition at line 30 of file ExtractorFromDeposits.h.

Referenced by deposit().