CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PropagateToMuonSetupT< Tr > Class Template Reference

#include <PropagateToMuonSetup.h>

Public Member Functions

PropagateToMuon init (const edm::EventSetup &iSetup) const
 
 PropagateToMuonSetupT (const edm::ParameterSet &iConfig, edm::ConsumesCollector)
 
 ~PropagateToMuonSetupT ()=default
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Private Attributes

const bool cosmicPropagation_
 for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states are in-out really More...
 
const bool fallbackToME1_
 Fallback to ME1 if propagation to ME2 fails. More...
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagfieldToken_
 
const edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecordmuonGeometryToken_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorAnyToken_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorOppositeToken_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorToken_
 
const bool useMB2_
 Propagate to MB2 (default) instead of MB1. More...
 
const bool useMB2InOverlap_
 
const bool useSimpleGeometry_
 Use simplified geometry (cylinders and disks, not individual chambers) More...
 
WhichState whichState_
 
WhichTrack whichTrack_
 Labels for input collections. More...
 

Detailed Description

template<edm::Transition Tr>
class PropagateToMuonSetupT< Tr >

Definition at line 23 of file PropagateToMuonSetup.h.

Constructor & Destructor Documentation

◆ PropagateToMuonSetupT()

template<edm::Transition Tr>
PropagateToMuonSetupT< Tr >::PropagateToMuonSetupT ( const edm::ParameterSet iConfig,
edm::ConsumesCollector  iC 
)
explicit

Definition at line 70 of file PropagateToMuonSetup.h.

References AtVertex, PropagateToMuonSetupT< Tr >::cosmicPropagation_, Exception, edm::ParameterSet::getParameter(), GlobalTk, Innermost, MuonTk, None, Outermost, AlCaHLTBitMon_QueryRunRegistry::string, TrackerTk, PropagateToMuonSetupT< Tr >::whichState_, and PropagateToMuonSetupT< Tr >::whichTrack_.

71  : useSimpleGeometry_(iConfig.getParameter<bool>("useSimpleGeometry")),
72  useMB2_(iConfig.getParameter<bool>("useStation2")),
73  fallbackToME1_(iConfig.getParameter<bool>("fallbackToME1")),
76  cosmicPropagation_(iConfig.getParameter<bool>("cosmicPropagationHypothesis")),
77  useMB2InOverlap_(iConfig.getParameter<bool>("useMB2InOverlap")),
78  magfieldToken_(iC.esConsumes<Tr>()),
79  propagatorToken_(iC.esConsumes<Tr>(iConfig.getParameter<edm::ESInputTag>("propagatorAlong"))),
80  propagatorAnyToken_(iC.esConsumes<Tr>(iConfig.getParameter<edm::ESInputTag>("propagatorAny"))),
81  propagatorOppositeToken_(iC.esConsumes<Tr>(iConfig.getParameter<edm::ESInputTag>("propagatorOpposite"))),
82  muonGeometryToken_(iC.esConsumes<Tr>()) {
83  std::string whichTrack = iConfig.getParameter<std::string>("useTrack");
84  if (whichTrack == "none") {
85  whichTrack_ = None;
86  } else if (whichTrack == "tracker") {
88  } else if (whichTrack == "muon") {
90  } else if (whichTrack == "global") {
92  } else
93  throw cms::Exception("Configuration") << "Parameter 'useTrack' must be 'none', 'tracker', 'muon', 'global'\n";
94  if (whichTrack_ != None) {
95  std::string whichState = iConfig.getParameter<std::string>("useState");
96  if (whichState == "atVertex") {
98  } else if (whichState == "innermost") {
100  } else if (whichState == "outermost") {
102  } else
103  throw cms::Exception("Configuration") << "Parameter 'useState' must be 'atVertex', 'innermost', "
104  "'outermost'\n";
105  }
107  throw cms::Exception("Configuration") << "When using 'cosmicPropagationHypothesis' useTrack must not be "
108  "'none', and the state must not be 'atVertex'\n";
109  }
110 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const bool cosmicPropagation_
for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states...
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
const edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonGeometryToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
const bool useMB2_
Propagate to MB2 (default) instead of MB1.
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAnyToken_
const bool fallbackToME1_
Fallback to ME1 if propagation to ME2 fails.
WhichTrack whichTrack_
Labels for input collections.
const bool useSimpleGeometry_
Use simplified geometry (cylinders and disks, not individual chambers)

◆ ~PropagateToMuonSetupT()

template<edm::Transition Tr>
PropagateToMuonSetupT< Tr >::~PropagateToMuonSetupT ( )
default

Member Function Documentation

◆ fillPSetDescription()

template<edm::Transition Tr>
static void PropagateToMuonSetupT< Tr >::fillPSetDescription ( edm::ParameterSetDescription desc)
inlinestatic

Definition at line 31 of file PropagateToMuonSetup.h.

References submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

31  {
32  desc.add<bool>("useSimpleGeometry", true);
33  desc.add<bool>("useStation2", true);
34  desc.add<bool>("fallbackToME1", false);
35  desc.add<bool>("cosmicPropagationHypothesis", false);
36  desc.add<bool>("useMB2InOverlap", false);
37  desc.add<std::string>("useTrack", "tracker");
38  desc.add<std::string>("useState", "atVertex");
39  desc.add<edm::ESInputTag>("propagatorAlong", edm::ESInputTag("", "hltESPSteppingHelixPropagatorAlong"));
40  desc.add<edm::ESInputTag>("propagatorAny", edm::ESInputTag("", "SteppingHelixPropagatorAny"));
41  desc.add<edm::ESInputTag>("propagatorOpposite", edm::ESInputTag("", "hltESPSteppingHelixPropagatorOpposite"));
42  }

◆ init()

template<edm::Transition Tr>
PropagateToMuon PropagateToMuonSetupT< Tr >::init ( const edm::EventSetup iSetup) const

Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators

Definition at line 113 of file PropagateToMuonSetup.h.

References edm::EventSetup::getHandle(), volumeBasedMagneticField_160812_cfi::magfield, TrackCandidateProducer_cfi::propagator, L1TMuonDQMOffline_cfi::propagatorAny, and L1TMuonDQMOffline_cfi::propagatorOpposite.

113  {
114  auto const magfield = iSetup.getHandle(magfieldToken_);
115  auto const propagator = iSetup.getHandle(propagatorToken_);
117  auto const propagatorAny = iSetup.getHandle(propagatorAnyToken_);
118  auto const muonGeometry = iSetup.getHandle(muonGeometryToken_);
119 
120  return PropagateToMuon(magfield,
121  propagator,
124  muonGeometry,
126  useMB2_,
128  whichTrack_,
129  whichState_,
132 }
const bool cosmicPropagation_
for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states...
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
const edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonGeometryToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
const bool useMB2_
Propagate to MB2 (default) instead of MB1.
Propagate an object (usually a track) to the second (default) or first muon station.
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAnyToken_
const bool fallbackToME1_
Fallback to ME1 if propagation to ME2 fails.
WhichTrack whichTrack_
Labels for input collections.
const bool useSimpleGeometry_
Use simplified geometry (cylinders and disks, not individual chambers)

Member Data Documentation

◆ cosmicPropagation_

template<edm::Transition Tr>
const bool PropagateToMuonSetupT< Tr >::cosmicPropagation_
private

for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states are in-out really

Definition at line 59 of file PropagateToMuonSetup.h.

Referenced by PropagateToMuonSetupT< Tr >::PropagateToMuonSetupT().

◆ fallbackToME1_

template<edm::Transition Tr>
const bool PropagateToMuonSetupT< Tr >::fallbackToME1_
private

Fallback to ME1 if propagation to ME2 fails.

Definition at line 52 of file PropagateToMuonSetup.h.

◆ magfieldToken_

template<edm::Transition Tr>
const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PropagateToMuonSetupT< Tr >::magfieldToken_
private

Definition at line 63 of file PropagateToMuonSetup.h.

◆ muonGeometryToken_

template<edm::Transition Tr>
const edm::ESGetToken<MuonDetLayerGeometry, MuonRecoGeometryRecord> PropagateToMuonSetupT< Tr >::muonGeometryToken_
private

Definition at line 66 of file PropagateToMuonSetup.h.

◆ propagatorAnyToken_

template<edm::Transition Tr>
const edm::ESGetToken<Propagator, TrackingComponentsRecord> PropagateToMuonSetupT< Tr >::propagatorAnyToken_
private

Definition at line 64 of file PropagateToMuonSetup.h.

◆ propagatorOppositeToken_

template<edm::Transition Tr>
const edm::ESGetToken<Propagator, TrackingComponentsRecord> PropagateToMuonSetupT< Tr >::propagatorOppositeToken_
private

Definition at line 64 of file PropagateToMuonSetup.h.

◆ propagatorToken_

template<edm::Transition Tr>
const edm::ESGetToken<Propagator, TrackingComponentsRecord> PropagateToMuonSetupT< Tr >::propagatorToken_
private

Definition at line 64 of file PropagateToMuonSetup.h.

◆ useMB2_

template<edm::Transition Tr>
const bool PropagateToMuonSetupT< Tr >::useMB2_
private

Propagate to MB2 (default) instead of MB1.

Definition at line 49 of file PropagateToMuonSetup.h.

◆ useMB2InOverlap_

template<edm::Transition Tr>
const bool PropagateToMuonSetupT< Tr >::useMB2InOverlap_
private

Definition at line 61 of file PropagateToMuonSetup.h.

◆ useSimpleGeometry_

template<edm::Transition Tr>
const bool PropagateToMuonSetupT< Tr >::useSimpleGeometry_
private

Use simplified geometry (cylinders and disks, not individual chambers)

Definition at line 46 of file PropagateToMuonSetup.h.

◆ whichState_

template<edm::Transition Tr>
WhichState PropagateToMuonSetupT< Tr >::whichState_
private

◆ whichTrack_

template<edm::Transition Tr>
WhichTrack PropagateToMuonSetupT< Tr >::whichTrack_
private

Labels for input collections.

Definition at line 55 of file PropagateToMuonSetup.h.

Referenced by PropagateToMuonSetupT< Tr >::PropagateToMuonSetupT().