CMS 3D CMS Logo

visualizeHFPhase1PMTParams.h
Go to the documentation of this file.
1 #ifndef CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
2 #define CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
3 
4 #include <vector>
5 #include <sstream>
6 
10 
12  // Initialize the visualization options to some meaningful defaults
13  double minCharge{-1.0e2};
14  double maxCharge{1.0e3};
15  double minTDC{0.0};
16  double maxTDC{25.0};
17  double minAsymm{-5.0};
18  double maxAsymm{5.0};
19  unsigned plotPoints{1000};
20  bool verbose{false};
21 
23  cmdline.option(nullptr, "--minAsymm") >> minAsymm;
24  cmdline.option(nullptr, "--maxAsymm") >> maxAsymm;
25  cmdline.option(nullptr, "--minCharge") >> minCharge;
26  cmdline.option(nullptr, "--maxCharge") >> maxCharge;
27  cmdline.option(nullptr, "--minTDC") >> minTDC;
28  cmdline.option(nullptr, "--maxTDC") >> maxTDC;
29  cmdline.option(nullptr, "--plotPoints") >> plotPoints;
30  verbose = cmdline.has("-v");
31  }
32 
33  static const char* options() {
34  return "[-v] [--minAsymm a0] [--maxAsymm a1] [--minCharge Qmin] "
35  "[--maxCharge Qmax] [--minTDC t0] [--maxTDC t1] [--plotPoints n]";
36  }
37 
38  const char* description() const {
39  if (descr_.empty()) {
40  std::ostringstream os;
41 
42  os << " --minAsymm (default " << minAsymm << ") minimum value of charge asymmetry for plot axes\n\n";
43  os << " --maxAsymm (default " << maxAsymm << ") maximum value of charge asymmetry for plot axes\n\n";
44  os << " --minCharge (default " << minCharge << ") minimum value of charge for plot axes\n\n";
45  os << " --maxCharge (default " << maxCharge << ") maximum value of charge for plot axes\n\n";
46  os << " --maxTDC (default " << minTDC << ") minimum value of TDC time for plot axes\n\n";
47  os << " --maxTDC (default " << maxTDC << ") maximum value of TDC time for plot axes\n\n";
48  os << " -v (verbose) print various diagnostics "
49  << "to the standard output\n";
50 
51  descr_ = os.str();
52  }
53  return descr_.c_str();
54  }
55 
56 private:
58 };
59 
60 void visualizeHFPhase1PMTParams(const std::vector<HcalDetId>& idVec,
61  const HFPhase1PMTParams& cuts,
63  const HFPhase1PMTParams* reference = nullptr);
64 
65 #endif // CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
cmdline::CmdLine
Definition: CmdLine.h:204
visualizeHFPhase1PMTParams
void visualizeHFPhase1PMTParams(const std::vector< HcalDetId > &idVec, const HFPhase1PMTParams &cuts, const VisualizationOptions &options, const HFPhase1PMTParams *reference=nullptr)
VisualizationOptions::plotPoints
unsigned plotPoints
Definition: visualizeHFPhase1PMTParams.h:19
VisualizationOptions::descr_
std::string descr_
Definition: visualizeHFPhase1PMTParams.h:57
VisualizationOptions::maxTDC
double maxTDC
Definition: visualizeHFPhase1PMTParams.h:16
VisualizationOptions::minAsymm
double minAsymm
Definition: visualizeHFPhase1PMTParams.h:17
options
Definition: options.py:1
VisualizationOptions::maxAsymm
double maxAsymm
Definition: visualizeHFPhase1PMTParams.h:18
VisualizationOptions::maxCharge
double maxCharge
Definition: visualizeHFPhase1PMTParams.h:14
HcalItemCollById< HFPhase1PMTData >
VisualizationOptions::minTDC
double minTDC
Definition: visualizeHFPhase1PMTParams.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalDetId.h
VisualizationOptions::options
static const char * options()
Definition: visualizeHFPhase1PMTParams.h:33
RecoTauValidation_cfi.reference
reference
Definition: RecoTauValidation_cfi.py:234
VisualizationOptions::description
const char * description() const
Definition: visualizeHFPhase1PMTParams.h:38
VisualizationOptions
Definition: visualizeHFPhase1PMTParams.h:11
CmdLine.h
cmdline
Definition: CmdLine.h:119
VisualizationOptions::minCharge
double minCharge
Definition: visualizeHFPhase1PMTParams.h:13
VisualizationOptions::verbose
bool verbose
Definition: visualizeHFPhase1PMTParams.h:20
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
VisualizationOptions::load
void load(cmdline::CmdLine &cmdline)
Definition: visualizeHFPhase1PMTParams.h:22
HFPhase1PMTParams.h