CMS 3D CMS Logo

ClusterChargeCut.h
Go to the documentation of this file.
1 #ifndef RecoLocalTrackerSiStripClusterizerClusterChargeCut_H
2 #define RecoLocalTrackerSiStripClusterizerClusterChargeCut_H
3 
5 #include <iostream>
6 
7 inline float clusterChargeCut(const edm::ParameterSet& conf, const char* name = "clusterChargeCut") {
8  return conf.getParameter<edm::ParameterSet>(name).getParameter<double>("value");
9 }
10 
11 namespace CCC {
12  // SiStripClusterChargeCutNone: -1.0
13  // SiStripClusterChargeCutTiny: 800.0
14  // SiStripClusterChargeCutLoose: 1620.0
15  // SiStripClusterChargeCutTight: 1945.0
16 
17  enum OP { kNone = 0, kTiny = 1, kLoose = 2, kTight = 3 };
18  static constexpr std::array<float, 4> cuts = {{-1.0, 800.0, 1620.0, 1945.0}};
19 } // namespace CCC
20 
24  desc.add<double>("value", CCC::cuts[op]);
25  return desc;
26 }
27 
28 // this is needed to validate the configuration without explicitly setting a cut
31  desc.add<double>("value");
32  return desc;
33 }
34 
35 #endif // RecoLocalTrackerSiStripClusterizerClusterChargeCut_H
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ParameterSetDescription getConfigurationDescription4CCC(const CCC::OP &op)
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
static constexpr std::array< float, 4 > cuts
edm::ParameterSetDescription getConfigurationDescription4CCCNoDefault()