36 JParser<> zap(
"Auxiliary program to draw the strigs of detector.");
45 catch(
const exception &error) {
46 FATAL(error.what() << endl);
59 const double V = 0.61 *
C;
67 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
69 if (module->getFloor() == 1) {
72 z0[module->getString()] = module->getZ();
74 z0[module->getString()] = 0.0;
76 z1[module->getString()] = module->getZ() -
getAverage(
make_array(module->begin(), module->end(), &JPMT::getT0)) *
V;
80 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
82 if (module->getFloor() != 0) {
84 const double dz = module->getZ() - (module->getFloor() - 1) * step - z0[module->getString()];
85 const double ds = module->getZ() -
getAverage(
make_array(module->begin(), module->end(), &JPMT::getT0)) *
V - z1[module->getString()];
87 H0[module->getString()].put((Double_t) module->getFloor(), dz);
88 H1[module->getString()]->Fill(ds);
90 DEBUG(module->getLocation() <<
' ' <<
FIXED(7,3) << ds << endl);
Utility class to parse command line options.
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average.
#define MAKE_CSTRING(A)
Make C-string.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary data structure for floating point format specification.
Auxiliary data structure to build TGraph.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const double C
Physics constants.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
do set_variable DETECTOR_TXT $WORKDIR detector
#define DEBUG(A)
Message macros.