KaliVeda
Toolkit for HIC analysis
KVINDRAUpDater.cpp
1 /*
2 $Id: KVINDRAUpDater.cpp,v 1.12 2008/01/10 14:17:34 franklan Exp $
3 $Revision: 1.12 $
4 $Date: 2008/01/10 14:17:34 $
5 $Author: franklan $
6 */
7 
8 #include "KVINDRAUpDater.h"
9 #include "KVINDRA.h"
10 #include "KVCalibrator.h"
11 #include "KVNucleus.h"
12 #include "KVDBParameterSet.h"
13 #include "KVINDRADBRun.h"
14 #include "KVIDGridManager.h"
15 #include "KVDBChIoPressures.h"
16 #include "KVChIo.h"
17 #include "KVBase.h"
18 #include "KVSilicon.h"
19 #include "KVCsI.h"
20 #include "KVINDRADB.h"
21 using namespace std;
22 
23 
24 
27 
30 {
31  //Default ctor for KVINDRAUpDater object.
32 }
33 
34 
35 
36 
48 
49 void KVINDRAUpDater::SetParameters(UInt_t run, Bool_t physics_parameters_only)
50 {
51  //Set the parameters of INDRA for this run
52  //This will:
53  // set the multiplicity trigger of fArray using the database value for the run
54  // set the target corresponding to the run
55  // set the ChIo pressures for the run
56  //If physics_parameters_only==kFALSE:
57  // set special detector gains for run (if any)
58  // set calibration parameters for the run
59  // set identification parameters for the run
60  //
61 
62  cout << "Setting parameters of INDRA array for run " << run << ":" <<
63  endl;
64  KVDBRun* kvrun = gExpDB->GetDBRun(run);
65  if (!kvrun) {
66  Error("SetParameters(UInt_t)", "Run %u not found in database!", run);
67  return;
68  }
69  SetTrigger(kvrun);
70  SetTarget(kvrun);
71 
72  CheckStatusOfDetectors(kvrun);
73  SetChIoPressures(kvrun);
74 
75  if (!physics_parameters_only) {
76  //SetGains(kvrun);
77  SetCalibrationParameters(run);
78  SetIdentificationParameters(run);
79  }
80 }
81 
82 
83 
84 //void KVINDRAUpDater::SetCalibrationParameters(UInt_t run)
85 //{
86 // //Set calibration parameters for this run.
87 // //This will:
88 // // reset all the calibrators of all the detectors ready to receive the calibrators for the run (handled by child classes),
89 // // set calibration parameters for the run
90 // // set pedestals for the run
91 // // set PHD parameters of silicon detectors for run
92 
93 // cout << "Setting calibration parameters of INDRA array for run " << run << ":" <<
94 // endl;
95 // KVDBRun* kvrun = gExpDB->GetDBRun(run);
96 // if (!kvrun) {
97 // Error("SetParameters(UInt_t)", "Run %u not found in database!", run);
98 // return;
99 // }
100 // //Reset all calibrators of all detectors first
101 // TIter next(fArray->GetDetectors());
102 // KVDetector* kvd;
103 // KVCalibrator* kvc;
104 // while ((kvd = (KVDetector*) next())) {
105 // if (kvd->GetListOfCalibrators()) {
106 // TIter next_cal(kvd->GetListOfCalibrators());
107 // while ((kvc = (KVCalibrator*) next_cal())) {
108 // kvc->Reset();
109 // }
110 // }
111 // }
112 // SetCalibParameters(kvrun);
113 // //SetPedestals(kvrun);
114 // SetPHDs(kvrun);
115 //}
116 
117 
120 
122 {
123  //Set trigger used during this run
124 
125  cout << "--> Setting Trigger:" << endl;
126  GetINDRA()->SetTrigger(kvrun->GetTrigger());
127  cout << " M>=" << (Int_t)GetINDRA()->GetTrigger() << endl;
128 }
129 
130 
131 
133 
135 {
136 
137  KVRList* absdet = kvrun->GetLinks("Absent Detectors");
138  KVRList* oooacq = kvrun->GetLinks("OoO ACQPars");
139  KVRList* ooodet = kvrun->GetLinks("OoO Detectors");
140 
141  TIter next(fArray->GetDetectors());
142  KVDetector* det;
143  KVEBYEDAT_ACQParam* acq;
144 
145  Int_t ndet_absent = 0;
146  Int_t ndet_ooo = 0;
147  Int_t nacq_ooo = 0;
148 
149  while ((det = (KVDetector*)next())) {
150  //Test de la presence ou non du detecteur
151  if (!absdet) {
152  det->SetPresent();
153  }
154  else {
155  if (absdet->FindObject(det->GetName(), "Absent Detector")) {
156  det->SetPresent(kFALSE);
157  ndet_absent += 1;
158  }
159  else {
160  det->SetPresent();
161  }
162  }
163  if (det->IsPresent()) {
164  //Test du bon fonctionnement ou non du detecteur
165  if (!ooodet) {
166  det->SetDetecting();
167  }
168  else {
169  if (ooodet->FindObject(det->GetName(), "OoO Detector")) {
170  det->SetDetecting(kFALSE);
171  ndet_ooo += 1;
172  }
173  else {
174  det->SetDetecting();
175  }
176  }
177  //Test du bon fonctionnement ou non des parametres d acquisition
178 // if (det->IsDetecting()) {
179 // TIter next_acq(det->GetACQParamList());
180 // if (!oooacq) {
181 // while ((acq = (KVACQParam*)next_acq())) {
182 // acq->SetWorking();
183 // }
184 // }
185 // else {
186 // Int_t noff = 0;
187 // while ((acq = (KVACQParam*)next_acq())) {
188 // if (oooacq->FindObject(acq->GetName(), "OoO ACQPar")) {
189 // acq->SetWorking(kFALSE);
190 // noff += 1;
191 // nacq_ooo += 1;
192 // }
193 // else {
194 // acq->SetWorking();
195 // }
196 // }
197 // if (noff == 3) {
198 // det->SetDetecting(kFALSE);
199 // ndet_ooo += 1;
200 // nacq_ooo -= 3;
201 // }
202 // }
203 // }
204  }
205  }
206  Info("KVINDRAUpDater", "%d detecteurs absents", ndet_absent);
207  Info("KVINDRAUpDater", "%d detecteurs ne fonctionnent pas", ndet_ooo);
208  Info("KVINDRAUpDater", "%d parametres d acquisition ne fonctionnent pas", nacq_ooo);
209 }
210 
211 
212 //void KVINDRAUpDater::SetGains(KVDBRun* kvrun)
213 //{
214 // //Set gains used during this run
215 // //First all detector gains are set to 1.
216 // //Then, any detectors for which a different gain has been defined
217 // //will have its gain set to the value for the run
218 // TIter next(fArray->GetDetectors());
219 // KVDetector* kvd;
220 // while ((kvd = (KVDetector*) next()))
221 // kvd->SetGain(1.00);
222 // KVRList* gain_list = kvrun->GetLinks("Gains");
223 // if (!gain_list) {
224 // return;
225 // }
226 // cout << "--> Setting Gains:" << endl;
227 // Int_t ndets = gain_list->GetSize();
228 // cout << " Setting gains for " << ndets << " detectors : " << endl;
229 // for (int i = 0; i < ndets; i++) {
230 // KVDBParameterSet* dbps = (KVDBParameterSet*) gain_list->At(i);
231 // kvd = fArray->GetDetector(dbps->GetName());
232 // if (kvd) {
233 // kvd->SetGain(dbps->GetParameter(0));
234 // cout << " " << kvd->GetName() << " : G=" << kvd->
235 // GetGain() << endl;
236 // }
237 // else {
238 // Error("SetGains", "le detecteur %s n ext pas present", dbps->GetName());
239 // }
240 // }
241 //}
242 
243 //
244 // void KVINDRAUpDater::SetIDGrids(UInt_t run)
245 // {
246 // // Use global ID grid manager gIDGridManager to set identification grids for all
247 // // ID telescopes for this run. First, any previously set grids are removed.
248 // // Then all grids for current run are set in the associated ID telescopes.
249 //
250 // cout << "--> Setting Identification Grids" << endl;
251 // TIter next_idt(gMultiDetArray->GetListOfIDTelescopes());
252 // KVIDTelescope *idt;
253 // while ((idt = (KVIDTelescope *) next_idt()))
254 // {
255 // idt->RemoveGrids();
256 // }
257 // gIDGridManager->SetGridsInTelescopes(run);
258 // }
259 
260 
261 
268 
270 {
271  //Update ChIo pressures for this run with values in database (if any)
272  //
273  //if pressure is equal to 0 (no gas)
274  //mark the corresponding ChIo's as non detecting detector (see KVDetector::SetDetecting())
275  //
276 
277  KVRList* param_list = kvrun->GetLinks("ChIo Pressures");
278  if (!param_list) {
279  return;
280  }
281  KVChIo* kvd;
282  KVDBChIoPressures* kvps;
283  TIter next_ps(param_list);
284  auto chios = GetINDRA()->GetListOfChIo();
285  if (!chios) {
286  Error("SetChIoPressures",
287  "fArray->GetListOfChIo() returns null list pointer");
288  return;
289  }
290  cout << "--> Setting ChIo pressures" << endl;
291  TIter next_chio(chios);
292  while ((kvps = (KVDBChIoPressures*) next_ps())) {
293  cout << " Ring 2/3: " << kvps->
294  GetPressure(CHIO_2_3) << "mbar" << endl;
295  cout << " Ring 4/5: " << kvps->
296  GetPressure(CHIO_4_5) << "mbar" << endl;
297  cout << " Ring 6/7: " << kvps->
298  GetPressure(CHIO_6_7) << "mbar" << endl;
299  cout << " Ring 8/12: " << kvps->
300  GetPressure(CHIO_8_12) << "mbar" << endl;
301  cout << " Ring 13/17: " << kvps->
302  GetPressure(CHIO_13_17) << "mbar" << endl;
303  while ((kvd = (KVChIo*) next_chio())) {
304  if (!strcmp(kvd->GetType(), "CI")) {
305  //check detector type: ="CI" for standard INDRA chio
306  if (kvd->GetRingNumber() == 2)
307  kvd->SetPressure(kvps->GetPressure(CHIO_2_3));
308  if (kvd->GetRingNumber() == 4)
309  kvd->SetPressure(kvps->GetPressure(CHIO_4_5));
310  if (kvd->GetRingNumber() == 6)
311  kvd->SetPressure(kvps->GetPressure(CHIO_6_7));
312  if (kvd->GetRingNumber() >= 8 && kvd->GetRingNumber() <= 12)
313  kvd->SetPressure(kvps->GetPressure(CHIO_8_12));
314  if (kvd->GetRingNumber() >= 13 && kvd->GetRingNumber() <= 17)
315  kvd->SetPressure(kvps->GetPressure(CHIO_13_17));
316  if (kvd->GetPressure() == 0.0) {
317  kvd->SetDetecting(kFALSE);
318  }
319  else {
320  kvd->SetDetecting(kTRUE);
321  }
322  }
323  }
324  next_chio.Reset();
325  }
326 }
327 
328 
329 
330 
332 
334 {
335 
336 
337  KVRList* param_list = kvrun->GetLinks("Channel-Volt");
338  if (!param_list)
339  return;
340  if (!param_list->GetSize())
341  return;
342 
343  KVDetector* kvd;
344  KVDBParameterSet* kvps;
345  KVCalibrator* kvc;
346  TIter next_ps(param_list);
347 
348 
349  TString str;
350 
351  // Setting Channel-Volts calibration parameters
352  while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
353  str = kvps->GetName();
354  str.Remove(str.Sizeof() - 4, 3); //Removing 3 last letters (ex : "_PG")
355  kvd = fArray->GetDetector(str.Data());
356  if (!kvd)
357  Warning("SetChVoltParameters(UInt_t)", "Dectector %s not found !",
358  str.Data());
359  else { // detector found
360  kvc = kvd->GetCalibrator(kvps->GetName(), kvps->GetTitle());
361  if (!kvc)
362  Warning("SetChVoltParameters(UInt_t)",
363  "Calibrator %s %s not found !", kvps->GetName(),
364  kvps->GetTitle());
365  else { //calibrator found
366  for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
367  kvc->SetParameter(i, kvps->GetParameter(i));
368  }
369  kvc->SetStatus(kTRUE); // calibrator ready
370  } //calibrator found
371  } //detector found
372  } //boucle sur les parameters
373 }
374 
375 
376 
377 
379 
381 {
382 
383  KVRList* param_list = kvrun->GetLinks("Volt-Energy ChIo-Si");
384  if (!param_list)
385  return;
386  if (!param_list->GetSize()) {
387  return;
388  }
389 
390  KVDetector* kvd;
391  KVDBParameterSet* kvps;
392  KVCalibrator* kvc;
393  TIter next_ps(param_list);
394 
395  // Setting Channel-Volts calibration parameters
396  while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
397  kvd = fArray->GetDetector(kvps->GetName());
398  if (!kvd) {
399  /*
400  Warning("SetVoltEnergyParameters(UInt_t)",
401  "Dectector %s not found !", kvps->GetName());
402  */
403  }
404  else { // detector found
405  kvc = kvd->GetCalibrator(kvps->GetName(), kvps->GetTitle());
406  if (!kvc)
407  Warning("SetVoltEnergyParameters(UInt_t)",
408  "Calibrator %s %s not found !", kvps->GetName(),
409  kvps->GetTitle());
410  else { //calibrator found
411  for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
412  kvc->SetParameter(i, kvps->GetParameter(i));
413  }
414  kvc->SetStatus(kTRUE); // calibrator ready
415  } //calibrator found
416  } //detector found
417  } //boucle sur les parameters
418 }
419 
420 
421 
422 //void KVINDRAUpDater::SetCalibParameters(KVDBRun* run)
423 //{
424 // SetChVoltParameters(run);
425 // SetVoltEnergyChIoSiParameters(run);
426 // SetLitEnergyCsIParameters(run);
427 // SetCsIGainCorrectionParameters(run);
428 //}
429 
430 
431 //void KVINDRAUpDater::SetPedestals(KVDBRun* kvrun)
432 //{
433 // //Set pedestals for this run
434 
435 // SetChIoSiPedestals(kvrun);
436 // SetCsIPedestals(kvrun);
437 
438 //}
439 
440 
441 
447 
449 {
450  // Sets KVCsI::fGainCorrection data member, used by KVCsI::GetCorrectedLumiereTotale
451  // to return the total light output corrected by a run-dependent factor.
452  // We set all detectors' correction to 1, then set the corrections defined for this
453  // run, if any.
454 
455  AbstractMethod("SetCsIGainCorrectionParameters");
456 
457  TIter next_csi(GetINDRA()->GetListOfCsI());
458  KVCsI* csi;
459 // while ((csi = (KVCsI*)next_csi())) {
460 // csi->SetTotalLightGainCorrection(1.0);
461 // }
462 
463  KVRList* param_list = kvrun->GetLinks("CsIGainCorr");
464  if (!param_list) {
465  return;
466  }
467  if (!param_list->GetSize()) {
468  return;
469  }
470 
471  TIter next_ps(param_list);
472  KVDBParameterSet* dbps;
473  while ((dbps = (KVDBParameterSet*)next_ps())) {
474 
475  csi = (KVCsI*)fArray->GetDetector(dbps->GetName());
476  if (!csi) {
477  // the name of the parameter set should be the name of the detector;
478  // however, it may be the name of an acquisition parameter associated with
479  // the detector!
480 // KVACQParam* a = fArray->GetACQParam(dbps->GetName());
481 // if (a) csi = (KVCsI*)a->GetDetector();
482  // still no good ?
483  if (!csi) {
484  Warning("SetCsIGainCorrectionParameters",
485  "Cannot find detector associated with %s", dbps->GetName());
486  continue;
487  }
488  }
489 // csi->SetTotalLightGainCorrection(dbps->GetParameter());
490 // Info("SetCsIGainCorrectionParameters", "%s gain correction = %f", csi->GetName(), csi->GetTotalLightGainCorrection());
491  }
492 }
493 
494 
495 
496 
499 
501 {
502 
503  // Setting Light- Energy CsI calibration parameters for Z=1
504  KVRList* param_list = kvrun->GetLinks("Light-Energy CsI Z=1");
505 
506  if (param_list && param_list->GetSize()) {
507 
508  KVDetector* kvd;
509  KVDBParameterSet* kvps;
510  KVCalibrator* kvc;
511  TIter next_ps(param_list);
512  TString str;
513 
514  while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
515  str = kvps->GetName();
516  kvd = fArray->GetDetector(str.Data());
517  if (!kvd)
518  Warning("SetLitEnergyCsIParameters(UInt_t)",
519  "Dectector %s not found !", str.Data());
520  else { // detector found
521  kvc = kvd->GetCalibrator(kvps->GetTitle());
522  if (!kvc) {
523  Warning("SetLitEnergyCsIParameters(UInt_t)",
524  "Calibrator %s %s not found ! - it will be created",
525  kvps->GetName(), kvps->GetTitle());
526  //kvd->SetCalibrators();
527  kvc = kvd->GetCalibrator(kvps->GetTitle());
528  }
529  for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
530  kvc->SetParameter(i, kvps->GetParameter(i));
531  kvc->SetStatus(kTRUE); // calibrator ready
532  }
533  } //detector found
534  } //boucle sur les parameters
535  }
536  // Setting Light- Energy CsI calibration parameters for Z>1
537  param_list = kvrun->GetLinks("Light-Energy CsI Z>1");
538 
539  if (!param_list || !param_list->GetSize()) {
540  return;
541  }
542 
543  KVDetector* kvd;
544  KVDBParameterSet* kvps;
545  KVCalibrator* kvc;
546  TString str;
547 
548  TIter next_ps2(param_list);
549  while ((kvps = (KVDBParameterSet*) next_ps2())) { // boucle sur les parametres
550  str = kvps->GetName();
551  kvd = fArray->GetDetector(str.Data());
552  if (!kvd)
553  Warning("SetLitEnergyCsIParameters(UInt_t)",
554  "Dectector %s not found !", str.Data());
555  else { // detector found
556  kvc = kvd->GetCalibrator(kvps->GetTitle());
557  if (!kvc) {
558  Warning("SetLitEnergyCsIParameters(UInt_t)",
559  "Calibrator %s %s not found ! - it will be created",
560  kvps->GetName(), kvps->GetTitle());
561  //kvd->SetCalibrators();
562  kvc = kvd->GetCalibrator(kvps->GetTitle());
563  }
564  for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
565  kvc->SetParameter(i, kvps->GetParameter(i));
566  kvc->SetStatus(kTRUE); // calibrator ready
567  }
568  } //detector found
569  } //boucle sur les parameters
570 }
571 
572 
573 
574 //void KVINDRAUpDater::SetChIoSiPedestals(KVDBRun* kvrun)
575 //{
576 // //read Chio-Si-Etalons pedestals
577 
578 // if (!kvrun->GetKey("Pedestals"))
579 // return;
580 // if (!kvrun->GetKey("Pedestals")->GetLinks())
581 // return;
582 // if (!kvrun->GetKey("Pedestals")->GetLinks()->At(0))
583 // return;
584 
585 // ifstream file_pied_chiosi;
586 // if (!KVBase::
587 // SearchAndOpenKVFile(kvrun->GetKey("Pedestals")->GetLinks()->At(0)->
588 // GetName(), file_pied_chiosi, fDataSet.Data())) {
589 // Error("SetPedestals", "Problem opening file %s",
590 // kvrun->GetKey("Pedestals")->GetLinks()->At(0)->GetName());
591 // return;
592 // }
593 // cout << "--> Setting Pedestals" << endl;
594 // cout << " ChIo/Si/Etalons: " << kvrun->GetKey("Pedestals")->
595 // GetLinks()->At(0)->GetName() << endl;
596 
597 // //skip first 5 lines - header
598 // TString line;
599 // for (int i = 5; i; i--) {
600 // line.ReadLine(file_pied_chiosi);
601 // }
602 
603 // int cou, mod, type, n_phys, n_gene;
604 // float ave_phys, sig_phys, ave_gene, sig_gene;
605 
606 // while (file_pied_chiosi.good()) {
607 
608 // file_pied_chiosi >> cou >> mod >> type >> n_phys >> ave_phys >>
609 // sig_phys >> n_gene >> ave_gene >> sig_gene;
610 
611 // KVDetector* det = GetINDRA()->GetDetectorByType(cou, mod, type);
612 // if (det) {
613 // switch (type) {
614 
615 // case ChIo_GG:
616 
617 // det->SetPedestal("GG", ave_gene);
618 // break;
619 
620 // case ChIo_PG:
621 
622 // det->SetPedestal("PG", ave_gene);
623 // break;
624 
625 // case Si_GG:
626 
627 // det->SetPedestal("GG", ave_gene);
628 // break;
629 
630 // case Si_PG:
631 
632 // det->SetPedestal("PG", ave_gene);
633 // break;
634 
635 // case SiLi_GG:
636 
637 // det->SetPedestal("GG", ave_gene);
638 // break;
639 
640 // case SiLi_PG:
641 
642 // det->SetPedestal("PG", ave_gene);
643 // break;
644 
645 // case Si75_GG:
646 
647 // det->SetPedestal("GG", ave_gene);
648 // break;
649 
650 // case Si75_PG:
651 
652 // det->SetPedestal("PG", ave_gene);
653 // break;
654 
655 // default:
656 
657 // break;
658 // }
659 // }
660 // }
661 // file_pied_chiosi.close();
662 //}
663 
665 
666 //void KVINDRAUpDater::SetCsIPedestals(KVDBRun* kvrun)
667 //{
668 // if (!kvrun->GetKey("Pedestals"))
669 // return;
670 // if (!kvrun->GetKey("Pedestals")->GetLinks())
671 // return;
672 // if (!kvrun->GetKey("Pedestals")->GetLinks()->At(1))
673 // return;
674 
675 // //read CsI pedestals
676 // ifstream file_pied_csi;
677 // if (!KVBase::
678 // SearchAndOpenKVFile(kvrun->GetKey("Pedestals")->GetLinks()->At(1)->
679 // GetName(), file_pied_csi, fDataSet.Data())) {
680 // Error("SetPedestals", "Problem opening file %s",
681 // kvrun->GetKey("Pedestals")->GetLinks()->At(1)->GetName());
682 // return;
683 // }
684 // cout << "--> Setting Pedestals" << endl;
685 // cout << " CsI : " << kvrun->GetKey("Pedestals")->
686 // GetLinks()->At(1)->GetName() << endl;
687 
688 // int cou, mod, type, n_phys, n_gene;
689 // float ave_phys, sig_phys, ave_gene, sig_gene;
690 // TString line;
691 
692 // //skip first 5 lines - header
693 // for (int i = 5; i; i--) {
694 // line.ReadLine(file_pied_csi);
695 // }
696 
697 // while (file_pied_csi.good()) {
698 
699 // file_pied_csi >> cou >> mod >> type >> n_phys >> ave_phys >> sig_phys
700 // >> n_gene >> ave_gene >> sig_gene;
701 
702 // KVDetector* det = GetINDRA()->GetDetectorByType(cou, mod, type);
703 // if (det) {
704 // switch (type) {
705 
706 // case CsI_R:
707 
708 // det->SetPedestal("R", ave_gene);
709 // break;
710 
711 // case CsI_L:
712 
713 // det->SetPedestal("L", ave_gene);
714 // break;
715 
716 // default:
717 
718 // break;
719 // }
720 // }
721 // }
722 // file_pied_csi.close();
723 //}
724 
725 
727 
729 {
730  return (KVINDRA*)fArray;
731 }
732 
733 
734 
735 
775 
777 {
778  //If the environment variable
779  // name_of_dataset.INDRADB.PHD: name_of_file
780  //is set, then the corresponding file (which must be in $KVROOT/KVFiles/name_of_dataset)
781  //is read and used to set the (Moulton) pulse-height defect parameters of all silicon
782  //detectors.
783 
784 // TString phdfile = gExpDB->GetDBEnv("PHD");
785 
786 // if (phdfile != "") {
787 // cout << "--> Setting Si pulse height defect parameters (Moulton)" << endl;
788 
789 // //get full path to file
790 // TString path;
791 // if (KVBase::SearchKVFile(phdfile.Data(), path, gDataSet->GetName())) {
792 // //read file with a TEnv
793 // TEnv phds;
794 // if (phds.ReadFile(path.Data(), kEnvLocal) != 0) {
795 // Error("SetPHDs", "TEnv::ReadFile != 0, cannot read PHD file");
796 // }
797 // //loop over all silicons
798 // TIter next_si(GetINDRA()->GetListOfSi());
799 // KVSilicon* si;
800 // while ((si = (KVSilicon*)next_si())) {
801 // Int_t group = phds.GetValue(si->GetName(), 0);
802 // if (group) {
803 // Double_t p1 = phds.GetValue(Form("Group%d.p1", group), 0.0);
804 // Double_t p2 = phds.GetValue(Form("Group%d.p2", group), 0.0);
805 // //set parameters for this detector
806 // //using si->SetMoultonPHDParameters(Double_t a_1, Double_t a_2, Double_t b_1, Double_t b_2)
807 // //in our case,
808 // // a_1 = 0.0223 a_2 = 0.5682 b_1 = p2 b_2 = p1
809 // si->SetMoultonPHDParameters(0.0223, 0.5682, p2, p1);
810 // }
811 // }
812 // //set flag in INDRA to say this has been done
813 // GetINDRA()->PHDSet();
814 // }
815 // else {
816 // Error("SetPHDs", "File %s not found", phdfile.Data());
817 // }
818 // }
819 }
820 
821 
int Int_t
unsigned int UInt_t
bool Bool_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
void AbstractMethod(const char *method)
Base class for all detector calibrations.
Definition: KVCalibrator.h:99
Int_t GetNumberParams() const
Definition: KVCalibrator.h:153
void SetParameter(int i, Double_t par_val) const
Definition: KVCalibrator.h:158
void SetStatus(Bool_t ready)
Definition: KVCalibrator.h:166
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
CHIO pressure parameters.
virtual Float_t GetPressure(UInt_t chio_number)
To store calibration parameters in a database ,.
Double_t GetParameter(UShort_t i=0) const
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:40
Int_t GetTrigger() const
Definition: KVDBRun.h:207
GANIL VXI/VME 16 bit (maximum) EBYEDAT acquisition parameter.
KVDBRun * GetDBRun(Int_t number) const
Definition: KVExpDB.h:89
UInt_t GetRingNumber() const
Class implementing necessary methods for setting INDRA parameters for each run, using information sto...
virtual void SetVoltEnergyChIoSiParameters(KVDBRun *)
KVINDRA * GetINDRA()
virtual void SetChIoPressures(KVDBRun *)
virtual void SetCalibParameters(KVDBRun*);
virtual void SetPHDs(KVDBRun *)
virtual void SetChVoltParameters(KVDBRun *)
virtual void SetPedestals(KVDBRun*);
virtual void SetTrigger(KVDBRun *)
virtual void SetCalibrationParameters(UInt_t);
void SetParameters(UInt_t run, Bool_t physics_parameters_only=kFALSE) override
void CheckStatusOfDetectors(KVDBRun *)
virtual void SetGains(KVDBRun*);
virtual void SetLitEnergyCsIParameters(KVDBRun *)
Setting Light- Energy CsI calibration parameters for Z=1.
virtual void SetCsIGainCorrectionParameters(KVDBRun *)
INDRA multidetector array geometry.
Definition: KVINDRA.h:66
Wrapper for TRefArray adding some functionality.
Definition: KVRList.h:37
KVBase * FindObject(const Char_t *name, const Char_t *type) const
Definition: KVRList.cpp:106
Int_t GetSize() const override
Definition: KVRList.h:76
void Reset()
const char * GetName() const override
const char * GetTitle() const override
const char * Data() const
virtual Int_t Sizeof() const
TString & Remove(EStripType s, char c)
void Error(const char *location, const char *fmt,...)
void Info(const char *location, const char *fmt,...)
void Warning(const char *location, const char *fmt,...)
ClassImp(TPyArg)