CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SoftLepton.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SoftLepton
4 // Class: SoftLepton
5 //
13 // Original Author: fwyzard
14 // Created: Wed Oct 18 18:02:07 CEST 2006
15 
16 
17 #include <memory>
18 #include <string>
19 #include <utility>
20 #include <cmath>
21 
24 
25 // ROOT::Math vectors (aka math::XYZVector)
27 #include "Math/GenVector/PxPyPzM4D.h"
28 #include "Math/GenVector/VectorUtil.h"
29 #include "Math/GenVector/Boost.h"
30 
32 
37 #include "SoftLepton.h"
38 
39 enum AxisType {
40  AXIS_CALORIMETRIC = 0, // use the calorimietric jet axis
41  AXIS_CHARGED_AVERAGE = 1, // refine jet axis using charged tracks: use a pT-weighted average of (eta, phi)
42  AXIS_CHARGED_AVERAGE_NOLEPTON = 2, // as above, without the tagging lepton track
43  AXIS_CHARGED_SUM = 3, // refine jet axis using charged tracks: use the sum of tracks momentum
44  AXIS_CHARGED_SUM_NOLEPTON = 4, // as above, without the tagging lepton track
45  AXIS_CALORIMETRIC_NOLEPTON = 5 // use the calorimetric jet axis minus the lepton momentum
46 };
47 
48 using namespace std;
49 using namespace edm;
50 using namespace reco;
51 using namespace ROOT::Math::VectorUtil;
52 
56 
57 // ------------ static copy of the nominal beamspot --------------------------------------
59  reco::Vertex::Point( 0, 0, 0 ),
60  reco::Vertex::Error( ROOT::Math::SVector<double,6>( 0.0015 * 0.0015, // 0.0, 0.0
61  0.0, 0.0015 * 0.0015, // 0.0
62  0.0, 0.0, 15. * 15. ) ),
63  1, 1, 0 );
64 
65 // ------------ c'tor --------------------------------------------------------------------
67  m_jets( iConfig.getParameter<edm::InputTag>( "jets" ) ),
68  token_jtas( mayConsume<reco::JetTracksAssociationCollection>( iConfig.getParameter<edm::InputTag>( "jets" ) ) ),
69  token_jets( mayConsume<edm::View<reco::Jet> >( iConfig.getParameter<edm::InputTag>( "jets" ) ) ),
70  token_primaryVertex( consumes<reco::VertexCollection>( iConfig.getParameter<edm::InputTag>( "primaryVertex" ) ) ),
71  m_leptons( iConfig.getParameter<edm::InputTag>( "leptons" ) ),
72  token_gsfElectrons( mayConsume<GsfElectronView>( iConfig.getParameter<edm::InputTag>( "leptons" ) ) ),
73  token_electrons( mayConsume<ElectronView>( iConfig.getParameter<edm::InputTag>( "leptons" ) ) ),
74  token_pfElectrons( mayConsume<reco::PFCandidateCollection>( iConfig.getParameter<edm::InputTag>( "leptons" ) ) ),
75  token_muons( mayConsume<MuonView>( iConfig.getParameter<edm::InputTag>( "leptons" ) ) ),
76  token_tracks( mayConsume<edm::View<reco::Track> >( iConfig.getParameter<edm::InputTag>( "leptons" ) ) ),
77  m_leptonCands( iConfig.exists("leptonCands") ? iConfig.getParameter<edm::InputTag>( "leptonCands" ) : edm::InputTag() ),
78  token_leptonCands( mayConsume<edm::ValueMap<float> >( iConfig.exists("leptonCands") ? iConfig.getParameter<edm::InputTag>( "leptonCands" ) : edm::InputTag() ) ),
79  m_leptonId( iConfig.exists("leptonId") ? iConfig.getParameter<edm::InputTag>( "leptonId" ) : edm::InputTag() ),
80  token_leptonId( mayConsume<edm::ValueMap<float> >( iConfig.exists("leptonId") ? iConfig.getParameter<edm::InputTag>( "leptonId" ) : edm::InputTag() ) ),
81  m_transientTrackBuilder( 0 ),
82  m_refineJetAxis( iConfig.getParameter<unsigned int>( "refineJetAxis" ) ),
83  m_deltaRCut( iConfig.getParameter<double>( "leptonDeltaRCut" ) ),
84  m_chi2Cut( iConfig.getParameter<double>( "leptonChi2Cut" ) ),
85  m_muonSelection( (muon::SelectionType) iConfig.getParameter<unsigned int>( "muonSelection" ) )
86 {
87  produces<reco::SoftLeptonTagInfoCollection>();
88 }
89 
90 // ------------ d'tor --------------------------------------------------------------------
92 }
93 
94 // ------------ method called once per event during the event loop -----------------------
95 void
97 
98  // grab a TransientTrack helper from the Event Setup
100  setup.get<TransientTrackRecord>().get( "TransientTrackBuilder", builder );
101  m_transientTrackBuilder = builder.product();
102 
103  // input objects
104 
105  // input jets (and possibly tracks)
106  ProductID jets_id;
107  std::vector<edm::RefToBase<reco::Jet> > jets;
108  std::vector<reco::TrackRefVector> tracks;
109  do { {
110  // look for a JetTracksAssociationCollection
112  event.getByToken(token_jtas, h_jtas);
113  if (h_jtas.isValid()) {
114  unsigned int size = h_jtas->size();
115  jets.resize(size);
116  tracks.resize(size);
117  for (unsigned int i = 0; i < size; ++i) {
118  jets[i] = (*h_jtas)[i].first;
119  tracks[i] = (*h_jtas)[i].second;
120  }
121  break;
122  }
123  } { // else...
124  // look for a View<Jet>
126  event.getByToken(token_jets, h_jets);
127  if (h_jets.isValid()) {
128  unsigned int size = h_jets->size();
129  jets.resize(size);
130  tracks.resize(size);
131  for (unsigned int i = 0; i < h_jets->size(); i++)
132  jets[i] = h_jets->refAt(i);
133  break;
134  }
135  } { // else...
136  throw edm::Exception(edm::errors::NotFound) << "Object " << m_jets << " of type among (\"reco::JetTracksAssociationCollection\", \"edm::View<reco::Jet>\") not found";
137  } } while (false);
138 
139  // input primary vetex
140  reco::Vertex vertex;
141  Handle<reco::VertexCollection> h_primaryVertex;
142  event.getByToken(token_primaryVertex, h_primaryVertex);
143  if (h_primaryVertex.isValid() and not h_primaryVertex->empty())
144  vertex = h_primaryVertex->front();
145  else
146  // fall back to nominal beam spot
147  vertex = s_nominalBeamSpot;
148 
149  // input leptons (can be of different types)
151 
152  Handle<edm::ValueMap<float> > h_leptonCands;
153  bool haveLeptonCands = !(m_leptonCands == edm::InputTag());
154  if (haveLeptonCands)
155  event.getByToken(token_leptonCands, h_leptonCands);
156 
157  // try to access the input collection as a collection of GsfElectrons, Muons or Tracks
158 
160  do { {
161  // look for View<GsfElectron>
162  Handle<GsfElectronView> h_electrons;
163  event.getByToken(token_gsfElectrons, h_electrons);
164 
165  if (h_electrons.isValid()) {
166  leptonId = SoftLeptonProperties::Quality::egammaElectronId;
167  for (GsfElectronView::const_iterator electron = h_electrons->begin(); electron != h_electrons->end(); ++electron) {
168  LeptonIds &id = leptons[reco::TrackBaseRef(electron->gsfTrack())];
169  id[SoftLeptonProperties::Quality::pfElectronId] = electron->mva_e_pi();
170  if (haveLeptonCands)
171  id[SoftLeptonProperties::Quality::btagElectronCands] = (*h_leptonCands)[h_electrons->refAt(electron - h_electrons->begin())];
172  }
173  break;
174  }
175  } { // else
176  // look for View<Electron>
177  // FIXME: is this obsolete?
178  Handle<ElectronView> h_electrons;
179  event.getByToken(token_electrons, h_electrons);
180  if (h_electrons.isValid()) {
181  leptonId = SoftLeptonProperties::Quality::egammaElectronId;
182  for (ElectronView::const_iterator electron = h_electrons->begin(); electron != h_electrons->end(); ++electron) {
183  LeptonIds &id = leptons[reco::TrackBaseRef(electron->track())];
184  if (haveLeptonCands)
185  id[SoftLeptonProperties::Quality::btagElectronCands] = (*h_leptonCands)[h_electrons->refAt(electron - h_electrons->begin())];
186  }
187  break;
188  }
189  } { // else
190  // look for PFElectrons
191  // FIXME: is this obsolete?
193  event.getByToken(token_pfElectrons, h_electrons);
194  if (h_electrons.isValid()) {
195  leptonId = SoftLeptonProperties::Quality::egammaElectronId;
196  for (reco::PFCandidateCollection::const_iterator electron = h_electrons->begin(); electron != h_electrons->end(); ++electron) {
197  LeptonIds *id;
198  if (electron->gsfTrackRef().isNonnull())
199  id = &leptons[reco::TrackBaseRef(electron->gsfTrackRef())];
200  else if (electron->trackRef().isNonnull())
201  id = &leptons[reco::TrackBaseRef(electron->trackRef())];
202  else
203  continue;
204  (*id)[SoftLeptonProperties::Quality::pfElectronId] = electron->mva_e_pi();
205  if (haveLeptonCands)
206  (*id)[SoftLeptonProperties::Quality::btagElectronCands] = (*h_leptonCands)[reco::PFCandidateRef(h_electrons, electron - h_electrons->begin())];
207  }
208  break;
209  }
210  } { // else
211  // look for View<Muon>
212  Handle<MuonView> h_muons;
213  event.getByToken(token_muons, h_muons);
214  if (h_muons.isValid()) {
215  for (MuonView::const_iterator muon = h_muons->begin(); muon != h_muons->end(); ++muon) {
216  // FIXME -> turn this selection into a muonCands input?
218  LeptonIds *id;
219  if (muon->globalTrack().isNonnull())
220  id = &leptons[reco::TrackBaseRef(muon->globalTrack())];
221  else if (muon->innerTrack().isNonnull())
222  id = &leptons[reco::TrackBaseRef(muon->innerTrack())];
223  else if (muon->outerTrack().isNonnull())
224  // does this makes sense ?
225  id = &leptons[reco::TrackBaseRef(muon->outerTrack())];
226  else
227  continue;
228  if (haveLeptonCands)
229  (*id)[SoftLeptonProperties::Quality::btagMuonCands] = (*h_leptonCands)[h_muons->refAt(muon - h_muons->begin())];
230  }
231  }
232  break;
233  }
234  } { // else
235  // look for edm::View<Track>
237  event.getByToken(token_tracks, h_tracks);
238  if (h_tracks.isValid()) {
239  for (unsigned int i = 0; i < h_tracks->size(); i++) {
240  LeptonIds &id = leptons[h_tracks->refAt(i)];
241  if (haveLeptonCands)
242  id[SoftLeptonProperties::Quality::btagLeptonCands] = (*h_leptonCands)[h_tracks->refAt(i)];
243  }
244  break;
245  }
246  } { // else
247  throw edm::Exception(edm::errors::NotFound) << "Object " << m_leptons << " of type among (\"edm::View<reco::GsfElectron>\", \"edm::View<reco::Muon>\", \"edm::View<reco::Track>\") !found";
248  } } while (false);
249 
250  if (!(m_leptonId == edm::InputTag())) {
251  Handle<edm::ValueMap<float> > h_leptonId;
252  event.getByToken(token_leptonId, h_leptonId);
253 
254  for (Leptons::iterator lepton = leptons.begin(); lepton != leptons.end(); ++lepton)
255  lepton->second[leptonId] = (*h_leptonId)[lepton->first];
256  }
257 
258  // output collections
259  std::auto_ptr<reco::SoftLeptonTagInfoCollection> outputCollection( new reco::SoftLeptonTagInfoCollection() );
260  for (unsigned int i = 0; i < jets.size(); ++i) {
261  reco::SoftLeptonTagInfo result = tag( jets[i], tracks[i], leptons, vertex );
262  outputCollection->push_back( result );
263  }
264  event.put( outputCollection );
265 }
266 
267 // ---------------------------------------------------------------------------------------
271  const Leptons & leptons,
273 ) const {
275  info.setJetRef( jet );
276 
277  for(Leptons::const_iterator lepton = leptons.begin(); lepton != leptons.end(); ++lepton) {
278  const math::XYZVector & lepton_momentum = lepton->first->momentum();
279  if (m_chi2Cut > 0.0 && lepton->first->normalizedChi2() > m_chi2Cut)
280  continue;
281 
282  const GlobalVector jetAxis = refineJetAxis( jet, tracks, lepton->first );
283  const math::XYZVector axis( jetAxis.x(), jetAxis.y(), jetAxis.z());
284  float deltaR = Geom::deltaR(lepton_momentum, axis);
285  if (deltaR > m_deltaRCut)
286  continue;
287 
288  reco::SoftLeptonProperties properties;
289 
290  reco::TransientTrack transientTrack = m_transientTrackBuilder->build(*lepton->first);
291  properties.sip2d = IPTools::signedTransverseImpactParameter( transientTrack, jetAxis, primaryVertex ).second.significance();
292  properties.sip3d = IPTools::signedImpactParameter3D( transientTrack, jetAxis, primaryVertex ).second.significance();
293  properties.deltaR = deltaR;
294  properties.ptRel = Perp( lepton_momentum, axis );
295  properties.p0Par = boostedPPar( lepton_momentum, axis );
296  properties.etaRel = relativeEta( lepton_momentum, axis );
297  properties.ratio = lepton_momentum.R() / axis.R();
298  properties.ratioRel = lepton_momentum.Dot(axis) / axis.Mag2();
299 
300  for(LeptonIds::const_iterator iter = lepton->second.begin(); iter != lepton->second.end(); ++iter)
301  properties.setQuality(static_cast<SoftLeptonProperties::Quality::Generic>(iter->first), iter->second);
302 
303  info.insert( lepton->first, properties );
304  }
305 
306  return info;
307 }
308 
309 
310 // ---------------------------------------------------------------------------------------
314  const reco::TrackBaseRef & exclude /* = reco::TrackBaseRef() */
315 ) const {
316  math::XYZVector axis = jet->momentum();
317 
320 
321  double sum_pT = 0.;
322  double sum_eta_by_pT = 0.;
323  double sum_phi_by_pT = 0.;
324 
325  double perp;
326  double phi_rel;
327  double eta_rel;
328 
329  // refine jet eta and phi with charged tracks measurements, if available
330  for (reco::TrackRefVector::const_iterator track_it = tracks.begin(); track_it != tracks.end(); ++track_it ) {
331  const reco::Track & track = **track_it;
332 
333  perp = track.pt();
334  eta_rel = (double) track.eta() - axis.eta();
335  phi_rel = (double) track.phi() - axis.phi();
336  while (phi_rel < -M_PI) phi_rel += 2*M_PI;
337  while (phi_rel > M_PI) phi_rel -= 2*M_PI;
338 
339  sum_pT += perp;
340  sum_phi_by_pT += perp * phi_rel;
341  sum_eta_by_pT += perp * eta_rel;
342  }
343 
344  // "remove" excluded track
346  const reco::Track & track = *exclude;
347 
348  perp = track.pt();
349  eta_rel = (double) track.eta() - axis.eta();
350  phi_rel = (double) track.phi() - axis.phi();
351  while (phi_rel < -M_PI) phi_rel += 2*M_PI;
352  while (phi_rel > M_PI) phi_rel -= 2*M_PI;
353 
354  sum_pT -= perp;
355  sum_phi_by_pT -= perp * phi_rel;
356  sum_eta_by_pT -= perp * eta_rel;
357  }
358 
359  if (sum_pT > 1.) // avoid the case of only the lepton-track with small rounding errors
360  axis = math::RhoEtaPhiVector( axis.rho(), axis.eta() + sum_eta_by_pT / sum_pT, axis.phi() + sum_phi_by_pT / sum_pT);
361 
362  } else if (m_refineJetAxis == AXIS_CHARGED_SUM or
364  math::XYZVector sum;
365 
366  // recalculate the jet direction as the sum of charget tracks momenta
367  for (reco::TrackRefVector::const_iterator track_it = tracks.begin(); track_it != tracks.end(); ++track_it ) {
368  const reco::Track & track = **track_it;
369  sum += track.momentum();
370  }
371 
372  // "remove" excluded track
373  if (m_refineJetAxis == AXIS_CHARGED_SUM_NOLEPTON and exclude.isNonnull()) {
374  const reco::Track & track = *exclude;
375  sum -= track.momentum();
376  }
377 
378  if (sum.R() > 1.) // avoid the case of only the lepton-track with small rounding errors
379  axis = sum;
381  axis -= exclude->momentum();
382  }
383 
384  return GlobalVector(axis.x(), axis.y(), axis.z());
385 }
386 
387 double SoftLepton::relativeEta(const math::XYZVector& vector, const math::XYZVector& axis) {
388  double mag = vector.r() * axis.r();
389  double dot = vector.Dot(axis);
390  return -log((mag - dot)/(mag + dot)) / 2;
391 }
392 
393 // compute the lepton momentum along the jet axis, in the jet rest frame
394 double SoftLepton::boostedPPar(const math::XYZVector& vector, const math::XYZVector& axis) {
395  static const double lepton_mass = 0.00; // assume a massless (ultrarelativistic) lepton
396  static const double jet_mass = 5.279; // use B±/B0 mass as the jet rest mass [PDG 2007 updates]
397  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > lepton(vector.Dot(axis) / axis.r(), Perp(vector, axis), 0., lepton_mass);
398  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > jet( axis.r(), 0., 0., jet_mass );
399  ROOT::Math::BoostX boost( -jet.Beta() );
400  return boost(lepton).x();
401 }
402 
403 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
404 void
406 
408  desc.add<unsigned int>("muonSelection",1);
409  desc.add<edm::InputTag>("leptons",edm::InputTag("muons"));
410  desc.add<edm::InputTag>("primaryVertex",edm::InputTag("offlinePrimaryVertices"));
411  desc.add<edm::InputTag>("leptonCands",edm::InputTag(""));
412  desc.add<edm::InputTag>("leptonId",edm::InputTag(""));
413  desc.add<unsigned int>("refineJetAxis",0);
414  desc.add<edm::InputTag>("jets",edm::InputTag("ak4PFJetsCHS"));
415  desc.add<double>("leptonDeltaRCut",0.4);
416  desc.add<double>("leptonChi2Cut",9999.0);
417  descriptions.addDefault(desc);
418 }
int i
Definition: DBlmapReader.cc:9
const edm::EDGetTokenT< reco::PFCandidateCollection > token_pfElectrons
Definition: SoftLepton.h:106
static const TGPicture * info(bool iBackgroundIsBlack)
edm::View< reco::Muon > MuonView
Definition: SoftLepton.cc:55
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Base class for all types of Jets.
Definition: Jet.h:20
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:50
const edm::EDGetTokenT< edm::ValueMap< float > > token_leptonCands
Definition: SoftLepton.h:110
virtual Vector momentum() const
spatial momentum vector
reco::TransientTrack build(const reco::Track *p) const
T y() const
Definition: PV3DBase.h:63
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:43
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:71
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:693
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const edm::EDGetTokenT< edm::ValueMap< float > > token_leptonId
Definition: SoftLepton.h:112
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:279
const edm::EDGetTokenT< edm::View< reco::Muon > > token_muons
Definition: SoftLepton.h:107
void setJetRef(const edm::Ref< T > &jetRef)
Definition: JetTagInfo.h:25
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:723
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
const edm::EDGetTokenT< edm::View< reco::Electron > > token_electrons
Definition: SoftLepton.h:105
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:32
double m_chi2Cut
Definition: SoftLepton.h:120
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > token_gsfElectrons
Definition: SoftLepton.h:104
SelectionType
Selector type.
Definition: MuonSelectors.h:17
void setQuality(Quality::Generic qual, float value)
std::vector< SoftLeptonTagInfo > SoftLeptonTagInfoCollection
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:699
void addDefault(ParameterSetDescription const &psetDescription)
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:31
const edm::InputTag m_leptons
Definition: SoftLepton.h:103
static double relativeEta(const math::XYZVector &vector, const math::XYZVector &axis)
Definition: SoftLepton.cc:387
GlobalVector refineJetAxis(const edm::RefToBase< reco::Jet > &jet, const reco::TrackRefVector &tracks, const edm::RefToBase< reco::Track > &exclude=edm::RefToBase< reco::Track >()) const
Definition: SoftLepton.cc:311
vector< PseudoJet > jets
double pt() const
track transverse momentum
Definition: TrackBase.h:669
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
const edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
Definition: SoftLepton.h:102
AxisType
Definition: SoftLepton.cc:39
const edm::InputTag m_leptonId
Definition: SoftLepton.h:111
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
bool isValid() const
Definition: HandleBase.h:75
double m_deltaRCut
Definition: SoftLepton.h:119
#define M_PI
const edm::InputTag m_leptonCands
Definition: SoftLepton.h:109
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
unsigned int m_refineJetAxis
Definition: SoftLepton.h:118
void insert(const REF &lepton, const SoftLeptonProperties &properties)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
reco::SoftLeptonTagInfo tag(const edm::RefToBase< reco::Jet > &jet, const reco::TrackRefVector &tracks, const Leptons &leptons, const reco::Vertex &primaryVertex) const
Definition: SoftLepton.cc:268
const edm::EDGetTokenT< edm::View< reco::Jet > > token_jets
Definition: SoftLepton.h:101
tuple tracks
Definition: testEve_cfg.py:39
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const T & get() const
Definition: EventSetup.h:55
SoftLepton(const edm::ParameterSet &iConfig)
Definition: SoftLepton.cc:66
T const * product() const
Definition: ESHandle.h:86
std::map< unsigned int, float > LeptonIds
Definition: SoftLepton.h:65
edm::View< reco::GsfElectron > GsfElectronView
Definition: SoftLepton.cc:53
static const reco::Vertex s_nominalBeamSpot
Definition: SoftLepton.h:126
muon::SelectionType m_muonSelection
Definition: SoftLepton.h:123
T perp() const
Magnitude of transverse component.
T dot(const Basic3DVector &v) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
std::map< edm::RefToBase< reco::Track >, LeptonIds, TrackCompare > Leptons
Definition: SoftLepton.h:66
const edm::InputTag m_jets
Definition: SoftLepton.h:99
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SoftLepton.cc:405
const TransientTrackBuilder * m_transientTrackBuilder
Definition: SoftLepton.h:115
const edm::EDGetTokenT< edm::View< reco::Track > > token_tracks
Definition: SoftLepton.h:108
edm::View< reco::Electron > ElectronView
Definition: SoftLepton.cc:54
virtual void produce(edm::Event &event, const edm::EventSetup &setup)
Definition: SoftLepton.cc:96
T x() const
Definition: PV3DBase.h:62
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
const edm::EDGetTokenT< reco::JetTracksAssociationCollection > token_jtas
Definition: SoftLepton.h:100
Global3DVector GlobalVector
Definition: GlobalVector.h:10
static double boostedPPar(const math::XYZVector &vector, const math::XYZVector &axis)
Definition: SoftLepton.cc:394