CMS 3D CMS Logo

PositionAtECalEntranceComputer.cc
Go to the documentation of this file.
2 
6 
7 #include <cassert>
8 
10 
12 
16  bField_z_ = bField->inTesla(GlobalPoint(0., 0., 0.)).z();
17 }
18 
20  bool& success) const {
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 }
RawParticle
Definition: RawParticle.h:37
BaseParticlePropagator.h
cms::cuda::assert
assert(be >=bs)
PositionAtECalEntranceComputer::~PositionAtECalEntranceComputer
~PositionAtECalEntranceComputer()
Definition: PositionAtECalEntranceComputer.cc:11
BaseParticlePropagator
Definition: BaseParticlePropagator.h:82
PositionAtECalEntranceComputer::beginEvent
void beginEvent(const edm::EventSetup &)
Definition: PositionAtECalEntranceComputer.cc:13
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
IdealMagneticFieldRecord.h
edm::ESHandle< MagneticField >
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
PositionAtECalEntranceComputer::operator()
reco::Candidate::Point operator()(const reco::Candidate *particle, bool &success) const
Definition: PositionAtECalEntranceComputer.cc:19
reco::Candidate::vertex
virtual const Point & vertex() const =0
vertex position
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
PositionAtECalEntranceComputer::PositionAtECalEntranceComputer
PositionAtECalEntranceComputer()
Definition: PositionAtECalEntranceComputer.cc:9
get
#define get
reco::Candidate
Definition: Candidate.h:27
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
PositionAtECalEntranceComputer.h