CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
tuple cfg
Definition: looper.py:296
__constant__ float const minz[nPairs]
static CalIsolationAlgo< T, C > make(const edm::ParameterSet &cfg)
static void init(Alg &algo, const edm::EventSetup &es)
__constant__ float const maxz[nPairs]
T const * product() const
Definition: ESHandle.h:86
long double T
BFieldIsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > > type