Belle II Software  release-05-01-25
arichBtestModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * *
7  * This software is provided "as is" without any warranty. *
8  **************************************************************************/
9 
10 #include <arich/modules/arichBtest/arichBtestModule.h>
11 
12 //include <boost/format.hpp>
13 //include <boost/foreach.hpp>
14 
15 
16 // Framework - DataStore
17 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 #include <framework/datastore/StoreArray.h>
20 #include <framework/logging/Logger.h>
21 #include <framework/gearbox/Unit.h>
22 
23 
24 #include <boost/algorithm/string.hpp>
25 #include <boost/foreach.hpp>
26 
27 
28 // Hit classes
29 #include <arich/dataobjects/ARICHDigit.h>
30 #include <arich/dataobjects/ARICHAeroHit.h>
31 #include "arich/geometry/ARICHGeometryPar.h"
32 #include "arich/geometry/ARICHBtestGeometryPar.h"
33 
34 #include "arich/modules/arichBtest/arichBtestData.h"
35 
36 #include <TH1F.h>
37 #include <TH2F.h>
38 #include <TFile.h>
39 #include <TNtuple.h>
40 #include <TVector3.h>
41 #include <TAxis.h>
42 
43 // ifstream constructor.
44 #include <fstream>
45 
46 const char* record_strings[] = { "Event", "Begin_run", "Pause", "Resume", "End_run" };
47 
48 using namespace std;
49 
50 namespace Belle2 {
57 //-----------------------------------------------------------------
58 // Register the Module
59 //-----------------------------------------------------------------
60  REG_MODULE(arichBtest)
61 
62 //-----------------------------------------------------------------
63 // Implementation
64 //-----------------------------------------------------------------
65 
66 
67  arichBtestModule::arichBtestModule() : Module(), m_end(0), m_events(0), m_file(NULL), m_timestart(0), m_mwpc(NULL)
68  {
69  //Set module properties
70  setDescription("Module for the ARICH Beamtest data analysis. It creates track form the MWPC hits and reads the HAPD hits");
71 
72  //Parameter definition
73  addParam("outputFileName", m_outFile, "Output Root Filename", string("output.root"));
74  vector<string> defaultList;
75  addParam("runList", m_runList, "Data Filenames.", defaultList);
76  vector<int> defaultMask;
77  addParam("mwpcTrackMask", m_MwpcTrackMask, "Create track from MWPC layers", defaultMask);
78  m_fp = NULL;
79  addParam("beamMomentum", m_beamMomentum, "Momentum of the beam [GeV]", 0.0);
80 
81  for (int i = 0; i < 32; i++) m_tdc[i] = 0;
82 
83  }
84 
85  TNtuple* m_tuple;
86  TH1F* hapd[6];
87  TH1F* mwpc_tdc[4][5];
88  TH1F* mwpc_diff[4][2];
89  TH1F* mwpc_sum[4][2];
90  TH1F* mwpc_sum_cut[4][2];
91  TH1F* mwpc_residuals[4][2];
92  TH2F* mwpc_xy[4];
93  TH2F* mwpc_residualsz[4][2];
94  //TGraph* m_hapdmap;
95  //TGraph* m_el2pos;
96 
97  void arichBtestModule::initialize()
98  {
99  B2INFO("arichBtestModule::initialize()");
100  StoreArray<ARICHAeroHit> aeroHits;
101  StoreArray<ARICHDigit> digits;
102  aeroHits.registerInDataStore();
103  digits.registerInDataStore();
104 
105  m_file = new TFile(m_outFile.c_str(), "RECREATE");
106  m_tuple = new TNtuple("nt", "Btest data hits", "x:y:xrec:yrec:m:c:gx:gy");
107  char hapdName[256];
108  for (int i = 0; i < 6; i++) {
109  sprintf(hapdName, "hapd%d", i);
110  hapd[i] = new TH1F(hapdName, hapdName, 145, -0.5, 144.5);
111  }
112  char name[256];
113 
114  for (int i = 0; i < 4; i++) {
115  for (int k = 0; k < 2; k++) {
116  sprintf(name, "mwpc%d_a%d_", i, k);
117  mwpc_diff[i][k] = new TH1F(strcat(name, "diff"), name, 300, -150, 150);
118  sprintf(name, "mwpc%d_a%d_", i, k);
119  mwpc_sum[i][k] = new TH1F(strcat(name, "sum"), name, 200, -0.5, 199.5);
120  sprintf(name, "mwpc%d_a%d_", i, k);
121  mwpc_sum_cut[i][k] = new TH1F(strcat(name, "sum_cut"), name, 200, -0.5, 199.5);
122  sprintf(name, "mwpc%d_a%d_", i, k);
123  mwpc_residuals[i][k] = new TH1F(strcat(name, "resd"), name, 200, -100, 100);
124  sprintf(name, "mwpc%d_a%d_", i, k);
125  mwpc_residualsz[i][k] = new TH2F(strcat(name, "resd_z"), name, 200, -25, 25, 400, -1000, 1000);
126  }
127  for (int k = 0; k < 5; k++) {
128  sprintf(name, "mwpc%d_a%d_", i, k);
129  mwpc_tdc[i][k] = new TH1F(strcat(name, "tdc"), name, 1024, -1024, 1024);
130  }
131  sprintf(name, "mwpc%d_", i);
132  mwpc_xy[i] = new TH2F(strcat(name, "xy"), name, 120, -30, 30, 120, -30, 30);
133  }
134  //m_hapdmap = new TGraph("arich/modules/arichBtest/geometry/hapd.map");
135  //m_el2pos = new TGraph("arich/modules/arichBtest/geometry/hapdchmap_v0.dat");
136 
137  /*
138  arich::ARICHGeometryPar* _arichgp = arich::ARICHGeometryPar::Instance();
139 
140  ofstream dout;
141  dout.open ("ChannelCenterGlob.txt");
142  for (int i=0;i<6;i++){
143  for (int k=0;k<144;k++){
144  TVector3 r = _arichgp->getChannelCenterGlob(i + 1, k);
145  dout << r.x() << " " << r.y() << endl;
146  }
147  }
148  dout.close();
149  */
150  time(&m_timestart);
151  }
152 
153  void arichBtestModule::beginRun()
154  {
155 
156  B2INFO("arichBtestModule::beginRun()");
157 
158  StoreObjPtr<EventMetaData> eventMetaDataPtr;
159  B2INFO("arichBtestModule::eventMetaDataPtr run:" << eventMetaDataPtr->getRun());
160  B2INFO("arichBtestModule::eventMetaDataPtr exp:" << eventMetaDataPtr->getExperiment());
161 
162  ARICHBtestGeometryPar* _arichbtgp = ARICHBtestGeometryPar::Instance();
163  m_mwpc = _arichbtgp->getMwpc();
164 
165  static int first = 1;
166  if (first) {
167  m_runCurrent = m_runList.begin();
168  first = 0;
169  m_mwpc[0].Print();
170  m_mwpc[1].Print();
171  m_mwpc[2].Print();
172  m_mwpc[3].Print();
173 
174  }
175  m_end = 1;
176 
177  if (m_runCurrent < m_runList.end()) {
178  if (m_fp) {
179  m_eveList.push_back(m_events);
180  gzclose(m_fp);
181  }
182  m_fp = gzopen((*m_runCurrent).c_str(), "rb");
183  if (m_fp == NULL) {
184  B2INFO("Cannot open " << *m_runCurrent);
185  m_end = 1;
186  } else {
187  B2INFO("File opened " << *m_runCurrent);
188  m_end = 0;
189  }
190  }
191  m_events = 0;
192  }
193 
194  int arichBtestModule::skipdata(gzFile fp)
195  {
196  unsigned int u;
197  gzread(fp, &u, sizeof(unsigned int));
198  gzseek(fp, u * sizeof(unsigned int), SEEK_CUR);
199  return u + 1;
200  }
201 
202  void arichBtestModule::readmwpc(unsigned int* dbuf, unsigned int len, int print1290)
203  {
204 
205  const int unsigned MAXV1290 = 32;
206 
207  unsigned int edge;
208  unsigned int tdcch;
209  unsigned int tdcl;
210  unsigned int nhits;
211 
212  for (int i = 0; i < 32; i++) m_tdc[i] = 0XFFFF;
213  //TDC V1290
214  //for (int i=0;i<len;i++) printf("V1290 %d(%d) 0x%08x \n",i,len, dbuf[i],n);
215  for (unsigned int i = 0; i < len; i++) {
216  int rid = (dbuf[i] >> 27) & 0x1F;
217  switch (rid) {
218  case 0x18: // Filler
219  if (print1290) printf("Filler 0x%08x %u.data\n", dbuf[i], i);
220  break;
221  case 0x8: // Global Header
222  if (print1290) printf("Global Header 0x%08x %u.data\n", dbuf[i], i);
223  break;
224  case 0x10: // Global Trailer --- Last word of data
225  nhits = ((dbuf[i] >> 5) & 0xFFFF); //Word Count = bit 31...21< Word Count: 20 ... 5 > 4...0
226  if (print1290) printf("Global Trailer 0x%08x %u.data STATUS=0x%03x nhits=%u\n", dbuf[i], i, (dbuf[i] >> 24) & 0x7, nhits);
227 
228  if (nhits != len) {
229  if (print1290) printf("V1290 nhits!=len %u %u\n", nhits, len);
230  };
231  break;
232  case 0x11: // Global Trigger TimeTag
233  if (print1290) printf("Global Trigger TimeTag 0x%08x %u.data\n", dbuf[i], i);
234  break;
235  case 0x1: // TDC header
236  if (print1290) printf("TDC header 0x%08x %u.data evid=%d wc=%u\n", dbuf[i], i, (dbuf[i] >> 12) & 0xFFF, dbuf[i] & 0xFFF);
237 
238  break;
239  case 0x3: // TDC trailer
240  if (print1290) printf("TDC trailer 0x%08x %u.data\n", dbuf[i], i);
241 
242  break;
243  case 0x4: // TDC Error
244  if (print1290) printf("TDC Error 0x%08x %u.data ERR=0x%x\n", dbuf[i], i, dbuf[i] & 0x3FFF);
245 
246  break;
247  case 0x0 : // TDC data
248 
249  edge = (dbuf[i] >> 26) & 0x1;
250  tdcch = (dbuf[i] >> 21) & 0x1F;
251  tdcl = dbuf[i] & 0x1FFFFF;
252  if (tdcch < MAXV1290) {
253  //if (tdcch>15) gV1290[tdcch]->Fill(tdcl/40);
254  //if (tdcch>15) if (tdcl< trg[tdcch-16] && tdcl>16000 && tdcl<20000 ) trg[tdcch-16]=tdcl;
255  if (print1290)
256  printf("V1290 0x%08x %u. [ch=%2u] edge=%u data=%u \n", dbuf[i], i, tdcch, edge, tdcl);
257  m_tdc[tdcch] = tdcl / 40;
258  }
259 
260  break;
261 
262  default:
263  if (print1290) printf("Unknown 0x%08x %u.data\n", dbuf[i], i);
264 
265  break;
266 
267  }
268  }
269 
270  }
271 
272  int arichBtestModule::readhapd(unsigned int len, unsigned int* data)
273  {
274 
275  ARICHGeometryPar* _arichgp = ARICHGeometryPar::Instance();
276  ARICHBtestGeometryPar* _arichbtgp = ARICHBtestGeometryPar::Instance();
277  //-----------------------------------------------------
278 
279  int bmask = 0xF;
280 
281  for (int module = 0; module < 6; module++) {
282  int istart = 19 * module;
283  int istop = 19 * module + 18;
284  for (int i = istart; i < istop; i++) {
285  for (int j = 0; j < 8; j++) {
286  unsigned int kdata = data[i] & (bmask << (j * 4));
287  if (kdata) {
288  int channelID = j + 8 * (i - istart);
289 
290  if (_arichgp->isActive(module, channelID)) {
291 
292  hapd[module]->Fill(channelID);
293 
294  StoreArray<ARICHDigit> arichDigits;
295  double globalTime = 0;
296 
297  double rposx = 0, rposy = 0;
298  pair<int, int> eposhapd(_arichbtgp->GetHapdElectronicMap(module * 144 + channelID));
299  int channel = eposhapd.second;
300 
301  if ((channel < 108 && channel > 71) || channel < 36) channel = 108 - (int(channel / 6) * 2 + 1) * 6 +
302  channel;
303  else channel = 144 - (int((channel - 36) / 6) * 2 + 1) * 6 + channel - 36;
304  TVector2 loc = _arichgp->getChannelCenterLoc(channel);
305  if (abs(loc.X()) > 2.3 || abs(loc.Y()) > 2.3) continue;
306 
307  arichDigits.appendNew(module + 1, channel, globalTime);
308 
309  TVector3 rechit = _arichgp->getChannelCenterGlob(module + 1, channel);
310  pair<double, double> poshapd(_arichbtgp->GetHapdChannelPosition(module * 144 + channelID));
311  m_tuple ->Fill(-poshapd.first, poshapd.second, rechit.x(), rechit.y(), module, channelID, rposx, rposy);
312  }
313  }
314  }
315  }
316  }
317 
318  return len;
319  }
320 
321 
322  int arichBtestModule::getTrack(int mask, TVector3& r, TVector3& dir)
323  {
324  int retval = 0;
325  //const int trgch = 13;
326  const double t0 = 0;// m_tdc[trgch];
327  for (int i = 0; i < 4; i++) {
328  ARICHTracking* w = &m_mwpc[i];
329 
330  for (int k = 0; k < 4; k++) mwpc_tdc[i][k]->Fill(m_tdc[w->tdc[k]] - t0);
331  mwpc_tdc[i][4]->Fill(m_tdc[w->atdc] - t0);
332 
333 
334  for (int k = 0; k < 2; k++) { // axis x,y
335  w->status[k] = 1;
336  w->diff[k] = m_tdc[w->tdc[2 * k]] - m_tdc[w->tdc[2 * k + 1]];
337  w->sum[k] = m_tdc[w->tdc[2 * k + 1]] + m_tdc[w->tdc[2 * k]] - 2 * m_tdc[w->atdc];
338  mwpc_sum[i][k]->Fill(w->sum[k]);
339  if (w->sum[k] < w->cutll[k] || w->sum[k] > w->cutul[k]) continue;
340  mwpc_sum_cut[i][k]->Fill(w->sum[k]);
341  w->status[k] = 0;
342  w->reco[k] = w->diff[k] * w->slp[k] + w->offset[k];
343  w->reco[k] += w->pos[k];
344 
345  mwpc_diff[i][k]->Fill(w->diff[k]);
346  }
347 
348  w->reco[2] = w->pos[2]; // update z axis
349  if (!w->status[0] && !w->status[1]) mwpc_xy[i]->Fill(w->reco[0], w->reco[1]);
350 
351  if (mask & (1 << i)) {
352  if (!w->status[0] && !w->status[1]) {
353  // add point to a fitter
354  } else {
355  retval = 1;
356  }
357  }
358  }
359 
360  // replace by fitter
361  int ii[4] = {0, 1, 0, 0};
362  int ncnt = 0;
363  for (int i = 0; i < 4; i++) {
364  if (mask & (1 << i)) {
365  //B2INFO(ncnt << " " << i << " Mask " << mask);
366  ii[ncnt++] = i;
367  }
368  }
369  int i0 = ii[0];
370  int i1 = ii[1];
371 
372  r.SetXYZ(m_mwpc[i0].reco[1], m_mwpc[i0].reco[0], m_mwpc[i0].reco[2]);
373  dir.SetXYZ(m_mwpc[i1].reco[1] - m_mwpc[i0].reco[1],
374  m_mwpc[i1].reco[0] - m_mwpc[i0].reco[0],
375  m_mwpc[i1].reco[2] - m_mwpc[i0].reco[2]);
376 
377  dir = dir.Unit();
378 
379 // end replace by fitter
380  if (dir.z() != 0) {
381  for (int i = 0; i < 4; i++) {
382  ARICHTracking* w = &m_mwpc[i];
383  double l = (w->reco[2] - r.z()) / dir.z() ;
384  TVector3 rext = r + dir * l;
385  if (!w->status[0]) mwpc_residuals[i][0]->Fill(w->reco[0] - rext.y());
386  if (!w->status[1]) mwpc_residuals[i][1]->Fill(w->reco[1] - rext.x());
387 
388  TAxis* axis = mwpc_residualsz[i][1]->GetYaxis();
389  for (int k = 0; k < axis->GetNbins(); k++) {
390  double ll = (w->reco[2] + axis->GetBinCenter(k + 1) - r.z()) / dir.z();
391  TVector3 rextt = r + dir * ll;
392  mwpc_residualsz[i][0]->Fill(w->reco[0] - rextt.y(), axis->GetBinCenter(k + 1));
393  mwpc_residualsz[i][1]->Fill(w->reco[1] - rextt.x(), axis->GetBinCenter(k + 1));
394 
395  }
396  }
397  }
398 
399  return retval;
400  }
401 
402  int arichBtestModule::readdata(gzFile fp, int rec_id, int)
403  {
404 
405  unsigned int len, data[10000];
406  gzread(fp, &len, sizeof(unsigned int));
407  //if (print) printf( "[%3d] %d: ", len, rec_id );
408  gzread(fp, data, sizeof(unsigned int)*len);
409 
410  TVector3 r;
411  TVector3 dir;
412  if (rec_id == 1) {
413  readmwpc(data, len);
414  int retval = getTrack(*(m_MwpcTrackMask.begin()), r, dir);
415  //dir = TVector3(0,0,1);
416 
417  if (!retval) {
418  // global transf, add track to datastore
419  StoreArray<ARICHAeroHit> arichAeroHits;
420 
421  int particleId = 11;// geant4
422  dir *= m_beamMomentum * Unit::GeV;
423  r *= Unit::mm /*/ CLHEP::mm*/;
424  static ARICHBtestGeometryPar* _arichbtgp = ARICHBtestGeometryPar::Instance();
425  static TVector3 dr = _arichbtgp->getTrackingShift();
426 
427  r += dr;
428 
429  //----------------------------------------
430  // Track rotation
431  //
432  TRotation rot = _arichbtgp->getFrameRotation();
433  TVector3 rc = _arichbtgp->getRotationCenter();
434 
435  TVector3 rrel = rc - rot * rc;
436  r = rot * r + rrel;
437  dir = rot * dir;
438  r.SetX(-r.X()); dir.SetX(-dir.X());
439 
440  //
441  // end track rotation
442  //----------------------------------------
443  r[1] = -r.y();
444  dir[1] = -dir.y();
445  B2DEBUG(50, "-----------> " << rc.x() << " " << rc.y() << " " << rc.z() << "::::" << rrel.x() << " " << rrel.y() << " " <<
446  rrel.z() << " ----> R " << r.x() << " " << r.y() << " " << r.z() << " ----> S " << dir.x() << " " << dir.y() << " " <<
447  dir.z());
448 
449  // Add new ARIHCAeroHit to datastore
450  arichAeroHits.appendNew(particleId, r, dir);
451 
452  }
453  }
454 
455  if (rec_id == 2) {
456  readhapd(len, data);
457  }
458 
459  for (unsigned int j = 0; j < len; j++) {
460  //if( j%8==0 && j!= 0 ) printf( " " );
461  //printf( " %08x", data[j] );
462  //if( j%8==7 || j==len-1 ) putchar('\n');
463  }
464  return len + 1;
465  }
466 
467 
468 
469 
470  void arichBtestModule::event()
471  {
472 
473 
474 
475 
476 
477  if (!m_fp) return;
478  unsigned int hdr[2];
479  EventRec rec;
480  BeginRec beginrec;
481  BeginRec endrec;
482  static char msg[1024];
483  int type;
484 
485  const int sint = sizeof(unsigned int);
486  do {
487  if (gzread(m_fp, hdr, sint * 2) != 2 * sint && m_end) {
488  B2INFO("[" << m_events << "] End of file: " << *m_runCurrent);
489  ++m_runCurrent;
490  if (m_runCurrent == m_runList.end()) {
491  StoreObjPtr<EventMetaData> eventMetaDataPtr;
492  eventMetaDataPtr->setEndOfData();
493  return;
494  }
495  beginRun();
496  }
497 
498  } while (m_end && m_runCurrent != m_runList.end());
499  if (m_events % 1000 == 0) {
500  time_t m_time;
501  time(&m_time);
502  B2INFO("neve= [" << m_events << "] in " << (double)(m_time - m_timestart) / 60. << " min (" << int(
503  m_time - m_timestart) << "s) from " << *m_runCurrent);
504 
505  }
506  m_events++;
507 
508  type = hdr[0];
509  // len = hdr[1];
510 
511  gzseek(m_fp, 2 * sizeof(unsigned int), SEEK_CUR);
512  switch (type) {
513  case BEGIN_RECORD_TYPE: {
514  gzread(m_fp, &beginrec, sizeof(beginrec));
515  time_t t = beginrec.time;
516  sprintf(msg, "BeginRec run %u time %s", beginrec.runno, ctime(&t));
517  B2INFO(msg);
518  break;
519  }
520  case END_RECORD_TYPE: {
521  gzread(m_fp, &endrec, sizeof(endrec));
522  time_t t = endrec.time;
523  sprintf(msg, "EndRec run %u time %s", endrec.runno, ctime(&t));
524  B2INFO(msg);
525  break;
526  }
527  case EVENT_RECORD_TYPE: {
528  gzread(m_fp, &rec, sizeof(rec));
529  int print = !(rec.evtno % 10000);
530  time_t t = rec.time;
531  if (print) {
532  sprintf(msg, "EventRec run %u evt %u mstime %u, time %s", rec.runno, rec.evtno, rec.mstime, ctime(&t));
533  B2INFO(msg);
534  }
535  /* if you just want to jump to the end */
536  int pos = gztell(m_fp);
537  /* try to read inside data */
538  int buflen = rec.len - sizeof(rec) / sizeof(int);
539 
540  //if (print) printf ("%d: buflen\n",buflen);
541  int n[5] = { 0 };
542  int i(0), j(0);
543  while (i < buflen && j < 5) {
544  n[j] = readdata(m_fp, j, print);
545  // n[j] = skipdata( m_fp );
546  i += n[j];
547  j++;
548  }
549  if (gzseek(m_fp, pos + buflen * sizeof(unsigned int), SEEK_SET) < 0) B2ERROR("gzseek returns -1 ");
550  break;
551  }
552  default:
553  B2ERROR("IO error unknown record type " << type);
554  break;
555  }
556  if (gzeof(m_fp)) m_end = 1;
557  }
558 
559  void arichBtestModule::endRun()
560  {
561  B2INFO(" arichBtestModule: End Run !!!");
562 
563  m_file->Write();
564  m_file->Close();
565 
566  if (m_fp) {
567  gzclose(m_fp);
568  m_eveList.push_back(m_events);
569  }
570  }
571 
572  void arichBtestModule::terminate()
573  {
574  int j = 1;
575  BOOST_FOREACH(const string & fname, m_runList) {
576  B2INFO(m_eveList[j] << " events processed from file " << fname);
577  j++;
578  }
579  for (int i = 0; i < 4; i++) {
580  //ARICHTracking* w = &m_mwpc[i];
581  B2INFO(i << " a1=" << m_mwpc[i].tdc[0] << " a2=" << m_mwpc[i].tdc[1] << " a3=" << m_mwpc[i].tdc[2] << " a2=" << m_mwpc[i].tdc[3]
582  << " A=" << m_mwpc[i].atdc);
583  }
584 
585  }
586 
588 }
Belle2::StoreArray::appendNew
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:256
Belle2::mwpc_residualsz
TH2F * mwpc_residualsz[4][2]
z-residuals from mwpcs
Definition: arichBtestModule.cc:93
Belle2::hapd
TH1F * hapd[6]
histogram of hits for each hapd
Definition: arichBtestModule.cc:86
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::arichBtestModule
The UserTutorial module.
Definition: arichBtestModule.h:37
Belle2::ARICHBtestGeometryPar::getFrameRotation
TRotation getFrameRotation()
Get the rotation matrix of the Aerogel RICH frame.
Definition: ARICHBtestGeometryPar.cc:141
Belle2::mwpc_residuals
TH1F * mwpc_residuals[4][2]
residuals from mwpcs
Definition: arichBtestModule.cc:91
Belle2::ARICHBtestGeometryPar::GetHapdChannelPosition
std::pair< double, double > GetHapdChannelPosition(int)
Get the position of the HAPD channel.
Definition: ARICHBtestGeometryPar.cc:84
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::ARICHBtestGeometryPar::getMwpc
ARICHTracking * getMwpc()
Get the pointer of the tracking MWPCs.
Definition: ARICHBtestGeometryPar.cc:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::mwpc_sum_cut
TH1F * mwpc_sum_cut[4][2]
tdc sum from mwpcs, with sum cut applied
Definition: arichBtestModule.cc:90
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::ARICHGeometryPar
The Class for ARICH Geometry Parameters.
Definition: ARICHGeometryPar.h:36
Belle2::ARICHBtestGeometryPar::getRotationCenter
TVector3 getRotationCenter()
Get the rotation center of the Aerogel RICH frame.
Definition: ARICHBtestGeometryPar.cc:128
Belle2::ARICHGeometryPar::getChannelCenterLoc
TVector2 getChannelCenterLoc(int chID)
get center position of chID channel (in detector module local coordinates)
Definition: ARICHGeometryPar.cc:436
Belle2::mwpc_diff
TH1F * mwpc_diff[4][2]
tdc difference from mwpcs
Definition: arichBtestModule.cc:88
Belle2::ARICHBtestGeometryPar::getTrackingShift
TVector3 getTrackingShift()
Get the tracking shift.
Definition: ARICHBtestGeometryPar.cc:115
BeginRec::time
unsigned int time
Timestamp of the run.
Definition: arichBtestData.h:35
Belle2::ARICHBtestGeometryPar::GetHapdElectronicMap
std::pair< int, int > GetHapdElectronicMap(int)
Get the mapping of the electronic channel to the HAPD module nr and the channel number.
Definition: ARICHBtestGeometryPar.cc:89
Belle2::mwpc_sum
TH1F * mwpc_sum[4][2]
tdc sum from mwpcs
Definition: arichBtestModule.cc:89
Belle2::ARICHGeometryPar::isActive
bool isActive(int module, int channel)
check the activity of the channel
Definition: ARICHGeometryPar.cc:553
Belle2::ARICHTracking
Beamtest ARICH Geometry Tracking Class.
Definition: ARICHBtestGeometryPar.h:36
BeginRec::runno
unsigned int runno
Run number.
Definition: arichBtestData.h:31
EventRec
Event record structure for the beamtest data.
Definition: arichBtestData.h:9
BeginRec
Begin record structure for the beamtest data.
Definition: arichBtestData.h:25
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::m_tuple
TNtuple * m_tuple
ntuple containing hapd hits
Definition: arichBtestModule.cc:85
Belle2::mwpc_tdc
TH1F * mwpc_tdc[4][5]
tdc information from mwpcs
Definition: arichBtestModule.cc:87
Belle2::ARICHGeometryPar::getChannelCenterGlob
TVector3 getChannelCenterGlob(int modID, int chanID)
get center of chanID channel of modID detector module (in global coordinates)
Definition: ARICHGeometryPar.cc:430
Belle2::mwpc_xy
TH2F * mwpc_xy[4]
calculated x-y track positions
Definition: arichBtestModule.cc:92
Belle2::ARICHBtestGeometryPar
The Class for ARICH Beamtest Geometry Parameters.
Definition: ARICHBtestGeometryPar.h:109