diff --git a/external/InstallParameter.cmake b/external/InstallParameter.cmake index 6893de53a2c113d8f9f583f891669a058d2ad1c9..77309f5222d7180abc8af99ca2ce0548c79c602e 100644 --- a/external/InstallParameter.cmake +++ b/external/InstallParameter.cmake @@ -1,4 +1,4 @@ -set(PARAMETER_VERSION 92ccc2608756fc38186cd74af3667a1443bd0b77) +set(PARAMETER_VERSION 9835279a7166989062eab6654af7e9c256028106) set(PARAMETER_SRC_URL "https://git.cbm.gsi.de/CbmSoft/cbmroot_parameter.git") diff --git a/macro/beamtime/mcbm2022/ini_tof_clusterizer.C b/macro/beamtime/mcbm2022/ini_tof_clusterizer.C new file mode 100644 index 0000000000000000000000000000000000000000..3a795c078817b9a819f81fb8a764fea72dc3fede --- /dev/null +++ b/macro/beamtime/mcbm2022/ini_tof_clusterizer.C @@ -0,0 +1,264 @@ +/* Copyright (C) 2022 Physikalisches Institut, Universitaet Heidelberg, Heidelberg + SPDX-License-Identifier: GPL-3.0-only + Authors: Norbert Herrmann [committer]*/ + +void ini_tof_clusterizer(Int_t calMode = 53, Int_t calSel = 0, Int_t calSm = 900, Int_t RefSel = 1, + TString cFileId = "Test", Int_t iCalSet = 910601600, Bool_t bOut = 0, Int_t iSel2 = 0, + Double_t dDeadtime = 50, TString cCalId = "XXX", TString parPath = "") +{ + Int_t iVerbose = 1; + CbmTofEventClusterizer* tofClust = new CbmTofEventClusterizer("TOF Event Clusterizer", iVerbose, bOut); + cout << "Instantiate CbmTofEventClusterizer " << endl; + tofClust->SetCalMode(calMode); + tofClust->SetCalSel(calSel); + tofClust->SetCaldXdYMax(3000.); // geometrical matching window in cm + tofClust->SetCalCluMulMax(3.); // Max Counter Cluster Multiplicity for filling calib histos + tofClust->SetCalRpc(calSm); // select detector for calibration update + tofClust->SetTRefId(RefSel); // reference trigger for offset calculation + tofClust->SetTotMax(20.); // Tot upper limit for walk corection + tofClust->SetTotMin(0.); //(12000.); // Tot lower limit for walk correction + tofClust->SetTotPreRange(5.); // effective lower Tot limit in ns from peak position + tofClust->SetTotMean(5.); // Tot calibration target value in ns + tofClust->SetMaxTimeDist(0.5); // default cluster range in ns + //tofClust->SetMaxTimeDist(0.); //Deb// default cluster range in ns + tofClust->SetDelTofMax(50.); // acceptance range for cluster distance in ns (!) + tofClust->SetSel2MulMax(3); // limit Multiplicity in 2nd selector + tofClust->SetChannelDeadtime(dDeadtime); // artificial deadtime in ns + tofClust->SetEnableAvWalk(kFALSE); + //tofClust->SetEnableMatchPosScaling(kFALSE); // turn off projection to nominal target + tofClust->SetYFitMin(1.E3); + tofClust->SetToDAv(0.04); + // tofClust->SetTimePeriod(25600.); // ignore coarse time + // tofClust->SetCorMode(iBugCor); // correct missing hits + //tofClust->SetIdMode(0); // calibrate on counter level + tofClust->SetIdMode(1); // calibrate on module level + // tofClust->SetDeadStrips(15,23); // declare dead strip for T0M3,Rpc0,Strip 23 + //tofClust->SetDeadStrips(25,16); // declare non-existant diamond strip (#5) dead + + Int_t calSelRead = calSel; + TString cFname = + Form("%s/%s_set%09d_%02d_%01dtofClust.hst.root", parPath.Data(), cFileId.Data(), iCalSet, calMode, calSelRead); + if (calSel < 0) calSelRead = 1; // get default calibration + if (cCalId != "XXX") + cFname = + Form("%s/%s_set%09d_%02d_%01dtofClust.hst.root", parPath.Data(), cCalId.Data(), iCalSet, calMode, calSelRead); + tofClust->SetCalParFileName(cFname); + TString cOutFname = Form("data/tofClust_%s_set%09d.hst.root", cFileId.Data(), iCalSet); + tofClust->SetOutHstFileName(cOutFname); + + TString cAnaFile = Form("data/%s_%09d%03d_tofAna.hst.root", cFileId.Data(), iCalSet, iSel2); + + switch (calMode) { + case -1: // initial check of raw data + tofClust->SetTotMax(256.); // range in bin number + tofClust->SetTotPreRange(256.); + //tofClust->SetTotMin(1.); + tofClust->SetTRefDifMax(26000.); // in ns + tofClust->PosYMaxScal(10000.); // in % of length + tofClust->SetMaxTimeDist(0.); // no cluster building + //tofClust->SetTimePeriod(25600.); // inspect coarse time + break; + case 0: // initial calibration + tofClust->SetTotMax(256.); // range in bin number + tofClust->SetTotPreRange(256.); + //tofClust->SetTotMin(1.); + tofClust->SetTRefDifMax(1000.); // in ns + tofClust->PosYMaxScal(10.); // in % of length + tofClust->SetMaxTimeDist(0.); // no cluster building + break; + case 1: // save offsets, update walks, for diamonds + tofClust->SetTotMax(256.); // range in bin number + tofClust->SetTotPreRange(256.); + tofClust->SetTRefDifMax(6.25); // in ns + //tofClust->SetTimePeriod(6.25); // inspect coarse time + tofClust->PosYMaxScal(10.); // in % of length + break; + case 11: + tofClust->SetTRefDifMax(5.); // in ns + tofClust->PosYMaxScal(3.0); // in % of length + break; + case 21: + tofClust->SetTRefDifMax(3.0); // in ns + tofClust->PosYMaxScal(2.0); // in % of length + break; + case 31: + tofClust->SetTRefDifMax(3.); // in ns + tofClust->PosYMaxScal(1.); // in % of length + break; + case 41: + tofClust->SetTRefDifMax(2.0); // in ns + tofClust->PosYMaxScal(0.9); // in % of length + break; + case 51: + tofClust->SetTRefDifMax(2.0); // in ns + tofClust->PosYMaxScal(0.8); // in % of length + break; + case 61: + tofClust->SetTRefDifMax(1.5); // in ns + tofClust->PosYMaxScal(0.75); // in % of length + break; + case 71: + tofClust->SetTRefDifMax(0.8); // in ns + tofClust->PosYMaxScal(0.6); // in % of length + break; + + case 2: // time difference calibration + tofClust->SetTRefDifMax(300.); // in ns + tofClust->PosYMaxScal(1000.); //in % of length + break; + + case 3: // time offsets + tofClust->SetTRefDifMax(200.); // in ns + tofClust->PosYMaxScal(100.); //in % of length + tofClust->SetMaxTimeDist(0.); // no cluster building + break; + case 12: + case 13: + tofClust->SetTRefDifMax(100.); // in ns + tofClust->PosYMaxScal(10.); //in % of length + break; + case 22: + case 23: + tofClust->SetTRefDifMax(50.); // in ns + tofClust->PosYMaxScal(5.); //in % of length + break; + case 32: + case 33: + tofClust->SetTRefDifMax(25.); // in ns + tofClust->PosYMaxScal(4.); //in % of length + break; + case 42: + case 43: + tofClust->SetTRefDifMax(12.); // in ns + tofClust->PosYMaxScal(2.); //in % of length + break; + case 52: + case 53: + tofClust->SetTRefDifMax(10.); // in ns + tofClust->PosYMaxScal(1.5); //in % of length + break; + case 62: + case 63: + tofClust->SetTRefDifMax(10.); // in ns + tofClust->PosYMaxScal(1.); //in % of length + break; + case 72: + case 73: + case 75: + tofClust->SetTRefDifMax(10.); // in ns + tofClust->PosYMaxScal(0.9); //in % of length + break; + case 82: + case 83: + case 85: + tofClust->SetTRefDifMax(10.); // in ns + tofClust->PosYMaxScal(0.8); //in % of length + break; + case 92: + case 93: + case 95: + tofClust->SetTRefDifMax(10.); // in ns + tofClust->PosYMaxScal(0.75); //in % of length + break; + + case 4: // velocity dependence (DelTOF) + case 14: + tofClust->SetTRefDifMax(25.); // in ns + tofClust->PosYMaxScal(2.0); //in % of length + break; + case 24: + tofClust->SetTRefDifMax(5.); // in ns + tofClust->PosYMaxScal(1.5); //in % of length + break; + case 34: + tofClust->SetTRefDifMax(5.); // in ns + tofClust->PosYMaxScal(1.2); //in % of length + break; + case 44: + tofClust->SetTRefDifMax(3.5); // in ns + tofClust->PosYMaxScal(1.0); //in % of length + break; + case 54: + tofClust->SetTRefDifMax(3.0); // in ns + tofClust->PosYMaxScal(0.9); //in % of length + break; + case 64: + tofClust->SetTRefDifMax(2.5); // in ns + tofClust->PosYMaxScal(0.8); //in % of length + break; + case 74: + tofClust->SetTRefDifMax(2.0); // in ns + tofClust->PosYMaxScal(0.7); //in % of length + break; + case 19: + case 29: + case 39: + case 49: + case 59: + case 69: + case 79: + case 89: + case 99: + tofClust->SetTRefDifMax(20.0); // in ns + tofClust->PosYMaxScal(2.); //in % of length + break; + default: cout << "<E> Calib mode not implemented! stop execution of script" << endl; return; + } + + Int_t iBRef = iCalSet % 1000; + Int_t iSet = (iCalSet - iBRef) / 1000; + Int_t iRSel = 0; + Int_t iRSelTyp = 0; + Int_t iRSelSm = 0; + Int_t iRSelRpc = 0; + iRSel = iBRef; // use diamond + + Int_t iRSelin = iRSel; + iRSelRpc = iRSel % 10; + iRSelTyp = (iRSel - iRSelRpc) / 10; + iRSelSm = iRSelTyp % 10; + iRSelTyp = (iRSelTyp - iRSelSm) / 10; + + tofClust->SetBeamRefId(iRSelTyp); // define Beam reference counter + tofClust->SetBeamRefSm(iRSelSm); + tofClust->SetBeamRefDet(iRSelRpc); + tofClust->SetBeamAddRefMul(-1); + tofClust->SetBeamRefMulMax(3); + + Int_t iSel2in = iSel2; + if (iSel2in > -1) { + Int_t iSel2Rpc = iSel2 % 10; + iSel2 = (iSel2 - iSel2Rpc) / 10; + Int_t iSel2Sm = iSel2 % 10; + iSel2 = (iSel2 - iSel2Sm) / 10; + + tofClust->SetSel2Id(iSel2); + tofClust->SetSel2Sm(iSel2Sm); + tofClust->SetSel2Rpc(iSel2Rpc); + } + + Int_t iRef = iSet % 1000; + Int_t iDut = (iSet - iRef) / 1000; + Int_t iDutRpc = iDut % 10; + iDut = (iDut - iDutRpc) / 10; + Int_t iDutSm = iDut % 10; + iDut = (iDut - iDutSm) / 10; + + tofClust->SetDutId(iDut); + tofClust->SetDutSm(iDutSm); + tofClust->SetDutRpc(iDutRpc); + + Int_t iRefRpc = iRef % 10; + iRef = (iRef - iRefRpc) / 10; + Int_t iRefSm = iRef % 10; + iRef = (iRef - iRefSm) / 10; + + tofClust->SetSelId(iRef); + tofClust->SetSelSm(iRefSm); + tofClust->SetSelRpc(iRefRpc); + + FairRunAna* run = FairRunAna::Instance(); + if (NULL != run) run->AddTask(tofClust); + + cout << "Clusterizer Run with iRSel = " << iRSel << ", iSel2 = " << iSel2in << endl; +} diff --git a/macro/beamtime/mcbm2022/ini_tof_trks.C b/macro/beamtime/mcbm2022/ini_tof_trks.C new file mode 100644 index 0000000000000000000000000000000000000000..2ffe47506749a868138ee7ba1dc5f276d52168e1 --- /dev/null +++ b/macro/beamtime/mcbm2022/ini_tof_trks.C @@ -0,0 +1,668 @@ +/* Copyright (C) 2022 Physikalisches Institut, Universitaet Heidelberg, Heidelberg + SPDX-License-Identifier: GPL-3.0-only + Authors: Norbert Herrmann [committer]*/ + +void ini_tof_trks(Int_t iSel = 22002, Int_t iTrackingSetup = 1, Int_t iGenCor = 1, Double_t dScalFac = 1., + Double_t dChi2Lim2 = 500., TString cCalId = "", Bool_t bUseSigCalib = kFALSE, Int_t iCalOpt = 1, + Int_t iTrkPar = 2, Double_t dTOffScal = 1., TString parPath = "") +{ + if (cCalId == "") { + cout << "<E> No action without cCalId!" << endl; + return; + } + // ========================================================================= + // === Tof Tracking === + // ========================================================================= + cout << "<I> Initialize Tof tracker by ini_tof_trks" << endl; + TString cTrkFile = Form("%s/%s_tofFindTracks.hst.root", parPath.Data(), cCalId.Data()); + // ----- Local selection variables ------------------------------------------- + + Int_t iRef = iSel % 1000; + Int_t iDut = (iSel - iRef) / 1000; + Int_t iDutRpc = iDut % 10; + iDut = (iDut - iDutRpc) / 10; + Int_t iDutSm = iDut % 10; + iDut = (iDut - iDutSm) / 10; + Int_t iRefRpc = iRef % 10; + iRef = (iRef - iRefRpc) / 10; + Int_t iRefSm = iRef % 10; + iRef = (iRef - iRefSm) / 10; + Int_t iBucRpc = 0; + + CbmTofTrackFinder* tofTrackFinder = new CbmTofTrackFinderNN(); + tofTrackFinder->SetMaxTofTimeDifference(0.2); // in ns/cm + + CbmTofTrackFitter* tofTrackFitter = new CbmTofTrackFitterKF(0, 211); + TFitter* MyFit = new TFitter(1); // initialize Minuit + tofTrackFinder->SetFitter(tofTrackFitter); + CbmTofFindTracks* tofFindTracks = new CbmTofFindTracks("TOF Track Finder"); + tofFindTracks->UseFinder(tofTrackFinder); + tofFindTracks->UseFitter(tofTrackFitter); + + tofFindTracks->SetCalOpt(iCalOpt); // 1 - update offsets, 2 - update walk, 0 - bypass + tofFindTracks->SetCorMode(iGenCor); // valid options: 0,1,2,3,4,5,6, 10 - 19 + //tofFindTracks->SetTtTarg(0.047); // target value for Mar2022 double stack, v21b + tofFindTracks->SetTtTarg(0.035); // target value for Jun2021 double stack, v21c, v21d,v21e,v21f + tofFindTracks->SetTOffScal(dTOffScal); // modifier of existing offset values + // 0.0605); // target value for Mar2020 triple stack -> betapeak ~ 0.95 + //tofFindTracks->SetTtTarg(0.062); // target value for Mar2020 triple stack -> betapeak ~ 0.95 + //tofFindTracks->SetTtTarg(0.058); // target value for Mar2020 double stack + //tofFindTracks->SetTtTarg(0.051); // target value Nov2019 + //tofFindTracks->SetTtTarg(0.035); // target value for inverse velocity, > 0.033 ns/cm! + tofFindTracks->SetCalParFileName(cTrkFile); // Tracker parameter value file name + tofFindTracks->SetR0Lim(5.); + tofFindTracks->SetStationMaxHMul(30); // Max Hit Multiplicity in any used station + + tofFindTracks->SetT0MAX(dScalFac); // in ns + tofFindTracks->SetSIGT(0.08); // default in ns + tofFindTracks->SetSIGX(0.3); // default in cm + tofFindTracks->SetSIGY(0.45); // default in cm + tofFindTracks->SetSIGZ(0.05); // default in cm + tofFindTracks->SetUseSigCalib(bUseSigCalib); // ignore resolutions in CalPar file + tofTrackFinder->SetSIGLIM(dChi2Lim2 * 2.); // matching window in multiples of chi2 + tofTrackFinder->SetChiMaxAccept(dChi2Lim2); // max tracklet chi2 + tofTrackFinder->SetSIGLIMMOD(5.); // max deviation for last hit + tofTrackFinder->SetAddVertex(kFALSE); // disable virtual vertex + + cout << "<I> Tracker Parameter Set: " << iTrkPar << endl; + switch (iTrkPar) { + case 0: // for full mTof setup at 12.5 deg + tofTrackFinder->SetTxMean(0.); // mean slope dy/dz + tofTrackFinder->SetTyMean(0.); // mean slope dy/dz + tofTrackFinder->SetTxLIM(0.31); // max slope dx/dz + tofTrackFinder->SetTyLIM(0.4); // max dev from mean slope dy/dz + tofFindTracks->SetBeamCounter(5, 0, 0); // default beam counter + tofFindTracks->SetR0Lim(30.); + //tofFindTracks->SetEvNhitMax(40); // avoid wasting time + break; + case 1: // for double stack test counters + tofTrackFinder->SetTxMean(0.); // mean slope dy/dz + tofTrackFinder->SetTyMean(0.18); // mean slope dy/dz + tofTrackFinder->SetTxLIM(0.15); // max slope dx/dz + tofTrackFinder->SetTyLIM(0.18); // max dev from mean slope dy/dz + tofFindTracks->SetBeamCounter(5, 0, 0); // default beam counter + break; + case 2: // for double stack cosmics + tofTrackFinder->SetTxMean(0.); // mean slope dy/dz + tofTrackFinder->SetTyMean(0.); // mean slope dy/dz + tofTrackFinder->SetTxLIM(2.); // max slope dx/dz + tofTrackFinder->SetTyLIM(20.); // max dev from mean slope dy/dz + tofFindTracks->SetTtMin(-100.); // allow negative velocities with respect to z-axis + tofFindTracks->SetTtTarg(0.033); // target value for mCBM Cosmic2021 triple stack, v21c, v21d + tofFindTracks->SetSIGT(0.2); // default in ns + break; + case 3: // for Jul2021-CRI + tofTrackFinder->SetTxMean(-0.2); // mean slope dy/dz + tofTrackFinder->SetTyMean(0.); // mean slope dy/dz + tofTrackFinder->SetTxLIM(0.1); // max slope dx/dz + tofTrackFinder->SetTyLIM(0.3); // max dev from mean slope dy/dz + tofTrackFinder->SetAddVertex(kTRUE); // add virtual vertex + tofFindTracks->SetTtMin(-100.); // allow negative velocities with respect to z-axis + tofFindTracks->SetR0Lim(30.); // allow for large extrapolation errors + break; + case 4: // for Mar2022-CRI + tofTrackFinder->SetTxMean(0.); // mean slope dy/dz + tofTrackFinder->SetTyMean(0.); // mean slope dy/dz + tofTrackFinder->SetTxLIM(0.31); // max slope dx/dz + tofTrackFinder->SetTyLIM(0.4); // max dev from mean slope dy/dz + tofTrackFinder->SetAddVertex(kTRUE); // add virtual vertex + tofFindTracks->SetTtTarg(0.033); // target value for mCBM Cosmic2021 triple stack, v21d, run 1588 + tofFindTracks->SetTtMin(0.); // do not allow negative velocities with respect to z-axis + tofFindTracks->SetR0Lim(20.); // allow for large extrapolation errors + break; + } + + Int_t iMinNofHits = -1; + Int_t iNStations = 0; + Int_t iNReqStations = 3; + + switch (iTrackingSetup) { + case 0: // bypass mode + iMinNofHits = -1; + iNStations = 1; + tofFindTracks->SetStation(0, 5, 0, 0); // Diamond + break; + + case 1: // for calibration mode of full mTof setup + { + Double_t dTsig = dScalFac * 0.03; + tofFindTracks->SetSIGT(dTsig); // allow for variable deviations in ns + } + iMinNofHits = 4; + iNStations = 39; + iNReqStations = 5; + tofFindTracks->SetStation(0, 5, 0, 0); + tofFindTracks->SetStation(1, 0, 2, 2); + tofFindTracks->SetStation(2, 0, 1, 2); + tofFindTracks->SetStation(3, 0, 0, 2); + tofFindTracks->SetStation(4, 0, 2, 1); + tofFindTracks->SetStation(5, 0, 1, 1); + tofFindTracks->SetStation(6, 0, 0, 1); + tofFindTracks->SetStation(7, 0, 2, 3); + tofFindTracks->SetStation(8, 0, 1, 3); + tofFindTracks->SetStation(9, 0, 0, 3); + tofFindTracks->SetStation(10, 0, 2, 0); + tofFindTracks->SetStation(11, 0, 1, 0); + tofFindTracks->SetStation(12, 0, 0, 0); + tofFindTracks->SetStation(13, 0, 2, 4); + tofFindTracks->SetStation(14, 0, 1, 4); + tofFindTracks->SetStation(15, 0, 0, 4); + tofFindTracks->SetStation(16, 0, 4, 0); + tofFindTracks->SetStation(17, 0, 3, 0); + tofFindTracks->SetStation(18, 0, 4, 1); + tofFindTracks->SetStation(19, 0, 3, 1); + tofFindTracks->SetStation(20, 0, 4, 2); + tofFindTracks->SetStation(21, 0, 3, 2); + tofFindTracks->SetStation(22, 0, 4, 3); + tofFindTracks->SetStation(23, 0, 3, 3); + tofFindTracks->SetStation(24, 0, 4, 4); + tofFindTracks->SetStation(25, 0, 3, 4); + tofFindTracks->SetStation(26, 9, 0, 0); + tofFindTracks->SetStation(27, 7, 0, 0); + tofFindTracks->SetStation(28, 9, 0, 1); + tofFindTracks->SetStation(29, 7, 0, 1); + tofFindTracks->SetStation(30, 6, 0, 0); + tofFindTracks->SetStation(31, 6, 0, 1); + tofFindTracks->SetStation(32, 2, 0, 0); + tofFindTracks->SetStation(33, 2, 0, 1); + tofFindTracks->SetStation(34, 2, 0, 2); + tofFindTracks->SetStation(35, 2, 0, 3); + tofFindTracks->SetStation(36, 2, 0, 4); + tofFindTracks->SetStation(37, 8, 0, 0); + tofFindTracks->SetStation(38, 8, 1, 0); + break; + + case 10: // for calibration mode of full setup + iMinNofHits = 3; + iNStations = 39; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 2, 2); + tofFindTracks->SetStation(1, 0, 1, 2); + tofFindTracks->SetStation(2, 0, 0, 2); + tofFindTracks->SetStation(3, 0, 2, 1); + tofFindTracks->SetStation(4, 0, 1, 1); + tofFindTracks->SetStation(5, 0, 0, 1); + tofFindTracks->SetStation(6, 0, 2, 3); + tofFindTracks->SetStation(7, 0, 1, 3); + tofFindTracks->SetStation(8, 0, 0, 3); + tofFindTracks->SetStation(9, 0, 2, 0); + tofFindTracks->SetStation(10, 0, 1, 0); + tofFindTracks->SetStation(11, 0, 0, 0); + tofFindTracks->SetStation(12, 0, 2, 4); + tofFindTracks->SetStation(13, 0, 1, 4); + tofFindTracks->SetStation(14, 0, 0, 4); + tofFindTracks->SetStation(15, 0, 4, 0); + tofFindTracks->SetStation(16, 0, 3, 0); + tofFindTracks->SetStation(17, 0, 4, 1); + tofFindTracks->SetStation(18, 0, 3, 1); + tofFindTracks->SetStation(19, 0, 4, 2); + tofFindTracks->SetStation(20, 0, 3, 2); + tofFindTracks->SetStation(21, 0, 4, 3); + tofFindTracks->SetStation(22, 0, 3, 3); + tofFindTracks->SetStation(23, 0, 4, 4); + tofFindTracks->SetStation(24, 0, 3, 4); + tofFindTracks->SetStation(25, 9, 0, 0); + tofFindTracks->SetStation(26, 7, 0, 0); + tofFindTracks->SetStation(27, 9, 0, 1); + tofFindTracks->SetStation(28, 7, 0, 1); + tofFindTracks->SetStation(29, 6, 0, 0); + tofFindTracks->SetStation(30, 6, 0, 1); + tofFindTracks->SetStation(31, 2, 0, 0); + tofFindTracks->SetStation(32, 2, 0, 1); + tofFindTracks->SetStation(33, 2, 0, 2); + tofFindTracks->SetStation(34, 2, 0, 3); + tofFindTracks->SetStation(35, 2, 0, 4); + tofFindTracks->SetStation(36, 8, 0, 0); + tofFindTracks->SetStation(37, 8, 1, 0); + tofFindTracks->SetStation(38, 5, 0, 0); + break; + + case 11: // for calibration mode of 2-stack & test counters + iMinNofHits = 3; + iNStations = 17; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 4, 0); + tofFindTracks->SetStation(1, 0, 3, 0); + tofFindTracks->SetStation(2, 0, 4, 1); + tofFindTracks->SetStation(3, 0, 3, 1); + tofFindTracks->SetStation(4, 0, 4, 2); + tofFindTracks->SetStation(5, 0, 3, 2); + tofFindTracks->SetStation(6, 0, 4, 3); + tofFindTracks->SetStation(7, 0, 3, 3); + tofFindTracks->SetStation(8, 0, 4, 4); + tofFindTracks->SetStation(9, 0, 3, 4); + tofFindTracks->SetStation(10, 9, 0, 0); + tofFindTracks->SetStation(11, 9, 1, 0); + tofFindTracks->SetStation(12, 9, 0, 1); + tofFindTracks->SetStation(13, 9, 1, 1); + tofFindTracks->SetStation(14, 6, 0, 0); + tofFindTracks->SetStation(15, 6, 0, 1); + tofFindTracks->SetStation(16, 5, 0, 0); + break; + + case 12: // for calibration mode of 2-stack & test counters + iMinNofHits = 3; + iNStations = 9; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 9, 0, 0); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 6, 0, 0); + tofFindTracks->SetStation(5, 9, 0, 1); + tofFindTracks->SetStation(6, 9, 1, 1); + tofFindTracks->SetStation(7, 6, 0, 1); + tofFindTracks->SetStation(8, 5, 0, 0); + break; + + case 13: // for calibration mode of triple-stack (july2021-cri) + iMinNofHits = 3; + iNStations = 10; + iNReqStations = 3; + tofFindTracks->SetStation(0, 0, 1, 2); + tofFindTracks->SetStation(1, 0, 0, 2); + tofFindTracks->SetStation(2, 0, 1, 1); + tofFindTracks->SetStation(3, 0, 0, 1); + tofFindTracks->SetStation(4, 0, 1, 3); + tofFindTracks->SetStation(5, 0, 0, 3); + tofFindTracks->SetStation(6, 0, 1, 0); + tofFindTracks->SetStation(7, 0, 0, 0); + tofFindTracks->SetStation(8, 0, 1, 4); + tofFindTracks->SetStation(9, 0, 0, 4); + break; + + case 113: // for double stack TSHU counter (031) + iMinNofHits = 6; + iNStations = 7; + iNReqStations = 7; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 9, 0, 1); + tofFindTracks->SetStation(2, 9, 1, 1); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 9, 0, 0); + tofFindTracks->SetStation(5, 5, 0, 0); + tofFindTracks->SetStation(6, iDut, iDutSm, iDutRpc); + break; + + case 114: // for double stack TSHU counter (041) + iMinNofHits = 6; + iNStations = 7; + iNReqStations = 7; + tofFindTracks->SetStation(0, 9, 1, 1); + tofFindTracks->SetStation(1, 9, 0, 1); + tofFindTracks->SetStation(2, 0, 3, 1); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 9, 0, 0); + tofFindTracks->SetStation(5, 5, 0, 0); + tofFindTracks->SetStation(6, iDut, iDutSm, iDutRpc); + break; + + case 116: // for evaluation of BUC counter (600, 601) + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 9, 0, 1); + tofFindTracks->SetStation(2, 0, 3, 1); + tofFindTracks->SetStation(3, 9, 0, 0); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 117: // for evaluation of BUC counter (600, 601) + iMinNofHits = 5; + iNStations = 6; + iNReqStations = 6; + iBucRpc = 1 - iDutRpc; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 9, 0, 1); + tofFindTracks->SetStation(2, 0, 3, 1); + tofFindTracks->SetStation(3, 9, 0, 0); + tofFindTracks->SetStation(4, 6, 0, iBucRpc); + tofFindTracks->SetStation(5, iDut, iDutSm, iDutRpc); + break; + + case 2: + iMinNofHits = 3; + iNStations = 38; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 2, 2); + tofFindTracks->SetStation(1, 0, 1, 2); + tofFindTracks->SetStation(2, 0, 0, 2); + tofFindTracks->SetStation(3, 0, 2, 1); + tofFindTracks->SetStation(4, 0, 1, 1); + tofFindTracks->SetStation(5, 0, 0, 1); + tofFindTracks->SetStation(6, 0, 2, 3); + tofFindTracks->SetStation(7, 0, 1, 3); + tofFindTracks->SetStation(8, 0, 0, 3); + tofFindTracks->SetStation(9, 0, 2, 0); + tofFindTracks->SetStation(10, 0, 1, 0); + tofFindTracks->SetStation(11, 0, 0, 0); + tofFindTracks->SetStation(12, 0, 2, 4); + tofFindTracks->SetStation(13, 0, 1, 4); + tofFindTracks->SetStation(14, 0, 0, 4); + tofFindTracks->SetStation(15, 0, 4, 0); + tofFindTracks->SetStation(16, 0, 3, 0); + tofFindTracks->SetStation(17, 0, 4, 1); + tofFindTracks->SetStation(18, 0, 3, 1); + tofFindTracks->SetStation(19, 0, 4, 2); + tofFindTracks->SetStation(20, 0, 3, 2); + tofFindTracks->SetStation(21, 0, 4, 3); + tofFindTracks->SetStation(22, 0, 3, 3); + tofFindTracks->SetStation(23, 0, 4, 4); + tofFindTracks->SetStation(24, 0, 3, 4); + tofFindTracks->SetStation(25, 9, 0, 0); + tofFindTracks->SetStation(26, 7, 0, 0); + tofFindTracks->SetStation(27, 9, 0, 1); + tofFindTracks->SetStation(28, 7, 0, 1); + tofFindTracks->SetStation(29, 6, 0, 0); + tofFindTracks->SetStation(30, 6, 0, 1); + tofFindTracks->SetStation(31, 2, 0, 0); + tofFindTracks->SetStation(32, 2, 0, 1); + tofFindTracks->SetStation(33, 2, 0, 2); + tofFindTracks->SetStation(34, 2, 0, 3); + tofFindTracks->SetStation(35, 2, 0, 4); + tofFindTracks->SetStation(36, 8, 0, 0); + tofFindTracks->SetStation(37, 8, 1, 0); + break; + + case 3: + iMinNofHits = 3; + iNStations = 16; + iNReqStations = 4; + tofFindTracks->SetStation(0, 5, 0, 0); + tofFindTracks->SetStation(1, 0, 2, 2); + tofFindTracks->SetStation(2, 0, 1, 2); + tofFindTracks->SetStation(3, 0, 0, 2); + + tofFindTracks->SetStation(4, 0, 2, 1); + tofFindTracks->SetStation(5, 0, 1, 1); + tofFindTracks->SetStation(6, 0, 0, 1); + + tofFindTracks->SetStation(7, 0, 2, 3); + tofFindTracks->SetStation(8, 0, 1, 3); + tofFindTracks->SetStation(9, 0, 0, 3); + + tofFindTracks->SetStation(10, 0, 2, 0); + tofFindTracks->SetStation(11, 0, 1, 0); + tofFindTracks->SetStation(12, 0, 0, 0); + + tofFindTracks->SetStation(13, 0, 2, 4); + tofFindTracks->SetStation(14, 0, 1, 4); + tofFindTracks->SetStation(15, 0, 0, 4); + + /* + tofFindTracks->SetStation(16, 0, 3, 2); + tofFindTracks->SetStation(17, 0, 4, 2); + tofFindTracks->SetStation(18, 0, 3, 1); + tofFindTracks->SetStation(19, 0, 4, 1); + tofFindTracks->SetStation(20, 0, 3, 3); + tofFindTracks->SetStation(21, 0, 4, 3); + tofFindTracks->SetStation(22, 0, 3, 0); + tofFindTracks->SetStation(23, 0, 4, 0); + tofFindTracks->SetStation(24, 0, 3, 4); + tofFindTracks->SetStation(25, 0, 4, 4); + */ + break; + + case 31: // cosmic triple stack, Aug 2021 + iMinNofHits = 3; + iNStations = 20; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 0, 2); + tofFindTracks->SetStation(1, 0, 2, 2); + tofFindTracks->SetStation(2, 0, 1, 2); + tofFindTracks->SetStation(3, 2, 0, 2); + + tofFindTracks->SetStation(4, 0, 0, 1); + tofFindTracks->SetStation(5, 0, 2, 1); + tofFindTracks->SetStation(6, 0, 1, 1); + tofFindTracks->SetStation(7, 2, 0, 1); + + tofFindTracks->SetStation(8, 0, 0, 3); + tofFindTracks->SetStation(9, 0, 2, 3); + tofFindTracks->SetStation(10, 0, 1, 3); + tofFindTracks->SetStation(11, 2, 0, 3); + + tofFindTracks->SetStation(12, 0, 0, 0); + tofFindTracks->SetStation(13, 0, 2, 0); + tofFindTracks->SetStation(14, 0, 1, 0); + tofFindTracks->SetStation(15, 2, 0, 0); + + tofFindTracks->SetStation(16, 0, 0, 4); + tofFindTracks->SetStation(17, 0, 2, 4); + tofFindTracks->SetStation(18, 0, 1, 4); + tofFindTracks->SetStation(19, 2, 0, 4); + break; + + case 4: // for USTC evaluation (dut=910,911) + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + //tofFindTracks->SetStation(2, 9, 0, 1); // broken in May2021 + tofFindTracks->SetStation(2, 9, 0, 0); + tofFindTracks->SetStation(3, 5, 0, 0); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 40: // for USTC evaluation (dut=910) + iMinNofHits = 4; + iNStations = 6; + iNReqStations = 6; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + //tofFindTracks->SetStation(2, 9, 0, 1); + tofFindTracks->SetStation(2, 9, 0, 0); + tofFindTracks->SetStation(3, 9, 1, 1); + tofFindTracks->SetStation(4, 5, 0, 0); + tofFindTracks->SetStation(5, iDut, iDutSm, iDutRpc); + break; + + case 41: // for USTC evaluation (dut=911) + iMinNofHits = 4; + iNStations = 6; + iNReqStations = 6; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + //tofFindTracks->SetStation(2, 9, 0, 1); + tofFindTracks->SetStation(2, 9, 0, 0); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 5, 0, 0); + tofFindTracks->SetStation(5, iDut, iDutSm, iDutRpc); + break; + + case 42: // for USTC evaluation (dut=900, 901) + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 6, 0, 0); + tofFindTracks->SetStation(3, 6, 0, 1); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 43: // for USTC evaluation (dut=900, 901) + iMinNofHits = 3; + iNStations = 4; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 6, 0, 1); + tofFindTracks->SetStation(3, iDut, iDutSm, iDutRpc); + break; + + case 14: + iMinNofHits = 3; + iNStations = 15; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 2, 2); + tofFindTracks->SetStation(1, 0, 1, 2); + tofFindTracks->SetStation(2, 0, 0, 2); + tofFindTracks->SetStation(0, 0, 2, 1); + tofFindTracks->SetStation(1, 0, 1, 1); + tofFindTracks->SetStation(2, 0, 0, 1); + tofFindTracks->SetStation(0, 0, 2, 0); + tofFindTracks->SetStation(1, 0, 1, 0); + tofFindTracks->SetStation(2, 0, 0, 0); + tofFindTracks->SetStation(0, 0, 2, 3); + tofFindTracks->SetStation(1, 0, 1, 3); + tofFindTracks->SetStation(2, 0, 0, 3); + tofFindTracks->SetStation(0, 0, 2, 4); + tofFindTracks->SetStation(1, 0, 1, 4); + tofFindTracks->SetStation(2, 0, 0, 4); + break; + + case 5: // for evaluation of Buc in 2-stack + iMinNofHits = 3; + iNStations = 4; + iNReqStations = 4; + tofFindTracks->SetStation(0, 0, 4, 3); + tofFindTracks->SetStation(1, 0, 3, 3); + tofFindTracks->SetStation(2, 5, 0, 0); + tofFindTracks->SetStation(3, iDut, iDutSm, iDutRpc); + break; + + case 50: // for evaluation of Buc in 2-stack + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 4, 3); + tofFindTracks->SetStation(1, 0, 3, 3); + tofFindTracks->SetStation(2, 6, 0, 1); + tofFindTracks->SetStation(3, 5, 0, 0); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 51: // for evaluation of Buc in 2-stack + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 4, 3); + tofFindTracks->SetStation(1, 0, 3, 3); + tofFindTracks->SetStation(2, 6, 0, 0); + tofFindTracks->SetStation(3, 5, 0, 0); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 6: // for double stack TSHU counter (900,901) evaluation + iMinNofHits = 5; + iNStations = 6; + iNReqStations = 6; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 9, 1, 1); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 5, 0, 0); + tofFindTracks->SetStation(5, iDut, iDutSm, iDutRpc); + break; + + case 60: // for double stack TSHU counter (900) evaluation + iMinNofHits = 5; + iNStations = 7; + iNReqStations = 7; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 9, 1, 1); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 9, 0, 1); + tofFindTracks->SetStation(5, 5, 0, 0); + tofFindTracks->SetStation(6, iDut, iDutSm, iDutRpc); + break; + + case 61: // for double stack TSHU counter (901) evaluation + iMinNofHits = 5; + iNStations = 7; + iNReqStations = 7; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 9, 1, 1); + tofFindTracks->SetStation(3, 9, 1, 0); + tofFindTracks->SetStation(4, 9, 0, 0); + tofFindTracks->SetStation(5, 5, 0, 0); + tofFindTracks->SetStation(6, iDut, iDutSm, iDutRpc); + break; + + case 7: // for double stack mTOF counter evaluation + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 9, 1, 1); + tofFindTracks->SetStation(1, 9, 0, 0); + tofFindTracks->SetStation(2, 9, 1, 0); + tofFindTracks->SetStation(3, 5, 0, 0); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 8: // evaluation of add-on counters (BUC) + iMinNofHits = 5; + iNStations = 6; + + iNReqStations = 6; + tofFindTracks->SetStation(0, 5, 0, 0); + tofFindTracks->SetStation(1, 9, 0, 1); + tofFindTracks->SetStation(2, 0, 4, 1); + tofFindTracks->SetStation(3, 9, 0, 0); + tofFindTracks->SetStation(4, 0, 3, 1); + tofFindTracks->SetStation(5, iDut, iDutSm, iDutRpc); + break; + + case 81: // evaluation of add-on counters (BUC) in July 2021 + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 4, 1); + tofFindTracks->SetStation(1, 0, 3, 1); + tofFindTracks->SetStation(2, 9, 0, 0); + tofFindTracks->SetStation(3, 9, 0, 1); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 9: // evaluation of M6, Dut=202 + iMinNofHits = 4; + iNStations = 5; + iNReqStations = 5; + tofFindTracks->SetStation(0, 0, 2, 2); + tofFindTracks->SetStation(1, 0, 0, 2); + tofFindTracks->SetStation(2, 0, 1, 2); + tofFindTracks->SetStation(3, 5, 0, 0); + tofFindTracks->SetStation(4, iDut, iDutSm, iDutRpc); + break; + + case 992: // evaluation of CRI cosmics 2021 + iMinNofHits = 3; + iNStations = 4; + iNReqStations = 4; + { + Int_t iType[4] = {0, 0, 0, 2}; + Int_t iModule[4] = {0, 2, 1, 0}; + Int_t iSt = 0; + for (Int_t iM = 0; iM < iNStations; iM++) { + if (iType[iM] == iDut && iModule[iM] == iDutSm) continue; + tofFindTracks->SetStation(iSt, iType[iM], iModule[iM], iDutRpc); + iSt++; + } + } + tofFindTracks->SetStation(3, iDut, iDutSm, iDutRpc); + break; + + default: + cout << "Tracking setup " << iTrackingSetup << " not implemented " << endl; + return; + ; + } + tofFindTracks->SetMinNofHits(iMinNofHits); + tofFindTracks->SetNStations(iNStations); + tofFindTracks->SetNReqStations(iNReqStations); + tofFindTracks->PrintSetup(); + + FairRunAna* run = FairRunAna::Instance(); + if (NULL != run) { + run->AddTask(tofFindTracks); + LOG(info) << "AddTask " << tofFindTracks->GetName(); + } + else { + LOG(fatal) << "No FairRunAna found "; + } +} diff --git a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C new file mode 100644 index 0000000000000000000000000000000000000000..3977aacb5f76ca6d7c234d5f99efd6d12e56ec1f --- /dev/null +++ b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C @@ -0,0 +1,731 @@ +/* Copyright (C) 2020 Facility for Antiproton and Ion Research in Europe, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Pierre-Alain Loizeau, Adrian Weber [committer] */ + +// -------------------------------------------------------------------------- +// +// Macro for reconstruction of mcbm data (2021) +// Combined reconstruction (cluster + hit finder) for different subsystems. +// +// -------------------------------------------------------------------------- + +#include <math.h> +#include <stdio.h> +#include <string.h> + +/// FIXME: Disable clang formatting to keep easy parameters overview +/* clang-format off */ +Bool_t mcbm_event_reco_L1(UInt_t uRunId = 2391, + Int_t nTimeslices = 10, + TString sInpDir = "./data/", + TString sOutDir = "./data/", + Int_t iUnpFileIndex = -1, + Bool_t bMVD = kFALSE, + Bool_t bSTS = kTRUE, + Bool_t bTRD = kTRUE, + Bool_t bTRD2d = kTRUE, + Bool_t bRICH = kTRUE, + Bool_t bMUCH = kFALSE, + Bool_t bTOF = kTRUE, + Bool_t bTOFtr = kTRUE, + Bool_t bPSD = kFALSE, + Bool_t bAli = kTRUE, + Bool_t bEvB = kTRUE, + Bool_t bL1 = kFALSE, + Bool_t bQA = kFALSE, + TString sInpFile = "" + ) +{ + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ + + // --- Logger settings ---------------------------------------------------- + TString logLevel = "INFO"; //"INFO"; + TString logVerbosity = "VERYLOW"; //"VERYLOW"; + // ------------------------------------------------------------------------ + + + // ----- Environment -------------------------------------------------- + TString myName = "mcbm_event_reco"; // this macro's name for screen output + TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory + // ------------------------------------------------------------------------ + + + // ----- In- and output file names ------------------------------------ + /// Standardized RUN ID + TString sRunId = TString::Format("%04u", uRunId); + + /// Initial pattern + TString inFile = sInpFile; // + "/" + sRunId + ".digi"; + TString cFileId = sRunId; + + //TString parFileIn = sInpDir + "/unp_mcbm_params_" + sRunId; + TString parFileOut = sOutDir + "/reco_event_mcbm_test_params_" + sRunId; + TString outFile = sOutDir + "/reco_event_mcbm_test" + sRunId; + + // Your folder with the Tof Calibration files; + TString TofFileFolder = ""; + // TString TofFileFolder = "/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2021/"; + + + /// Add index of splitting at unpacking level if needed + if (0 <= iUnpFileIndex) { + inFile += TString::Format("_%02u", iUnpFileIndex); + // the input par file is not split during unpacking! + parFileOut += TString::Format("_%02u", iUnpFileIndex); + outFile += TString::Format("_%02u", iUnpFileIndex); + } // if ( 0 <= uUnpFileIndex ) + /// Add ROOT file suffix + inFile += ".root"; + // parFileIn += ".root"; + parFileOut += ".root"; + outFile += ".root"; + + if ("" != sInpFile) inFile = sInpFile; + // --------------------------------------------- + + + // ----- TOF defaults ------------------------ + Int_t calMode = 93; + Int_t calSel = 1; + Int_t calSm = 2; + Int_t RefSel = 11; + Double_t dDeadtime = 50.; + Int_t iSel2 = -1; + + // Tracking + Int_t iSel = 22002; + Int_t iTrackingSetup = 1; // 2 for checking without beam counter; + Int_t iGenCor = 1; + Double_t dScalFac = 2.5; + Double_t dChi2Lim2 = 4.; + Bool_t bUseSigCalib = kFALSE; + Int_t iCalOpt = 110; // 0=do not call CbmTofCalibrator + Int_t iTrkPar = 0; // 4 for check without beam counter + // ------------------------------------------------------------------------ + + // ----- TOF Calibration Settings --------------------------------------- + TString cCalId = "490.100.5.0"; + if (uRunId >= 759) cCalId = "759.100.4.0"; + if (uRunId >= 812) cCalId = "831.100.4.0"; + if (uRunId >= 1588) cCalId = "1588.50.6.0"; + if (uRunId >= 2160) cCalId = "2160.50.4.0"; + if (uRunId >= 2352) cCalId = "2391.5.000"; + Int_t iCalSet = 30040500; // calibration settings + if (uRunId >= 759) iCalSet = 10020500; + if (uRunId >= 812) iCalSet = 10020500; + if (uRunId >= 1588) iCalSet = 12002002; + if (uRunId >= 2160) iCalSet = 700900500; + if (uRunId >= 2352) iCalSet = 22002500; + + Double_t Tint = 100.; // coincidence time interval + Int_t iTrackMode = 2; // 2 for TofTracker + const Int_t iTofCluMode = 1; + // ------------------------------------------------------------------------ + + // --- Load the geometry setup ---- + // This is currently only required by the TRD (parameters) + TString geoSetupTag = "mcbm_beam_2021_07_surveyed"; + if (2060 <= uRunId) { + /// Setup changed multiple times between the 2022 carbon and uranium runs + if (uRunId <= 2065) { + /// Carbon runs: 2060 - 2065 = 10/03/2022 + geoSetupTag = "mcbm_beam_2022_03_09_carbon"; + } + else if (2150 <= uRunId && uRunId <= 2160) { + /// Iron runs: 2150 - 2160 = 24-25/03/2022 + geoSetupTag = "mcbm_beam_2022_03_22_iron"; + } + else if (2176 <= uRunId && uRunId <= 2310) { + /// Uranium runs: 2176 - 2310 = 30/03/2022 - 01/04/2022 + geoSetupTag = "mcbm_beam_2022_03_28_uranium"; + } + else if (2352 <= uRunId) { + /// Uranium runs: 2176 - 2310 = 30/03/2022 - 01/04/2022 + geoSetupTag = "mcbm_beam_2022_05_23_nickel"; + } + } + + TString geoFile = sInpDir + "/" + geoSetupTag + ".geo.root"; + CbmSetup* geoSetup = CbmSetup::Instance(); + geoSetup->LoadSetup(geoSetupTag); + + // You can modify the pre-defined setup by using + if (bMVD) geoSetup->SetActive(ECbmModuleId::kMvd, kTRUE); + if (bSTS) geoSetup->SetActive(ECbmModuleId::kSts, kTRUE); + if (bMUCH) geoSetup->SetActive(ECbmModuleId::kMuch, kTRUE); + if (bRICH) geoSetup->SetActive(ECbmModuleId::kRich, kTRUE); + if (bTRD) geoSetup->SetActive(ECbmModuleId::kTrd, kTRUE); + if (bTRD2d) geoSetup->SetActive(ECbmModuleId::kTrd2d, kTRUE); + if (bTOF) geoSetup->SetActive(ECbmModuleId::kTof, kTRUE); + if (bPSD) geoSetup->SetActive(ECbmModuleId::kPsd, kTRUE); + + //----- Load Parameters -------------------------------------------------- + TList* parFileList = new TList(); + TofFileFolder = Form("%s/%s", TofFileFolder.Data(), cCalId.Data()); + + // ----- TRD digitisation parameters ------------------------------------- + TString geoTagTrd; + if (geoSetup->IsActive(ECbmModuleId::kTrd)) { + if (geoSetup->GetGeoTag(ECbmModuleId::kTrd, geoTagTrd)) { + TString paramFilesTrd(Form("%s/parameters/trd/trd_%s", srcDir.Data(), geoTagTrd.Data())); + std::vector<TString> paramFilesVecTrd = {"asic", "digi", "gas", "gain"}; + for (auto parIt : paramFilesVecTrd) { + parFileList->Add(new TObjString(Form("%s.%s.par", paramFilesTrd.Data(), parIt.Data()))); + } + } + for (auto parFileVecIt : *parFileList) { + LOG(debug) << Form("TrdParams - %s - added to parameter file list\n", parFileVecIt->GetName()); + } + } + // ----- TOF digitisation parameters ------------------------------------- + TString geoTag; + if (geoSetup->IsActive(ECbmModuleId::kTof)) { + geoSetup->GetGeoTag(ECbmModuleId::kTof, geoTag); + TObjString* tofBdfFile = new TObjString(srcDir + "/parameters/tof/tof_" + geoTag + ".digibdf.par"); + parFileList->Add(tofBdfFile); + std::cout << "-I- " << myName << ": Using parameter file " << tofBdfFile->GetString() << std::endl; + + // TFile* fgeo = new TFile(geoFile); + // TGeoManager* geoMan = (TGeoManager*) fgeo->Get("FAIRGeom"); + // if (NULL == geoMan) { + // cout << "<E> FAIRGeom not found in geoFile " << geoFile.Data() << endl; + // return 1; + // } + } + // ------------------------------------------------------------------------ + + // ----- Timer -------------------------------------------------------- + TStopwatch timer; + timer.Start(); + // ------------------------------------------------------------------------ + + + // ----- FairRunAna --------------------------------------------------- + FairRunAna* run = new FairRunAna(); + FairFileSource* inputSource = new FairFileSource(inFile); + run->SetSource(inputSource); + + FairRootFileSink* outputSink = new FairRootFileSink(outFile); + run->SetSink(outputSink); + run->SetGeomFile(geoFile); + + // Define output file for FairMonitor histograms + TString monitorFile {outFile}; + monitorFile.ReplaceAll("reco", "reco.monitor"); + FairMonitor::GetMonitor()->EnableMonitor(kTRUE, monitorFile); + // ------------------------------------------------------------------------ + + + // ----- Logger settings ---------------------------------------------- + FairLogger::GetLogger()->SetLogScreenLevel(logLevel.Data()); + FairLogger::GetLogger()->SetLogVerbosityLevel(logVerbosity.Data()); + //FairLogger::GetLogger()->SetLogScreenLevel("DEBUG"); + // ------------------------------------------------------------------------ + + + // ========================================================================= + // === Alignment Correction === + // ========================================================================= + // (Fairsoft Apr21p2 or newer is needed) + if (bAli) { + + TString alignmentMatrixFileName = srcDir + "/parameters/mcbm/AlignmentMatrices_" + geoSetupTag + ".root"; + if (alignmentMatrixFileName.Length() != 0) { + std::cout << "-I- " << myName << ": Applying alignment for file " << alignmentMatrixFileName << std::endl; + + // Define the basic structure which needs to be filled with information + // This structure is stored in the output file and later passed to the + // FairRoot framework to do the (miss)alignment + std::map<std::string, TGeoHMatrix>* matrices {nullptr}; + + // read matrices from disk + LOG(info) << "Filename: " << alignmentMatrixFileName; + TFile* misalignmentMatrixRootfile = new TFile(alignmentMatrixFileName, "READ"); + if (misalignmentMatrixRootfile->IsOpen()) { + gDirectory->GetObject("MisalignMatrices", matrices); + misalignmentMatrixRootfile->Close(); + } + else { + LOG(error) << "Could not open file " << alignmentMatrixFileName << "\n Exiting"; + exit(1); + } + + if (matrices) { run->AddAlignmentMatrices(*matrices); } + else { + LOG(error) << "Alignment required but no matrices found." + << "\n Exiting"; + exit(1); + } + } + } + // ------------------------------------------------------------------------ + + + // --------------------event builder--------------------------------------- + // ----- EventBuilder Settings---------------- + // mCbm track trigger Tof, T0 & STS (case 4 of mcbm_unp_event.C) + const Int_t eb_TriggerMinNumberT0 {1}; + const Int_t eb_TriggerMaxNumberT0 {2}; + const Int_t eb_TriggerMinNumberSts {2}; + const Int_t eb_TriggerMinNumberStsLayers {1}; + const Int_t eb_TriggerMinNumberMuch {0}; + const Int_t eb_TriggerMinNumberTof {8}; + const Int_t eb_TriggerMinNumberTofLayers {4}; + const Int_t eb_TriggerMinNumberRich {0}; + + const Int_t eb_TrigWinMinT0 {-50}; + const Int_t eb_TrigWinMaxT0 {50}; + const Int_t eb_TrigWinMinSts {-60}; + const Int_t eb_TrigWinMaxSts {60}; + const Int_t eb_TrigWinMinTrd1d {-300}; + const Int_t eb_TrigWinMaxTrd1d {300}; + const Int_t eb_TrigWinMinTrd2d {-200}; + const Int_t eb_TrigWinMaxTrd2d {200}; + const Int_t eb_TrigWinMinTof {-20}; + const Int_t eb_TrigWinMaxTof {60}; + const Int_t eb_TrigWinMinRich {-60}; + const Int_t eb_TrigWinMaxRich {60}; + + if (bEvB) { + CbmTaskBuildRawEvents* evBuildRaw = new CbmTaskBuildRawEvents(); + + //Choose between NoOverlap, MergeOverlap, AllowOverlap + evBuildRaw->SetEventOverlapMode(EOverlapModeRaw::AllowOverlap); + + // Remove detectors where digis not found + evBuildRaw->RemoveDetector(kRawEventBuilderDetRich); + if (!bRICH || !geoSetup->IsActive(ECbmModuleId::kRich)) evBuildRaw->RemoveDetector(kRawEventBuilderDetRich); + if (!bMUCH || !geoSetup->IsActive(ECbmModuleId::kMuch)) evBuildRaw->RemoveDetector(kRawEventBuilderDetMuch); + if (!bPSD || !geoSetup->IsActive(ECbmModuleId::kPsd)) evBuildRaw->RemoveDetector(kRawEventBuilderDetPsd); + if (!bTRD || !geoSetup->IsActive(ECbmModuleId::kTrd)) evBuildRaw->RemoveDetector(kRawEventBuilderDetTrd); + if (!bTRD2d || !geoSetup->IsActive(ECbmModuleId::kTrd2d)) evBuildRaw->RemoveDetector(kRawEventBuilderDetTrd2D); + if (!bSTS || !geoSetup->IsActive(ECbmModuleId::kSts)) evBuildRaw->RemoveDetector(kRawEventBuilderDetSts); + if (!bTOF || !geoSetup->IsActive(ECbmModuleId::kTof)) evBuildRaw->RemoveDetector(kRawEventBuilderDetTof); + + // Set T0 as reference detector + evBuildRaw->SetReferenceDetector(kRawEventBuilderDetT0); + + // Use sliding window seed builder with STS + //evBuildRaw->SetReferenceDetector(kRawEventBuilderDetUndef); + //evBuildRaw->AddSeedTimeFillerToList(kRawEventBuilderDetTof); + //evBuildRaw->SetSlidingWindowSeedFinder(10, 10, 50); + //evBuildRaw->SetSeedFinderQa(true); // optional QA information for seed finder + //evBuildRaw->SetTriggerMinNumber(ECbmModuleId::kSts, 1000); + //evBuildRaw->SetTriggerMaxNumber(ECbmModuleId::kSts, -1); + //evBuildRaw->SetTriggerWindow(ECbmModuleId::kSts, -500, 500); + + // void SetTsParameters(double TsStartTime, double TsLength, double TsOverLength): TsStartTime=0, TsLength=256ms in 2021, TsOverLength=TS overlap, not used in mCBM2021 + evBuildRaw->SetTsParameters(0.0, 1.28e8, 1.12928e8); + + if (geoSetup->IsActive(ECbmModuleId::kTof)) { + evBuildRaw->SetTriggerMinNumber(ECbmModuleId::kTof, eb_TriggerMinNumberTof); + evBuildRaw->SetTriggerMinLayersNumber(ECbmModuleId::kTof, eb_TriggerMinNumberTofLayers); + evBuildRaw->SetTriggerMaxNumber(ECbmModuleId::kTof, -1); + } + + evBuildRaw->SetTriggerMinNumber(ECbmModuleId::kT0, eb_TriggerMinNumberT0); + evBuildRaw->SetTriggerMaxNumber(ECbmModuleId::kT0, eb_TriggerMaxNumberT0); + + if (geoSetup->IsActive(ECbmModuleId::kSts)) { + evBuildRaw->SetTriggerMinNumber(ECbmModuleId::kSts, eb_TriggerMinNumberSts); + evBuildRaw->SetTriggerMinLayersNumber(ECbmModuleId::kSts, eb_TriggerMinNumberStsLayers); + evBuildRaw->SetTriggerMaxNumber(ECbmModuleId::kSts, -1); + } + if (geoSetup->IsActive(ECbmModuleId::kRich)) { + evBuildRaw->SetTriggerMinNumber(ECbmModuleId::kRich, eb_TriggerMinNumberRich); + evBuildRaw->SetTriggerMaxNumber(ECbmModuleId::kRich, -1); + } + + evBuildRaw->SetTriggerWindow(ECbmModuleId::kT0, eb_TrigWinMinT0, eb_TrigWinMaxT0); + if (geoSetup->IsActive(ECbmModuleId::kTof)) + evBuildRaw->SetTriggerWindow(ECbmModuleId::kTof, eb_TrigWinMinTof, eb_TrigWinMaxTof); + if (geoSetup->IsActive(ECbmModuleId::kSts)) + evBuildRaw->SetTriggerWindow(ECbmModuleId::kSts, eb_TrigWinMinSts, eb_TrigWinMaxSts); + if (geoSetup->IsActive(ECbmModuleId::kTrd)) + evBuildRaw->SetTriggerWindow(ECbmModuleId::kTrd, eb_TrigWinMinTrd1d, eb_TrigWinMaxTrd1d); + if (geoSetup->IsActive(ECbmModuleId::kTrd)) + evBuildRaw->SetTriggerWindow(ECbmModuleId::kTrd2d, eb_TrigWinMinTrd2d, eb_TrigWinMaxTrd2d); + if (geoSetup->IsActive(ECbmModuleId::kRich)) + evBuildRaw->SetTriggerWindow(ECbmModuleId::kRich, eb_TrigWinMinRich, eb_TrigWinMaxRich); + + run->AddTask(evBuildRaw); + } + // ------------------------------------------------------------------------ + + + // ----- Reconstruction tasks ----------------------------------------- + + + // ========================================================================= + // === local STS Reconstruction === + // ========================================================================= + + if (bSTS && geoSetup->IsActive(ECbmModuleId::kSts)) { + CbmRecoSts* recoSts = new CbmRecoSts(); + recoSts->SetMode(kCbmRecoEvent); + + recoSts->SetTimeCutDigisAbs(20.0); // cluster finder: time cut in ns + recoSts->SetTimeCutClustersAbs(20.0); // hit finder: time cut in ns + + // Sensor params + CbmStsParSensor sensor6cm(CbmStsSensorClass::kDssdStereo); + sensor6cm.SetPar(0, 6.2092); // Extension in x + sensor6cm.SetPar(1, 6.2); // Extension in y + sensor6cm.SetPar(2, 0.03); // Extension in z + sensor6cm.SetPar(3, 5.9692); // Active size in y + sensor6cm.SetPar(4, 1024.); // Number of strips front side + sensor6cm.SetPar(5, 1024.); // Number of strips back side + sensor6cm.SetPar(6, 0.0058); // Strip pitch front side + sensor6cm.SetPar(7, 0.0058); // Strip pitch back side + sensor6cm.SetPar(8, 0.0); // Stereo angle front side + sensor6cm.SetPar(9, 7.5); // Stereo angle back side + + CbmStsParSensor sensor12cm(sensor6cm); // copy all parameters, change then only the y size + sensor12cm.SetPar(1, 12.4); // Extension in y + sensor12cm.SetPar(3, 12.1692); // Active size in y + + // --- Addresses for sensors + // --- They are defined in each station as sensor 1, module 1, halfladderD (2), ladder 1 + // Int_t GetAddress(UInt_t unit = 0, UInt_t ladder = 0, UInt_t halfladder = 0, UInt_t module = 0, UInt_t sensor = 0, + // UInt_t side = 0, UInt_t version = kCurrentVersion); + + Int_t stsAddress01 = CbmStsAddress::GetAddress(0, 0, 1, 0, 0, 0); // U0 L0 M0 6 cm + Int_t stsAddress02 = CbmStsAddress::GetAddress(0, 0, 1, 1, 0, 0); // U0 L0 M1 6 cm + Int_t stsAddress03 = CbmStsAddress::GetAddress(0, 1, 1, 0, 0, 0); // U0 L1 M0 6 cm + Int_t stsAddress04 = CbmStsAddress::GetAddress(0, 1, 1, 1, 0, 0); // U0 L1 M1 6 cm + Int_t stsAddress05 = CbmStsAddress::GetAddress(1, 0, 1, 0, 0, 0); // U1 L0 M0 6 cm + Int_t stsAddress06 = CbmStsAddress::GetAddress(1, 0, 1, 1, 0, 0); // U1 L0 M1 12 cm + Int_t stsAddress07 = CbmStsAddress::GetAddress(1, 1, 1, 0, 0, 0); // U1 L1 M0 6 cm + Int_t stsAddress08 = CbmStsAddress::GetAddress(1, 1, 1, 1, 0, 0); // U1 L1 M1 12 cm + Int_t stsAddress09 = CbmStsAddress::GetAddress(1, 2, 1, 0, 0, 0); // U1 L2 M0 6 cm + Int_t stsAddress10 = CbmStsAddress::GetAddress(1, 2, 1, 1, 0, 0); // U1 L2 M1 6 cm + Int_t stsAddress11 = CbmStsAddress::GetAddress(1, 2, 1, 2, 0, 0); // U1 L2 M2 6 cm + + + std::cout << "STS address01 " << std::dec << stsAddress01 << " " << std::hex << stsAddress01 << std::endl; + std::cout << "STS address02 " << std::dec << stsAddress02 << " " << std::hex << stsAddress02 << std::endl; + std::cout << "STS address03 " << std::dec << stsAddress03 << " " << std::hex << stsAddress03 << std::endl; + std::cout << "STS address04 " << std::dec << stsAddress04 << " " << std::hex << stsAddress04 << std::endl; + std::cout << "STS address05 " << std::dec << stsAddress05 << " " << std::hex << stsAddress05 << std::endl; + std::cout << "STS address06 " << std::dec << stsAddress06 << " " << std::hex << stsAddress06 << std::endl; + std::cout << "STS address07 " << std::dec << stsAddress07 << " " << std::hex << stsAddress07 << std::endl; + std::cout << "STS address08 " << std::dec << stsAddress08 << " " << std::hex << stsAddress08 << std::endl; + std::cout << "STS address09 " << std::dec << stsAddress09 << " " << std::hex << stsAddress09 << std::endl; + std::cout << "STS address10 " << std::dec << stsAddress10 << " " << std::hex << stsAddress10 << std::endl; + std::cout << "STS address11 " << std::dec << stsAddress11 << " " << std::hex << stsAddress11 << std::endl; + + // --- Now we can define the sensor parameter set and tell recoSts to use it + auto sensorParSet = new CbmStsParSetSensor("CbmStsParSetSensor", "STS sensor parameters" + "mcbm2021"); + sensorParSet->SetParSensor(stsAddress01, sensor6cm); + sensorParSet->SetParSensor(stsAddress02, sensor6cm); + sensorParSet->SetParSensor(stsAddress03, sensor6cm); + sensorParSet->SetParSensor(stsAddress04, sensor6cm); + sensorParSet->SetParSensor(stsAddress05, sensor6cm); + sensorParSet->SetParSensor(stsAddress06, sensor12cm); + sensorParSet->SetParSensor(stsAddress07, sensor6cm); + sensorParSet->SetParSensor(stsAddress08, sensor12cm); + sensorParSet->SetParSensor(stsAddress09, sensor6cm); + sensorParSet->SetParSensor(stsAddress10, sensor6cm); + sensorParSet->SetParSensor(stsAddress11, sensor6cm); + + recoSts->UseSensorParSet(sensorParSet); + + // ASIC params: #ADC channels, dyn. range, threshold, time resol., dead time, + // noise RMS, zero-threshold crossing rate + auto parAsic = new CbmStsParAsic(128, 31, 75000., 3000., 5., 800., 1000., 3.9789e-3); + + // Module params: number of channels, number of channels per ASIC + auto parMod = new CbmStsParModule(2048, 128); + parMod->SetAllAsics(*parAsic); + recoSts->UseModulePar(parMod); + + // Sensor conditions: full depletion voltage, bias voltage, temperature, + // coupling capacitance, inter-strip capacitance + auto sensorCond = new CbmStsParSensorCond(70., 140., 268., 17.5, 1.); + recoSts->UseSensorCond(sensorCond); + + run->AddTask(recoSts); + std::cout << "-I- : Added task " << recoSts->GetName() << std::endl; + // ------------------------------------------------------------------------ + } + + + // ========================================================================= + // === local TRD Reconstruction === + // ========================================================================= + + if (bTRD && geoSetup->IsActive(ECbmModuleId::kTrd)) { + CbmTrdClusterFinder* trdCluster; + Double_t triggerThreshold = 0.5e-6; // SIS100 + + trdCluster = new CbmTrdClusterFinder(); + trdCluster->SetNeighbourEnable(true, false); + trdCluster->SetMinimumChargeTH(triggerThreshold); + trdCluster->SetRowMerger(true); + run->AddTask(trdCluster); + std::cout << "-I- : Added task " << trdCluster->GetName() << std::endl; + + CbmTrdHitProducer* trdHit = new CbmTrdHitProducer(); + run->AddTask(trdHit); + std::cout << "-I- : Added task " << trdHit->GetName() << std::endl; + } + + // ========================================================================= + // === RICH Reconstruction === + // ========================================================================= + + if (bRICH && geoSetup->IsActive(ECbmModuleId::kRich)) { + // ----- Local reconstruction of RICH Hits ------------------------------ + CbmRichMCbmHitProducer* hitProd = new CbmRichMCbmHitProducer(); + hitProd->SetMappingFile(std::string(srcDir.Data()) + + "/macro/rich/mcbm/beamtime/mRICH_Mapping_vert_20190318_elView.geo"); + hitProd->SetIcdFilenameBase(std::string(srcDir.Data()) + "/macro/beamtime/mcbm2022/icd_offset_it"); + hitProd->setToTLimits(23.7, 30.0); + hitProd->applyToTCut(); + hitProd->applyICDCorrection(); + run->AddTask(hitProd); + // ------------------------------------------------------------------------ + + // ----- Local reconstruction in RICh -> Finding of Rings --------------- + CbmRichReconstruction* richReco = new CbmRichReconstruction(); + richReco->UseMCbmSetup(); + run->AddTask(richReco); + // ------------------------------------------------------------------------ + } + + // ========================================================================= + // === TOF Hitfinding === + // ========================================================================= + + TString parPath = srcDir + "/parameters/mcbm/"; + if (bTOF && geoSetup->IsActive(ECbmModuleId::kTof)) { + TString cFname; + switch (iTofCluMode) { + case 1: { + // ----- TOF defaults ------------------------ + Int_t calMode = 93; + Int_t calSel = 1; + Int_t calSm = 0; + Int_t RefSel = 0; + Double_t dDeadtime = 50.; + Int_t iSel2 = 500; + Bool_t bOut = kFALSE; + + // ------------------------------------------------------------------------ + gROOT->LoadMacro(srcDir + "/macro/beamtime/mcbm2022/ini_tof_clusterizer.C"); + Char_t* cCmd = + Form("ini_tof_clusterizer(%d,%d,%d,%d,\"%s\",%d,%d,%d,%f,\"%s\",\"%s\")", calMode, calSel, calSm, RefSel, + cFileId.Data(), iCalSet, (Int_t) bOut, iSel2, dDeadtime, cCalId.Data(), parPath.Data()); + cout << "<I> " << cCmd << endl; + gInterpreter->ProcessLine(cCmd); + // disable histogramming + CbmTofEventClusterizer* tofClust = CbmTofEventClusterizer::Instance(); + tofClust->SetDutId(-1); // to disable histogramming + } break; + + default: { + ; + } + } + + // ========================================================================= + // === Tof Tracking === + // ========================================================================= + + if (bTOFtr) { + cout << "<I> Initialize Tof tracker by ini_trks" << endl; + + Double_t dTOffScal = 1.; + gROOT->LoadMacro(srcDir + "/macro/beamtime/mcbm2022/ini_tof_trks.C"); + Char_t* cCmd = + Form("ini_tof_trks(%d,%d,%d,%6.2f,%8.1f,\"%s\",%d,%d,%d,%f,\"%s\")", iSel, iTrackingSetup, iGenCor, dScalFac, + dChi2Lim2, cCalId.Data(), (Int_t) bUseSigCalib, iCalOpt, iTrkPar, dTOffScal, parPath.Data()); + cout << "<I> " << cCmd << endl; + gInterpreter->ProcessLine(cCmd); + + CbmTofFindTracks* tofFindTracks = CbmTofFindTracks::Instance(); + Int_t iNStations = tofFindTracks->GetNStations(); + } + } + + + //Constant Field + // CbmConstField *fMagField = new CbmConstField(); + // fMagField->SetFieldXYZ(0, 0 ,0 ); // values are in kG + // fMagField->SetFieldRegions(-10, -10 ,-10 , 10, 10 , 10 ); + // run->SetField(fMagField); + + // ========================================================================= + // === L1 === + // ========================================================================= + if (bL1) { + run->AddTask(new CbmTrackingDetectorInterfaceInit()); + + CbmKF* kalman = new CbmKF(); + run->AddTask(kalman); + + CbmL1* l1 = new CbmL1(); + l1->SetLegacyEventMode(1); + l1->SetMcbmMode(); + l1->SetUseHitErrors(1); + // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); + + // --- Material budget file names + TString mvdGeoTag; + if (geoSetup->GetGeoTag(ECbmModuleId::kMvd, mvdGeoTag)) { + TString parFile = gSystem->Getenv("VMCWORKDIR"); + parFile = parFile + "/parameters/mvd/mvd_matbudget_" + mvdGeoTag + ".root"; + std::cout << "Using material budget file " << parFile << std::endl; + l1->SetMvdMaterialBudgetFileName(parFile.Data()); + } + TString stsGeoTag; + if (geoSetup->GetGeoTag(ECbmModuleId::kSts, stsGeoTag)) { + TString parFile = gSystem->Getenv("VMCWORKDIR"); + parFile = parFile + "/parameters/sts/sts_matbudget_v19a.root"; + std::cout << "Using material budget file " << parFile << std::endl; + l1->SetStsMaterialBudgetFileName(parFile.Data()); + } + + TString muchGeoTag; + if (geoSetup->GetGeoTag(ECbmModuleId::kMuch, muchGeoTag)) { + + // --- Parameter file name + TString geoTag; + geoSetup->GetGeoTag(ECbmModuleId::kMuch, geoTag); + Int_t muchFlag = 0; + if (geoTag.Contains("mcbm")) muchFlag = 1; + + + // TString parFile2 = gSystem->Getenv("VMCWORKDIR"); + // parFile2 = parFile2 + "/parameters/much/much_matbudget_" + geoTag + ".root "; + // std::cout << "Using material budget file " << parFile2 << std::endl; + // l1->SetMuchMaterialBudgetFileName(parFile2.Data()); + } + + TString trdGeoTag; + if (geoSetup->GetGeoTag(ECbmModuleId::kTrd, trdGeoTag)) { + TString parFile = gSystem->Getenv("VMCWORKDIR"); + parFile = parFile + "/parameters/trd/trd_matbudget_v22a_mcbm.root"; //trd_matbudget_" + trdGeoTag + ".root "; + std::cout << "Using material budget file " << parFile << std::endl; + l1->SetTrdMaterialBudgetFileName(parFile.Data()); + } + + TString tofGeoTag; + if (geoSetup->GetGeoTag(ECbmModuleId::kTof, tofGeoTag)) { + TString parFile = gSystem->Getenv("VMCWORKDIR"); + // parFile = parFile + "/parameters/tof/tof_matbudget_" + tofGeoTag + ".root "; + + parFile = parFile + "/parameters/tof/tof_matbudget_v21d_mcbm.root"; + std::cout << "Using material budget file " << parFile << std::endl; + l1->SetTofMaterialBudgetFileName(parFile.Data()); + } + + + // Workaround to get it running: + // 1) Change fUseGlobal in line 129 of CbmStsParSetModule.h to + // Bool_t fUseGlobal = kTRUE; + // 2) Change fUseGlobal in line 114 of CbmStsParSetSensor.h to + // Bool_t fUseGlobal = kTRUE; + run->AddTask(l1); + + CbmL1GlobalTrackFinder* globalTrackFinder = new CbmL1GlobalTrackFinder(); + FairTask* globalFindTracks = new CbmL1GlobalFindTracksEvents(globalTrackFinder); + run->AddTask(globalFindTracks); + } + // ========================================================================= + // === QA === + // ========================================================================= + if (bQA) { + // e.g for RICH: + CbmRichMCbmQaReal* qaTask = new CbmRichMCbmQaReal(); + Int_t taskId = 1; + if (taskId < 0) { qaTask->SetOutputDir(Form("result_run%d", uRunId)); } + else { + qaTask->SetOutputDir(Form("result_run%d_%05d", uRunId, taskId)); + } + //qaTask->XOffsetHistos(+25.0); + qaTask->XOffsetHistos(-4.1); + if (uRunId > 2351) qaTask->XOffsetHistos(0.0); + qaTask->SetMaxNofDrawnEvents(100); + qaTask->SetTotRich(23.7, 30.0); + qaTask->SetTriggerRichHits(eb_TriggerMinNumberRich); + qaTask->SetTriggerTofHits(0); // eb_TriggerMinNumberTof); + qaTask->SetSEDisplayRingOnly(); + run->AddTask(qaTask); + } + // ------------------------------------------------------------------------ + + // ----- Parameter database -------------------------------------------- + std::cout << std::endl << std::endl; + std::cout << "-I- " << myName << ": Set runtime DB" << std::endl; + FairRuntimeDb* rtdb = run->GetRuntimeDb(); + FairParRootFileIo* parIo1 = new FairParRootFileIo(); + FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo(); + FairParRootFileIo* parIo3 = new FairParRootFileIo(); + //parIo1->open(parFileIn.Data(), "READ"); + //rtdb->setFirstInput(parIo1); + parIo2->open(parFileList, "in"); + rtdb->setSecondInput(parIo2); + parIo3->open(parFileOut.Data(), "RECREATE"); + // ------------------------------------------------------------------------ + rtdb->setOutput(parIo3); + rtdb->saveOutput(); + rtdb->print(); + + // ----- Run initialisation ------------------------------------------- + std::cout << std::endl; + std::cout << "-I- " << myName << ": Initialise run" << std::endl; + run->Init(); + + // ------------------------------------------------------------------------ + + + // ----- Start run ---------------------------------------------------- + std::cout << std::endl << std::endl; + std::cout << "-I- " << myName << ": Starting run" << std::endl; + run->Run(0, nTimeslices); + // ------------------------------------------------------------------------ + + + // ----- Finish ------------------------------------------------------- + timer.Stop(); + FairMonitor::GetMonitor()->Print(); + Double_t rtime = timer.RealTime(); + Double_t ctime = timer.CpuTime(); + std::cout << std::endl << std::endl; + std::cout << "Macro finished successfully." << std::endl; + std::cout << "Output file is " << outFile << std::endl; + std::cout << "Parameter file is " << parFileOut << std::endl; + std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << std::endl; + std::cout << std::endl; + // ------------------------------------------------------------------------ + + + // ----- Resource monitoring ------------------------------------------ + // Extract the maximal used memory an add is as Dart measurement + // This line is filtered by CTest and the value send to CDash + FairSystemInfo sysInfo; + Float_t maxMemory = sysInfo.GetMaxMemory(); + std::cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">"; + std::cout << maxMemory; + std::cout << "</DartMeasurement>" << std::endl; + + Float_t cpuUsage = ctime / rtime; + std::cout << "<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">"; + std::cout << cpuUsage; + std::cout << "</DartMeasurement>" << std::endl; + // ------------------------------------------------------------------------ + + + // ----- Function needed for CTest runtime dependency ----------------- + // RemoveGeoManager(); + // ------------------------------------------------------------------------ + + /// --- Screen output for automatic tests + std::cout << " Test passed" << std::endl; + std::cout << " All ok " << std::endl; + + return kTRUE; +} diff --git a/macro/run/CMakeLists.txt b/macro/run/CMakeLists.txt index 3401054dd62f6a89867931ae4558cb5cc1d123a9..e30e0ec8425505c78bc9ce861620ade5675a3c74 100644 --- a/macro/run/CMakeLists.txt +++ b/macro/run/CMakeLists.txt @@ -305,18 +305,28 @@ If(DEFINED ENV{RAW_DATA_PATH} ) GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_unpack_tsa.C ) # Unpackers GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/mcbm2021/check_timing_any.C ) # Check Timing mCBM 2021 GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/mcbm2022/mcbm_event.C ) # Event building mCBM 2022 + GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C ) # Reco + Event building + L1 mCBM 2022 + GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_transport.C) ## Run only if raw data files present: 2021 # =====> Set the timeouts depending on test model (profiling = slow) SET( RAW_DATA_UNPACK_TO 700) # Nightly mode on run4: 298 for run 1588, 525 for 2391, 601 for 2488 SET( RAW_DATA_CHECK_TO 600) # Nightly mode on run4: 562 for run 1588 SET( RAW_DATA_BUILD_TO 250) # Nightly mode on run4: 155 for 2391, 190 for 2488 + SET( RAW_DATA_RECO_TO 2000) # 300 for 1 TS in 2391 and 2488 if(${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile ) Message( STATUS "Profiling model detected, increasing timeout for mCBM 2021 tests with coverage." ) SET( RAW_DATA_UNPACK_TO 800) # Coverage mode: 716 for run 1588 on run4 SET( RAW_DATA_CHECK_TO 800) # Coverage mode: 654 for run 1588 on run4 endif() # ==================================================================== + SET( RECO_EVNTS_NB 20) + if(${CBM_TEST_MODEL} MATCHES MergeRequest OR ${CBM_TEST_MODEL} MATCHES Continuous ) + Message( STATUS "MR or Continuous model detected, decreasing event nb for mCBM 2022 reco tests to single one." ) + SET( RECO_EVNTS_NB 1) + SET( RAW_DATA_RECO_TO 900) # ~380 for 1 TS in 2391 and ~500 in 2488 on run4 + endif() + ForEach(RUN 1588 ) Message( STATUS "Checking if raw data file exists: ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa" ) If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa) @@ -356,6 +366,20 @@ If(DEFINED ENV{RAW_DATA_PATH} ) SET( RAW_DATA_UNPACK_TO 2200) # Coverage mode: 1669 for run 2391, 2085 for run 2488 SET( RAW_DATA_CHECK_TO 300) # Coverage mode: 171 for run 2391, 213 for run 2488 endif() + + + ### Transport run to create geo file + Set(setup mcbm_beam_2022_05_23_nickel) + Set(testname mcbm_geo_${setup}) + Set(fixture_geo_run fixture_done_${testname}) + Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_transport.sh 1 \"${setup}\" \"${CBMROOT_BINARY_DIR}/macro/run/data/${setup}\" \"\" kTRUE) + Set_Tests_Properties(${testname} PROPERTIES + TIMEOUT "600" + PASS_REGULAR_EXPRESSION "Test Passed;All ok" + FIXTURES_REQUIRED run_cleanup + FIXTURES_SETUP ${fixture_geo_run} + ) + # ==================================================================== ForEach(RUN 2391 2488 ) Message( STATUS "Checking if raw data file exists: ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa" ) @@ -386,9 +410,33 @@ If(DEFINED ENV{RAW_DATA_PATH} ) FIXTURES_REQUIRED ${fixture_unpacked_${RUN}} FIXTURES_SETUP ${fixture_event_${RUN}} ) + + ### Raw analysis tests: (event building and) reconstruction => need calibration files!! + Set(testname mcbm_reco_2022_${RUN}) + Set(fixture_reco_${RUN} fixture_done_${testname}) + Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/mcbm2022/mcbm_event_reco_L1.sh ${RUN} ${RECO_EVNTS_NB} + \"${CBMROOT_BINARY_DIR}/macro/run/data/\" \"${CBMROOT_BINARY_DIR}/macro/run/data/\" + -1 kFALSE kTRUE kTRUE kTRUE kTRUE kFALSE kTRUE kTRUE kFALSE kTRUE kTRUE kFALSE kFALSE + \"${CBMROOT_BINARY_DIR}/macro/run/data/${RUN}_first20Ts.digi.root\" + ) + Set_Tests_Properties(${testname} PROPERTIES + TIMEOUT ${RAW_DATA_RECO_TO} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED "${fixture_geo_run};${fixture_event_${RUN}}" + FIXTURES_SETUP ${fixture_reco_${RUN}} + RESOURCE_LOCK mcbmRecoAllCoresBug + ) + + EndIf() # If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa)) EndForEach() # ForEach(RUN 2391 2488 ) EndIf() # If(DEFINED ENV{RAW_DATA_PATH} ) + + + + + ##################### # ============================================================================ diff --git a/reco/detectors/psd/CbmPsdMCbmHitProducer.cxx b/reco/detectors/psd/CbmPsdMCbmHitProducer.cxx index 9d2d823c821945e6b1a3c4cc90ab806730787de0..8bf210be1afc8491f8e5251c3022932c3c191c58 100644 --- a/reco/detectors/psd/CbmPsdMCbmHitProducer.cxx +++ b/reco/detectors/psd/CbmPsdMCbmHitProducer.cxx @@ -39,9 +39,9 @@ InitStatus CbmPsdMCbmHitProducer::Init() FairRootManager* manager = FairRootManager::Instance(); fCbmEvents = dynamic_cast<TClonesArray*>(manager->GetObject("CbmEvent")); - if (fCbmEvents == nullptr) { LOG(info) << ": CbmEvent NOT found \n \n \n"; } + if (fCbmEvents == nullptr) { LOG(info) << GetName() << "::Init() CbmEvent NOT found \n"; } else { - LOG(info) << ": CbmEvent found \n \n \n"; + LOG(info) << GetName() << "::Init() CbmEvent found"; } fDigiMan = CbmDigiManager::Instance(); @@ -67,7 +67,7 @@ void CbmPsdMCbmHitProducer::InitMapping() //TODO change for psd } fPsdMapping.clear(); - + while ( getline (file,line) ) { istringstream iss(line); @@ -80,9 +80,9 @@ void CbmPsdMCbmHitProducer::InitMapping() //TODO change for psd data.fX = stod(results[6]); data.fY = stod(results[7]); data.fZ = 348.; - + data.fX -= 6.3; //Shift by 1Pmt + PmtGap + 1cm - + Int_t adr = ((data.fTrbId << 16) | (data.fChannel & 0x00FF)); // cout << data.fTrbId << " " << data.fChannel << " " << data.fX << " " << data.fY << " " << adr << endl; diff --git a/reco/detectors/rich/CbmRichReconstruction.cxx b/reco/detectors/rich/CbmRichReconstruction.cxx index 00934104992b42096e6ab716c5889e860e962d25..68d2e066fd636d5827e87ead60f220023b675c0e 100644 --- a/reco/detectors/rich/CbmRichReconstruction.cxx +++ b/reco/detectors/rich/CbmRichReconstruction.cxx @@ -69,9 +69,9 @@ InitStatus CbmRichReconstruction::Init() if (nullptr == manager) LOG(fatal) << "CbmRichReconstruction::Init(): FairRootManager is nullptr."; fCbmEvents = dynamic_cast<TClonesArray*>(manager->GetObject("CbmEvent")); - if (fCbmEvents == nullptr) { LOG(info) << ": CbmEvent NOT found \n \n \n"; } + if (fCbmEvents == nullptr) { LOG(info) << GetName() << "::Init() CbmEvent NOT found \n"; } else { - LOG(info) << ": CbmEvent found \n \n \n"; + LOG(info) << GetName() << "::Init() CbmEvent found"; } if (fRunExtrapolation) { @@ -201,7 +201,7 @@ void CbmRichReconstruction::InitFinder() fRingFinder = new CbmL1RichENNRingFinder(0); } else if ((fFinderName == "enn_parallel")) { - + fRingFinder = new CbmL1RichENNRingFinderParallel(0); } else if (fFinderName == "hough_prototype") { fRingFinder = new CbmRichProtRingFinderHough(); diff --git a/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.cxx b/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.cxx index 3c6d919f16fac19c36943dfc97ab7186df349754..5f57e281184b2778cadd79701e1106277c10a7b9 100644 --- a/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.cxx +++ b/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.cxx @@ -47,9 +47,9 @@ InitStatus CbmRichMCbmHitProducer::Init() FairRootManager* manager = FairRootManager::Instance(); fCbmEvents = dynamic_cast<TClonesArray*>(manager->GetObject("CbmEvent")); - if (fCbmEvents == nullptr) { LOG(info) << ": CbmEvent NOT found \n \n \n"; } + if (fCbmEvents == nullptr) { LOG(info) << GetName() << "::Init() CbmEvent NOT found \n"; } else { - LOG(info) << ": CbmEvent found \n \n \n"; + LOG(info) << GetName() << "::Init() CbmEvent found"; } fDigiMan = CbmDigiManager::Instance(); @@ -290,7 +290,9 @@ bool CbmRichMCbmHitProducer::RestrictToAerogelAccDec2019(Double_t x, Double_t y) void CbmRichMCbmHitProducer::read_ICD(std::array<Double_t, 2304>& ICD_offsets, unsigned int iteration) { std::string line; - std::ifstream icd_file(Form("icd_offset_it_%u.data", iteration)); + std::string filename = ("" == fIcdFilenameBase ? "icd_offset_it" : fIcdFilenameBase); + filename += Form("_%u.data", iteration); + std::ifstream icd_file(filename); unsigned int lineCnt = 0; if (icd_file.is_open()) { while (getline(icd_file, line)) { @@ -299,17 +301,17 @@ void CbmRichMCbmHitProducer::read_ICD(std::array<Double_t, 2304>& ICD_offsets, u unsigned int addr = 0; Double_t value; if (!(iss >> addr >> value)) { - LOG(info) << "A Problem accured in line " << lineCnt << "\n"; + LOG(info) << "A Problem accured in line " << lineCnt; break; } // error lineCnt++; ICD_offsets.at(addr) += value; } icd_file.close(); - LOG(info) << "Loaded inter channel delay file icd_offset_it_" << iteration << ".data for RICH.\n"; + LOG(info) << "Loaded inter channel delay file " << filename << " for RICH."; } else { - LOG(info) << "Unable to open inter channel delay file icd_offset_it_" << iteration << ".data\n"; + LOG(info) << "Unable to open inter channel delay file " << filename; } } diff --git a/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.h b/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.h index fa48567ff2b679e1a1854fe80f6413628d0780f9..c51a7a98ac69ef14c38152d8fe1e2c4ceed13a8f 100644 --- a/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.h +++ b/reco/detectors/rich/mcbm/CbmRichMCbmHitProducer.h @@ -76,6 +76,12 @@ public: void SetMappingFile(const std::string& mappingFile) { fMappingFile = mappingFile; } + /** + * Set ICD base-file path. + */ + void SetIcdFilenameBase(const std::string& icdFileBase) { fIcdFilenameBase = icdFileBase; } + + /** * Set ToT Limits. */ @@ -143,6 +149,7 @@ private: std::string fMappingFile; + std::string fIcdFilenameBase = ""; std::array<Double_t, 2304> fICD_offset_read; void InitMapping(); diff --git a/reco/detectors/tof/CbmTofEventClusterizer.cxx b/reco/detectors/tof/CbmTofEventClusterizer.cxx index 435bae290faeb6ec20e039c92d731fdb371ca49e..22b3f682d0cefc44c14173ec5331c258953f2695 100644 --- a/reco/detectors/tof/CbmTofEventClusterizer.cxx +++ b/reco/detectors/tof/CbmTofEventClusterizer.cxx @@ -373,6 +373,8 @@ void CbmTofEventClusterizer::Exec(Option_t* option) LOG(info) << "New timeslice " << iNbTs << " with " << fEventsColl->GetEntriesFast() << " events, " << fDigiMan->GetNofDigis(ECbmModuleId::kTof) << " TOF digis + " << fDigiMan->GetNofDigis(ECbmModuleId::kT0) << " T0 digis "; + fiNbSkip1 = 0; + fiNbSkip2 = 0; iNbTs++; fiHitStart = 0; Int_t iNbHits = 0; @@ -467,6 +469,14 @@ void CbmTofEventClusterizer::Exec(Option_t* option) fTofHitsColl->Clear("C"); fTofDigiMatchColl->Delete(); //Clear("C"); } + if (0 < fiNbSkip1) { + // + LOG(info) << "Total Skip1 Digi nb " << fiNbSkip1; + } + if (0 < fiNbSkip2) { + // + LOG(info) << "Total Skip2 Digi nb " << fiNbSkip2; + } } else { // fTofDigisColl=fTofRawDigisColl; @@ -4793,6 +4803,7 @@ Bool_t CbmTofEventClusterizer::BuildClusters() // Then loop over the digis array and store the Digis in separate vectors for // each RPC modules + // iNbTofDigi = fTofCalDigisColl->GetEntriesFast(); iNbTofDigi = fTofCalDigiVec->size(); for (Int_t iDigInd = 0; iDigInd < iNbTofDigi; iDigInd++) { @@ -4815,11 +4826,14 @@ Bool_t CbmTofEventClusterizer::BuildClusters() .push_back(iDigInd); } else { - LOG(info) << "Skip2 Digi " - << " Type " << pDigi->GetType() << " " << fDigiBdfPar->GetNbSmTypes() << " Sm " << pDigi->GetSm() - << " " << fDigiBdfPar->GetNbSm(pDigi->GetType()) << " Rpc " << pDigi->GetRpc() << " " - << fDigiBdfPar->GetNbRpc(pDigi->GetType()) << " Ch " << pDigi->GetChannel() << " " - << fDigiBdfPar->GetNbChan(pDigi->GetType(), 0); + if (fiNbSkip2 < 20) { + LOG(info) << "Skip2 Digi " + << " Type " << pDigi->GetType() << " " << fDigiBdfPar->GetNbSmTypes() << " Sm " << pDigi->GetSm() + << " " << fDigiBdfPar->GetNbSm(pDigi->GetType()) << " Rpc " << pDigi->GetRpc() << " " + << fDigiBdfPar->GetNbRpc(pDigi->GetType()) << " Ch " << pDigi->GetChannel() << " " + << fDigiBdfPar->GetNbChan(pDigi->GetType(), 0); + } + ++fiNbSkip2; } } // for( Int_t iDigInd = 0; iDigInd < nTofDigi; iDigInd++ ) @@ -6230,11 +6244,14 @@ Bool_t CbmTofEventClusterizer::CalibRawDigis() } } else { - LOG(info) << "Skip1 Digi " - << " Type " << pDigi->GetType() << " " << fDigiBdfPar->GetNbSmTypes() << " Sm " << pDigi->GetSm() << " " - << fDigiBdfPar->GetNbSm(pDigi->GetType()) << " Rpc " << pDigi->GetRpc() << " " - << fDigiBdfPar->GetNbRpc(pDigi->GetType()) << " Ch " << pDigi->GetChannel() << " " - << fDigiBdfPar->GetNbChan(pDigi->GetType(), 0); + if (fiNbSkip1 < 20) { + LOG(info) << "Skip1 Digi " + << " Type " << pDigi->GetType() << " " << fDigiBdfPar->GetNbSmTypes() << " Sm " << pDigi->GetSm() + << " " << fDigiBdfPar->GetNbSm(pDigi->GetType()) << " Rpc " << pDigi->GetRpc() << " " + << fDigiBdfPar->GetNbRpc(pDigi->GetType()) << " Ch " << pDigi->GetChannel() << " " + << fDigiBdfPar->GetNbChan(pDigi->GetType(), 0); + } + ++fiNbSkip1; } if (0) // (bAddBeamCounterSideDigi) diff --git a/reco/detectors/tof/CbmTofEventClusterizer.h b/reco/detectors/tof/CbmTofEventClusterizer.h index 97fa8edeb7ce3a9c547dca586dad816ac664dafc..5c754987155808c58fb680cb312c063c8f4a2235 100644 --- a/reco/detectors/tof/CbmTofEventClusterizer.h +++ b/reco/detectors/tof/CbmTofEventClusterizer.h @@ -271,6 +271,8 @@ private: // Generic Int_t fVerbose; + Int_t fiNbSkip1 = 0; + Int_t fiNbSkip2 = 0; // Intermediate storage variables