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