CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ExtractorFromDeposits.cc
Go to the documentation of this file.
2 
6 
7 using namespace edm;
8 using namespace std;
9 using namespace reco;
10 using namespace muonisolation;
12 
13 ExtractorFromDeposits::ExtractorFromDeposits( const ParameterSet& par, edm::ConsumesCollector && iC ) :
14  theCollectionToken(iC.consumes<reco::IsoDepositMap>(par.getParameter<edm::InputTag>("IsolationCollectionTag")))
15 { }
16 
18  const edm::EventSetup & evSetup, const reco::TrackCollection & muons)
19 { }
20 
22  const EventSetup & eventSetup, const Track & muon) const
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 }
48 
50  const EventSetup & eventSetup, const TrackRef & muon) const
51 {
53  event.getByToken(theCollectionToken, depMap);
54 
55  return (*depMap)[muon];
56 }
virtual void fillVetos(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks)
const std::string metname
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:693
bool ev
edm::EDGetTokenT< reco::IsoDepositMap > theCollectionToken
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:699
virtual reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
reco::IsoDeposit IsoDeposit
Definition: Isolation.h:7
tuple muons
Definition: patZpeak.py:38