diff --git a/MQ/hitbuilder/CbmDeviceHitBuilderTof.cxx b/MQ/hitbuilder/CbmDeviceHitBuilderTof.cxx index 466a5c4bd2d48c75231babf88c1c49f3c614ba2a..4c258235412df811d8a1d1eacce727ae79302c17 100644 --- a/MQ/hitbuilder/CbmDeviceHitBuilderTof.cxx +++ b/MQ/hitbuilder/CbmDeviceHitBuilderTof.cxx @@ -2077,9 +2077,10 @@ Bool_t CbmDeviceHitBuilderTof::InspectRawDigis() { fChannelInfo = fDigiPar->GetCell(iChId); if (NULL == fChannelInfo) { LOG(warn) << Form("Invalid ChannelInfo for 0x%08x, 0x%08x", - iChId, pDigi2Min->GetAddress()) - << " TSRC " << pDigi->GetType() - <<pDigi->GetSm() <<pDigi->GetRpc()<<pDigi->GetChannel(); + iChId, + pDigi2Min->GetAddress()) + << " TSRC " << pDigi->GetType() << pDigi->GetSm() + << pDigi->GetRpc() << pDigi->GetChannel(); continue; } if (fDigiBdfPar->GetSigVel( @@ -4362,12 +4363,12 @@ Bool_t CbmDeviceHitBuilderTof::FillHistos() { Int_t iS0 = pDig0->GetSide(); Int_t iS1 = pDig1->GetSide(); if (iCh0 != iCh1 || iS0 == iS1) { - LOG(error) << Form( - " MT2 for Tofhit %d in iDetIndx %d, Ch %d from %3.0f strips: ", - iHitInd, - iDetIndx, - iCh, - dNstrips) + LOG(error) << Form(" MT2 for Tofhit %d in iDetIndx %d, Ch %d from " + "%3.0f strips: ", + iHitInd, + iDetIndx, + iCh, + dNstrips) << Form(" Dig0: Ind %d, Ch %d, Side %d, T: %6.1f ", iDigInd0, iCh0, diff --git a/MQ/unpacker/CbmDeviceUnpackTofMcbm2018.cxx b/MQ/unpacker/CbmDeviceUnpackTofMcbm2018.cxx index 345da0983d1de1f40b673301c1943f42ac7578d2..298665fcf0b917399678c1b4163753d32218be7b 100644 --- a/MQ/unpacker/CbmDeviceUnpackTofMcbm2018.cxx +++ b/MQ/unpacker/CbmDeviceUnpackTofMcbm2018.cxx @@ -205,7 +205,7 @@ void CbmDeviceUnpackTofMcbm2018::InitTask() try { } break; - case 4: + case 4: case 9: // HD 2-RPC boxes for (Int_t iRpc = 0; iRpc < 2; iRpc++) { Int_t iAddr = CbmTofAddress::GetUniqueAddress( diff --git a/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoTof.cxx b/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoTof.cxx index 86791b3cd3f9db4046b1c08e845fbaad193dd80a..c58ea33c58bfe91d8b79e964d8b4997ed0e32b5e 100644 --- a/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoTof.cxx +++ b/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoTof.cxx @@ -251,6 +251,8 @@ Bool_t CbmMcbm2018UnpackerAlgoTof::InitParameters() { case 1: // STAR eTOF modules if (fviRpcSide[iGbtx] < 2) { // mTof modules + LOG(info) << "Start eTOF module side " << fviRpcSide[iGbtx] << " at " + << iCh; const Int_t RpcMap[3] = {0, 1, 2}; for (Int_t iRpc = 0; iRpc < fviNrOfRpc[iGbtx]; iRpc++) { Int_t iStrMax = 32; @@ -370,6 +372,8 @@ Bool_t CbmMcbm2018UnpackerAlgoTof::InitParameters() { LOG(info) << " Map end ceramics box at GBTX - iCh = " << iCh; break; + case 4: // intended fallthrough + [[fallthrough]]; case 9: // Star2 boxes { LOG(info) << " Map Star2 box at GBTX - iCh = " << iCh; @@ -452,10 +456,17 @@ Bool_t CbmMcbm2018UnpackerAlgoTof::InitParameters() { case 0: iRpcMap = 0; break; case 1: iRpcMap = 1; break; } - if (iFeet > 2) + if (iFeet % 2 == 1) iModuleIdMap = 1; else iModuleIdMap = 0; + + switch (iFeet) { + case 0: + case 3: iSideMap = 0; break; + case 1: + case 2: iSideMap = 1; break; + } } break; } if (iSideMap > -1) diff --git a/macro/beamtime/camera_restore.C b/macro/beamtime/camera_restore.C old mode 100755 new mode 100644 index 48fa4f808d4176069f9204665377fd9e002f5536..558182887eb6e5e6bd05befdfc06760191d7cab8 --- a/macro/beamtime/camera_restore.C +++ b/macro/beamtime/camera_restore.C @@ -6,21 +6,18 @@ void camera_restore(const char* fname, int mode = 0) } */ -void writeCurrentCamera(const char* fname) -{ +void writeCurrentCamera(const char* fname) { TGLCamera& c = gEve->GetDefaultGLViewer()->CurrentCamera(); - TFile* f = TFile::Open(fname, "RECREATE"); + TFile* f = TFile::Open(fname, "RECREATE"); c.Write(); f->Close(); } -void readCurrentCamera(const char* fname) -{ +void readCurrentCamera(const char* fname) { TGLCamera& c = gEve->GetDefaultGLViewer()->CurrentCamera(); - TFile* f = TFile::Open(fname, "READ"); - if (!f) - return; + TFile* f = TFile::Open(fname, "READ"); + if (!f) return; if (f->GetKey(c.ClassName())) { f->GetKey(c.ClassName())->Read(&c); diff --git a/macro/beamtime/mcbm2020/ana_trks_eval.C b/macro/beamtime/mcbm2020/ana_trks_eval.C index a06675806f0a137e410c3019e53f5ce88d5aaf33..051803ef97559d48974b90712646bb74bab8a569 100644 --- a/macro/beamtime/mcbm2020/ana_trks_eval.C +++ b/macro/beamtime/mcbm2020/ana_trks_eval.C @@ -219,7 +219,7 @@ void ana_trks_eval(Int_t nEvents = 10000, 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->SetSIGLIMMOD(5.); // max deviation for last hit Int_t iMinNofHits = -1; Int_t iNStations = 0; @@ -484,7 +484,7 @@ void ana_trks_eval(Int_t nEvents = 10000, tofFindTracks->SetStation(2, 0, 0, 2); tofFindTracks->SetStation(3, 0, 1, 2); break; - + case 30: iMinNofHits = 3; iNStations = 4; @@ -493,7 +493,7 @@ void ana_trks_eval(Int_t nEvents = 10000, tofFindTracks->SetStation(1, 0, 0, 0); tofFindTracks->SetStation(2, 5, 0, 0); tofFindTracks->SetStation(3, 0, 1, 0); - break; + break; case 31: iMinNofHits = 3; @@ -504,7 +504,7 @@ void ana_trks_eval(Int_t nEvents = 10000, tofFindTracks->SetStation(2, 5, 0, 0); tofFindTracks->SetStation(3, 0, 1, 1); break; - + case 32: iMinNofHits = 3; iNStations = 4; @@ -513,8 +513,8 @@ void ana_trks_eval(Int_t nEvents = 10000, tofFindTracks->SetStation(1, 0, 0, 2); tofFindTracks->SetStation(2, 5, 0, 0); tofFindTracks->SetStation(3, 0, 1, 2); - break; - + break; + case 33: iMinNofHits = 3; iNStations = 4; @@ -523,8 +523,8 @@ void ana_trks_eval(Int_t nEvents = 10000, tofFindTracks->SetStation(1, 0, 0, 3); tofFindTracks->SetStation(2, 5, 0, 0); tofFindTracks->SetStation(3, 0, 1, 3); - break; - + break; + case 34: iMinNofHits = 3; iNStations = 4; @@ -533,7 +533,7 @@ void ana_trks_eval(Int_t nEvents = 10000, tofFindTracks->SetStation(1, 0, 0, 4); tofFindTracks->SetStation(2, 5, 0, 0); tofFindTracks->SetStation(3, 0, 1, 4); - break; + break; default: cout << "Tracking setup " << iTrackingSetup << " not implemented " diff --git a/macro/beamtime/pl_trk_cal_walk.C b/macro/beamtime/pl_trk_cal_walk.C new file mode 100644 index 0000000000000000000000000000000000000000..4a03355e184cc416722fdb0ddda8cd9793e9c3cc --- /dev/null +++ b/macro/beamtime/pl_trk_cal_walk.C @@ -0,0 +1,38 @@ +void pl_trk_cal_walk(Int_t iType = 0, + Int_t iSm = 0, + Int_t iRpc = 0, + Int_t iSide = 0) { + // TCanvas *can = new TCanvas("can22","can22"); + // can->Divide(2,2); + TCanvas* can = new TCanvas("can", "can", 50, 0, 800, 800); + can->Divide(4, 8); + gPad->SetFillColor(0); + gStyle->SetPalette(1); + gStyle->SetOptStat(kTRUE); + + gROOT->cd(); + gROOT->SetDirLevel(1); + + TH1* h; + TH1* h1; + TH2* h2; + Int_t iCan = 1; + for (Int_t iCh = 0; iCh < 32; iCh++) { + if (iCan == 36) iCan = 1; + can->cd(iCan++); + gROOT->cd(); + TString hname = Form( + "cal_SmT%d_sm%03d_rpc%03d_Ch%03d_S%d_Walk", iType, iSm, iRpc, iCh, iSide); + h2 = (TH2*) gROOT->FindObjectAny(hname); + if (h2 != NULL) { + h2->Draw("colz"); + gPad->SetLogz(); + // gPad->SetGridx(); + // gPad->SetGridy(); + } else { + cout << hname << " not found" << endl; + } + } + + can->SaveAs(Form("pl_trk_walk_%d%d%d_%d.pdf", iType, iSm, iRpc, iSide)); +}