CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

MuonServiceProxy Class Reference

#include <MuonServiceProxy.h>

List of all members.

Public Member Functions

edm::ESHandle
< MuonDetLayerGeometry
detLayerGeometry () const
 get the detLayer geometry
const edm::EventSetupeventSetup () const
 get the whole EventSetup
bool isTrackingComponentsRecordChanged () const
 check if the MuonReco Geometry has been changed
edm::ESHandle< MagneticFieldmagneticField () const
 get the magnetic field
const MuonNavigationSchoolmuonNavigationSchool () const
 MuonServiceProxy (const edm::ParameterSet &par)
 Constructor.
edm::ESHandle< Propagatorpropagator (std::string propagatorName) const
 get the propagator
edm::ESHandle
< GlobalTrackingGeometry
trackingGeometry () const
 get the tracking geometry
void update (const edm::EventSetup &setup)
 update the services each event
virtual ~MuonServiceProxy ()
 Destructor.

Private Types

typedef std::map< std::string,
edm::ESHandle< Propagator > > 
propagators

Private Attributes

unsigned long long theCacheId_DG
unsigned long long theCacheId_GTG
unsigned long long theCacheId_MG
unsigned long long theCacheId_P
bool theChangeInTrackingComponentsRecord
edm::ESHandle
< MuonDetLayerGeometry
theDetLayerGeometry
const edm::EventSetuptheEventSetup
edm::ESHandle< MagneticFieldtheMGField
bool theMuonNavigationFlag
propagators thePropagators
bool theRPCLayer
const MuonNavigationSchooltheSchool
edm::ESHandle
< GlobalTrackingGeometry
theTrackingGeometry

Detailed Description

Class to handle the services needed by the muon reconstruction This class avoid the EventSetup percolation. The update method is called each event in order to update the pointers.

Date:
2008/02/13 13:53:54
Revision:
1.10
Author:
N. Amapane - CERN <nicola.amapane@cern.ch>
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>

Class to handle the services needed by the muon reconstruction This class avoid the EventSetup percolation. The update method is called each event in order to update the pointers.

Date:
2009/10/14 10:34:51
Revision:
1.19
Author:
N. Amapane - CERN <nicola.amapane@cern.ch>
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>

Definition at line 26 of file MuonServiceProxy.h.


Member Typedef Documentation

typedef std::map<std::string, edm::ESHandle<Propagator> > MuonServiceProxy::propagators [private]

Definition at line 64 of file MuonServiceProxy.h.


Constructor & Destructor Documentation

MuonServiceProxy::MuonServiceProxy ( const edm::ParameterSet par)

Constructor.

Definition at line 37 of file MuonServiceProxy.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), LogDebug, theCacheId_DG, theCacheId_GTG, theCacheId_MG, theCacheId_P, theChangeInTrackingComponentsRecord, theMuonNavigationFlag, thePropagators, and theRPCLayer.

                                                            :theTrackingGeometry(0),theMGField(0),theDetLayerGeometry(0),theEventSetup(0),theSchool(0){
  
  // load the propagators map
  vector<string> noPropagators;
  vector<string> propagatorNames;

  theMuonNavigationFlag = par.getUntrackedParameter<bool>("UseMuonNavigation",true);
  if(theMuonNavigationFlag) theRPCLayer = par.getParameter<bool>("RPCLayers");
  else theRPCLayer = true;

  propagatorNames = par.getUntrackedParameter<vector<string> >("Propagators", noPropagators);
  
  if(propagatorNames.empty())
    LogDebug("Muon|RecoMuon|MuonServiceProxy") << "NO propagator(s) selected!";
  
  for(vector<string>::iterator propagatorName = propagatorNames.begin();
      propagatorName != propagatorNames.end(); ++propagatorName)
    thePropagators[ *propagatorName ] = ESHandle<Propagator>(0);

  theCacheId_GTG = 0;
  theCacheId_MG = 0;  
  theCacheId_DG = 0;
  theCacheId_P = 0;
  theChangeInTrackingComponentsRecord = false;

}
MuonServiceProxy::~MuonServiceProxy ( ) [virtual]

Destructor.

Definition at line 66 of file MuonServiceProxy.cc.

                                   {
  
  // FIXME: how do that?
  // delete theTrackingGeometry;
  // delete theMGField;
  // delete theDetLayerGeometry;
  
  // FIXME: is it enough?
  thePropagators.clear();
  if(theSchool) delete theSchool;
}

Member Function Documentation

edm::ESHandle<MuonDetLayerGeometry> MuonServiceProxy::detLayerGeometry ( ) const [inline]

get the detLayer geometry

Definition at line 46 of file MuonServiceProxy.h.

References theDetLayerGeometry.

Referenced by MuonSimHitProducer::produce().

const edm::EventSetup& MuonServiceProxy::eventSetup ( ) const [inline]
bool MuonServiceProxy::isTrackingComponentsRecordChanged ( ) const [inline]

check if the MuonReco Geometry has been changed

Definition at line 55 of file MuonServiceProxy.h.

References theChangeInTrackingComponentsRecord.

edm::ESHandle<MagneticField> MuonServiceProxy::magneticField ( ) const [inline]
const MuonNavigationSchool* MuonServiceProxy::muonNavigationSchool ( ) const [inline]

Definition at line 57 of file MuonServiceProxy.h.

References theSchool.

                                                          {
    return theSchool;
  }
edm::ESHandle<Propagator> MuonServiceProxy::propagator ( std::string  propagatorName) const
edm::ESHandle<GlobalTrackingGeometry> MuonServiceProxy::trackingGeometry ( ) const [inline]
void MuonServiceProxy::update ( const edm::EventSetup setup)

Member Data Documentation

unsigned long long MuonServiceProxy::theCacheId_DG [private]

Definition at line 78 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

unsigned long long MuonServiceProxy::theCacheId_GTG [private]

Definition at line 76 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

unsigned long long MuonServiceProxy::theCacheId_MG [private]

Definition at line 77 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

unsigned long long MuonServiceProxy::theCacheId_P [private]

Definition at line 79 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

Definition at line 81 of file MuonServiceProxy.h.

Referenced by isTrackingComponentsRecordChanged(), and MuonServiceProxy().

Definition at line 68 of file MuonServiceProxy.h.

Referenced by detLayerGeometry().

Definition at line 69 of file MuonServiceProxy.h.

Referenced by eventSetup().

Definition at line 67 of file MuonServiceProxy.h.

Referenced by magneticField().

Definition at line 70 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

Definition at line 74 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

Definition at line 71 of file MuonServiceProxy.h.

Referenced by MuonServiceProxy().

Definition at line 72 of file MuonServiceProxy.h.

Referenced by muonNavigationSchool().