Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-24 02:12:57

0001 #ifndef RecoLocalTrackerSiStripClusterizerClusterChargeCut_H
0002 #define RecoLocalTrackerSiStripClusterizerClusterChargeCut_H
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include <iostream>
0006 
0007 inline float clusterChargeCut(const edm::ParameterSet& conf, const char* name = "clusterChargeCut") {
0008   return conf.getParameter<edm::ParameterSet>(name).getParameter<double>("value");
0009 }
0010 
0011 namespace CCC {
0012   // SiStripClusterChargeCutNone:    -1.0
0013   // SiStripClusterChargeCutTiny:   800.0
0014   // SiStripClusterChargeCutLoose: 1620.0
0015   // SiStripClusterChargeCutTight: 1945.0
0016 
0017   enum OP { kNone = 0, kTiny = 1, kLoose = 2, kTight = 3 };
0018   static constexpr std::array<float, 4> cuts = {{-1.0, 800.0, 1620.0, 1945.0}};
0019 }  // namespace CCC
0020 
0021 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0022 inline edm::ParameterSetDescription getConfigurationDescription4CCC(const CCC::OP& op) {
0023   edm::ParameterSetDescription desc;
0024   desc.add<double>("value", CCC::cuts[op]);
0025   return desc;
0026 }
0027 
0028 // this is needed to validate the configuration without explicitly setting a cut
0029 inline edm::ParameterSetDescription getConfigurationDescription4CCCNoDefault() {
0030   edm::ParameterSetDescription desc;
0031   desc.add<double>("value");
0032   return desc;
0033 }
0034 
0035 #endif  // RecoLocalTrackerSiStripClusterizerClusterChargeCut_H