CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PositionAtECalEntranceComputer Class Reference

#include <PositionAtECalEntranceComputer.h>

Public Member Functions

void beginEvent (const edm::EventSetup &)
 
reco::Candidate::Point operator() (const reco::Candidate *particle, bool &success) const
 
 PositionAtECalEntranceComputer ()
 
 ~PositionAtECalEntranceComputer ()
 

Private Attributes

double bField_z_
 

Detailed Description

Extrapolate particle (charged or neutral) to ECAL entrance, in order to compute the distance of the tau to ECAL cracks and/or dead ECAL channels

Authors
Fabio Colombo, Christian Veelken

Definition at line 19 of file PositionAtECalEntranceComputer.h.

Constructor & Destructor Documentation

◆ PositionAtECalEntranceComputer()

PositionAtECalEntranceComputer::PositionAtECalEntranceComputer ( )

Definition at line 9 of file PositionAtECalEntranceComputer.cc.

9 : bField_z_(-1.) {}

◆ ~PositionAtECalEntranceComputer()

PositionAtECalEntranceComputer::~PositionAtECalEntranceComputer ( )

Definition at line 11 of file PositionAtECalEntranceComputer.cc.

11 {}

Member Function Documentation

◆ beginEvent()

void PositionAtECalEntranceComputer::beginEvent ( const edm::EventSetup es)

◆ operator()()

reco::Candidate::Point PositionAtECalEntranceComputer::operator() ( const reco::Candidate particle,
bool &  success 
) const

Definition at line 19 of file PositionAtECalEntranceComputer.cc.

20  {
21  assert(bField_z_ != -1.);
23  RawParticle(particle->p4(),
24  math::XYZTLorentzVector(particle->vertex().x(), particle->vertex().y(), particle->vertex().z(), 0.),
25  particle->charge()),
26  0.,
27  0.,
28  bField_z_);
29  propagator.propagateToEcalEntrance(false);
31  if (propagator.getSuccess() != 0) {
32  position = propagator.particle().vertex().Vect();
33  success = true;
34  } else {
35  success = false;
36  }
37  return position;
38 }

References cms::cuda::assert(), bField_z_, reco::Candidate::charge(), reco::Candidate::p4(), position, TrackCandidateProducer_cfi::propagator, summarizeEdmComparisonLogfiles::success, and reco::Candidate::vertex().

Member Data Documentation

◆ bField_z_

double PositionAtECalEntranceComputer::bField_z_
private

Definition at line 30 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent(), and operator()().

RawParticle
Definition: RawParticle.h:37
cms::cuda::assert
assert(be >=bs)
BaseParticlePropagator
Definition: BaseParticlePropagator.h:82
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
reco::Candidate::charge
virtual int charge() const =0
electric charge
edm::ESHandle< MagneticField >
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
reco::Candidate::vertex
virtual const Point & vertex() const =0
vertex position
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
get
#define get
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
PositionAtECalEntranceComputer::bField_z_
double bField_z_
Definition: PositionAtECalEntranceComputer.h:30
reco::Candidate::p4
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
reco::Candidate::Point
math::XYZPoint Point
point in the space
Definition: Candidate.h:40