50 JParser<> zap(
"Program to plot PDF of Cherenkov light from muon using interpolation tables.");
54 zap[
'E'] =
make_field(
E,
"muon energy at vertex [GeV]") = 1.0;
55 zap[
'R'] =
make_field(
R,
"distance of approach [m]");
57 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
58 zap[
'T'] =
make_field(TTS_ns,
"PMT time smearing [ns]") = 0.0;
64 catch(
const exception &error) {
65 FATAL(error.what() << endl);
69 typedef JSplineFunction1S_t JFunction1D_t;
70 typedef JMAPLIST<JPolint1FunctionalMap,
71 JPolint1FunctionalGridMap,
72 JPolint1FunctionalGridMap>::maplist JMapList_t;
73 typedef JPDFTable<JFunction1D_t, JMapList_t> JPDF_t;
75 const int N = inputFile.size();
82 for (
int i = 0;
i !=
N; ++
i) {
84 NOTICE(
"loading input from file " << inputFile[
i] <<
"... " << flush);
88 pdf [
i].load(inputFile[
i].c_str());
90 pdf [
i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
99 catch(
const JException& error) {
100 FATAL(error.what() << endl);
104 const double E_emission =
gWater.
getE(
E, z_emission );
108 for (
double dt; cin >> dt; ) {
110 for (
int i = 0;
i !=
N; ++
i) {
112 JFunction1D_t::result_type
y = pdf[
i](
R, dir.getTheta(), dir.getPhi(), dt);
120 cout << setw(2) <<
type[
i] <<
' '
122 <<
FIXED(5,1) << R <<
' '
124 <<
FIXED(5,2) << dir.getTheta() <<
' '
125 <<
FIXED(5,2) << dir.getPhi() <<
' '
126 <<
FIXED(5,1) << dt <<
' '
142 const double t0 = 0.0;
164 for (
int i = 1; i <= h0.GetNbinsX(); ++
i) {
166 const double dt = h0.GetBinCenter(i) - t0;
170 for (
int j = 0;
j !=
N; ++
j) {
174 if (z_emission >= 0 && z_emission <=
gWater(
E)) {
176 JFunction1D_t::result_type y = pdf[
j](
R, dir.getTheta(), dir.getPhi(), dt);
Utility class to parse command line options.
static const double COS_THETA_C_WATER
Average cosine corresponding to the group velocity.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
static const double MASS_MUON
muon mass [GeV]
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
static const JZero zero
Function object to assign zero value.
then warning Cannot perform comparison test for histogram
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
Auxiliary data structure for floating point format specification.
double getDeltaRaysFromMuon(const double E, const JRange< double > T_GeV=JRange< double >(DELTARAY_TMIN, DELTARAY_TMAX))
Equivalent EM-shower energy due to delta-rays per unit muon track length.
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getPDFType(const std::string &file_name)
Get PDF type.
then JCookie sh JDataQuality D $DETECTOR_ID R
virtual double getE(const double E, const double dx) const override
Get energy of muon after specified distance.
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
then set_variable DETECTOR set_variable OUTPUT_FILE set_variable DAQ_FILE set_variable PMT_FILE else fatal Wrong number of arguments fi JPrintTree f $DAQ_FILE type
Auxiliary data structure for floating point format specification.
JAbstractHistogram< double > JHistogram_t
Type definition for scan along axis.