49 #ifdef WITH_BUILTIN_GRU
56 #include "MFMEbyedatFrame.h"
58 #include "MFMMesytecMDPPFrame.h"
265 if (!
de->IsOK() && !
e->IsOK())
return ntels;
383 TString uri = de_type + de_thick +
"-" + e_type + e_thick;
387 uri = de_type + de_thick +
"-" + e_type;
391 uri = de_type +
"-" + e_type + e_thick;
395 uri = de_type +
"-" + e_type;
401 uri = de_type +
"-" + e_type;
546 if (
de->GetGroup()) {
596 unique_ptr<KVSeqCollection> fGroups(
GetStructures()->GetSubListWithType(
"GROUP"));
597 TIter ngrp(fGroups.get());
598 while ((grp = (
KVGroup*) ngrp())) {
651 for (
int j = 0; j < dethits; j++) {
890 Error(
"DetectEvent",
"the KVEvent object pointer has to be valid");
894 Error(
"DetectEvent",
"the KVReconstructedEvent object pointer has to be valid");
900 Error(
"DetectEvent",
"ROOT geometry is requested, but has not been set: gGeoManager=0x0");
904 Error(
"DetectEvent",
"Using ROOT geometry, but no navigator exists");
934 Int_t part_index = 0;
935 while ((part =
event->GetNextNucleus())) {
940 cout <<
"DetectEvent(): looking at particle---->" << endl;
943 if (strcmp(detection_frame,
"")) _part = (
KVNucleus*)part->
GetFrame(detection_frame);
960 det_stat.
SetValue(
"UNDETECTED",
"NEUTRON");
965 else if (_part->
GetKE() < 1.e-3) {
966 det_stat.
SetValue(
"UNDETECTED",
"NO ENERGY");
979 eLostInTarget = ebef - _part->
GetKE();
980 if (_part->
GetKE() < 1.e-3) {
981 det_stat.
SetValue(
"UNDETECTED",
"STOPPED IN TARGET");
984 part->
AddGroup(
"STOPPED IN TARGET");
995 if (part->
GetZ() == 0) {
997 det_stat.
SetValue(
"UNDETECTED",
"NEUTRON");
1003 det_stat.
SetValue(
"UNDETECTED",
"NO HIT");
1010 else if (nvl->
GetNpar() == 0) {
1012 if (part->
GetZ() == 0) {
1014 det_stat.
SetValue(
"UNDETECTED",
"NEUTRON");
1023 det_stat.
SetValue(
"UNDETECTED",
"DEAD ZONE");
1083 det_stat.
SetValue(
"UNDETECTED",
"GEOMETRY INCOHERENCY");
1086 part->
AddGroup(
"GEOMETRY INCOHERENCY");
1095 det_stat.
SetValue(
"UNDETECTED",
"THRESHOLD");
1107 det_stat.
SetValue(
"DETECTED",
"OK");
1116 det_stat.
SetValue(
"DETECTED",
"INCOMPLETE");
1120 Warning(
"DetectEvent",
"Cas non prevu ....");
1121 printf(
"last_det->GetName()=%s, lidtel->GetEntries()=%d, last_det->GetEnergy()=%lf\n",
1130 if (_part->
GetKE() > 1.e-3) {
1143 det_stat.
SetValue(
"UNDETECTED",
"GEOMETRY INCOHERENCY");
1145 part->
AddGroup(
"GEOMETRY INCOHERENCY");
1148 else if (nbre_nvl) {
1155 det_stat.
SetValue(
"DETECTED",
"PUNCH THROUGH");
1174 TIter nextIDT(lidtel);
1179 for (
int i = 1; i <= ndet; i++) {
1183 if (ntouche < ndet)
continue;
1214 ppp.
Add(part_index);
1242 while ((grp_tch = (
KVGroup*) nxt_grp())) {
1245 while ((part =
event->GetNextNucleus())) {
1257 if (!last_det)
continue;
1278 while ((grp_tch = (
KVGroup*) nxt_grp())) {
1321 while ((part =
event->GetNextNucleus())) {
1326 if (!last_det || !(last_det->
IsOK()))
continue;
1367 while ((grp_tch = (
KVGroup*) nxt_grp())) {
1372 Int_t round = 1, nchanged;
1379 while ((grp_tch = (
KVGroup*) nxt_grp())) {
1405 while ((grp_tch = (
KVGroup*) nxt_grp())) {
1455 Error(
"DetectParticle_TGEO",
"No existing navigator ...");
1526 Warning(
"ReplaceDetector",
"Needs reimplementing");
1614 unique_ptr<KVSeqCollection> fGroups(
GetStructures()->GetSubListWithType(
"GROUP"));
1616 TIter next(fGroups.get());
1618 while ((grp = (
KVGroup*) next())) {
1731 TString tabname = (myname !=
"" ?
Form(
"%s.Calibrations", myname.
Data()) :
"Calibrations");
1732 Info(
"SetCalibratorParameters",
"For array %s in table %s",
GetName(), tabname.
Data());
1733 KVRList* run_links =
r->GetLinks(tabname);
1734 if (run_links)
Info(
"SetCalibratorParameters",
"Found %d calibrations for this run", run_links->
GetEntries());
1736 Warning(
"SetCalibratorParameters",
"Got no links for %s", tabname.
Data());
1740 TIter nxt_link(run_links);
1746 Warning(
"SetCalibratorParameters",
"Got parameters for unknown detector: %s", dbps->
GetName());
1755 while (!clop.
End()) {
1768 catch (std::exception&
e) {
1769 Error(
"SetCalibratorParameters",
1770 "Problem for %s [%s] : %s", det->
GetName(), cal->
GetType(),
e.what());
1784 Warning(
"SetCalibratorParameters",
"Wrong number of parameters (%d) for calibrator %s for detector %s : should be %d",
1842 if (
s.IsNull())
continue;
1875 if (!fired_dets || !fired_dets->
GetEntries()) {
1878 if (fired_dets && fired_dets->
GetEntries()) {
1880 TIter next_det(fired_dets);
1889 unique_ptr<KVSeqCollection> fGroups(
GetStructures()->GetSubListWithType(
"GROUP"));
1891 TIter next_grp(fGroups.get());
1893 while ((grp = (
KVGroup*) next_grp())) {
1898 detev->AddGroup(grp);
1932 TIter nxt_grp(kvde->GetGroups());
1933 while ((grp_tch = (
KVGroup*) nxt_grp())) {
1975 Warning(
"RemoveGroup",
"Needs reimplementing");
2016 Error(
"DetectParticleIn",
"Detector %s not found", detname);
2052 printf(
"Info in <KVMultiDetArray::MakeMultiDetector>: Changing dataset\n");
2057 printf(
"Info in <KVMultiDetArray::MakeMultiDetector>: Deleting existing array %s\n",
gMultiDetArray->
GetName());
2103 filepath +=
"/idgrids_DB";
2109 printf(
"Info in <KVMultiDetArray::MakeMultiDetector>: Saving %d grids in SQL-ROOT database file %s\n",
2110 n_grids_to_write, filepath.
Data());
2116 {
"IDLabel",
gr->GetIDTelescopeLabel()},
2117 {
"IDTelescopes",
gr->GetParameters()->GetStringValue(
"IDTelescopes")},
2118 {
"VarX",
gr->GetVarX()},
2119 {
"VarY",
gr->GetVarY()},
2120 {
"Runlist",
gr->GetRunList()},
2124 if (!(n_grids_to_write % 1000)) printf(
"Info in <KVMultiDetArray::MakeMultiDetector>: ...%d grids left...\n",
2318 filepath +=
"/idgrids_DB";
2330 Info(
"SetIdentifications",
"No active identifications");
2334 id_labels.
Begin(
" ");
2337 while (!id_labels.
End()) {
2343 Info(
"SetIdentifications",
"Initialising %s identifications...", idt->
GetLabel());
2345 Info(
"SetIdentifications",
"OK");
2352 Warning(
"SetIdentfications",
"No telescopes found with labels given in %s.ActiveIdentifications list: %s",
2429 cout << endl <<
"-----STATUS OF IDENTIFICATION TELESCOPES";
2432 cout <<
"------" << endl << endl;
2438 TIter it(typelist.get());
2441 if (id_labels ==
"") id_labels +=
type->GetString().Data();
2443 id_labels +=
Form(
" %s",
type->GetString().Data());
2447 if (id_labels ==
"") {
2448 cout <<
" *** No active identifications *** " << endl;
2452 unique_ptr<TObjArray> toks(id_labels.
Tokenize(
' '));
2458 TList* id_type_list = 0;
2459 while ((id_type_list = (
TList*)next_type())) {
2461 cout <<
" *** " << id_type_list->
GetName() <<
" Identifications -------------------" << endl;
2462 if (!toks->FindObject(id_type_list->
GetName())) {
2463 cout <<
" [NOT ACTIVE]" << endl;
2467 TList* print_list = 0;
2471 if (Nok < Notok) print_list = ok_list;
2472 else print_list = notok_list;
2474 if (Nok && (!Notok)) cout <<
" ALL telescopes are OK" << endl;
2475 else if (Notok && (!Nok)) cout <<
" NO telescopes are OK" << endl;
2477 cout <<
" " << ok_list->
GetEntries() <<
" telescopes are OK, "
2478 << notok_list->
GetEntries() <<
" telescopes are NOT OK" << endl;
2479 cout <<
" " << print_list->
GetName() <<
" :" << endl;
2480 TIter it(print_list);
2483 while ((ob = it())) cout <<
"," << ob->
GetName();
2525 if (!id_type_list) {
2526 id_type_list =
new TList;
2629 type_list =
new TList;
2659 Info(
"PrintCalibStatusOfDetectors",
"Cannot know status without knowing RUN NUMBER");
2663 cout << endl <<
"-----------STATUS OF CALIBRATIONS FOR RUN "
2670 TList* id_type_list = 0;
2671 while ((id_type_list = (
TList*)next_type())) {
2673 cout <<
" *** " << id_type_list->
GetName() <<
" Detectors -------------------" << endl;
2676 TList* print_list = 0;
2680 if (Nok < Notok) print_list = ok_list;
2681 else print_list = notok_list;
2683 if (Nok && (!Notok)) cout <<
" ALL calibrations are OK" << endl;
2684 else if (Notok && (!Nok)) cout <<
" NO calibrations are OK" << endl;
2686 cout <<
" " << ok_list->
GetEntries() <<
" calibrations are OK, "
2687 << notok_list->
GetEntries() <<
" calibrations are NOT OK" << endl;
2688 cout <<
" " << print_list->
GetName() <<
" :" << endl;
2689 TIter it(print_list);
2692 while ((ob = it())) cout <<
"," << ob->
GetName();
2817 if (filename !=
"") {
2829 Warning(
"SetDetectorThicknesses",
"Could not open DetectorThicknessesFile %s...", fullpath.
Data());
2835 if (filename ==
"") {
2836 Error(
"SetDetectorThicknesses",
"*.KVMultiDetArray.DetectorThicknesses not defined in .kvrootrc");
2841 if (fullpath ==
"") {
2842 Info(
"SetDetectorThicknesses",
"File %s not found", filename.
Data());
2891 Error(
"SetDetectorThicknesses",
"Problem opening file %s", fullpath.
Data());
2894 Info(
"SetDetectorThicknesses",
"Setting thicknesses of detectors from file %s", fullpath.
Data());
2957 Error(
"GetPunchThroughEnergy",
"Detector %s not found in array", detector);
2986 punch->
SetName(
Form(
"KVMultiDetpunchthrough_%s_mass%d", detector, massform));
2987 punch->
SetTitle(
Form(
"Array Punch-through %s (MeV) (mass formula %d)", detector, massform));
2990 for (
int Z = 1; Z <= 92; Z++) {
3011 punch->
SetName(
Form(
"KVMultiDetpunchthroughEsurA_%s_mass%d", detector, massform));
3012 punch->
SetTitle(
Form(
"Array Punch-through %s (AMeV) (mass formula %d)", detector, massform));
3015 for (
int Z = 1; Z <= 92; Z++) {
3038 punch->
SetName(
Form(
"KVMultiDetpunchthroughV_%s_mass%d", detector, massform));
3039 punch->
SetTitle(
Form(
"Array Punch-through %s (cm/ns) (mass formula %d)", detector, massform));
3042 for (
int Z = 1; Z <= 92; Z++) {
3064 Error(
"SetROOTGeometry",
"ROOT geometry is requested, but has not been set: gGeoManager=0x0,\n Call CreateGeoManager() method first");
3139 trans.
SetDz(distance) ;
3141 if (postTrans)
h = (*postTrans) * rot2 * trans * rot1 ;
3142 else h = rot2 * trans * rot1;
3169 if (
d->GetNode()->GetNDetsBehind() > 1)
d->SetSegment(0);
3170 else d->SetSegment(1);
3192 if (!(det->
IsOK()))
return;
3210 for (
int i = 0; i < (aligned->
GetSize() - 1); i++) {
3230 TIter next_tel(list);
3320 TIter nextdet(lgrdet);
3326 for (
Int_t ii = 0; ii < ntel; ii += 1) {
3342 for (
Int_t kk = 0; kk <
id->GetListOfIDGrids()->GetEntries(); kk += 1) {
3349 delete lidtel->
Remove(
id);
3401 gr->Remove(fTelescope);
3407 Warning(
"SetPresent",
"Method implemented only in case detector is alone in telescope");
3418 gr->Add(fTelescope);
3491 if (!
gr->GetRuns().Contains((
Int_t) run))
3497 TIter nxtid(
gr->GetIDTelescopes());
3515 gr->ClearListOfTelescopes();
3516 if (
gr->GetParameters()->HasParameter(
"IDTelescopes")) {
3517 KVString tel_list =
gr->GetParameters()->GetStringValue(
"IDTelescopes");
3518 tel_list.
Begin(
",");
3519 while (!tel_list.
End()) {
3522 if (idt)
gr->AddIDTelescope(idt);
3553 if (opt.
Next() ==
"tracks") {
3569 else Error(
"Draw",
"Only ROOT geometries can be viewed");
3600 list->
Add(
new TH2F(name,
Form(
"Hits in %s", idt->
GetName()), dimension, 0., 0., dimension, 0., 0.));
3649 TIter it(groups.get());
3652 Info(
"CalculateReconstructionTrajectories",
"Calculating trajectories for particle reconstruction:");
3654 std::cout <<
"\xd" <<
" -- calculated " << ntr <<
" reconstruction trajectories" << std::flush;
3656 ntr +=
group->CalculateReconstructionTrajectories();
3658 std::cout <<
"\xd" <<
" -- calculated " << ntr <<
" reconstruction trajectories" << std::flush;
3661 std::cout <<
" -- calculated " << ntr <<
" reconstruction trajectories" << std::endl;
3663 std::cout << std::endl;
3687 Info(
"DeduceIdentificationTelescopesFromGeometry",
"Calculating...");
3689 std::cout <<
"\xd" <<
" -- created " << count <<
" telescopes" << std::flush;
3701 std::cout <<
"\xd" <<
" -- created " << count <<
" telescopes" << std::flush;
3706 std::cout <<
" -- created " << count <<
" telescopes" << std::endl;
3708 std::cout << std::endl;
3727 int len_tr = tr->
GetN();
3731 if ((tr2 != tr) && (len_tr < tr2->GetN()) && (tr2->
ContainsPath(tr))) {
3739 TIter it_dup(&duplicates);
3743 Info(
"AssociateTrajectoriesAndNodes",
"Removed %d duplicated sub-trajectories", duplicates.
GetEntries());
3758 if (
N->GetNTraj() > 1) {
3761 multitraj_nodes.
Add(
N);
3762 TIter tr(
N->GetTrajectories());
3765 if (tried_trajectories.
FindObject(traj))
continue;
3766 tried_trajectories.
Add(traj);
3770 detectors_of_group.
Add(node);
3776 else if (
N->GetNTraj() == 1) {
3780 if (tried_trajectories.
FindObject(traj))
return;
3781 tried_trajectories.
Add(traj);
3785 detectors_of_group.
Add(node);
3791 detectors_of_group.
Add(
N);
3832 #ifdef WITH_BUILTIN_GRU
3833 if (
r->GetDataFormat() ==
"EBYEDAT")
3851 Info(
"DeduceGroupsFromTrajectories",
"Deducing groups of detectors from trajectories");
3852 Int_t number_of_groups = 0;
3855 if (stl.get() && stl->GetEntries()) {
3856 Info(
"DeduceGroupsFromTrajectories",
"Deleting existing %d groups in array", stl->GetEntries());
3858 Info(
"DeduceGroupsFromTrajectories",
"Done");
3867 if (!detectors_of_group.
GetEntries())
continue;
3871 TIter next_node(&detectors_of_group);
3877 Info(
"DeduceGroupsFromTrajectories",
"Filling group trajectory lists");
3900 DetNames.
Begin(
"/");
3901 while (!DetNames.
End()) {
3903 if (det) DetList->
Add(det);
3954 e->SetMinimumOKMultiplicity(1);
3958 #ifdef WITH_BUILTIN_GRU
4089 #ifdef WITH_PROTOBUF
4094 #ifdef WITH_BUILTIN_GRU
4172 if (detname !=
"") sig_name =
Form(
"%s.%s", detname.
Data(), sig_type.
Data());
4173 else sig_name = sig_type;
4203 int N =
l.GetNpar();
4204 for (
int i = 0; i <
N; ++i) {
4212 bool with_det = (dots == 4);
4213 assert(with_det || (dots == 3));
4221 det_name = name.
Next();
4222 sig_type = name.
Next();
4226 sig_type = name.
Next();
4279 if (basic_name ==
"") {
4280 Info(meth,
"No name found for \"%s\" file", keyw);
4287 Info(meth,
"\tNo file found ...");
4301 return unique_ptr<KVFileReader>();
4304 if (!fr->OpenFileToRead(fp.
Data())) {
4305 Error(meth,
"Error in opening file %s", fp.
Data());
4309 Info(meth,
"Reading %s file", fp.
Data());
4320 unique_ptr<KVFileReader> fr =
GetKVFileReader(db,
"ReadCalibrationFiles()",
"CalibrationFiles");
4325 while (fr->IsOK()) {
4327 if (fr->GetCurrentLine().BeginsWith(
"#") || fr->GetCurrentLine() ==
"") {}
4329 ReadCalibFile(fr->GetCurrentLine().Data(), db, calib_table);
4423 Info(
"ReadCalibFile",
"%s does not exist or not found", filename);
4427 Info(
"ReadCalibFile",
"file : %s found", fullpath.
Data());
4433 KVString opt_list =
"RunList SignalIn SignalOut CalibType CalibClass CalibOptions ZRange";
4434 opt_list.
Begin(
" ");
4435 while (!opt_list.
End()) {
4443 Warning(
"ReadCalibFile",
"Calibration has 'Runlist' parameter (ignored): %s, did you mean 'RunList'?", env.
GetValue(
"Runlist",
""));
4447 Error(
"ReadCalibFile",
"No input signal defined : SignalIn");
4451 Error(
"ReadCalibFile",
"No output signal defined : SignalOut");
4455 Error(
"ReadCalibFile",
"No calibration type defined : CalibType");
4462 if (ph) calibrator_class = ph->
GetClass();
4464 Error(
"ReadCalibFile",
"No calibrator plugin of type %s", options.
GetStringValue(
"CalibClass"));
4478 Info(
"ReadCalibFile",
"Calibration used for runs %s", run_list.
AsString());
4481 Info(
"ReadCalibFile",
"Calibration used for all runs in database");
4488 while ((rec = (
TEnvRec*)next())) {
4501 if (clop !=
"") par->
SetParameter(
"CalibOptions", clop);
4505 while (!lval.
End()) {
4530 if (mfmreader.IsFrameReadMerge()) {
4551 while (mergeframe.ReadNextFrame()) {
4583 if (mfmframe.GetFrameType() == MFM_MESYTEC_MDPP_FRAME_TYPE)
4584 return handle_raw_data_event_mfmframe_mesytec_mdpp((
const MFMMesytecMDPPFrame&)mfmframe);
4586 if (mfmframe.GetFrameType() == MFM_EBY_EN_FRAME_TYPE
4587 || mfmframe.GetFrameType() == MFM_EBY_TS_FRAME_TYPE
4588 || mfmframe.GetFrameType() == MFM_EBY_EN_TS_FRAME_TYPE)
4613 Bool_t KVMultiDetArray::handle_raw_data_event_mfmframe_mesytec_mdpp(
const MFMMesytecMDPPFrame&)
4624 #ifdef WITH_PROTOBUF
4670 Int_t ndet_absent = 0;
4672 TString absent_dets, ooo_dets;
4682 if (ndet_absent) absent_dets +=
",";
4683 absent_dets += det->
GetName();
4698 if (ndet_ooo) ooo_dets +=
",";
4709 if (ndet_absent)
Info(
"CheckStatusOfDetectors",
"%d detectors absent during run : %s", ndet_absent, absent_dets.
Data());
4710 else Info(
"CheckStatusOfDetectors",
"All detectors present during run");
4711 if (ndet_ooo)
Info(
"CheckStatusOfDetectors",
"%d detectors malfunctioned during run : %s", ndet_ooo, ooo_dets.
Data());
4712 else Info(
"CheckStatusOfDetectors",
"All detectors functioning during run");
4751 Info(
"ReadOoODetectors()",
"Reading lists of out-of-order detectors...");
4752 auto fOoODet = db->
AddTable(
Form(
"%s.OoO Detectors",
GetName()),
"Name of out of order detectors");
4765 while (!srec.
End()) {
4767 dbrec->
AddKey(
"Runs",
"List of Runs");
4768 fOoODet->AddRecord(dbrec);
4774 dbrec->
AddKey(
"Runs",
"List of Runs");
4775 fOoODet->AddRecord(dbrec);
KVDataSetManager * gDataSetManager
KVIDGridManager * gIDGridManager
KVMultiDetArray * gMultiDetArray
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
void SetLabel(const Char_t *lab)
virtual const Char_t * GetType() const
static const Char_t * GetWORKDIRFilePath(const Char_t *namefile="")
const Char_t * GetLabel() const
static bool is_gnuinstall()
virtual void Print(Option_t *option="") const
virtual void SetType(const Char_t *str)
static const Char_t * GetDataSetEnv(const Char_t *dataset, const Char_t *type, const Char_t *defval)
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
Base class for all detector calibrations.
Int_t GetNumberParams() const
virtual void SetOptions(const KVNameValueList &)
void SetParameter(int i, Double_t par_val) const
void SetStatus(Bool_t ready)
void SetOutputSignalType(const TString &type)
void SetInputSignalType(const TString &type)
static KVCalibrator * MakeCalibrator(const Char_t *type)
To store calibration parameters in a database ,.
Bool_t HasParameter(const Char_t *name) const
TString GetStringParameter(const TString &name) const
Double_t GetParameter(UShort_t i=0) const
void Print(Option_t *option="") const
Int_t GetParamNumber() const
void SetParameter(UShort_t i, Double_t val)
const KVNameValueList & GetParameters() const
Record folder for the database.
virtual Bool_t AddKey(KVDBKey *key, Bool_t check=kTRUE)
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
Description of an experimental run in database ,.
virtual Bool_t AddRecord(KVDBRecord *add)
static Bool_t IsRunningBatchAnalysis()
virtual Bool_t AddTable(KVDBTable *table)
KVDataSet * GetDataSet(Int_t) const
Return pointer to DataSet using index in list of all datasets, index>=0.
Manage an experimental dataset corresponding to a given experiment or campaign.
const Char_t * GetDataSetDir() const
Bool_t HasCalibIdentInfos() const
const Char_t * GetDataSetEnv(const Char_t *type, const Char_t *defval="") const
TString GetFullPathToDataSetFile(const Char_t *filename)
Bool_t DataBaseUpdateInProgress() const
Base class for output signal data produced by a detector.
virtual void SetValue(Double_t x)
virtual Double_t GetValue(const KVNameValueList ¶ms="") const
TString GetFullName() const
void SetFired(Bool_t yes=true)
Base class for detector geometry description.
virtual Bool_t IsOK() const
TList * GetTelescopesForIdentification()
KVList * GetAlignedIDTelescopes()
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
KVGroup * GetGroup() const
void AddDetectorSignal(KVDetectorSignal *ds)
virtual void SetEnergyLoss(Double_t e) const
KVList * GetHits() const
Return the list of particles hitting this detector in an event.
virtual Double_t GetEnergy() const
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
KVList * GetIDTelescopes()
Double_t GetTheta() const
KVMaterial * GetAbsorber(Int_t i) const
Returns pointer to the i-th absorber in the detector (i=0 first absorber, i=1 second,...
virtual void DeduceACQParameters(KVEvent *, KVNumberList &)
void SetThickness(Double_t thick)
virtual KVDetectorSignal * GetDetectorSignal(const KVString &type) const
Bool_t IsCalibrated() const
void SetDetecting(Bool_t yes=kTRUE)
virtual void RemoveCalibrators()
virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A)
virtual Bool_t IsDetecting() const
virtual TList * GetAlignedDetectors(UInt_t direction=1)
KVGeoDetectorNode * GetNode()
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
virtual Bool_t IsPresent() const
TVector3 GetRandomDirection(Option_t *t="isotropic")
void ResetAlignedDetectors(UInt_t direction=1)
virtual void Print(Option_t *option="") const
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
void SetPresent(Bool_t yes=kTRUE)
Abstract base class container for multi-particle events.
KVNameValueList * GetParameters() const
void Clear(Option_t *opt="")
Clear object properties : name, type/title, number, label.
Base class to describe database of an experiment ,.
Bool_t FindCalibFile(const Char_t *type, TString &fullpath) const
TString GetCalibFileName(const Char_t *type) const
const KVNumberList & GetRunList() const
virtual void LinkRecordToRunRange(KVDBRecord *rec, UInt_t first_run, UInt_t last_run)
Handle reading columns of numeric data in text files.
KVString GetCurrentLine()
ReadStatus ReadLine(const KVString &pattern="")
Bool_t OpenFileToRead(const KVString &filename)
Reads GANIL acquisition files (EBYEDAT)
Path taken by particles through multidetector geometry.
KVGeoDetectorNode * GetNextNode() const
KVSeqCollection * AccessIDTelescopeList()
void AddToNodes()
Add reference to this trajectory to all nodes on it.
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Bool_t ContainsPath(KVGeoDNTrajectory *other)
KVGeoDetectorNode * GetNodeInFront(const KVGeoDetectorNode *n) const
KVGeoDetectorNode * GetNodeAt(Int_t i) const
Information on relative positions of detectors & particle trajectories.
KVDetector * GetDetector() const
Base class for propagation of particles through array geometry.
Bool_t IsTracking() const
void ResetTrackID(Int_t id=0)
void DrawTracks(KVNumberList *=nullptr)
Base class describing elements of array geometry.
virtual Bool_t Fired(Option_t *opt="any") const
void SetOwnsDetectors(Bool_t yes=kTRUE)
KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
const KVSeqCollection * GetDetectors() const
const KVSeqCollection * GetStructures() const
virtual void Add(KVBase *)
KVSeqCollection * GetStructureTypeList(const Char_t *type) const
KVGeoStrucElement * GetStructure(const Char_t *name) const
void ClearStructures(const Char_t *type="")
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
const KVSeqCollection * GetParents() const
Base class for particle reconstruction in one group of a detector array.
static KVGroupReconstructor * Factory(const TString &plugin="")
Group of detectors which can be treated independently of all others in array.
void AddTrajectory(KVGeoDNTrajectory *t)
void Reset(Option_t *opt="")
virtual void SetNumber(UInt_t num)
virtual TList * GetDetectorsInLayer(UInt_t lay)
virtual UInt_t GetNumberOfDetectorLayers()
Extended version of ROOT THashList.
Base class for particle identification in a 2D map.
void RemoveIDTelescope(KVBase *t)
Handles a stock of identification grids to be used by one or more identification telescopes.
virtual void LoadGridsForRun(UInt_t)
Bool_t ReadAsciiFile(const Char_t *filename)
const TList * GetLastReadGrids() const
virtual bool IsSQLROOT() const
Base class for all detectors or associations of detectors in array which can identify charged particl...
virtual Double_t GetIDMapY(Option_t *opt="")
virtual Bool_t IsReadyForID()
KVIDGrid * CalculateDeltaE_EGrid(const KVNameValueList &AperZ, Int_t npoints=30, Double_t xfactor=1.)
void SetGroup(KVGroup *kvg)
virtual Double_t GetIDMapX(Option_t *opt="")
static KVIDTelescope * MakeIDTelescope(const Char_t *name)
virtual Bool_t SetIdentificationParameters(const KVMultiDetArray *)
void SetIDGrid(KVIDGraph *)
KVDetector * GetDetector(UInt_t n) const
virtual Bool_t CheckTheoreticalIdentificationThreshold(KVNucleus *, Double_t=0.0)
virtual Bool_t CanIdentify(Int_t Z, Int_t)
virtual void AddDetector(KVDetector *d)
const KVList * GetDetectors() const
virtual UShort_t GetIDCode()
virtual void Initialize(void)
virtual void SetIdentificationStatus(KVReconstructedNucleus *)
const KVList * GetListOfIDGrids() const
Extended TList class which owns its objects by default.
Read MFM format acquisition data.
Description of physical materials used to construct detectors & targets; interface to range tables.
virtual void SetThickness(Double_t thick)
static KVIonRangeTable * GetRangeTable()
Base class for describing the geometry of a detector array.
const KVSeqCollection * GetFiredSignals() const
KVNumberList fAcceptECodes
list of acceptable calibration codes for reconstructed nuclei
virtual KVNameValueList * DetectParticle(KVNucleus *part)
Bool_t IsROOTGeometry() const
bool try_a_singleIDtelescope(TString uri, KVDetector *d, TCollection *l)
KVUniqueNameList fExtraRawDataSignals
any signals read from raw data not associated with a detector
virtual KVGroup * GetGroupWithDetector(const Char_t *)
KVSeqCollection * GetListOfIDTelescopes() const
KVUniqueNameList * GetIDTelescopeTypes()
void FillListOfIDTelescopes(KVIDGraph *gr) const
virtual Bool_t handle_raw_data_event_mfmframe_ebyedat(const MFMEbyedatFrame &)
Read a raw data event from a EBYEDAT MFM Frame.
KVNumberList fAcceptIDCodes
list of acceptable identification codes for reconstructed nuclei
virtual void DetectEvent(KVEvent *event, KVReconstructedEvent *rec_event, const Char_t *detection_frame="")
void SetDetectorThicknesses()
virtual void GetDetectorEvent(KVDetectorEvent *detev, const TSeqCollection *fired_params=0)
virtual Bool_t handle_raw_data_event_protobuf(KVProtobufDataReader &)
void MakeHistogramsForAllIDTelescopes(KVSeqCollection *list, Int_t dimension=100)
TList * GetStatusOfIDTelescopes()
int try_all_singleID_telescopes(KVDetector *d, TCollection *l)
virtual void GetIDTelescopesForGroup(KVGroup *grp, TCollection *tel_list)
static Bool_t fCloseGeometryNow
virtual KVGroup * GetGroup(const Char_t *) const
Return pointer to group with name.
virtual void DeduceIdentificationTelescopesFromGeometry()
std::unique_ptr< KVFileReader > GetKVFileReader(KVExpDB *db, const Char_t *meth, const Char_t *keyw)
virtual Double_t GetTargetEnergyLossCorrection(KVReconstructedNucleus *)
virtual Bool_t handle_raw_data_event_mfmmergeframe(const MFMMergeFrameManager &)
virtual Bool_t handle_raw_data_event_mfmfile(MFMBufferReader &)
void ReadOoODetectors(KVExpDB *db)
Bool_t fHandledRawData
set to true if multidetector handles data in last call to HandleRawData
KVSeqCollection * GetIDTelescopesWithType(const Char_t *type)
TList * fCalibStatusDets
used by GetStatusIDTelescopes
KVDetectorEvent * fHitGroups
list of hit groups in simulation
virtual UShort_t GetCoherencyIDCode()
void RecursiveTrajectoryClustering(KVGeoDetectorNode *N, KVUniqueNameList &tried_trajectories, KVUniqueNameList &multitraj_nodes, KVUniqueNameList &detectors_of_group)
KVSeqCollection * fIDTelescopes
deltaE-E telescopes in groups
virtual Int_t FilteredEventCoherencyAnalysis(Int_t round, KVReconstructedEvent *rec_event)
virtual void SetMinimumOKMultiplicity(KVEvent *) const
UInt_t fCurrentRun
Number of the current run used to call SetParameters.
static Bool_t fMakeMultiDetectorSetParameters
void CalculateIdentificationGrids()
For each IDtelescope in array, calculate an identification grid.
void prepare_to_handle_new_raw_data()
reset acquisition parameters etc. before reading new raw data event
virtual UChar_t GetNormalCalibrationCode()
int try_all_doubleID_telescopes(KVDetector *de, KVDetector *e, TCollection *l)
void FillHistogramsForAllIDTelescopes(KVSeqCollection *list)
Fill TH2F histograms for all IDTelescopes of the array.
void set_detector_thicknesses(const TString &)
virtual TGraph * DrawPunchThroughEsurAVsZ(const Char_t *detector, Int_t massform=KVNucleus::kBetaMass)
Bool_t ReadGridsFromAsciiFile(const Char_t *) const
virtual void InitialiseRawDataReading(KVRawDataReader *)
virtual void SetExpectedDetectorSignalNames()
virtual void SetParameters(UInt_t n, Bool_t physics_parameters_only=kFALSE)
virtual void SetDetecting(KVDetector *det, Bool_t detecting=kTRUE)
virtual void copy_fired_parameters_to_recon_param_list()
TString GetDataSet() const
virtual void SetPresent(KVDetector *det, Bool_t present=kTRUE)
void CalculateDetectorSegmentationIndex()
virtual void AnalyseGroupAndReconstructEvent(KVReconstructedEvent *recev, KVGroup *grp)
static TGeoHMatrix * GetVolumePositioningMatrix(Double_t distance, Double_t theta, Double_t phi, TGeoTranslation *postTrans=nullptr)
KVGeoNavigator * GetNavigator() const
void DetectParticleIn(const Char_t *detname, KVNucleus *kvp)
KVUpDater * fUpDater
used to set parameters for multidetector
virtual Int_t GetIDTelescopes(KVDetector *, KVDetector *, TCollection *list)
void SetGeometry(TGeoManager *)
virtual void MakeCalibrationTables(KVExpDB *)
virtual ~KVMultiDetArray()
destroy (delete) the MDA and all the associated structure, detectors etc.
virtual void SetRunIdentificationParameters(UShort_t n)
Bool_t HandleRawDataBuffer(MFMBufferReader &)
TString GetFileName(KVExpDB *, const Char_t *meth, const Char_t *keyw)
virtual void Clear(Option_t *opt="")
virtual void CheckStatusOfDetectors(KVDBRun *, const TString &="")
virtual void PerformClosedROOTGeometryOperations()
KVRangeTableGeoNavigator * fNavigator
for propagating particles through array geometry
UInt_t GetCurrentRunNumber() const
void SetDetectorTransparency(Char_t)
Modify the transparency of detector volumes in OpenGL view.
virtual KVGroupReconstructor * GetReconstructorForGroup(const KVGroup *) const
virtual void SetIdentifications()
void RemoveGroup(KVGroup *)
TList * fStatusIDTelescopes
used by GetStatusIDTelescopes
Bool_t fSimMode
=kTRUE in "simulation mode" (use for calculating response to simulated events)
virtual void Build(Int_t run=-1)
virtual void FillDetectorList(KVReconstructedNucleus *rnuc, KVHashList *DetList, const KVString &DetNames)
virtual UShort_t GetBadIDCode()
virtual Bool_t handle_raw_data_event_ebyedat(KVGANILDataReader &)
General method for reading raw data in old GANIL ebyedat format.
const TSeqCollection * GetTrajectories() const
virtual void MakeListOfDetectors()
static Bool_t fBuildTarget
KVTarget * fTarget
target used in experiment
virtual void set_up_telescope(KVDetector *de, KVDetector *e, KVIDTelescope *idt, TCollection *l)
Set up detectors in de-e identification telescope and add to fIDTelescopes and to l.
TList * GetCalibrationStatusOfDetectors()
void Draw(Option_t *option="")
bool try_upper_and_lower_singleIDtelescope(TString uri, KVDetector *d, TCollection *l)
void ReplaceDetector(const Char_t *name, KVDetector *new_kvd)
virtual Bool_t handle_raw_data_event_mfmframe(const MFMCommonFrame &)
TGeoManager * GetGeometry() const
Return pointer to the (ROOT) geometry of the array.
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray")
KVRawDataReader * fRawDataReader
last raw data reader object used in call to HandleRawData
virtual void ReconstructEvent(KVReconstructedEvent *, KVDetectorEvent *)
virtual KVGroup * GetGroupWithAngles(Float_t, Float_t)
virtual void SetRawDataFromReconEvent(KVNameValueList &)
void add_and_set_detector_signal(KVDetector *det, KVString detname, Double_t sig_data, KVString sig_type)
virtual TGraph * DrawPunchThroughZVsVpar(const Char_t *detector, Int_t massform=KVNucleus::kBetaMass)
virtual Bool_t HandleRawDataEvent(KVRawDataReader *)
virtual Double_t GetPunchThroughEnergy(const Char_t *detector, Int_t Z, Int_t A)
virtual void InitializeIDTelescopes()
virtual void SetROOTGeometry(Bool_t on=kTRUE)
KVUniqueNameList fFiredDetectors
list of fired detectors after reading raw data event
virtual void RenumberGroups()
virtual void SetRunCalibrationParameters(UShort_t n)
void PrintStatusOfIDTelescopes()
bool try_upper_and_lower_doubleIDtelescope(TString uri, KVDetector *de, KVDetector *e, TCollection *l)
void PrintCalibStatusOfDetectors()
virtual TGraph * DrawPunchThroughEnergyVsZ(const Char_t *detector, Int_t massform=KVNucleus::kBetaMass)
Bool_t fROOTGeometry
=kTRUE use ROOT geometry
void ReadCalibrationFiles(KVExpDB *db)
virtual UShort_t GetMultiHitFirstStageIDCode()
virtual void SetCalibratorParameters(KVDBRun *, const TString &="")
KVNameValueList * DetectParticle_TGEO(KVNucleus *part)
Int_t fFilterType
type of filtering (used by DetectEvent)
virtual void PrepareModifGroup(KVGroup *grp, KVDetector *dd)
virtual void SetPartSeedCond(const Char_t *cond)
void SetGridsInTelescopes(UInt_t run)
KVIDTelescope * GetIDTelescope(const Char_t *name) const
Return pointer to DeltaE-E ID Telescope with "name".
void CalculateReconstructionTrajectories()
KVUniqueNameList fTrajectories
list of all possible trajectories through detectors of array
virtual void SetIDCodeForIDTelescope(KVIDTelescope *) const
virtual void SetReconParametersInEvent(KVReconstructedEvent *) const
Copy any parameters in fReconParameters in to the reconstructed event parameter list.
KVNameValueList fReconParameters
general purpose list of parameters for storing information on data reconstruction
TString fDataSet
name of associated dataset, used with MakeMultiDetector()
void AssociateTrajectoriesAndNodes()
void ReadCalibFile(const Char_t *filename, KVExpDB *db, KVDBTable *calib_table)
virtual void AcceptParticleForAnalysis(KVReconstructedNucleus *) const
virtual KVTelescope * GetTelescope(const Char_t *name) const
Return pointer to telescope in array with name given by "name".
void SetNavigator(KVGeoNavigator *geo)
KVMultiDetArray()
Default constructor.
void DeduceGroupsFromTrajectories()
virtual void set_up_single_stage_telescope(KVDetector *det, KVIDTelescope *idt, TCollection *l)
Set up detector in single-stage identification telescope and add to fIDTelescopes and to l.
bool try_a_doubleIDtelescope(TString uri, KVDetector *de, KVDetector *e, TCollection *l)
virtual void GetAlignedIDTelescopesForDetector(KVDetector *det, TCollection *list)
virtual void CreateIDTelescopesInGroups()
KVUnownedList fFiredSignals
list of fired signals after reading raw data event
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Double_t GetDoubleValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
void RemoveParameter(const Char_t *name)
virtual void Clear(Option_t *opt="")
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
const Char_t * GetStringValue(const Char_t *name) const
Bool_t HasParameter(const Char_t *name) const
KVHashList * GetList() const
TString GetTStringValue(const Char_t *name) const
void Copy(TObject &nvl) const
A generic named parameter storing values of different types.
Double_t GetDouble() const
Description of properties and kinematics of atomic nuclei.
virtual void Print(Option_t *t="") const
Display nucleus parameters.
void SetZ(Int_t z, Char_t mt=-1)
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
void SetMassFormula(UChar_t mt)
Int_t GetZ() const
Return the number of proton / atomic number.
Strings used to represent a set of ranges of values.
Bool_t Contains(Int_t val) const
returns kTRUE if the value 'val' is contained in the ranges defined by the number list
const Char_t * AsString(Int_t maxchars=0) const
void Add(Int_t)
Add value 'n' to the list.
void Set(const TString &l)
void SetIsOK(Bool_t flag=kTRUE)
void SetTheta(Double_t theta)
TVector3 * GetPInitial() const
void RemoveGroup(const Char_t *groupname)
Remove group from list of groups.
void AddGroup(const Char_t *groupname, const Char_t *from="") const
KVNameValueList * GetParameters() const
void SetMomentum(const TVector3 &v)
Double_t GetEnergy() const
void SetE0(TVector3 *e=0)
KVParticle const * GetFrame(const Char_t *frame, Bool_t warn_and_return_null_if_unknown=kTRUE) const
Bool_t BelongsToGroup(const Char_t *groupname) const
Bool_t IsSmallerThan(KVPosition *pos)
kTRUE if "this" is entirely contained within "pos"
Read Google Protobuf DAQ files.
Wrapper for TRefArray adding some functionality.
virtual KVBase * FindObject(const Char_t *name, const Char_t *type) const
Propagate particles through array geometry calculating energy losses.
Bool_t CheckIonForRangeTable(Int_t Z, Int_t A)
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
We start a new track to represent the particle's trajectory through the array.
Abstract base class for reading raw (DAQ) data.
virtual TString GetDataFormat() const =0
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
virtual Bool_t AnalyseDetectors(TList *kvtl)
virtual void IdentifyEvent()
virtual void SecondaryIdentCalib()
virtual void CalibrateEvent()
Nuclei reconstructed from data measured by a detector array .
virtual void Reconstruct(KVDetector *kvd)
virtual void SetAMeasured(Bool_t yes=kTRUE)
void SetNSegDet(Int_t seg)
virtual Int_t GetECode() const
static UInt_t GetNUnidentifiedInGroup(KVGroup *grp)
Bool_t IsIdentified() const
virtual Int_t GetIDCode() const
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
virtual void GetAnglesFromReconstructionTrajectory(Option_t *opt="random")
virtual void SetZMeasured(Bool_t yes=kTRUE)
KVIDTelescope * GetIdentifyingTelescope() const
static void AnalyseParticlesInGroup(KVGroup *grp)
void SetIDCode(UShort_t s)
KVGroup * GetGroup() const
@ kStatusPileupDE
telescope; a minimum Z could be estimated from the measured energy loss.
void SetIdentifyingTelescope(KVIDTelescope *i)
Combine ROOT file containing objects with SQLite database with info on the objects.
ID grid manager using KVSQLROOTFile backend.
KaliVeda extensions to ROOT collection classes.
virtual TObject * FindObjectByLabel(const Char_t *) const
T * get_object(const TString &name) const
virtual void SetOwner(Bool_t enable=kTRUE)
virtual void Clear(Option_t *option="")
virtual TObject * At(Int_t idx) const
KVSeqCollection * GetSubListWithType(const Char_t *retvalue) const
virtual void SetCleanup(Bool_t enable=kTRUE)
virtual void Add(TObject *obj)
KVSeqCollection * GetSubListWithLabel(const Char_t *retvalue) const
virtual TObject * Remove(TObject *obj)
Remove object from list.
virtual void Delete(Option_t *option="")
virtual TObject * FindObject(const char *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Int_t GetNValues(TString delim) const
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0)
void Clear(Option_t *opt="")
Reset absorber - set stored energy lost by particles in absorber to zero.
void SetOutgoing(Bool_t r=kTRUE)
Associates two detectors placed one behind the other.
Particle * GetNextParticle(Option_t *opt="") const
Optimised list in which named objects can only be placed once.
virtual void Add(TObject *obj)
Abstract class implementing necessary methods for setting multidetector parameters for each run of th...
virtual void SetParameters(UInt_t, Bool_t physics_parameters_only=kFALSE)
static KVUpDater * MakeUpDater(const Char_t *uri, KVMultiDetArray *)
virtual void SetCalibrationParameters(UInt_t)
Set calibration parameters for this run.
virtual void SetIdentificationParameters(UInt_t)
virtual const char * GetName() const
void SetName(const char *name)
virtual Int_t GetEntries() const
virtual void Delete(Option_t *option="")=0
virtual void SetOwner(Bool_t enable=kTRUE)
Bool_t Contains(const char *name) const
virtual Int_t GetSize() const
const char * GetName() const
const char * GetValue() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
Bool_t Defined(const char *name) const
THashList * GetTable() const
void SetStyle(Short_t st)
void SetCurrentCamera(ECameraType camera)
void SetSmoothPoints(Bool_t s)
void SetSmoothLines(Bool_t s)
TGeoVolume * GetTopVolume() const
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
virtual void SetDz(Double_t dz)
void SetTransparency(Char_t transparency=0)
virtual void Draw(Option_t *option="")
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
virtual void SetName(const char *name="")
virtual void SetTitle(const char *title="")
virtual void Sort(Bool_t(*greater)(const TGraph *, Int_t, Int_t)=&TGraph::CompareX, Bool_t ascending=kTRUE, Int_t low=0, Int_t high=-1111)
virtual Int_t Fill(const char *name, Double_t w)
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
virtual TObject * At(Int_t idx) const
virtual void Delete(Option_t *option="")
virtual TObject * First() const
virtual const char * GetName() const
virtual void SetTitle(const char *title="")
virtual const char * GetTitle() const
virtual void SetName(const char *name)
void AbstractMethod(const char *method) const
virtual const char * GetName() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void ls(Option_t *option="") const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * GetClass() const
Longptr_t ExecPlugin(int nargs, const T &... params)
virtual TObject * RemoveAt(Int_t idx)
TObjArray * Tokenize(const TString &delim) const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
const char * Data() const
TString & Prepend(char c, Ssiz_t rep=1)
void Form(const char *fmt,...)
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
const long double g
masses
Double_t Max(Double_t a, Double_t b)