41 int main(
int argc,
char **argv)
45 using namespace KM3NETDAQ;
59 JParser<> zap(
"Program to search for sets of consecutive hits on a given PMT that are equidistant in time.");
66 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
71 catch(
const exception& error) {
72 FATAL(error.what() << endl);
87 cerr <<
"FATAL ERROR. Could not open detector file '" << detectorFile <<
"'." << endl;
93 TH1D
h1 (
"MEvt",
"", 50, 0.5, 50.5);
95 TH2D h2 (
"FEvt", NULL,
99 TH1D h3 (
"ML0" ,
"", 50, 0.5, 50.5);
101 TH2D h4 (
"FL0", NULL,
105 for (Int_t i = 1; i <= h2.GetXaxis()->GetNbins(); ++i) {
106 h2.GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(stringRouter.at(i-1)));
109 for (Int_t i = 1; i <= h2.GetXaxis()->GetNbins(); ++i) {
110 h4.GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(stringRouter.at(i-1)));
122 JHitBuffer& buffer =
event->getHits<JHit_t>();
124 std::sort(buffer.begin(),buffer.end(),less<JDAQKeyHit>());
126 for (JHitBuffer::const_iterator p = buffer.begin() ; p != buffer.end() ; ) {
128 JHitBuffer::const_iterator q = p;
131 (++q != buffer.end() &&
132 q->getModuleID() == p->getModuleID() &&
133 q->getPMT() == p->getPMT() &&
134 q->getT() == t1 + deltaT);
141 if (d >= multiplicity)
163 for(JDAQTimeslice::iterator frame = slice->begin(); frame != slice->end() ; ++frame){
166 JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*frame, module);
168 for (JSuperFrame2D_t::iterator pmt = buffer.begin() ; pmt != buffer.end() ; ++pmt) {
172 for (JHitBuffer::const_iterator p = pmt->begin() ; p != pmt->end() ;) {
174 JHitBuffer::const_iterator q = p;
177 (++q != pmt->end() &&
178 q->getT() == t1 + deltaT);
185 if (d >= multiplicity)
Auxiliary class to set-up Hit.
Utility class to parse command line options.
Direct access to PMT data in detector data structure for DAQ hits.
Auxiliary class to uniquely identify PMT readout channel.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
int getFloor() const
Get floor number.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Recording of objects on file according a format that follows from the file name extension.
Router for direct addressing of module data in detector data structure.
#define MAKE_CSTRING(A)
Make C-string.
then for HISTOGRAM in h0 h1
Dynamic ROOT object management.
unsigned int JTDC_t
leading edge [ns]
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getNumberOfFloors(const JDetector &detector)
Get number of floors.
General purpose messaging.
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
Direct access to string in detector data structure.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Direct access to module in detector data structure.
int getString() const
Get string number.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Router for mapping of string identifier to index.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
2-dimensional frame with time calibrated data from one optical module.
do set_variable DETECTOR_TXT $WORKDIR detector
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
JPMTChannel getPMTChannel(const JDAQKeyHit &hit) const
Get PMT channel.