CMS 3D CMS Logo

PositionAtECalEntranceComputer.cc
Go to the documentation of this file.
2 
6 
7 #include <cassert>
8 
10 
12 
15  es.get<IdealMagneticFieldRecord>().get(bField);
16  bField_z_ = bField->inTesla(GlobalPoint(0., 0., 0.)).z();
17 }
18 
20  assert(bField_z_ != -1.);
22  RawParticle(particle->p4(),
23  math::XYZTLorentzVector(particle->vertex().x(), particle->vertex().y(), particle->vertex().z(), 0.),
24  particle->charge()),
25  0.,
26  0.,
27  bField_z_);
28  propagator.propagateToEcalEntrance(false);
30  if (propagator.getSuccess() != 0) {
31  position = propagator.particle().vertex().Vect();
32  success = true;
33  } else {
34  success = false;
35  }
36  return position;
37 }
void beginEvent(const edm::EventSetup &)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
int getSuccess() const
Has propagation been performed and was barrel or endcap reached ?
RawParticle const & particle() const
The particle being propagated.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
T z() const
Definition: PV3DBase.h:64
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
bool propagateToEcalEntrance(bool first=true)
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:339
virtual int charge() const =0
electric charge
static int position[264][3]
Definition: ReadPGInfo.cc:509
T get() const
Definition: EventSetup.h:71
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
virtual const Point & vertex() const =0
vertex position
reco::Candidate::Point operator()(const reco::Candidate *particle, bool &success) const