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 
14 namespace helper {
15 
16  template<typename Alg>
18  static void init( Alg & algo, const edm::EventSetup& es ) {
19  edm::ESHandle<MagneticField> bFieldHandle;
20  es.template get<IdealMagneticFieldRecord>().get( bFieldHandle );
21  algo.setBfield( bFieldHandle.product() );
22  }
23  };
24 
25  template<typename T1, typename C2>
29  };
30 }
31 
32 
33 namespace reco {
34  namespace modules {
35 
36  template<typename T, typename C>
39  bool propagate = cfg.template getParameter<bool>( "PropagateToCal" );
40  double r=0.0, minz=0.0, maxz=0.0;
41  bool material = false;
42  //allow for undefined propagation-parameters, if no propagation is wanted
43  if ( propagate ) {
44  r = cfg.template getParameter<double>( "CalRadius" );
45  minz = cfg.template getParameter<double>( "CalMinZ" );
46  maxz = cfg.template getParameter<double>( "CalMaxZ" );
47  material = cfg.template getParameter<bool>( "IgnoreMaterial" );
48  }
49  return CalIsolationAlgo<T, C>( cfg.template getParameter<double>( "dRMin" ),
50  cfg.template getParameter<double>( "dRMax" ),
51  propagate, r, minz, maxz, material );
52  }
53  };
54  }
55 }
56 
57 #endif
Definition: helper.py:1
static CalIsolationAlgo< T, C > make(const edm::ParameterSet &cfg)
static void init(Alg &algo, const edm::EventSetup &es)
fixed size matrix
long double T
T const * product() const
Definition: ESHandle.h:84
BFieldIsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > > type