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
SteppingHelixPropagatorESProducer Class Reference

#include <SteppingHelixPropagatorESProducer.h>

Inheritance diagram for SteppingHelixPropagatorESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
 
 SteppingHelixPropagatorESProducer (const edm::ParameterSet &p)
 
virtual ~SteppingHelixPropagatorESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

boost::shared_ptr< Propagator_propagator
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 10 of file SteppingHelixPropagatorESProducer.h.

Constructor & Destructor Documentation

SteppingHelixPropagatorESProducer::SteppingHelixPropagatorESProducer ( const edm::ParameterSet p)

Definition at line 18 of file SteppingHelixPropagatorESProducer.cc.

References edm::ParameterSet::getParameter(), and L1TEmulatorMonitor_cff::p.

19 {
20  std::string myname = p.getParameter<std::string>("ComponentName");
21  pset_ = p;
22  setWhatProduced(this,myname);
23 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
SteppingHelixPropagatorESProducer::~SteppingHelixPropagatorESProducer ( )
virtual

Definition at line 25 of file SteppingHelixPropagatorESProducer.cc.

25 {}

Member Function Documentation

boost::shared_ptr< Propagator > SteppingHelixPropagatorESProducer::produce ( const TrackingComponentsRecord iRecord)

Definition at line 28 of file SteppingHelixPropagatorESProducer.cc.

References alongMomentum, anyDirection, SteppingHelixPropagator::applyRadX0Correction(), ExpressReco_HICollisions_FallBack::debugMode, dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), autoMagneticFieldProducer_cfi::magfield, oppositeToMomentum, ExpressReco_HICollisions_FallBack::returnTangentPlane, ExpressReco_HICollisions_FallBack::sendLogWarning, SteppingHelixPropagator::setDebug(), SteppingHelixPropagator::setEndcapShiftsInZPosNeg(), SteppingHelixPropagator::setMaterialMode(), SteppingHelixPropagator::setNoErrorPropagation(), SteppingHelixPropagator::setReturnTangentPlane(), SteppingHelixPropagator::setSendLogWarning(), SteppingHelixPropagator::setUseInTeslaFromMagField(), SteppingHelixPropagator::setUseIsYokeFlag(), SteppingHelixPropagator::setUseMagVolumes(), SteppingHelixPropagator::setUseMatVolumes(), SteppingHelixPropagator::setUseTuningForL2Speed(), SteppingHelixPropagator::setVBFPointer(), SteppingHelixPropagator_cfi::SteppingHelixPropagator, ExpressReco_HICollisions_FallBack::useInTeslaFromMagField, ExpressReco_HICollisions_FallBack::useIsYokeFlag, ExpressReco_HICollisions_FallBack::useMagVolumes, ExpressReco_HICollisions_FallBack::useMatVolumes, and ExpressReco_HICollisions_FallBack::useTuningForL2Speed.

28  {
29 // if (_propagator){
30 // delete _propagator;
31 // _propagator = 0;
32 // }
34  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
35 
36  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
37 
39 
40  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
41  if (pdir == "alongMomentum") dir = alongMomentum;
42  if (pdir == "anyDirection") dir = anyDirection;
43 
44  SteppingHelixPropagator* shProp = new SteppingHelixPropagator(&(*magfield), dir);
45 
46  bool useInTeslaFromMagField = pset_.getParameter<bool>("useInTeslaFromMagField");
47  bool setVBFPointer = pset_.getParameter<bool>("SetVBFPointer");
48  bool useMagVolumes = pset_.getParameter<bool>("useMagVolumes");
49 
50  // if useMagVolumes == true and an alternate VBF field is not specified with setVBFPointer,
51  // Force "useInTeslaFromMagField=true" for a B=0 VBF map.
52  if (useMagVolumes==true && !useInTeslaFromMagField && !setVBFPointer && magfield->nominalValue() == 0) {
53  const VolumeBasedMagneticField* vbfCPtr = dynamic_cast<const VolumeBasedMagneticField*>(&(*magfield));
54  if (vbfCPtr ==0 ){
55  edm::LogWarning("SteppingHelixPropagator") << "Config specifies useMagVolumes==True but no VBF field available: SHP has no access to yoke material properties. Use setVBFPointer=true and VBFName cards to set a VBF field, otherwise set useMagVolumes==False." << std::endl;
56  } else {
57  edm::LogInfo("SteppingHelixPropagator") << "Config specifies useMagVolumes==true and VBF field available: Forcing useInTeslaFromMagField = True." <<std::endl;
58  useInTeslaFromMagField = true;
59  }
60  }
61 
62  if (setVBFPointer){
63  std::string vbfName = pset_.getParameter<std::string>("VBFName");
64  ESHandle<MagneticField> vbfField;
65  iRecord.getRecord<IdealMagneticFieldRecord>().get(vbfName, vbfField );
66  const VolumeBasedMagneticField* vbfCPtr = dynamic_cast<const VolumeBasedMagneticField*>(&(*vbfField));
67  if (vbfField.isValid()) shProp->setVBFPointer(vbfCPtr);
68  }
69 
70  shProp->setUseInTeslaFromMagField(useInTeslaFromMagField);
71 
72  bool haveX0Corr = pset_.getParameter<bool>("ApplyRadX0Correction");
73  shProp->applyRadX0Correction(haveX0Corr);
74 
75  bool assumeNoMaterial = pset_.getParameter<bool>("AssumeNoMaterial");
76  shProp->setMaterialMode(assumeNoMaterial);
77 
78  bool noErrorPropagation = pset_.getParameter<bool>("NoErrorPropagation");
79  shProp->setNoErrorPropagation(noErrorPropagation);
80 
81  bool debugMode = pset_.getParameter<bool>("debug");
82  shProp->setDebug(debugMode);
83 
84  shProp->setUseMagVolumes(useMagVolumes);
85 
86  bool useMatVolumes = pset_.getParameter<bool>("useMatVolumes");
87  shProp->setUseMatVolumes(useMatVolumes);
88 
89  bool useIsYokeFlag = pset_.getParameter<bool>("useIsYokeFlag");
90  shProp->setUseIsYokeFlag(useIsYokeFlag);
91 
92  bool returnTangentPlane = pset_.getParameter<bool>("returnTangentPlane");
93  shProp->setReturnTangentPlane(returnTangentPlane);
94 
95  bool sendLogWarning = pset_.getParameter<bool>("sendLogWarning");
96  shProp->setSendLogWarning(sendLogWarning);
97 
98  bool useTuningForL2Speed = pset_.getParameter<bool>("useTuningForL2Speed");
99  shProp->setUseTuningForL2Speed(useTuningForL2Speed);
100 
101 
102  bool useECoffsets = pset_.getParameter<bool>("useEndcapShiftsInZ");
103  if (useECoffsets){
104  double valPos = pset_.getParameter<double>("endcapShiftInZPos");
105  double valNeg = pset_.getParameter<double>("endcapShiftInZNeg");
106  shProp->setEndcapShiftsInZPosNeg(valPos, valNeg);
107  }
108 
109  _propagator = boost::shared_ptr<Propagator>(shProp);
110  return _propagator;
111 }
T getParameter(std::string const &) const
void setDebug(bool debug)
Switch debug printouts (to cout) .. very verbose.
void setVBFPointer(const VolumeBasedMagneticField *val)
PropagationDirection
void setUseMagVolumes(bool val)
Switch to using MagneticField Volumes .. as in VolumeBasedMagneticField.
void applyRadX0Correction(bool applyRadX0Correction)
void setUseMatVolumes(bool val)
Switch to using Material Volumes .. internally defined for now.
void setReturnTangentPlane(bool val)
flag to return tangent plane for non-plane input
void setSendLogWarning(bool val)
flag to send LogWarning on failures
void setUseInTeslaFromMagField(bool val)
force getting field value from MagneticField, not the geometric one
dbl *** dir
Definition: mlp_gen.cc:35
void setEndcapShiftsInZPosNeg(double valPos, double valNeg)
set shifts in Z for endcap pieces (includes EE, HE, ME, YE)
void setMaterialMode(bool noMaterial)
Switch for material effects mode: no material effects if true.
void setNoErrorPropagation(bool noErrorPropagation)
Force no error propagation.

Member Data Documentation

boost::shared_ptr<Propagator> SteppingHelixPropagatorESProducer::_propagator
private

Definition at line 16 of file SteppingHelixPropagatorESProducer.h.

edm::ParameterSet SteppingHelixPropagatorESProducer::pset_
private

Definition at line 17 of file SteppingHelixPropagatorESProducer.h.