CMS 3D CMS Logo

Public Member Functions | Private Attributes

BeamHaloPropagatorESProducer Class Reference

#include <BeamHaloPropagatorESProducer.h>

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

List of all members.

Public Member Functions

 BeamHaloPropagatorESProducer (const edm::ParameterSet &)
 Constructor.
boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
virtual ~BeamHaloPropagatorESProducer ()
 Destructor.

Private Attributes

std::string myname
std::string theCrossingTrackerPropagatorName
std::string theEndCapTrackerPropagatorName
PropagationDirection thePropagationDirection
boost::shared_ptr< PropagatorthePropagator

Detailed Description

ES producer needed to put the BeamHaloPropagator inside the EventSetup

Author:
Jean-Roch VLIMANT UCSB

Definition at line 22 of file BeamHaloPropagatorESProducer.h.


Constructor & Destructor Documentation

BeamHaloPropagatorESProducer::BeamHaloPropagatorESProducer ( const edm::ParameterSet parameterSet)

Constructor.

Definition at line 26 of file BeamHaloPropagatorESProducer.cc.

References alongMomentum, anyDirection, Exception, edm::ParameterSet::getParameter(), and oppositeToMomentum.

{
  myname = parameterSet.getParameter<string>("ComponentName");

  string propDir = parameterSet.getParameter<string>("PropagationDirection");
  
  if (propDir == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
  else if (propDir == "alongMomentum") thePropagationDirection = alongMomentum;
  else if (propDir == "anyDirection") thePropagationDirection = anyDirection;
  else
    throw cms::Exception("BeamHaloPropagatorESProducer") 
      << "Wrong fit direction ("<< propDir <<")chosen in BeamHaloPropagatorESProducer";

  theEndCapTrackerPropagatorName = parameterSet.getParameter<string>("EndCapTrackerPropagator");
  theCrossingTrackerPropagatorName = parameterSet.getParameter<string>("CrossingTrackerPropagator");

  setWhatProduced(this,myname);
}
BeamHaloPropagatorESProducer::~BeamHaloPropagatorESProducer ( ) [virtual]

Destructor.

Definition at line 45 of file BeamHaloPropagatorESProducer.cc.

{}

Member Function Documentation

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

Definition at line 48 of file BeamHaloPropagatorESProducer.cc.

References edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and LogDebug.

                                                                            { 

  ESHandle<MagneticField> magField;
  iRecord.getRecord<IdealMagneticFieldRecord>().get(magField);
  
  ESHandle<Propagator> endcapPropagator;
  iRecord.get(theEndCapTrackerPropagatorName,endcapPropagator);

  ESHandle<Propagator> crossPropagator;
  iRecord.get(theCrossingTrackerPropagatorName,crossPropagator);
  
  LogDebug("BeamHaloPropagator")<<"Creating a BeamHaloPropagator: "<<myname
                                <<"\n with EndCap Propagator: "<<theEndCapTrackerPropagatorName
                                <<"\n with Crossing Propagator: "<<theCrossingTrackerPropagatorName;

  thePropagator  = boost::shared_ptr<Propagator>(new BeamHaloPropagator(*endcapPropagator,*crossPropagator,
                                                                        &*magField,
                                                                        thePropagationDirection));
  return thePropagator;
}

Member Data Documentation

std::string BeamHaloPropagatorESProducer::myname [private]

Definition at line 38 of file BeamHaloPropagatorESProducer.h.

Definition at line 40 of file BeamHaloPropagatorESProducer.h.

Definition at line 39 of file BeamHaloPropagatorESProducer.h.

Definition at line 37 of file BeamHaloPropagatorESProducer.h.

Definition at line 36 of file BeamHaloPropagatorESProducer.h.