KaliVeda
Toolkit for HIC analysis
KVINDRA.cpp
1 /***************************************************************************
2 $Id: KVINDRA.cpp,v 1.68 2009/01/21 10:05:51 franklan Exp $
3  kvindra.cpp - description
4  -------------------
5  begin : Mon May 20 2002
6  copyright : (C) 2002 by J.D. Frankland
7  email : frankland@ganil.fr
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #include "KVINDRA.h"
20 #include "KVDataSet.h"
21 #include "KVMaterial.h"
22 #include "KVDetector.h"
23 #include "KVIDTelescope.h"
24 #include "KVIDSiCsI.h"
25 #include "KVIDINDRACsI.h"
26 #include "KVIDChIoSi.h"
27 #include "KVIDChIoCsI.h"
28 #include "KVIDChIoSi75.h"
29 #include "KVIDSi75SiLi.h"
30 #include "KVIDPhoswich.h"
31 #include "KVGroup.h"
32 #include "KVChIo.h"
33 #include "KVCsI.h"
34 #include "KVDetectorEvent.h"
35 #include "TEnv.h"
36 #include "INDRAGeometryBuilder.h"
37 #include "KVGeoNavigator.h"
38 #include "KVGeoImportINDRA.h"
39 #ifdef WITH_BUILTIN_GRU
40 #include <KVGANILDataReader.h>
41 #endif
42 #include <KVDBChIoPressures.h>
43 #include <KVGeoImport.h>
44 #include <KVRangeTableGeoNavigator.h>
45 #include <KVRawDataReader.h>
46 #ifdef WITH_MFM
47 #include "KVMFMDataFileReader.h"
48 #include "MFMEbyedatFrame.h"
49 #ifdef WITH_MESYTEC
50 #include "MFMMesytecMDPPFrame.h"
51 #include "mesytec_buffer_reader.h"
52 #endif
53 #endif
54 #include "KVGeoImportINDRA.h"
55 #include "KVINDRAGroupReconstructor.h"
56 #include <cassert>
57 
58 using namespace std;
59 
61 
62 //Use this static array to translate EBaseIndra_type
63 //signal type to a string giving the signal type
64 
65 
68  "", //dummy for index=0
69  "GG", "PG", "T",
70  "GG", "PG", "T",
71  "R", "L", "T",
72  "GG", "PG", "T",
73  "GG", "PG", "T"
74 };
75 
76 
77 #define KV_DEBUG 1
78 
79 KVINDRA* gIndra;
80 
84 
86 {
87  //Default constructor
88  //Set up lists of ChIo, Si, CsI, Phoswich
89  fChIo.SetCleanup(kTRUE);
90  fSi.SetCleanup(kTRUE);
91  fCsI.SetCleanup(kTRUE);
92  fPhoswich.SetCleanup(kTRUE);
93  fTrigger = 0;
94  gIndra = this;
95  fPHDSet = kFALSE;
96  fSelecteur = nullptr;
97  fMesytecData = kFALSE;
98  fEbyedatData = kFALSE;
99 }
100 
101 
102 
105 
106 KVINDRA::~KVINDRA()
107 {
108  //Resets global gIndra pointer.
109 
110  if (gIndra == this) gIndra = nullptr;
111 }
112 
113 
114 
115 
118 
120 {
121  // Correspondance between CsI detectors and pin lasers is set up if known.
122 
123  if (run != -1) {
124  fCurrentRun = run;
125  }
126  BuildGeometry();
127 
128  if (fCloseGeometryNow) {
129  PerformClosedROOTGeometryOperations();
130  }
131 }
132 
133 
134 
137 
139 {
140  //Fill lists of ChIo, Si, CsI and phoswich
141 
142  fChIo.Clear();
143  fSi.Clear();
144  fCsI.Clear();
145  fPhoswich.Clear();
146  TIter next_det(GetDetectors());
147  KVDetector* kvd;
148  while ((kvd = (KVDetector*) next_det())) {
149  kvd->SetNameOfArray("INDRA");
150  if (kvd->InheritsFrom("KVChIo")) {
151  fChIo.Add(kvd);
152  }
153  if (kvd->InheritsFrom("KVSilicon")) {
154  fSi.Add(kvd);
155  }
156  if (kvd->InheritsFrom("KVCsI")) {
157  fCsI.Add(kvd);
158  }
159  if (kvd->InheritsFrom("KVPhoswich")) {
160  fPhoswich.Add(kvd);
161  }
162  }
163 }
164 
165 
166 
170 
172 {
173 
174  //Returns a pointer to the Ionisation Chamber placed directly in front of the
175  //detector "detname". If no ChIo is present, a null pointer is returned.
176 
177  KVINDRADetector* kvd;
178  kvd = dynamic_cast<KVINDRADetector*>(GetDetector(detname));
179  return (kvd ? (KVChIo*)kvd->GetChIo() : NULL);
180 }
181 
182 
183 
184 
188 
189 KVLayer* KVINDRA::GetChIoLayer(void)
190 {
191  //Return pointer to layer in INDRA structure corresponding to ionisation
192  //chambers.
193 
194  return (KVLayer*)GetStructure("LAYER", "CHIO");
195 }
196 
197 
198 
199 
203 
205 {
206  // Define multiplicity trigger used for acquisition and filter.
207  // Events with multipicity >= trig are OK.
208 
209  fTrigger = trig;
210 }
211 
212 
213 
239 
241 {
242  //Find a detector based on the old BaseIndra type definitions:
243  //
244 //enum EBaseIndra_type {
245 // ChIo_GG=1,
246 // ChIo_PG,//=2
247 // ChIo_T,//=3
248 // Si_GG,//=4
249 // Si_PG,//=5
250 // Si_T,//=6
251 // CsI_R,//=7
252 // CsI_L,//=8
253 // CsI_T,//=9
254 // Si75_GG,//=10
255 // Si75_PG,//=11
256 // Si75_T,//=12
257 // SiLi_GG,//=13
258 // SiLi_PG,//=14
259 // SiLi_T//=15
260 //};
261 //enum EBaseIndra_typePhos {
262 // Phos_R=1,
263 // Phos_L,//=2
264 // Phos_T,//=3
265 //};
266 
267  KVINDRADetector* det = 0;
268 
269  char nom_det[20];
270  if (cou == 1) {
271  if (type >= Phos_R && type <= Phos_T) {
272  sprintf(nom_det, "PHOS_%02d", mod);
273  det =
274  (KVINDRADetector*) GetListOfPhoswich()->FindObjectByName(nom_det);
275  }
276  }
277  if (det)
278  return det;
279  else if (type >= ChIo_GG && type <= ChIo_T) {
280  sprintf(nom_det, "CI_%02d%02d", cou, mod);
281  det = (KVINDRADetector*) GetListOfChIo()->FindObject(nom_det);
282  return det;
283  }
284  else if (type >= Si_GG && type <= Si_T) {
285  sprintf(nom_det, "SI_%02d%02d", cou, mod);
286  det = (KVINDRADetector*) GetListOfSi()->FindObject(nom_det);
287  return det;
288  }
289  else if (type >= SiLi_GG && type <= SiLi_T) {
290  sprintf(nom_det, "SILI_%02d", cou);
291  det = (KVINDRADetector*) GetListOfSi()->FindObject(nom_det);
292  return det;
293  }
294  else if (type >= Si75_GG && type <= Si75_T) {
295  sprintf(nom_det, "SI75_%02d", cou);
296  det = (KVINDRADetector*) GetListOfSi()->FindObject(nom_det);
297  return det;
298  }
299  else if (type >= CsI_R && type <= CsI_T) {
300  sprintf(nom_det, "CSI_%02d%02d", cou, mod);
301  det = (KVINDRADetector*) GetListOfCsI()->FindObject(nom_det);
302  return det;
303  }
304  return 0;
305 }
306 
307 
308 
313 
315 {
316  // Change default names of ID telescopes to INDRA standard
317  //
318  // This method also sets the types of the ID telescopes
319 
320  TIter it(GetListOfIDTelescopes());
321  KVIDTelescope* idt;
322  const TString etalon_numbers[] = {"1002", "1102", "1202", "1304", "1403", "1503", "1602", "1702"};
323  while ((idt = (KVIDTelescope*)it())) {
324  KVString N = idt->GetDetector(1)->GetName();
325  N.Begin("_");
326  KVString de_type = N.Next();
327  KVString de_number = N.Next();
328  if (idt->GetSize() == 1) {
329  if (de_type == "PHOS") {
330  idt->SetName(Form("%s_R_L_%s", de_type.Data(), de_number.Data()));
331  idt->SetType(Form("%s_R_L", de_type.Data()));
332  }
333  else if(de_type == "SI")
334  {
335  idt->SetName(idt->GetDetector(1)->GetName());
336  idt->SetType("SI");
337  }
338  else {
339  // CsI identification telescopes are called either CSI_R_L_RRMM (before 2021)
340  // or CSI_RRMM (for datasets from 2021 onwards)
341  auto csi_id_name_fmt = KVBase::GetDataSetEnv<TString>(fDataSet, "INDRA.CSI.IDTelescopeNameFormat", "CSI_%s");
342  idt->SetName(Form(csi_id_name_fmt, de_number.Data()));
343  // similarly, the type of CSI identifications was CSI_R_L before 2021, CSI from 2021 onwards
344  if (csi_id_name_fmt.Contains("R_L")) {
345  idt->SetType("CSI_R_L");
347  }
348  else idt->SetType("CSI");
349  }
350  }
351  else {
352  N = idt->GetDetector(2)->GetName();
353  N.Begin("_");
354  KVString e_type = N.Next();
355  KVString e_number = N.Next();
356  if (e_type == "SILI" || e_type == "SI75") {
357  e_number = etalon_numbers[dynamic_cast<KVINDRADetector*>(idt->GetDetector(2))->GetRingNumber() - 10];
358  }
359  idt->SetName(Form("%s_%s_%s", de_type.Data(), e_type.Data(), e_number.Data()));
360  idt->SetType(Form("%s_%s", de_type.Data(), e_type.Data()));
361  }
362  }
363  // changed names of all id telescope objects in hashlist: must rehash
364  dynamic_cast<KVHashList*>(GetListOfIDTelescopes())->Rehash();
365 }
366 
367 
368 
372 
374 {
375  // Finalise the ROOT geometry description by performing operations which can
376  // only be done once the geometry is closed
377 
379  gimp.SetNameCorrespondanceList("INDRA.names");
380  // INDRAGeometryBuilder instance holds list of directions to test for import which
381  // corresponds to detectors which are actually present in array
382  gimp.ImportGeometry(fIGB->GetDirectionsToTestForImport());
383  fIGB->CheckImportResults(GetDetectors());
384 
385  FillListsOfDetectorsByType();
386 
387  SetNamesOfIDTelescopes();
388 
389  SetIdentifications();
390 
391  //set flag to say Build() was called
392  SetBit(kIsBuilt);
393 
394  SetPinLasersForCsI();
395 
396  SetExpectedDetectorSignalNames();
397 
398  // link EBYEDAT parameter names to detectors
399  TIter next_det(GetDetectors());
400  KVDetector* det;
401  while ((det = (KVDetector*)next_det())) {
402  TString det_name(det->GetName());
403  if (det_name.BeginsWith("CI") || det_name.BeginsWith("SI")) {
404  fEbyedatParamDetMap.SetValue(det_name + "_PG", det_name);
405  fEbyedatParamDetMap.SetValue(det_name + "_GG", det_name);
406  }
407  else if (det_name.BeginsWith("CSI")) {
408  fEbyedatParamDetMap.SetValue(det_name + "_R", det_name);
409  fEbyedatParamDetMap.SetValue(det_name + "_L", det_name);
410  }
411  // handle change of "time marker" parameter type for certain experiments
412  auto time_marker_type = gDataSet->GetDataSetEnv<TString>(Form("KVACQParam.%s.T", det_name.Data()), "T");
413  time_marker_type.Prepend("_");
414  fEbyedatParamDetMap.SetValue(det_name + time_marker_type, det_name);
415  }
416 }
417 
418 
419 
421 
422 void KVINDRA::handle_ebyedat_raw_data_parameter(const char* param_name, uint16_t val)
423 {
424  KVString detname;
425  KVDetector* det = nullptr;
426  KVString sig_type;
427  // use look-up table parname => detectorname
428  if (fEbyedatParamDetMap.HasParameter(param_name)) {
429  det = GetDetector(fEbyedatParamDetMap.GetStringValue(param_name));
430  detname = det->GetName();
431  // parameter type given by whatever comes after final '_'
432  std::string lab(param_name);
433  sig_type = lab.substr(lab.rfind('_') + 1);
434  }
435  else { // no detector associated to parameter
436  sig_type = param_name;
437  }
438  add_and_set_detector_signal(det, detname, val, sig_type);
439 }
440 
441 
442 
450 
452 {
453  // Put values of all fired detector signals into the parameter list which will be copied
454  // into the reconstructed event.
455  //
456  // If Mesytec data is being read, we set the parameter "INDRA.MESYTEC", or if Ebyedat data, "INDRA.EBYEDAT".
457  // Note that in old reconstructed data these parameters did not exist, therefore in their
458  // absence EBYEDAT is assumed.
459 
460  if (fMesytecData) fReconParameters.SetValue("INDRA.MESYTEC", kTRUE);
461  else if (fEbyedatData) fReconParameters.SetValue("INDRA.EBYEDAT", kTRUE);
463 }
464 
465 
466 
490 
492 {
493  // Read ChIo pressures from a file with the following format:
494  //
495  //~~~
496  //PressureSet: A
497  //A.RunList: 1-22
498  //A.CI_02: 50.0
499  //A.CI_04: 30.0
500  //A.CI_06: 20.0
501  //
502  //+PressureSet: B
503  //B.Units: torr
504  //B.RunList: 23-50
505  //B.CI_08: 33.0
506  //B.CI_13: 11.6
507  //~~~
508  //
509  // `Units` can be either `mbar` or `torr`: `mbar` is used by default (e.g. for set `A` in the example).
510  //
511  // The different ionization chambers are designated by `CI_02`, `CI_04`, `CI_06`, `CI_08`, `CI_13`
512  // The same pressure will be applied to all cells of each ChIo which are present in the current geometry.
513  //
514  // If `RunList` is not given, the pressures will be applied to all runs in the database.
515 
516  TString fullpath;
517  if (!db->FindCalibFile("Pressures", fullpath, "INDRA")) return;
518  Info("ReadChIoPressures()", "Reading INDRA ChIo pressures used during runs...");
519 
520  auto pressure_table = db->AddTable("INDRA.ChIo Pressures", "INDRA ChIo gas pressures");
521 
522  KVString the_chios[] = {"CI_02", "CI_04", "CI_06", "CI_08", "CI_13"};
523 
524  TEnv env;
525  env.ReadFile(fullpath.Data(), kEnvAll);
526  KVString pressure_sets = env.GetValue("PressureSet", "");
527  pressure_sets.Begin(" ");
528  while (!pressure_sets.End()) {
529  auto pressure_set = pressure_sets.Next();
530  // set units
531  auto units = KVUnits::mbar;
532  if (KVString(env.GetValue(Form("%s.Units", pressure_set.Data()), "mbar")) != "mbar")
533  units = KVUnits::torr;
534  // set runlist if given
535  KVNumberList runlist(env.GetValue(Form("%s.RunList", pressure_set.Data()), ""));
536  if (runlist.IsEmpty()) runlist = db->GetRunList();
537  // get and set pressures
538  auto dbp = new KVDBChIoPressures;
539  int ichio = 0;
540  for (auto& chio : the_chios) {
541  Float_t P = 0;
542  if ((P = env.GetValue(Form("%s.%s", pressure_set.Data(), chio.Data()), 0.0)) > 0.0) {
543  dbp->SetPressure(ichio, P * units);
544  }
545  ++ichio;
546  }
547  pressure_table->AddRecord(dbp);
548  db->LinkRecordToRunRange(dbp, runlist);
549  }
550 }
551 
552 
553 
559 
561 {
562  //Update ChIo pressures for this run with values in database (if any)
563  //
564  //Any ChIo with zero pressure has KVDetector::IsDetecting() set to false
565  //(and hence KVDetector::IsOK() will also return false).
566 
567  KVRList* param_list = kvrun->GetLinks("INDRA.ChIo Pressures");
568  if (!param_list) {
569  return;
570  }
571  KVChIo* kvd;
572  KVDBChIoPressures* kvps;
573  TIter next_ps(param_list);
574  auto chios = GetListOfChIo();
575  if (!chios) {
576  Error("SetChIoPressures",
577  "GetListOfChIo() returns null list pointer");
578  return;
579  }
580  cout << "--> Setting ChIo pressures" << endl;
581  TIter next_chio(chios);
582  while ((kvps = (KVDBChIoPressures*) next_ps())) {
583  if (kvps->GetPressure(CHIO_2_3))
584  cout << " Ring 2/3: " << kvps->
585  GetPressure(CHIO_2_3) / KVUnits::mbar << " mbar" << endl;
586  if (kvps->GetPressure(CHIO_4_5))
587  cout << " Ring 4/5: " << kvps->
588  GetPressure(CHIO_4_5) / KVUnits::mbar << " mbar" << endl;
589  if (kvps->GetPressure(CHIO_6_7))
590  cout << " Ring 6/7: " << kvps->
591  GetPressure(CHIO_6_7) / KVUnits::mbar << " mbar" << endl;
592  if (kvps->GetPressure(CHIO_8_12))
593  cout << " Ring 8/12: " << kvps->
594  GetPressure(CHIO_8_12) / KVUnits::mbar << " mbar" << endl;
595  if (kvps->GetPressure(CHIO_13_17))
596  cout << " Ring 13/17: " << kvps->
597  GetPressure(CHIO_13_17) / KVUnits::mbar << " mbar" << endl;
598  while ((kvd = (KVChIo*) next_chio())) {
599  if (!strcmp(kvd->GetType(), "CI")) {
600  //check detector type: ="CI" for standard INDRA chio
601  if (kvd->GetRingNumber() == 2)
602  kvd->SetPressure(kvps->GetPressure(CHIO_2_3) / KVUnits::mbar);
603  if (kvd->GetRingNumber() == 4)
604  kvd->SetPressure(kvps->GetPressure(CHIO_4_5) / KVUnits::mbar);
605  if (kvd->GetRingNumber() == 6)
606  kvd->SetPressure(kvps->GetPressure(CHIO_6_7) / KVUnits::mbar);
607  if (kvd->GetRingNumber() >= 8 && kvd->GetRingNumber() <= 12)
608  kvd->SetPressure(kvps->GetPressure(CHIO_8_12) / KVUnits::mbar);
609  if (kvd->GetRingNumber() >= 13 && kvd->GetRingNumber() <= 17)
610  kvd->SetPressure(kvps->GetPressure(CHIO_13_17) / KVUnits::mbar);
611  if (kvd->GetPressure() == 0.0) {
612  kvd->SetDetecting(kFALSE);
613  }
614  else {
615  kvd->SetDetecting(kTRUE);
616  }
617  }
618  }
619  next_chio.Reset();
620  }
621 }
622 
623 
624 
627 
629 {
630  // Override base method in order to set ChIo pressures (if defined)
632  SetChIoPressures(dbr);
633 }
634 
635 
636 
638 
640 {
641  CreateGeoManager();
642 
643  fIGB.reset(new INDRAGeometryBuilder(fDataSet, fCurrentRun));
644  fIGB->Build(kFALSE, fCloseGeometryNow);
645 
646  SetName(fIGB->GetName());
647  SetTitle(fIGB->GetTitle());
648 }
649 
650 
651 #ifdef WITH_BUILTIN_GRU
652 
656 
658 {
659  // Set raw data in detectors/array coming from a GANIL EBYEDAT format
660  // acquisition file.
661 
662  fEbyedatData = kTRUE;
663  // loop over fired data parameters
664  TIter nxt_frd(&rdr.GetFiredDataParameters());
665  KVEBYEDAT_ACQParam* eby_par;
666  while ((eby_par = (KVEBYEDAT_ACQParam*)nxt_frd())) {
667  handle_ebyedat_raw_data_parameter(eby_par->GetName(), eby_par->GetData());
668  }
669 
670  return kTRUE;
671 }
672 
673 #endif
674 
675 #ifdef WITH_MFM
676 
692 
694 {
695  // General method for reading raw data in MFM-encapsulated ebyedat format
696  // Fills list of hit acquisition parameters.
697  // Returns kTRUE if at least one parameter belonging to the array is present.
698  //
699  // Any unknown parameters in the event (i.e. ones for which no KVACQParam object
700  // has been defined) are written in the fReconParameters list with names
701  // "ACQPAR.[array name].[parameter name]"
702  //
703  // Retrieve CENTRUM timestamp from data if present.
704  // It will be added to fReconParameters as a 64-bit value "INDRA.TS" (if != 0)
705  // Event number is retrieved and stored as "INDRA.EN" (if != 0)
706  // Any parameter which appears as [name] and [name]_UP is an unsigned 32-bit value
707  // split into two 16-bit words. We replace the two parameters with a 64-bit
708  // value (to hold correctly all unsigned 32-bit values) with [name].
709 
710  fEbyedatData = kTRUE;
711 
712  uint16_t val;
713  std::string lab;
714 
715  for (int i = 0; i < f.GetNbItems(); ++i) {
716  f.GetDataItem(i, lab, val);
717  handle_ebyedat_raw_data_parameter(lab.c_str(), val);
718  }
719 
720  ULong64_t ts = f.GetCENTRUMTimestamp();
721  if (ts != 0) fReconParameters.SetValue64bit("INDRA.TS", ts);
722  ULong64_t en = f.GetEventNumber();
723  if (en != 0) fReconParameters.SetValue64bit("INDRA.EN", en);
724  int npars = fReconParameters.GetNpar();
725  std::vector<TString> names;
726  for (int i = 0; i < npars; ++i) {
727  TString name = fReconParameters.GetParameter(i)->GetName();
728  if (name.EndsWith("_UP")) names.push_back(name);
729  }
730  if (names.size()) {
731  for (std::vector<TString>::iterator it = names.begin(); it != names.end(); ++it) {
732  TString name = (*it);
733  name.Remove(name.Index("_UP"), 3);
734  TString name_up = (*it);
735  ULong64_t par_up = fReconParameters.GetIntValue(name_up);
736  ULong64_t par = fReconParameters.GetIntValue(name);
737  UInt_t par32 = (par_up << 16) + par;
738  fReconParameters.RemoveParameter(name_up);
739  fReconParameters.RemoveParameter(name);
740  fReconParameters.SetValue64bit(name, par32);
741  }
742  }
743  return kTRUE;
744 }
745 
746 #endif
747 
748 
751 
753 {
754  // Set the INDRA-specific general identification code for the given telescope
755 
756  if (idt->IsType("PHOS_R_L")) idt->SetIDCode(IDCodes::ID_PHOSWICH);
757  else if (idt->IsType("CSI_R_L") || idt->IsType("CSI")) idt->SetIDCode(IDCodes::ID_CSI_PSA);
758  else if (idt->IsType("SI_CSI")) idt->SetIDCode(IDCodes::ID_SI_CSI);
759  else if (idt->IsType("SI")) idt->SetIDCode(IDCodes::ID_SI_PSA);
760  else if (idt->IsType("CI_SI")) idt->SetIDCode(IDCodes::ID_CI_SI);
761  else if (idt->IsType("CI_CSI")) idt->SetIDCode(IDCodes::ID_CI_CSI);
762  else if (idt->IsType("CI_SI75")) idt->SetIDCode(IDCodes::ID_CI_SI75);
763  else if (idt->IsType("SI75_SILI")) idt->SetIDCode(IDCodes::ID_SI75_SILI);
764  else if (idt->IsType("SILI_CSI")) idt->SetIDCode(IDCodes::ID_SILI_CSI);
765  else {
766  Error("SetIDCodeForIDTelescope", "Request for telescope name=%s of unknown class=%s",
767  idt->GetName(), idt->IsA()->GetName());
768  }
769 }
770 
771 
772 
774 
776 {
778 }
779 
780 
781 
807 
809 {
810  // Sets the KVCsI::fPinLaser member of each CsI detector with the number of the
811  // pin laser associated for the stability control of these detectors.
812  //
813  // We look for a file with the following format:
814  //
815  // CSI_0101 1
816  // CSI_0102 1
817  // CSI_0103 1
818  // CSI_0104 1
819  // etc.
820  //
821  // i.e. 'name of CsI detector' 'number of pin laser (1-8)'
822  // Comment lines must begin with '#'
823  //
824  // The default name of this file is defined in .kvrootrc by
825  //
826  // INDRADB.CsIPinCorr: CsI_PILA.dat
827  //
828  // Dataset-specific version can be specified:
829  //
830  // INDRA_e999.INDRADB.CsIPinCorr: CorrCsIPin_2054.dat
831  //
832  // This file should be in the directory corresponding to the current dataset,
833  // i.e. in $KVROOT/KVFiles/name_of_dataset
834 
835  ifstream pila_file;
836  if (gDataSet->OpenDataSetFile(gDataSet->GetDataSetEnv<TString>("INDRADB.CsIPinCorr"), pila_file)) {
837 
838  Info("SetPinLasersForCsI", "Setting correspondance CsI-PinLaser using file %s.",
839  gDataSet->GetDataSetEnv<TString>("INDRADB.CsIPinCorr").Data());
840  // read file, set correspondance
841  KVString line;
842  line.ReadLine(pila_file);
843  while (pila_file.good()) {
844  if (!line.BeginsWith("#")) {
845  line.Begin(" ");
846  KVString detname = line.Next(kTRUE);
847  KVCsI* det = (KVCsI*)GetDetector(detname.Data());
848  Int_t pila = line.Next(kTRUE).Atoi();
849  if (det) {
850  det->SetPinLaser(pila);
851  }
852  }
853  line.ReadLine(pila_file);
854  }
855  pila_file.close();
856  }
857 }
858 
859 
860 
861 
867 
869 {
870  // Overrides KVASMultiDetArray::GetDetectorEvent.
871  // If the list of fired detectors is given (meaning we are reading raw data)
872  // then we check that what we have read is in fact an INDRA event
873  // (see KVINDRATriggerInfo::IsINDRAEvent()) : if not, we do not try to find the hit groups.
874 
875  if (((fired_dets && fired_dets->GetEntries()) || fFiredDetectors.GetEntries())
876  && (GetTriggerInfo() && !GetTriggerInfo()->IsINDRAEvent())) return;
877  KVMultiDetArray::GetDetectorEvent(detev, fired_dets);
878 }
879 
880 
881 
882 
894 
896 {
897  // Special INDRA group reconstructors:
898  //
899  // * for data:
900  // - KVINDRAForwardGroupReconstructor rings 1-9
901  // - KVINDRABackwardGroupReconstructor rings 10-17
902  // - KVINDRAEtalonGroupReconstructor for groups with etalon telescopes
903  //
904  // * for filtered simulations:
905  // - KVINDRAFilterGroupReconstructor
906  // - KVINDRAFilterEtalonGroupReconstructor for groups with etalon telescopes
907 
908  KVGroupReconstructor* gr(nullptr);
909  if (GetGroup(g->GetName())) { // make sure group belongs to us
910  // etalons ?
911  if (g->GetDetectorByType("SILI") || g->GetDetectorByType("SI75")) {
912  if (IsSimMode())
913  gr = KVGroupReconstructor::Factory("INDRA.etalonFilter", g);
914  else
915  gr = KVGroupReconstructor::Factory("INDRA.etalon", g);
916  }
917  else {
918  if (IsSimMode()) return KVGroupReconstructor::Factory("INDRA.Filter", g);
919  KVINDRADetector* id = (KVINDRADetector*)g->GetDetectors()->First();
920  if (id->GetRingNumber() < 10) {
921  gr = KVGroupReconstructor::Factory("INDRA.forward", g);
922  }
923  else {
924  gr = KVGroupReconstructor::Factory("INDRA.backward", g);
925  }
926  }
927  }
928  return gr;
929 }
930 
931 
932 
935 
937 {
938  // If "INDRA.EN" parameter has been set, we use it to set the event number
939 
941  if (GetReconParameters().HasValue64bit("INDRA.EN")) e->SetNumber(GetReconParameters().GetValue64bit("INDRA.EN"));
942 }
943 
944 
945 
951 
953 {
954  // Overrides base method in KVMultiDetArray.
955  //
956  // If we are reading old reconstructed data with EBYEDAT parameters, we need special
957  // treatment to decode the detector name & signal type.
958 
959  if (!l.GetBoolValue("INDRA.MESYTEC") && !l.GetBoolValue("INDRA.EBYEDAT")) {
960  // assume we are reading old recon data with parameters in list such as "ACQPAR.INDRA.SI_0201_PG"
961  fMesytecData = kFALSE;
962  fEbyedatData = kTRUE;
963  prepare_to_handle_new_raw_data();
964 
965  int N = l.GetNpar();
966  for (int i = 0; i < N; ++i) {
967  KVNamedParameter* np = l.GetParameter(i);
968 
969  KVString name(np->GetName());
970  if (name.BeginsWith("ACQPAR")) {
971  // 2 '.' => 3 values
972  int dots = name.GetNValues(".");
973  assert(dots == 3); // sanity check
974  name.Begin(".");
975  name.Next(); // "ACQPAR"
976  if (name.Next() != "INDRA") continue; // check name of array - somebody else's parameter ?
977  std::string parname(name.Next());
978  KVString detname;
979  KVString sig_type;
980  KVDetector* det = nullptr;
981  if (parname.find('_') != kNPOS) {
982  // try to split into '[detname]_[partype]'
983  detname = parname.substr(0, parname.rfind('_'));
984  sig_type = parname.substr(parname.rfind('_') + 1);
985  det = GetDetector(detname);
986  }
987  else {
988  sig_type = parname;
989  }
990  add_and_set_detector_signal(det, detname, np->GetDouble(), sig_type);
991  }
992  }
993  }
994  else {
995  fMesytecData = l.GetBoolValue("INDRA.MESYTEC");
996  fEbyedatData = l.GetBoolValue("INDRA.EBYEDAT");
998  }
999 }
1000 
1001 
1002 
1005 
1007 {
1008  // Override base method in order to read ChIo pressures for each run
1010  // if the actual database class inherits from KVINDRADB (historic INDRA data),
1011  // the ChIo pressures have already been read (& from a file with a different format)
1012  if (!db->InheritsFrom("KVINDRADB")) ReadChIoPressures(db);
1013 }
1014 
1015 
1016 
1047 
1049 {
1050  // Call this method just after opening a raw data file in order to perform any
1051  // necessary initialisations, depending on the type of data
1052  //
1053  // Mesytec data:
1054  // =============
1055  // Reading data from Mesytec DAQ requires crate map & detector-channel correspondence files,
1056  // the latter of which may be run-dependent.
1057  //
1058  // Each dataset has to provide the necessary files, as well as a file containing the run-dependent
1059  // list of detector-channel correspondence files.
1060  //
1061  // The names of the files are given by the following dataset variables, if defined:
1062  //~~~
1063  //[dataset].MesytecCrateConf: [name of crate map file:default="mesytec_crate_map.dat"]
1064  //[dataset].MesytecChannelsConf: [name of detector-channel correspondence file:default="mesytec_detector_correspondence.dat"]
1065  //[dataset].MesytecChannelsConfList: [list of run-dependent detector-channel correspondence files:default="mesytec_conf_list.dat"]
1066  //~~~
1067  //
1068  // If given, the run-dependent list of configuration files should be like:
1069  //~~~
1070  //File: [file1]
1071  //[file1].RunList: [list of runs]
1072  //
1073  //+File: [file2]
1074  //[file2]:RunList: [list of runs]
1075  //~~~
1076  // If not given we assume the same crate map and detector-channel correspondence for all runs.
1077  //
1078  // If the required files are not found for the dataset, an exception will be thrown.
1079 
1081 
1082  fMesytecData = kFALSE;
1083  fEbyedatData = kFALSE;
1084 #ifdef WITH_MESYTEC
1085 #ifdef WITH_MFM
1086  if (r->GetDataFormat() == "MFM") {
1087  auto crate = gDataSet->GetDataSetEnv<TString>("MesytecCrateConf", "mesytec_crate_map.dat");
1088 
1089  // check file exists for dataset
1090  if(!gDataSet->FindDataSetFile(crate))
1091  throw std::runtime_error(Form("in <KVINDRA::InitialiseRawDataReading>: Mesytec crate map file %s not found in dataset directory %s",
1092  crate.Data(), gDataSet->GetDataSetDir()));
1093 
1094  Info("InitialiseRawDataReading", "Setting Mesytec crate config for run %d, raw run number=%d",
1095  GetCurrentRunNumber(), r->GetRunNumberReadFromFile());
1096 
1097  auto raw_run_number = r->GetRunNumberReadFromFile()>0 ? r->GetRunNumberReadFromFile() : GetCurrentRunNumber();
1098  auto channel_conf_list = gDataSet->GetDataSetEnv<TString>("MesytecChannelsConfList","mesytec_conf_list.dat");
1099  // do we have a run-dependent detector-channel correspondence ?
1100  if(gDataSet->FindDataSetFile(channel_conf_list))
1101  {
1102  TEnv conf_list;
1103  conf_list.ReadFile(gDataSet->GetFullPathToDataSetFile(channel_conf_list), kEnvUser);
1104  KVString files = conf_list.GetValue("File", "");
1105  files.Begin(" ");
1106  while (!files.End()) {
1107  KVString next_file = files.Next(kTRUE);
1108  KVNumberList runlist = conf_list.GetValue(Form("%s.RunList", next_file.Data()), "");
1109  if (runlist.Contains(raw_run_number)) {
1110  // check file exists
1111  if(!gDataSet->FindDataSetFile(next_file))
1112  throw std::runtime_error(Form("in <KVINDRA::InitialiseRawDataReading>: Mesytec detector-channel correspondence file %s not found in dataset directory %s",
1113  next_file.Data(), gDataSet->GetDataSetDir()));
1114  // found file for this run
1115  Info("InitialiseRawDataReading", "Using file %s for raw run number %d",
1116  next_file.Data(), raw_run_number);
1117  dynamic_cast<KVMFMDataFileReader*>(r)->InitialiseMesytecConfig(
1118  gDataSet->GetFullPathToDataSetFile(crate).Data(),
1119  gDataSet->GetFullPathToDataSetFile(next_file).Data()
1120  );
1121  }
1122  }
1123  }
1124  else
1125  {
1126  // single detector-correspondence for all runs of dataset
1127  auto conf = gDataSet->GetDataSetEnv<TString>("MesytecChannelsConf","mesytec_detector_correspondence.dat");
1128  // check file exists for dataset
1129  if(!gDataSet->FindDataSetFile(conf))
1130  throw std::runtime_error(Form("in <KVINDRA::InitialiseRawDataReading>: Mesytec detector-channel correspondence file %s not found in dataset directory %s",
1131  conf.Data(), gDataSet->GetDataSetDir()));
1132  Info("InitialiseRawDataReading", "Using file %s for raw run number %d",
1133  conf.Data(), raw_run_number);
1134  dynamic_cast<KVMFMDataFileReader*>(r)->InitialiseMesytecConfig(
1135  gDataSet->GetFullPathToDataSetFile(crate).Data(),
1136  gDataSet->GetFullPathToDataSetFile(conf).Data());
1137  }
1138  }
1139 #endif
1140 #endif
1141 }
1142 
1143 
1144 #ifdef WITH_MFM
1145 
1152 
1153 #ifdef WITH_MESYTEC
1155 {
1156  // Read a raw data event from a Mesytec MFM Frame.
1157  //
1158  // All data is transferred to KVDetectorSignal objects, either associated to detectors of the
1159  // array (if they can be identified), either associated more globally with the array/event
1160  // itself. The latter are created as needed and go into the fExtraRawDataSignals list.
1161 
1162  if (!fMesytecData) {
1163  // first time we read data, we tweak the parameter names
1164  mesytec::module::set_data_type_alias("qdc_long", "TotLight"); // => CsI
1165  mesytec::module::set_data_type_alias("qdc_short", "R"); // => like old CsI 'R' (rapide) parameter
1166  mesytec::module::set_data_type_alias("tdc", "T"); // => like old 'marqueur de temps' parameters
1167  mesytec::module::set_data_type_alias("adc", "ADC"); // => Si or ChIo signals
1168 
1169  fMesytecData = kTRUE;
1170  }
1171  fReconParameters.SetValue64bit("INDRA.TS", f.GetTimeStamp());
1172  auto mfmfilereader = dynamic_cast<KVMFMDataFileReader*>(fRawDataReader);
1173  mfmfilereader->GetMesytecBufferReader().read_event_in_buffer(
1174  (const uint8_t*)f.GetPointUserData(), f.GetBlobSize(),
1175  [ = ](const mesytec::event & evt, const mesytec::experimental_setup & setup) {
1176  // loop over module data in event, set data in detectors when possible
1177 
1178  for (auto& mdat : evt.get_module_data()) {
1179  auto mod_id = mdat.get_module_id();
1180  auto& current_module = setup.get_module(mod_id);
1181  if (current_module.is_mdpp_module()) {
1182  // data for detectors from MDPP module
1183  for (auto& voie : mdat.get_channel_data()) {
1184  KVString detname(setup.get_detector(mod_id, voie.get_channel_number()));
1185  KVString sig_type(current_module.get_data_type_name(voie.get_data_type()));
1186  Double_t sig_data = voie.get_data();
1187  // convert time markers to nanoseconds
1188  if(voie.get_data_type()==mesytec::module::datatype_t::TDC)
1189  {
1190  sig_data *= current_module.get_tdc_resolution();
1191  }
1192  add_and_set_detector_signal(GetDetector(detname), detname, sig_data, sig_type);
1193  if(voie.has_trace())
1194  {
1195  // signal trace data from MDPP - assume fixed 12.5 ns time step
1196  add_and_set_detector_signal_trace(GetDetector(detname), voie.get_trace(), 12.5);
1197  }
1198  }
1199  }
1200  else if (current_module.is_mvlc_scaler()) {
1201  // data from 64 bit scalers in MVLC
1202  //
1203  // 4 data words of 16 bits (least significant is first word) => 64 bit scaler
1204  if (mdat.get_channel_data().size() == 4) {
1205  ULong64_t x = 0;
1206  int i = 0;
1207  for (auto& d : mdat.get_channel_data()) x += ((uint64_t)d.get_data_word()) << (16 * (i++));
1208  fReconParameters.SetValue64bit(current_module.name.c_str(), x);
1209  }
1210  }
1211  }
1212  },
1213  f.GetRevision()
1214  );
1215  return kTRUE;
1216 }
1217 
1218 #endif
1219 #endif
1220 
1221 
1238 
1240 {
1241  // Use file given by fullpath to set the real thicknesses of the detectors.
1242  //
1243  // Any detector which is not in the file will be left with its nominal thickness.
1244  //
1245  // See KVMultiDetArray::set_detector_thicknesses() for more info on file format.
1246  // Unlike KVMultiDetArray::set_detector_thicknesses() however, here only the active layer thickness
1247  // for different detectors can be specified, not the full set of asbsorber thicknesses for a multi-layer
1248  // detector.
1249  //
1250  // NOTE: KVINDRA::SetDetectorThicknesses() will not actually change the thickness of any
1251  // detector (unlike KVMultiDetArray::SetDetectorThicknesses() which changes directly both the
1252  // the KVDetector thicknesses and the size of the associated TGeoShape in the geometry).
1253  // As it is too difficult to modify the INDRA geometry after it is built, all detector thicknesses
1254  // have to be known before the geometry is created. Therefore this method is called to read in and
1255  // store any informations in the INDRAGeometryBuilder before building the geometry.
1256 
1257  TEnv thickdat;
1258  if (thickdat.ReadFile(fullpath, kEnvUser) != 0) {
1259  Error("SetDetectorThicknesses", "Problem opening file %s", fullpath.Data());
1260  return;
1261  }
1262  Info("SetDetectorThicknesses", "Reading thicknesses of detectors from file %s", fullpath.Data());
1263 
1264  TIter it(thickdat.GetTable());
1265  TEnvRec* rec;
1266  while ((rec = (TEnvRec*)it())) {
1267  KVString val = rec->GetValue();
1268  if (!val.IsFloat()) {
1269  Warning("SetDetectorThicknesses", "Non-numeric value %s given for thickness of detector %s : no change",
1270  val.Data(), rec->GetName());
1271  }
1272  else {
1273  if (TString(rec->GetName()).BeginsWith("SI")) // "SI", "SI75", "SILI" thicknesses given in microns
1274  fIGB->SetDetectorThickness(rec->GetName(), val.Atof()*KVUnits::um);
1275  else
1276  fIGB->SetDetectorThickness(rec->GetName(), val.Atof());
1277  }
1278  }
1279 }
1280 
1281 
int Int_t
unsigned int UInt_t
ROOT::R::TRInterface & r
#define d(i)
#define f(i)
#define e(i)
bool Bool_t
unsigned char UChar_t
char Char_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
constexpr Ssiz_t kNPOS
constexpr Bool_t kTRUE
kEnvUser
kEnvAll
#define N
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
Build INDRA geometry from Huguet CAO infos.
virtual const Char_t * GetType() const
Definition: KVBase.h:176
virtual Bool_t IsType(const Char_t *typ) const
Definition: KVBase.h:184
virtual void SetType(const Char_t *str)
Definition: KVBase.h:172
Ionisation chamber detectors of the INDRA multidetector array.
Definition: KVChIo.h:30
Double_t GetPressure() const override
Definition: KVChIo.h:46
void SetPressure(Double_t P) override
Definition: KVChIo.h:41
CsI(Tl) scintillation detectors of the INDRA multidetector array.
Definition: KVCsI.h:16
void SetPinLaser(Int_t n)
Definition: KVCsI.h:33
CHIO pressure parameters.
virtual void SetPressure(UInt_t n, Float_t pressure)
virtual Float_t GetPressure(UInt_t chio_number)
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
Definition: KVDBRecord.cpp:206
Description of an experimental run in database ,,.
Definition: KVDBRun.h:41
virtual Bool_t AddTable(KVDBTable *table)
Definition: KVDataBase.cpp:84
TString GetFullPathToDataSetFile(const Char_t *filename) const
Definition: KVDataSet.cpp:2067
const Char_t * GetDataSetDir() const
Definition: KVDataSet.cpp:762
Bool_t OpenDataSetFile(const Char_t *filename, std::ifstream &file)
ValType GetDataSetEnv(const Char_t *type, const ValType &defval={}) const
Definition: KVDataSet.h:269
static Bool_t FindDataSetFile(const TString &dataset, const Char_t *filename)
Definition: KVDataSet.cpp:2102
List of hit groups in a multidetector array.
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:160
void SetNameOfArray(const TString &n)
Definition: KVDetector.h:774
void SetDetecting(Bool_t yes=kTRUE)
Definition: KVDetector.h:667
GANIL VXI/VME 16 bit (maximum) EBYEDAT acquisition parameter.
UShort_t GetData() const
Base class to describe database of an experiment ,,.
Definition: KVExpDB.h:61
const KVNumberList & GetRunList() const
Definition: KVExpDB.h:156
virtual void LinkRecordToRunRange(KVDBRecord *rec, UInt_t first_run, UInt_t last_run)
Definition: KVExpDB.cpp:290
Bool_t FindCalibFile(const Char_t *type, TString &fullpath, const TString &array_name="") const
Definition: KVExpDB.cpp:672
Reads GANIL acquisition files (EBYEDAT)
const KVSeqCollection & GetFiredDataParameters() const
Specialised geometry importer for INDRA.
void ImportGeometry(std::vector< INDRAGeometryBuilder::theta_phi >)
Use the known (theta,phi) positions of the centre of each CsI/phoswich in order to scan the array.
void SetNameCorrespondanceList(const Char_t *)
Base class for particle reconstruction in one group of a detector array.
static KVGroupReconstructor * Factory(const TString &plugin="", const KVGroup *g=nullptr)
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:20
Extended version of ROOT THashList.
Definition: KVHashList.h:29
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:85
KVDetector * GetDetector(UInt_t n) const
virtual void SetIDCode(UShort_t c)
UInt_t GetSize() const
Base class for detectors of INDRA array.
UInt_t GetRingNumber() const
KVINDRADetector * GetChIo() const
INDRA multidetector array geometry.
Definition: KVINDRA.h:66
void Build(Int_t run=-1) override
Correspondance between CsI detectors and pin lasers is set up if known.
Definition: KVINDRA.cpp:119
KVINDRA()
Definition: KVINDRA.cpp:85
KVGroupReconstructor * GetReconstructorForGroup(const KVGroup *) const override
Definition: KVINDRA.cpp:895
virtual KVChIo * GetChIoOf(const Char_t *detname)
Definition: KVINDRA.cpp:171
void handle_ebyedat_raw_data_parameter(const char *param_name, uint16_t val)
Definition: KVINDRA.cpp:422
void SetDetectorParametersForRun(KVDBRun *, const TString &="") override
Override base method in order to set ChIo pressures (if defined)
Definition: KVINDRA.cpp:628
void GetDetectorEvent(KVDetectorEvent *detev, const TSeqCollection *fired_dets=0) override
Definition: KVINDRA.cpp:868
void SetPinLasersForCsI()
Definition: KVINDRA.cpp:808
void copy_fired_parameters_to_recon_param_list() override
Definition: KVINDRA.cpp:451
KVLayer * GetChIoLayer()
Definition: KVINDRA.cpp:189
void SetChIoPressures(KVDBRun *)
Definition: KVINDRA.cpp:560
static Char_t SignalTypes[16][3]
Use this static array to translate EBaseIndra_type signal type to a string giving the signal type.
Definition: KVINDRA.h:69
void FillListsOfDetectorsByType()
Fill lists of ChIo, Si, CsI and phoswich.
Definition: KVINDRA.cpp:138
TString GetCsIIDType() const
Definition: KVINDRA.cpp:775
void SetReconParametersInEvent(KVReconstructedEvent *) const override
If "INDRA.EN" parameter has been set, we use it to set the event number.
Definition: KVINDRA.cpp:936
void PerformClosedROOTGeometryOperations() override
Definition: KVINDRA.cpp:373
void SetTrigger(UChar_t trig)
Definition: KVINDRA.cpp:204
void SetRawDataFromReconEvent(KVNameValueList &) override
Definition: KVINDRA.cpp:952
void MakeCalibrationTables(KVExpDB *) override
Override base method in order to read ChIo pressures for each run.
Definition: KVINDRA.cpp:1006
virtual KVINDRADetector * GetDetectorByType(UInt_t cou, UInt_t mod, UInt_t type) const
Definition: KVINDRA.cpp:240
void SetNamesOfIDTelescopes() const
Definition: KVINDRA.cpp:314
void SetIDCodeForIDTelescope(KVIDTelescope *) const override
Set the INDRA-specific general identification code for the given telescope.
Definition: KVINDRA.cpp:752
void ReadChIoPressures(KVExpDB *)
Definition: KVINDRA.cpp:491
Bool_t handle_raw_data_event_mfmframe_mesytec_mdpp(const MFMMesytecFrame &) override
Definition: KVINDRA.cpp:1154
void InitialiseRawDataReading(KVRawDataReader *) override
Definition: KVINDRA.cpp:1048
void set_detector_thicknesses(const TString &) override
Definition: KVINDRA.cpp:1239
Bool_t handle_raw_data_event_mfmframe_ebyedat(const MFMEbyedatFrame &) override
Definition: KVINDRA.cpp:693
void BuildGeometry()
Definition: KVINDRA.cpp:639
Bool_t handle_raw_data_event_ebyedat(KVGANILDataReader &) override
Definition: KVINDRA.cpp:657
Read MFM format acquisition data.
mesytec::buffer_reader & GetMesytecBufferReader() const
static KVIonRangeTable * GetRangeTable()
Definition: KVMaterial.cpp:158
virtual void GetDetectorEvent(KVDetectorEvent *detev, const TSeqCollection *fired_params=0)
virtual void InitialiseRawDataReading(KVRawDataReader *)
virtual void SetDetectorParametersForRun(KVDBRun *, const TString &="")
virtual void copy_fired_parameters_to_recon_param_list()
virtual void MakeCalibrationTables(KVExpDB *)
virtual void SetRawDataFromReconEvent(KVNameValueList &)
virtual void SetReconParametersInEvent(KVReconstructedEvent *) const
Copy any parameters in fReconParameters in to the reconstructed event parameter list.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
A generic named parameter storing values of different types.
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Bool_t Contains(Int_t val) const
returns kTRUE if the value 'val' is contained in the ranges defined by the number list
Bool_t IsEmpty() const
Definition: KVNumberList.h:175
Wrapper for TRefArray adding some functionality.
Definition: KVRList.h:37
Abstract base class for reading raw (DAQ) data.
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
void Begin(TString delim) const
Definition: KVString.cpp:565
Bool_t End() const
Definition: KVString.cpp:634
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
virtual Int_t GetEntries() const
THashList * GetTable() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
void Reset()
const char * GetName() const override
virtual void SetName(const char *name)
TClass * IsA() const override
virtual TObject * FindObject(const char *name) const
virtual Bool_t InheritsFrom(const char *classname) const
Double_t Atof() const
Bool_t IsFloat() const
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
unsigned long long ULong64_t
TLine * line
Double_t x[n]
gr SetName("gr")
TGraphErrors * gr
void Error(const char *location, const char *fmt,...)
void Info(const char *location, const char *fmt,...)
void Warning(const char *location, const char *fmt,...)
rec
TLine l
ClassImp(TPyArg)