57 JParser<> zap(
"Program to determine the energy loss due to visible delta-rays.");
69 catch(
const exception &error) {
70 FATAL(error.what() << endl);
79 else if (lepton == tau)
81 else if (lepton == positron)
86 FATAL(
"Invalid lepton " << lepton << endl);
100 NOTICE(
"Tmin [GeV] " <<
FIXED(8,6) << Tmin <<
' ' <<
FIXED(8,6) << T_GeV.getLowerLimit() << endl);
102 if (T_GeV.is_valid()) {
103 if (Tmin < T_GeV.getLowerLimit()) {
104 Tmin = T_GeV.getLowerLimit();
111 TH1D h0(
"h0", NULL, 80,
log10(MASS_LEPTON), +9.25);
113 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
115 const double x = h0.GetBinCenter(i);
116 const double E =
pow(10.0,x);
118 const double gamma = E / MASS_LEPTON;
119 const double beta = sqrt(1.0 - 1.0/(gamma*gamma));
126 (2.0*
MASS_ELECTRON*beta*beta*gamma*gamma) / (1.0 + 2.0*gamma*RATIO + RATIO*RATIO));
128 if (T_GeV.is_valid()) {
129 if (Tmax > T_GeV.getUpperLimit()) {
130 Tmax = T_GeV.getUpperLimit();
139 const double a = 1.0;
140 const double b = -beta*beta/Tmax;
141 const double c = 0.5/(E*
E);
147 const double W = dx * 0.5 *
K * (
Z/
A) * (1.0/(beta*beta));
149 for (
double x = xmin; x <=
xmax; x += dx) {
151 const double T =
exp(x);
153 const double F = a + T*(b + T*(
c));
154 const double y = W *
F;
163 DEBUG(
"dE/dx [MeV g^-1 cm^2] " <<
FIXED(5,4) << value << endl);
165 h0.SetBinContent(i, value);
169 TF1
f1(
"f1",
"[0] + [1]*x + [2]*x*x + [3]*x*x*x");
171 if (option.find(
'W') == string::npos) {
175 f1.SetParameter(0, h0.GetMinimum());
176 f1.SetParameter(1, (h0.GetMaximum() - h0.GetMinimum()) / (h0.GetXaxis()->GetXmax() - h0.GetXaxis()->GetXmin()));
177 f1.SetParameter(2, 0.0);
178 f1.SetParameter(3, 0.0);
180 f1.SetLineColor(kRed);
184 h0.Fit(&
f1, option.c_str(),
"same");
187 cout <<
"\t// " << lepton << endl;
188 cout <<
"\t// dE/dX = a + bx + cx^2 + dx^3; // [MeV g^-1 cm^2]; x = log10(E/GeV);" << endl;
190 for (
int i = 0; i != 4; ++i) {
191 cout <<
"\tstatic const double " << (char) (
'a' + i) <<
" = " <<
SCIENTIFIC(10,3) <<
f1.GetParameter(i) <<
";" << endl;
197 double Emin = 1 * MASS_LEPTON;
198 double Emax = 5 * MASS_LEPTON;
200 for (
double E = 0.5 * (Emin + Emax); ; E = 0.5 * (Emin + Emax)) {
202 const double gamma = E / MASS_LEPTON;
203 const double beta = sqrt(1.0 - 1.0/(gamma*gamma));
205 const double Tmax = (lepton ==
electron ?
207 (2.0*
MASS_ELECTRON*beta*beta*gamma*gamma) / (1.0 + 2.0*gamma*RATIO + RATIO*RATIO));
209 if (fabs(Tmax - Tmin) < precision) {
210 cout <<
"\tstatic const double Emin = " <<
FIXED(7,5) << E <<
"; // [GeV]" << endl;
then cat $TRIPOD_INITIAL<< EOF1 256877.5 4743716.7-2438.42 256815.5 4743395.0-2435.53 257096.2 4743636.0-2439.5EOFfiJEditDetector-a $DETECTOR_INITIAL-s"-1 addz -6.9"-o $DETECTOReval`JPrintDetector-a $DETECTOR-O SUMMARY`for STRING in ${STRINGS[*]};do set_variable MODULE`getModule-a $DETECTOR-L"$STRING 0"`JEditDetector-a $DETECTOR-M"$MODULE setz -2.9"-o $DETECTORdonecp-p $TRIPOD_INITIAL $TRIPODJAcoustics.sh $DETECTOR_IDcat > acoustics_trigger_parameters txt<< EOFQ=0.0;TMax_s=0.020;numberOfHits=90;EOFJAcousticsEventBuilder.sh $DETECTOR $RUNS[*]INPUT_FILES=(`ls KM3NeT_ ${(l:8::0::0:) DETECTOR_ID}_0 *${^RUNS}_event.root`) cd $WORKDIRif[!$HOMEDIR-ef $WORKDIR];then cp-p $HOMEDIR/$DETECTOR $WORKDIR cp-p $HOMEDIR/$TRIPOD $WORKDIR cp-p $HOMEDIR/${^INPUT_FILES}$WORKDIR cp-p $HOMEDIR/{acoustics_fit_parameters, acoustics_trigger_parameters, disable, hydrophone, mechanics, sound_velocity, tripod, waveform}.txt $WORKDIRfisource $JPP_DIR/examples/JAcoustics/acoustics-fit-toolkit.shtimer_startinitialise stage_1B > &stage log
Utility class to parse command line options.
static const uint32_t K[64]
static const double MASS_MUON
muon mass [GeV]
static const double INDEX_OF_REFRACTION_WATER
Average index of refraction of water corresponding to the group velocity.
Auxiliary data structure for floating point format specification.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
Type definition of range.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
set_variable E_E log10(E_{fit}/E_{#mu})"
static const double MASS_TAU
tau mass [GeV]
do set_variable OUTPUT_DIRECTORY $WORKDIR T
T pow(const T &x, const double y)
Power .
static const double MASS_ELECTRON
electron mass [GeV]
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
Auxiliary data structure for floating point format specification.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
then for LEPTON in muon tau positron electron
#define DEBUG(A)
Message macros.