CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ParticlePropagator Class Reference

#include <ParticlePropagator.h>

Inheritance diagram for ParticlePropagator:
BaseParticlePropagator RawParticle

Public Member Functions

double fieldMap (double x, double y, double z)
 
double fieldMap (const TrackerLayer &layer, double coord, int success)
 
void initProperDecayTime ()
 
 ParticlePropagator ()
 Default c'tor. More...
 
 ParticlePropagator (const RawParticle &myPart, double R, double Z, const MagneticFieldMap *aFieldMap, const RandomEngineAndDistribution *engine)
 
 ParticlePropagator (const RawParticle &myPart, const MagneticFieldMap *aFieldMap, const RandomEngineAndDistribution *engine)
 
 ParticlePropagator (const XYZTLorentzVector &p, const XYZTLorentzVector &v, float q, const MagneticFieldMap *aFieldMap)
 
 ParticlePropagator (const XYZTLorentzVector &p, const XYZVector &v, float q, const MagneticFieldMap *aFieldMap)
 
 ParticlePropagator (const FSimTrack &simTrack, const MagneticFieldMap *aFieldMap, const RandomEngineAndDistribution *engine)
 
 ParticlePropagator (const ParticlePropagator &myPropPart)
 
 ParticlePropagator (const BaseParticlePropagator &myPropPart, const MagneticFieldMap *aFieldMap)
 
ParticlePropagator propagated () const
 
bool propagateToBoundSurface (const TrackerLayer &)
 
bool propagateToClosestApproach (double x0=0., double y0=0., bool first=true)
 
bool propagateToNominalVertex (const XYZTLorentzVector &hit2=XYZTLorentzVector(0., 0., 0., 0.))
 
void setPropagationConditions (const TrackerLayer &, bool firstLoop=true)
 
- Public Member Functions inherited from BaseParticlePropagator
bool backPropagate ()
 
 BaseParticlePropagator ()
 Default c'tor. More...
 
 BaseParticlePropagator (const RawParticle &myPart, double r, double z, double B)
 
 BaseParticlePropagator (const RawParticle &myPart, double r, double z, double B, double t)
 
double getMagneticField () const
 Get the magnetic field. More...
 
int getSuccess () const
 Has propagation been performed and was barrel or endcap reached ? More...
 
bool hasDecayed () const
 Has the particle decayed while propagated ? More...
 
double helixCentreDistToAxis () const
 The distance between the cylinder and the helix axes. More...
 
double helixCentreDistToAxis (double xC, double yC) const
 
double helixCentrePhi () const
 The azimuth if the vector joining the cylinder and the helix axes. More...
 
double helixCentrePhi (double xC, double yC) const
 
double helixCentreX () const
 The x coordinate of the helix axis. More...
 
double helixCentreX (double radius, double phi) const
 
double helixCentreY () const
 The y coordinate of the helix axis. More...
 
double helixCentreY (double radius, double phi) const
 
double helixRadius () const
 The helix Radius. More...
 
double helixRadius (double pT) const
 
double helixStartPhi () const
 The azimuth of the momentum at the vertex. More...
 
void increaseRCyl (double delta)
 Just an internal trick. More...
 
void init ()
 Initialize internal switches and quantities. More...
 
bool inside () const
 Is the vertex inside the cylinder ? (stricly inside : true) More...
 
bool inside (double rPos2) const
 
bool onBarrel () const
 Is the vertex already on the cylinder barrel ? More...
 
bool onBarrel (double rPos2) const
 
bool onEndcap () const
 Is the vertex already on the cylinder endcap ? More...
 
bool onEndcap (double rPos2) const
 
bool onFiducial () const
 Is the vertex on some material ? More...
 
bool onSurface () const
 Is the vertex already on the cylinder surface ? More...
 
bool onSurface (double rPos2) const
 
bool propagate ()
 
BaseParticlePropagator propagated () const
 
bool propagateToBeamCylinder (const XYZTLorentzVector &v, double radius=0.)
 
bool propagateToClosestApproach (double x0=0., double y0=0, bool first=true)
 
bool propagateToEcal (bool first=true)
 
bool propagateToEcalEntrance (bool first=true)
 
bool propagateToHcalEntrance (bool first=true)
 
bool propagateToHcalExit (bool first=true)
 
bool propagateToHOLayer (bool first=true)
 
bool propagateToNominalVertex (const XYZTLorentzVector &hit2=XYZTLorentzVector(0., 0., 0., 0.))
 
bool propagateToPreshowerLayer1 (bool first=true)
 
bool propagateToPreshowerLayer2 (bool first=true)
 
bool propagateToVFcalEntrance (bool first=true)
 
void resetDebug ()
 
void setDebug ()
 Set the debug leve;. More...
 
void setMagneticField (double b)
 Set the magnetic field. More...
 
void setPropagationConditions (double r, double z, bool firstLoop=true)
 Set the propagation characteristics (rCyl, zCyl and first loop only) More...
 
void setProperDecayTime (double t)
 Set the proper decay time. More...
 
double xyImpactParameter (double x0=0., double y0=0.) const
 Transverse impact parameter. More...
 
double zImpactParameter (double x0=0, double y0=0.) const
 Longitudinal impact parameter. More...
 
- Public Member Functions inherited from RawParticle
void boost (double bx, double by, double bz)
 
void boost (const Boost &b)
 
double charge () const
 get the MEASURED charge More...
 
void chargeConjugate ()
 
double cos2Theta () const
 Cos**2(theta) is faster to determine than eta. More...
 
double cos2ThetaV () const
 
double et () const
 get the transverse energy More...
 
double eta () const
 
int isUsed () const
 
double mass () const
 get the MEASURED mass More...
 
const XYZTLorentzVectormomentum () const
 the momentum fourvector More...
 
RawParticleoperator= (const RawParticle &rhs)
 
double PDGcharge () const
 get the THEORETICAL charge More...
 
double PDGcTau () const
 get the THEORETICAL lifetime More...
 
double PDGmass () const
 get the THEORETICAL mass More...
 
std::string PDGname () const
 get the PDG name More...
 
int pid () const
 get the HEP particle ID number More...
 
void print () const
 
void printName () const
 
double r () const
 vertex radius More...
 
double R () const
 vertex radius More...
 
double r2 () const
 vertex radius**2 More...
 
double R2 () const
 vertex radius**2 More...
 
 RawParticle ()
 
 RawParticle (const XYZTLorentzVector &p)
 
 RawParticle (const int id, const XYZTLorentzVector &p)
 
 RawParticle (const std::string name, const XYZTLorentzVector &p)
 
 RawParticle (const XYZTLorentzVector &p, const XYZTLorentzVector &xStart)
 
 RawParticle (double px, double py, double pz, double e)
 
 RawParticle (const RawParticle &p)
 
void reUse ()
 
void rotate (double rphi, const XYZVector &raxis)
 
void rotate (const Rotation &r)
 
void rotate (const Rotation3D &r)
 
void rotate (const RotationX &r)
 
void rotate (const RotationY &r)
 
void rotate (const RotationZ &r)
 
void rotateX (double rphi)
 
void rotateY (double rphi)
 
void rotateZ (double rphi)
 
void setCharge (float q)
 set the MEASURED charge More...
 
void setID (const int id)
 
void setID (const std::string name)
 
void setMass (float m)
 set the RECONSTRUCTED mass More...
 
void setStatus (int istat)
 
void setT (const double t)
 set the time of creation More...
 
void setVertex (const XYZTLorentzVector &vtx)
 set the vertex More...
 
void setVertex (double xv, double yv, double zv, double tv)
 
int status () const
 get the particle status More...
 
double t () const
 vertex time More...
 
double T () const
 vertex time More...
 
void translate (const XYZVector &t)
 
void use ()
 
const XYZTLorentzVectorvertex () const
 the vertex fourvector More...
 
double x () const
 x of vertex More...
 
double X () const
 x of vertex More...
 
double y () const
 y of vertex More...
 
double Y () const
 y of vertex More...
 
double z () const
 z of vertex More...
 
double Z () const
 z of vertex More...
 
virtual ~RawParticle ()
 

Private Attributes

const RandomEngineAndDistributionrandom
 
const MagneticFieldMaptheFieldMap
 

Additional Inherited Members

- Public Types inherited from RawParticle
typedef ROOT::Math::Boost Boost
 
typedef ROOT::Math::AxisAngle Rotation
 
typedef ROOT::Math::Rotation3D Rotation3D
 
typedef ROOT::Math::RotationX RotationX
 
typedef ROOT::Math::RotationY RotationY
 
typedef ROOT::Math::RotationZ RotationZ
 
- Protected Member Functions inherited from BaseParticlePropagator
double c_light () const
 The speed of light in mm/ns (!) without clhep (yeaaahhh!) More...
 
- Protected Attributes inherited from BaseParticlePropagator
bool fiducial
 The particle traverses some real material. More...
 
int success
 0:propagation still be done, 1:reached 'barrel', 2:reached 'endcaps' More...
 
- Protected Attributes inherited from RawParticle
double myCharge
 the MEASURED charge More...
 
int myId
 the particle id number HEP-PID More...
 
const ParticleDatamyInfo
 The pointer to the PDG info. More...
 
double myMass
 the RECONSTRUCTED mass More...
 
int myStatus
 the status code according to PYTHIA More...
 
int myUsed
 status of the locking More...
 
XYZTLorentzVector myVertex
 the four vector of the vertex More...
 

Detailed Description

Definition at line 27 of file ParticlePropagator.h.

Constructor & Destructor Documentation

ParticlePropagator::ParticlePropagator ( )

Default c'tor.

Definition at line 13 of file ParticlePropagator.cc.

Referenced by propagated().

13  :
BaseParticlePropagator()
Default c&#39;tor.
const RandomEngineAndDistribution * random
ParticlePropagator::ParticlePropagator ( const RawParticle myPart,
double  R,
double  Z,
const MagneticFieldMap aFieldMap,
const RandomEngineAndDistribution engine 
)

Constructor taking as arguments a RawParticle, as well as the radius, half-height and magnetic field defining the cylinder for which propagation is to be performed

Definition at line 16 of file ParticlePropagator.cc.

References fieldMap(), initProperDecayTime(), BaseParticlePropagator::setMagneticField(), RawParticle::X(), RawParticle::Y(), and RawParticle::Z().

19  :
20  BaseParticlePropagator(myPart,RCyl,ZCyl,0.),
21  theFieldMap(aFieldMap),
22  random(engine)
23 {
24  setMagneticField(fieldMap(X(),Y(),Z()));
26 }
const MagneticFieldMap * theFieldMap
BaseParticlePropagator()
Default c&#39;tor.
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
double X() const
x of vertex
Definition: RawParticle.h:274
const RandomEngineAndDistribution * random
ParticlePropagator::ParticlePropagator ( const RawParticle myPart,
const MagneticFieldMap aFieldMap,
const RandomEngineAndDistribution engine 
)

Constructor with only a RawParticle as argument for subsequent propagation to known surfaces (ECAL, HCAL ...)

Definition at line 28 of file ParticlePropagator.cc.

References fieldMap(), initProperDecayTime(), BaseParticlePropagator::setMagneticField(), RawParticle::X(), RawParticle::Y(), and RawParticle::Z().

30  :
31  BaseParticlePropagator(myPart,0.,0.,0.),
32  theFieldMap(aFieldMap),
33  random(engine)
34 
35 {
36  setMagneticField(fieldMap(X(),Y(),Z()));
38 }
const MagneticFieldMap * theFieldMap
BaseParticlePropagator()
Default c&#39;tor.
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
double X() const
x of vertex
Definition: RawParticle.h:274
const RandomEngineAndDistribution * random
ParticlePropagator::ParticlePropagator ( const XYZTLorentzVector p,
const XYZTLorentzVector v,
float  q,
const MagneticFieldMap aFieldMap 
)

Constructor with two LorentzVector (momentum and vertex (in cm)) and an electric charge propagation to known surfaces (ECAL, HCAL ...)

Definition at line 40 of file ParticlePropagator.cc.

References fieldMap(), RawParticle::setCharge(), BaseParticlePropagator::setMagneticField(), RawParticle::X(), RawParticle::Y(), and RawParticle::Z().

42  :
43  BaseParticlePropagator(RawParticle(mom,vert),0.,0.,0.),
44  theFieldMap(aFieldMap),
45  random(0)
46 {
47  setCharge(q);
48  setMagneticField(fieldMap(X(),Y(),Z()));
49 }
const MagneticFieldMap * theFieldMap
void setCharge(float q)
set the MEASURED charge
Definition: RawParticle.cc:139
BaseParticlePropagator()
Default c&#39;tor.
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
double X() const
x of vertex
Definition: RawParticle.h:274
const RandomEngineAndDistribution * random
ParticlePropagator::ParticlePropagator ( const XYZTLorentzVector p,
const XYZVector v,
float  q,
const MagneticFieldMap aFieldMap 
)

Constructor with a LorentzVector (momentum), a Hep3Vector (vertex in cm) and an electric charge propagation to known surfaces (ECAL, HCAL ...)

ParticlePropagator::ParticlePropagator ( const FSimTrack simTrack,
const MagneticFieldMap aFieldMap,
const RandomEngineAndDistribution engine 
)

Constructor with a FSimTrack from the FSimEvent

Definition at line 63 of file ParticlePropagator.cc.

References FSimTrack::decayTime(), fieldMap(), initProperDecayTime(), FSimTrack::nDaughters(), FSimVertex::position(), BaseParticlePropagator::setMagneticField(), BaseParticlePropagator::setProperDecayTime(), RawParticle::setVertex(), FSimTrack::vertex(), RawParticle::X(), RawParticle::Y(), and RawParticle::Z().

65  :
66  BaseParticlePropagator(RawParticle(simTrack.type(),simTrack.momentum()),
67  0.,0.,0.),
68  theFieldMap(aFieldMap),
69  random(engine)
70 {
71  setVertex(simTrack.vertex().position());
72  setMagneticField(fieldMap(X(),Y(),Z()));
73  if ( simTrack.decayTime() < 0. ) {
74  if ( simTrack.nDaughters() )
75  // This particle already decayed, don't decay it twice
76  this->setProperDecayTime(1E99);
77  else
78  // This particle hasn't decayed yet. Decay time according to particle lifetime
80  } else {
81  // Decay time pre-defined at generator level
82  this->setProperDecayTime(simTrack.decayTime());
83  }
84 }
const MagneticFieldMap * theFieldMap
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:190
BaseParticlePropagator()
Default c&#39;tor.
int nDaughters() const
Number of daughters.
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:49
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
const FSimVertex & vertex() const
Origin vertex.
double X() const
x of vertex
Definition: RawParticle.h:274
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:40
void setProperDecayTime(double t)
Set the proper decay time.
double decayTime() const
Return the pre-defined decay time.
Definition: FSimTrack.h:199
const RandomEngineAndDistribution * random
void setVertex(const XYZTLorentzVector &vtx)
set the vertex
Definition: RawParticle.h:288
ParticlePropagator::ParticlePropagator ( const ParticlePropagator myPropPart)

Constructor with a (Base)ParticlePropagator

Definition at line 86 of file ParticlePropagator.cc.

86  :
87  BaseParticlePropagator(myPropPart),
88  theFieldMap(myPropPart.theFieldMap)
89 {
90  // setMagneticField(fieldMap(x(),y(),z()));
91 }
const MagneticFieldMap * theFieldMap
BaseParticlePropagator()
Default c&#39;tor.
ParticlePropagator::ParticlePropagator ( const BaseParticlePropagator myPropPart,
const MagneticFieldMap aFieldMap 
)

Definition at line 93 of file ParticlePropagator.cc.

References fieldMap(), BaseParticlePropagator::setMagneticField(), RawParticle::X(), RawParticle::Y(), and RawParticle::Z().

94  :
95  BaseParticlePropagator(myPropPart),
96  theFieldMap(aFieldMap)
97 {
98  setMagneticField(fieldMap(X(),Y(),Z()));
99 }
const MagneticFieldMap * theFieldMap
BaseParticlePropagator()
Default c&#39;tor.
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
double X() const
x of vertex
Definition: RawParticle.h:274

Member Function Documentation

double ParticlePropagator::fieldMap ( double  x,
double  y,
double  z 
)

The fieldMap given by the detector geormetry

Definition at line 134 of file ParticlePropagator.cc.

References RawParticle::charge(), MagneticFieldMap::inTeslaZ(), and theFieldMap.

Referenced by ParticlePropagator(), propagateToBoundSurface(), propagateToClosestApproach(), and propagateToNominalVertex().

134  {
135  // Arguments now passed in cm.
136  // return MagneticFieldMap::instance()->inTesla(GlobalPoint(xx/10.,yy/10.,zz/10.)).z();
137  // Return a dummy value for neutral particles!
138  return charge() == 0.0 || theFieldMap == 0 ?
139  4. : theFieldMap->inTeslaZ(GlobalPoint(xx,yy,zz));
140 }
const MagneticFieldMap * theFieldMap
double inTeslaZ(const GlobalPoint &) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double charge() const
get the MEASURED charge
Definition: RawParticle.h:282
double ParticlePropagator::fieldMap ( const TrackerLayer layer,
double  coord,
int  success 
)

Definition at line 143 of file ParticlePropagator.cc.

References RawParticle::charge(), MagneticFieldMap::inTeslaZ(), and theFieldMap.

143  {
144  // Arguments now passed in cm.
145  // return MagneticFieldMap::instance()->inTesla(GlobalPoint(xx/10.,yy/10.,zz/10.)).z();
146  // Return a dummy value for neutral particles!
147  return charge() == 0.0 || theFieldMap == 0 ?
148  4. : theFieldMap->inTeslaZ(layer,coord,success);
149 }
const MagneticFieldMap * theFieldMap
double inTeslaZ(const GlobalPoint &) const
int success
0:propagation still be done, 1:reached &#39;barrel&#39;, 2:reached &#39;endcaps&#39;
double charge() const
get the MEASURED charge
Definition: RawParticle.h:282
void ParticlePropagator::initProperDecayTime ( )

Initialize the proper decay time of the particle

Definition at line 103 of file ParticlePropagator.cc.

References funct::abs(), RandomEngineAndDistribution::flatShoot(), create_public_lumi_plots::log, RawParticle::PDGcTau(), RawParticle::pid(), BaseParticlePropagator::properDecayTime, random, and BaseParticlePropagator::setProperDecayTime().

Referenced by ParticlePropagator().

103  {
104 
105  // And this is the proper time at which the particle will decay
106  double properDecayTime =
107  (pid()==0||pid()==22||abs(pid())==11||abs(pid())==2112||abs(pid())==2212||
108  !random) ?
109  1E99 : -PDGcTau() * std::log(random->flatShoot());
110 
111  this->setProperDecayTime(properDecayTime);
112 
113 }
double flatShoot(double xmin=0.0, double xmax=1.0) const
double PDGcTau() const
get the THEORETICAL lifetime
Definition: RawParticle.cc:264
int pid() const
get the HEP particle ID number
Definition: RawParticle.h:265
double properDecayTime
The proper decay time of the particle.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void setProperDecayTime(double t)
Set the proper decay time.
const RandomEngineAndDistribution * random
ParticlePropagator ParticlePropagator::propagated ( ) const

Return a new instance, corresponding to the particle propagated to the surface of the cylinder

Definition at line 129 of file ParticlePropagator.cc.

References ParticlePropagator(), BaseParticlePropagator::propagated(), and theFieldMap.

129  {
131 }
const MagneticFieldMap * theFieldMap
ParticlePropagator()
Default c&#39;tor.
BaseParticlePropagator propagated() const
bool ParticlePropagator::propagateToBoundSurface ( const TrackerLayer layer)

Definition at line 152 of file ParticlePropagator.cc.

References TrackerLayer::disk(), TrackerLayer::diskInnerRadius(), run_regression::done, BaseParticlePropagator::fiducial, fieldMap(), BaseParticlePropagator::hasDecayed(), BaseParticlePropagator::propagate(), RawParticle::r(), BaseParticlePropagator::setMagneticField(), BaseParticlePropagator::success, and RawParticle::z().

Referenced by TrajectoryManager::propagateToLayer().

152  {
153 
154 
155  fiducial = true;
156  BoundDisk const* disk = layer.disk();
157  // bool disk = layer.forward();
158  // double innerradius=-999;
159  double innerradius = disk ? layer.diskInnerRadius() : -999. ;
160 
161  // if( disk ) {
162  // const Surface& surface = layer.surface();
163  // const BoundDisk & myDisk = dynamic_cast<const BoundDisk&>(surface);
164  // innerradius=myDisk.innerRadius();
165  // innerradius=myDisk->innerRadius();
166  // }
167 
168  bool done = propagate();
169 
170  // Set the magnetic field at the new location (if succesfully propagated)
171  if ( done && !hasDecayed() ) {
172  if ( success == 2 )
174  else if ( success == 1 )
176  }
177 
178  // There is some real material here
179  fiducial = !(!disk && success!=1) &&
180  !( disk && (success!=2 || r()<innerradius));
181 
182  return done;
183 }
bool hasDecayed() const
Has the particle decayed while propagated ?
double z() const
z of vertex
Definition: RawParticle.h:272
int success
0:propagation still be done, 1:reached &#39;barrel&#39;, 2:reached &#39;endcaps&#39;
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
double diskInnerRadius() const
Returns the inner radius of a disk.
Definition: TrackerLayer.h:85
BoundDisk const * disk() const
Returns the surface.
Definition: TrackerLayer.h:79
double r() const
vertex radius
Definition: RawParticle.h:280
bool fiducial
The particle traverses some real material.
bool ParticlePropagator::propagateToClosestApproach ( double  x0 = 0.,
double  y0 = 0.,
bool  first = true 
)

Update the particle after propagation to the closest approach from Z axis, to the preshower layer 1 & 2, to the ECAL entrance, to the HCAL entrance, the HCAL 2nd and 3rd layer (not coded yet), the VFCAL entrance, or any BoundSurface(disk or cylinder)

Definition at line 117 of file ParticlePropagator.cc.

References fieldMap(), BaseParticlePropagator::propagateToClosestApproach(), and BaseParticlePropagator::setMagneticField().

117  {
118  setMagneticField(fieldMap(0.,0.,0.));
120 }
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
bool propagateToClosestApproach(double x0=0., double y0=0, bool first=true)
bool first
Definition: L1TdeRCT.cc:75
bool ParticlePropagator::propagateToNominalVertex ( const XYZTLorentzVector hit2 = XYZTLorentzVector(0.,0.,0.,0.))

Definition at line 123 of file ParticlePropagator.cc.

References fieldMap(), BaseParticlePropagator::propagateToNominalVertex(), and BaseParticlePropagator::setMagneticField().

Referenced by FastPixelHitMatcher::compatibleHits(), and FastPixelHitMatcher::propagateToLayer().

123  {
124  setMagneticField(fieldMap(0.,0.,0.));
126 }
bool propagateToNominalVertex(const XYZTLorentzVector &hit2=XYZTLorentzVector(0., 0., 0., 0.))
void setMagneticField(double b)
Set the magnetic field.
double fieldMap(double x, double y, double z)
void ParticlePropagator::setPropagationConditions ( const TrackerLayer layer,
bool  firstLoop = true 
)

Definition at line 186 of file ParticlePropagator.cc.

References TrackerLayer::cylinder(), TrackerLayer::disk(), TrackerLayer::diskOuterRadius(), BaseParticlePropagator::firstLoop, TrackerLayer::forward(), and BaseParticlePropagator::setPropagationConditions().

Referenced by ConvBremSeedProducer::produce(), and TrajectoryManager::propagateToLayer().

187  {
188  // Set the magentic field
189  // setMagneticField(fieldMap(x(),y(),z()));
190 
191  // Set R and Z according to the Tracker Layer characteristics.
192  // const Surface& surface = layer.surface();
193 
194  if( layer.forward() ) {
195 
196  // const BoundDisk & myDisk = dynamic_cast<const BoundDisk&>(surface);
197  // ParticlePropagator works in mm, whereas the detector geometry is in cm
199  layer.diskOuterRadius(),
200  fabs(layer.disk()->position().z()),
201  firstLoop);
202 
203  // ... or if it is a cylinder barrel
204  } else {
205 
206  // const BoundCylinder & myCylinder = dynamic_cast<const BoundCylinder &>(surface);
207  // ParticlePropagator works now in cm
209  layer.cylinder()->bounds().width()/2.,
210  layer.cylinder()->bounds().length()/2.,
211  firstLoop);
212  }
213 
214 }
bool forward() const
Is the layer forward ?
Definition: TrackerLayer.h:70
bool firstLoop
Do only the first half-loop.
void setPropagationConditions(double r, double z, bool firstLoop=true)
Set the propagation characteristics (rCyl, zCyl and first loop only)
BoundDisk const * disk() const
Returns the surface.
Definition: TrackerLayer.h:79
double diskOuterRadius() const
Returns the outer radius of a disk.
Definition: TrackerLayer.h:88
BoundCylinder const * cylinder() const
Returns the cylinder.
Definition: TrackerLayer.h:76

Member Data Documentation

const RandomEngineAndDistribution* ParticlePropagator::random
private

Definition at line 97 of file ParticlePropagator.h.

Referenced by initProperDecayTime().

const MagneticFieldMap* ParticlePropagator::theFieldMap
private

Definition at line 96 of file ParticlePropagator.h.

Referenced by fieldMap(), and propagated().