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>
19  return cc.esConsumes<MagneticField, IdealMagneticFieldRecord>();
20  }
21  static void init(Alg& algo, const edm::EventSetup& es, const ESConsumesToken& token) {
22  algo.setBfield(&es.getData(token));
23  }
24  };
25 
26  template <typename T1, typename C2>
29  };
30 } // namespace helper
31 
32 namespace reco {
33  namespace modules {
34 
35  template <typename T, typename C>
38  bool propagate = cfg.template getParameter<bool>("PropagateToCal");
39  double r = 0.0, minz = 0.0, maxz = 0.0;
40  bool material = false;
41  //allow for undefined propagation-parameters, if no propagation is wanted
42  if (propagate) {
43  r = cfg.template getParameter<double>("CalRadius");
44  minz = cfg.template getParameter<double>("CalMinZ");
45  maxz = cfg.template getParameter<double>("CalMaxZ");
46  material = cfg.template getParameter<bool>("IgnoreMaterial");
47  }
48  return CalIsolationAlgo<T, C>(cfg.template getParameter<double>("dRMin"),
49  cfg.template getParameter<double>("dRMax"),
50  propagate,
51  r,
52  minz,
53  maxz,
54  material);
55  }
56  };
57  } // namespace modules
58 } // namespace reco
59 
60 #endif
Definition: helper.py:1
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
static void init(Alg &algo, const edm::EventSetup &es, const ESConsumesToken &token)
static CalIsolationAlgo< T, C > make(const edm::ParameterSet &cfg)
constexpr float minz[nPairs]
fixed size matrix
constexpr float maxz[nPairs]
long double T
BFieldIsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > > type
static ESConsumesToken esConsumes(edm::ConsumesCollector cc)