Go to the documentation of this file.
26 int main(
int argc,
char **argv)
36 JParser<> zap(
"Auxiliary program to plot QE and angular acceptance of PMT.");
44 catch(
const exception &error) {
45 FATAL(error.what() << endl);
48 using namespace NAMESPACE;
52 TH1D h0((
string(
"QE[") +
getNamespace() +
"]").c_str(), NULL, 340, 280.0, 700.0);
53 TH1D h1((
string(
"PMT[") +
getNamespace() +
"]").c_str(), NULL, 1000, -1.0, +1.0);
57 JManager_t qe ((TH1D*) h0.Clone(
"QE[%]"));
58 JManager_t pmt((TH1D*) h1.Clone(
"PMT[%]"));
60 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
62 const double y = h0.GetBinCenter (i);
64 h0.SetBinContent(i,
getQE(y));
66 for (
double x = -1.0; x <= +1.0; x += 0.1) {
74 for (
int i = 1; i <= h1.GetNbinsX(); ++i) {
76 const double x = h1.GetBinCenter (i);
77 const double dx = h1.GetBinWidth (i);
83 for (
double y = 340; y <= 640; y += 20.0) {
95 for (JManager_t::iterator i = qe .begin(); i != qe .end(); ++i) {
convertToPDF(*i->second,
"NW"); }
96 for (JManager_t::iterator i = pmt.begin(); i != pmt.end(); ++i) {
convertToPDF(*i->second,
"NW"); }
102 out.WriteTObject(&h0);
103 out.WriteTObject(&h1);
Auxiliary class to manage set of histograms.
Auxiliary data structure for floating point format specification.
static const JPhotocathodeArea2D getPhotocathodeArea2D
Function object for photo-cathode area 3 inch PMT.
void convertToPDF(TH1 &h1, const std::string &option="NW", const double factor=1.0)
Convert 1D histogram to PDF.
Utility class to parse command line options.
double getQE(const double R, const double mu)
Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::string getNamespace(const std::string &type_name)
Get name space, i.e.
int main(int argc, char **argv)
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
const double getPhotocathodeArea()
Photo-cathode area 10 inch PMT.