CMS 3D CMS Logo

CalIsolationExtrapolate.h
Go to the documentation of this file.
1 #ifndef IsolationAlgos_CalIsolationAlgo_h
2 #define IsolationAlgos_CalIsolationAlgo_h
3 /* Partial spacialization of parameter set adapeter helper
4  *
5  */
12 
13 namespace helper {
14 
15  template <typename Alg>
17  static void init(Alg& algo, const edm::EventSetup& es) {
18  edm::ESHandle<MagneticField> bFieldHandle;
19  es.template get<IdealMagneticFieldRecord>().get(bFieldHandle);
20  algo.setBfield(bFieldHandle.product());
21  }
22  };
23 
24  template <typename T1, typename C2>
27  };
28 } // namespace helper
29 
30 namespace reco {
31  namespace modules {
32 
33  template <typename T, typename C>
36  bool propagate = cfg.template getParameter<bool>("PropagateToCal");
37  double r = 0.0, minz = 0.0, maxz = 0.0;
38  bool material = false;
39  //allow for undefined propagation-parameters, if no propagation is wanted
40  if (propagate) {
41  r = cfg.template getParameter<double>("CalRadius");
42  minz = cfg.template getParameter<double>("CalMinZ");
43  maxz = cfg.template getParameter<double>("CalMaxZ");
44  material = cfg.template getParameter<bool>("IgnoreMaterial");
45  }
46  return CalIsolationAlgo<T, C>(cfg.template getParameter<double>("dRMin"),
47  cfg.template getParameter<double>("dRMax"),
48  propagate,
49  r,
50  minz,
51  maxz,
52  material);
53  }
54  };
55  } // namespace modules
56 } // namespace reco
57 
58 #endif
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ESHandle.h
modules
Definition: MuonCleanerBySegments.cc:35
CalIsolationAlgo.h
CalIsolationAlgo
Definition: CalIsolationAlgo.h:17
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
helper::IsolationAlgorithmSetup
Definition: IsolationProducer.h:28
helper::BFieldIsolationAlgorithmSetup
Definition: CalIsolationExtrapolate.h:16
helper::BFieldIsolationAlgorithmSetup::init
static void init(Alg &algo, const edm::EventSetup &es)
Definition: CalIsolationExtrapolate.h:17
cmsdt::algo
algo
Definition: constants.h:171
gpuPixelDoublets::maxz
__constant__ const float maxz[nPairs]
Definition: gpuPixelDoublets.h:55
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
IsolationProducer.h
edm::ESHandle< MagneticField >
edm::ParameterSet
Definition: ParameterSet.h:47
helper
Definition: helper.py:1
edm::EventSetup
Definition: EventSetup.h:58
looper.cfg
cfg
Definition: looper.py:296
alignCSCRings.r
r
Definition: alignCSCRings.py:93
reco::modules::ParameterAdapter< CalIsolationAlgo< T, C > >::make
static CalIsolationAlgo< T, C > make(const edm::ParameterSet &cfg)
Definition: CalIsolationExtrapolate.h:35
gen::C
C
Definition: PomwigHadronizer.cc:78
T
long double T
Definition: Basic3DVectorLD.h:48
EventSetup.h
ParameterAdapter.h
ParameterSet.h
helper::IsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > >::type
BFieldIsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > > type
Definition: CalIsolationExtrapolate.h:26
reco::modules::ParameterAdapter
Definition: ParameterAdapter.h:12
gpuPixelDoublets::minz
__constant__ const float minz[nPairs]
Definition: gpuPixelDoublets.h:53