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
cms::HICMuonPropagator Class Reference

#include <HICMuonPropagator.h>

Inheritance diagram for cms::HICMuonPropagator:
Propagator

Public Member Functions

virtual HICMuonPropagatorclone () const
 
 HICMuonPropagator (const MagneticField *mf)
 
virtual const MagneticFieldmagneticField () const
 
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Cylinder &cylin) const
 
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Plane &plane) const
 
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Surface &surface) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &state, const Plane &bc) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &state, const Cylinder &bc) const
 
void setHICConst (HICConst *hh)
 
virtual ~HICMuonPropagator ()
 
- Public Member Functions inherited from Propagator
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Plane &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Cylinder &) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) const
 
virtual PropagationDirection propagationDirection () const
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual void setPropagationDirection (PropagationDirection dir) const
 
virtual ~Propagator ()
 

Private Attributes

const MagneticFieldfield
 
HICConsttheHICConst
 

Detailed Description

Definition at line 12 of file HICMuonPropagator.h.

Constructor & Destructor Documentation

cms::HICMuonPropagator::HICMuonPropagator ( const MagneticField mf)
inline

Definition at line 14 of file HICMuonPropagator.h.

References field.

Referenced by clone().

14 {field = mf;}
const MagneticField * field
virtual cms::HICMuonPropagator::~HICMuonPropagator ( )
inlinevirtual

Definition at line 15 of file HICMuonPropagator.h.

15 {}

Member Function Documentation

virtual HICMuonPropagator* cms::HICMuonPropagator::clone ( void  ) const
inlinevirtual

Implements Propagator.

Definition at line 24 of file HICMuonPropagator.h.

References field, and HICMuonPropagator().

25  {
26  return new HICMuonPropagator(field);
27  }
const MagneticField * field
HICMuonPropagator(const MagneticField *mf)
virtual const MagneticField* cms::HICMuonPropagator::magneticField ( ) const
inlinevirtual

Implements Propagator.

Definition at line 45 of file HICMuonPropagator.h.

References field.

45 {return field;}
const MagneticField * field
TrajectoryStateOnSurface cms::HICMuonPropagator::propagate ( const FreeTrajectoryState fts,
const Cylinder cylin 
) const
virtual

Implements Propagator.

Definition at line 19 of file HICMuonPropagator.cc.

References a, b, FreeTrajectoryState::charge(), funct::cos(), gather_cfg::cout, FreeTrajectoryState::curvilinearError(), field, CurvilinearTrajectoryError::matrix(), GlobalTrajectoryParameters::momentum(), L1TEmulatorMonitor_cff::p, FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GlobalTrajectoryParameters::position(), Cylinder::radius(), funct::sin(), theHICConst, x, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and cms::HICConst::zvert.

21  {
22 #ifdef MUPROPAGATOR_DEBUG
23  cout<<"MuPropagator::Start propagation"<<endl;
24 #endif
25 // From FreeTrajectoryState to the vertex.
26 
27  GlobalPoint x = fts.parameters().position();
29  double px = p.x(); double py = p.y(); double pz = p.z();
30  double aCharge = fts.charge();
32  double dfcalc,phnext,zdet;
33 // double pt = p.perp();
34  double a = p.perp()/pz;
35 
36  double b = -a*theHICConst->zvert;
37 
38  double phiold=x.phi();
39  if(x.phi()<0.) phiold=twopi+x.phi();
40 
41 #ifdef MUPROPAGATOR_DEBUG
42  cout<< "MuPropagator::xold=" << x<<" p="<<p<<endl;
43  cout<<"MuPropagator::Propagate to cylinder="<<surface.radius()<<" pt="<<pt<<
44  " line parameters="<<a<<" "<<b<<endl;
45 #endif
46 
47 // Propagate on surface:phidet
48 
49  dfcalc = aCharge*0.006*fabs(x.perp()-surface.radius())/p.perp();
50  phnext = phiold+dfcalc;
51 
52  if(phnext>twopi) phnext = phnext-twopi;
53  if(phnext<0.) phnext = phnext+twopi;
54 
55 // Propagate Zdet
56 
57  zdet = (surface.radius()-b)/a;
58 
59 // New state
60  GlobalPoint xnew(surface.radius()*cos(phnext),surface.radius()*sin(phnext),zdet);
61  GlobalVector pnew(px*cos(dfcalc)-py*sin(dfcalc),px*sin(dfcalc)+py*cos(dfcalc),pz);
62 #ifdef MUPROPAGATOR_DEBUG
63  cout<< "almost empty propagator for the moment phnext,zdet="<<phnext<<" "<<zdet<<endl;
64  cout<<"New coordinates="<<xnew<<endl;
65  cout<<"New momentum="<<pnew<<endl;
66 #endif
67 
69  GlobalTrajectoryParameters(xnew, pnew, (int)aCharge, field),
70  CurvilinearTrajectoryError(e), surface
71  );
72  return tsos;
73  }
const MagneticField * field
T perp() const
Definition: PV3DBase.h:66
const GlobalTrajectoryParameters & parameters() const
float zvert
Definition: HICConst.h:25
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
T y() const
Definition: PV3DBase.h:57
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
T z() const
Definition: PV3DBase.h:58
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double b
Definition: hdecay.h:120
const AlgebraicSymMatrix55 & matrix() const
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:41
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:56
TrajectoryStateOnSurface cms::HICMuonPropagator::propagate ( const FreeTrajectoryState fts,
const Plane plane 
) const
virtual

Implements Propagator.

Definition at line 76 of file HICMuonPropagator.cc.

References a, b, FreeTrajectoryState::charge(), funct::cos(), gather_cfg::cout, FreeTrajectoryState::curvilinearError(), field, CurvilinearTrajectoryError::matrix(), GlobalTrajectoryParameters::momentum(), L1TEmulatorMonitor_cff::p, FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GloballyPositioned< T >::position(), GlobalTrajectoryParameters::position(), funct::sin(), x, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

78  {
79 
80 
81 //
82 // Check if it is detector or layer
83 // if(surface.position().perp()>0.000001) {
84 // HICTrajectoryCorrector* theNewPropagator = new HICTrajectoryCorrector();
85 // TrajectoryStateOnSurface tsos = theCorrector->propagate(fts,surface);
86 // delete theNewPropagator;
87 // return tsos;
88 // } else {
89 // Check if it is forward pixel detector
90 // if(abs(surface.position().z())>0. && abs(surface.position().z())<50.) {
91 // GtfPropagator* theNewPropagator = new GtfPropagator(oppositeToMomentum);
92 // TrajectoryStateOnSurface tsos = theCorrector->propagate(fts,surface);
93 // delete theNewPropagator;
94 // return tsos;
95 // }
96 // }
97 //
98  double dfcalc,phnext,rdet;
99 
100 #ifdef MUPROPAGATOR_DEBUG
101  cout<<"MuPropagator::Start propagation"<<endl;
102 #endif
103 // Information from previous layer
104 //
105  GlobalPoint x = fts.parameters().position();
106  GlobalVector p = fts.parameters().momentum();
107  double px = p.x(); double py = p.y(); double pz = p.z();
108  double aCharge = fts.charge();
110  double phiold=x.phi();
111  if(x.phi()<0.) phiold=twopi+x.phi();
112 
113 #ifdef MUPROPAGATOR_DEBUG
114  cout<< "MuPropagator::xold=" << x<<" p= "<<p<<endl;
115 #endif
116 
117  double a = p.perp()/pz;
118  double b = x.perp()-a*x.z();
119 
120 #ifdef MUPROPAGATOR_DEBUG
121  cout<<"MuPropagator::Propagate to disk="<<surface.position().z()<<" pz="<<pz<<
122  " line parameters="<<a<<" "<<b<<endl;
123 #endif
124 
125 // Propagate on surface:phidet
126 //
127  dfcalc = aCharge*0.006*fabs(x.z()-surface.position().z())/fabs(pz);
128  phnext = phiold+dfcalc;
129 
130  if(phnext>twopi) phnext = phnext-twopi;
131  if(phnext<0.) phnext = phnext+twopi;
132 
133 // Propagate Zdet
134 //
135  rdet = a*surface.position().z()-b;
136 
137 // New state
138  GlobalPoint xnew(rdet*cos(phnext),rdet*sin(phnext),surface.position().z());
139  GlobalVector pnew(px*cos(dfcalc)-py*sin(dfcalc),px*sin(dfcalc)+py*cos(dfcalc),pz);
140 
141 #ifdef MUPROPAGATOR_DEBUG
142  cout<< "MuPropagator::phiold,phnext,zdet,charge,dfcalc="
143  <<phiold<<" "<<phnext<<" "<<
144  surface.position().z()<<" "<<aCharge<<" "<<dfcalc<<endl;
145  cout<<"New coordinates="<<xnew<<endl;
146  cout<<"New momentum="<<pnew<<endl;
147 #endif
148 
150  GlobalTrajectoryParameters(xnew, pnew, (int)aCharge, field),
152  surface);
153  return tsos;
154  }
const MagneticField * field
T perp() const
Definition: PV3DBase.h:66
const GlobalTrajectoryParameters & parameters() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
T y() const
Definition: PV3DBase.h:57
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
T z() const
Definition: PV3DBase.h:58
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double b
Definition: hdecay.h:120
const AlgebraicSymMatrix55 & matrix() const
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:41
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:56
TrajectoryStateOnSurface cms::HICMuonPropagator::propagate ( const FreeTrajectoryState state,
const Surface sur 
) const
inlinevirtual

Propagate from a free state (e.g. position and momentum in in global cartesian coordinates) to a surface.Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Reimplemented from Propagator.

Definition at line 29 of file HICMuonPropagator.h.

References Propagator::propagate().

30  {
31  return Propagator::propagate( fts, surface);
32  }
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
virtual std::pair< TrajectoryStateOnSurface, double> cms::HICMuonPropagator::propagateWithPath ( const FreeTrajectoryState state,
const Plane bc 
) const
inlinevirtual

Implements Propagator.

Definition at line 35 of file HICMuonPropagator.h.

35  {
36  std::pair<TrajectoryStateOnSurface,double> tp;
37  return tp;
38  }
virtual std::pair< TrajectoryStateOnSurface, double> cms::HICMuonPropagator::propagateWithPath ( const FreeTrajectoryState state,
const Cylinder bc 
) const
inlinevirtual

Implements Propagator.

Definition at line 40 of file HICMuonPropagator.h.

40  {
41  std::pair<TrajectoryStateOnSurface,double> tp;
42  return tp;
43  }
void cms::HICMuonPropagator::setHICConst ( HICConst hh)
inline

Definition at line 22 of file HICMuonPropagator.h.

References theHICConst.

22 {theHICConst = hh;}

Member Data Documentation

const MagneticField* cms::HICMuonPropagator::field
private

Definition at line 48 of file HICMuonPropagator.h.

Referenced by clone(), HICMuonPropagator(), magneticField(), and propagate().

HICConst* cms::HICMuonPropagator::theHICConst
private

Definition at line 47 of file HICMuonPropagator.h.

Referenced by propagate(), and setHICConst().