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 
9 
10 using namespace edm;
11 using namespace std;
12 using namespace reco;
13 using namespace muonisolation;
15 
16 ExtractorFromDeposits::ExtractorFromDeposits( const ParameterSet& par ) :
17  theCollectionTag(par.getParameter<edm::InputTag>("IsolationCollectionTag"))
18 { }
19 
21  const edm::EventSetup & evSetup, const reco::TrackCollection & muons)
22 { }
23 
25  const EventSetup & eventSetup, const Track & muon) const
26 {
27  static std::string metname = "RecoMuon|ExtractorFromDeposits";
29  event.getByLabel(theCollectionTag, depMap);
30 
31  LogWarning(metname)<<"Call this method only if the original muon track collection is lost";
32 
33  // double vtx_z = muon.vz();
34  reco::isodeposit::Direction muonDir(muon.eta(), muon.phi());
35 
36  typedef reco::IsoDepositMap::const_iterator iterator_i;
38  iterator_i depI = depMap->begin();
39  iterator_i depIEnd = depMap->end();
40  for (; depI != depIEnd; ++depI){
41  iterator_ii depII = depI.begin();
42  iterator_ii depIIEnd = depI.end();
43  for (; depII != depIIEnd; ++depII){
44  reco::isodeposit::Direction depDir(depII->direction());
45  if (muonDir.deltaR(depDir) < 1.e-6) return *depII;
46  }
47  }
48 
49  return IsoDeposit();
50 }
51 
53  const EventSetup & eventSetup, const TrackRef & muon) const
54 {
55  static std::string metname = "RecoMuon|ExtractorFromDeposits";
57  event.getByLabel(theCollectionTag, depMap);
58 
59  return (*depMap)[muon];
60 }
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:10
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:139
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:141
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
const double par[8 *NPar][4]