Main Page
Namespaces
Classes
Package Documentation
CondTools
Hcal
interface
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
7
#include "
CondTools/Hcal/interface/CmdLine.h
"
8
#include "
DataFormats/HcalDetId/interface/HcalDetId.h
"
9
#include "
CondFormats/HcalObjects/interface/HFPhase1PMTParams.h
"
10
11
struct
VisualizationOptions
12
{
13
// Initialize the visualization options to some meaningful defaults
14
double
minCharge
{-1.0e2};
15
double
maxCharge
{1.0e3};
16
double
minTDC
{0.0};
17
double
maxTDC
{25.0};
18
double
minAsymm
{-5.0};
19
double
maxAsymm
{5.0};
20
unsigned
plotPoints
{1000};
21
bool
verbose
{
false
};
22
23
void
load
(
cmdline::CmdLine
&
cmdline
)
24
{
25
cmdline.
option
(0,
"--minAsymm"
) >>
minAsymm
;
26
cmdline.
option
(0,
"--maxAsymm"
) >>
maxAsymm
;
27
cmdline.
option
(0,
"--minCharge"
) >>
minCharge
;
28
cmdline.
option
(0,
"--maxCharge"
) >>
maxCharge
;
29
cmdline.
option
(0,
"--minTDC"
) >>
minTDC
;
30
cmdline.
option
(0,
"--maxTDC"
) >>
maxTDC
;
31
cmdline.
option
(0,
"--plotPoints"
) >>
plotPoints
;
32
verbose
= cmdline.
has
(
"-v"
);
33
}
34
35
static
const
char
*
options
()
36
{
37
return
"[-v] [--minAsymm a0] [--maxAsymm a1] [--minCharge Qmin] "
38
"[--maxCharge Qmax] [--minTDC t0] [--maxTDC t1] [--plotPoints n]"
;
39
}
40
41
const
char
*
description
()
const
42
{
43
if
(
descr_
.empty())
44
{
45
std::ostringstream os;
46
47
os <<
" --minAsymm (default "
<<
minAsymm
48
<<
") minimum value of charge asymmetry for plot axes\n\n"
;
49
os <<
" --maxAsymm (default "
<<
maxAsymm
50
<<
") maximum value of charge asymmetry for plot axes\n\n"
;
51
os <<
" --minCharge (default "
<<
minCharge
52
<<
") minimum value of charge for plot axes\n\n"
;
53
os <<
" --maxCharge (default "
<<
maxCharge
54
<<
") maximum value of charge for plot axes\n\n"
;
55
os <<
" --maxTDC (default "
<<
minTDC
56
<<
") minimum value of TDC time for plot axes\n\n"
;
57
os <<
" --maxTDC (default "
<<
maxTDC
58
<<
") maximum value of TDC time for plot axes\n\n"
;
59
os <<
" -v (verbose) print various diagnostics "
60
<<
"to the standard output\n"
;
61
62
descr_
= os.str();
63
}
64
return
descr_
.c_str();
65
}
66
67
private
:
68
mutable
std::string
descr_
;
69
};
70
71
void
visualizeHFPhase1PMTParams
(
const
std::vector<HcalDetId>& idVec,
72
const
HFPhase1PMTParams
&
cuts
,
73
const
VisualizationOptions
&
options
,
74
const
HFPhase1PMTParams
*
reference
=
nullptr
);
75
76
#endif // CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
cmdline::CmdLine::has
bool has(const char *shortOpt, const char *longOpt=0)
Definition:
CmdLine.h:306
VisualizationOptions::plotPoints
unsigned plotPoints
Definition:
visualizeHFPhase1PMTParams.h:20
HFPhase1PMTParams.h
VisualizationOptions::load
void load(cmdline::CmdLine &cmdline)
Definition:
visualizeHFPhase1PMTParams.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
verbose
Definition:
MagVerbosity.h:13
options
Definition:
options.py:1
particleFlowClusterECALTimeSelected_cfi.cuts
cuts
Definition:
particleFlowClusterECALTimeSelected_cfi.py:6
VisualizationOptions::minCharge
double minCharge
Definition:
visualizeHFPhase1PMTParams.h:14
VisualizationOptions::description
const char * description() const
Definition:
visualizeHFPhase1PMTParams.h:41
VisualizationOptions::minAsymm
double minAsymm
Definition:
visualizeHFPhase1PMTParams.h:18
HcalDetId.h
VisualizationOptions::descr_
std::string descr_
Definition:
visualizeHFPhase1PMTParams.h:68
VisualizationOptions::options
static const char * options()
Definition:
visualizeHFPhase1PMTParams.h:35
VisualizationOptions::maxTDC
double maxTDC
Definition:
visualizeHFPhase1PMTParams.h:17
VisualizationOptions::maxCharge
double maxCharge
Definition:
visualizeHFPhase1PMTParams.h:15
VisualizationOptions
Definition:
visualizeHFPhase1PMTParams.h:11
cmdline::CmdLine
Definition:
CmdLine.h:215
visualizeHFPhase1PMTParams
void visualizeHFPhase1PMTParams(const std::vector< HcalDetId > &idVec, const HFPhase1PMTParams &cuts, const VisualizationOptions &options, const HFPhase1PMTParams *reference=0)
VisualizationOptions::minTDC
double minTDC
Definition:
visualizeHFPhase1PMTParams.h:16
HcalItemCollById< HFPhase1PMTData >
cmdline::CmdLine::option
OneShotIStream option(const char *shortOpt, const char *longOpt=0)
Definition:
CmdLine.h:322
CmdLine.h
cmdline
Definition:
CmdLine.h:119
RecoTauValidation_cfi.reference
reference
Definition:
RecoTauValidation_cfi.py:238
VisualizationOptions::maxAsymm
double maxAsymm
Definition:
visualizeHFPhase1PMTParams.h:19
Generated for CMSSW Reference Manual by
1.8.11