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::~PositionAtECalEntranceComputer ( )

Definition at line 11 of file PositionAtECalEntranceComputer.cc.

11 {}

Member Function Documentation

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

Definition at line 19 of file PositionAtECalEntranceComputer.cc.

References bField_z_, reco::Candidate::charge(), BaseParticlePropagator::getSuccess(), reco::Candidate::p4(), BaseParticlePropagator::particle(), position, BaseParticlePropagator::propagateToEcalEntrance(), PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi::propagator, reco::Candidate::vertex(), and RawParticle::vertex().

19  {
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 }
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
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
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
virtual const Point & vertex() const =0
vertex position

Member Data Documentation

double PositionAtECalEntranceComputer::bField_z_
private

Definition at line 30 of file PositionAtECalEntranceComputer.h.

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