diff --git a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C index 367a2bdddfa0d51bf0af7bbfc9f4599e3d932e95..3977aacb5f76ca6d7c234d5f99efd6d12e56ec1f 100644 --- a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C +++ b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C @@ -479,7 +479,9 @@ Bool_t mcbm_event_reco_L1(UInt_t uRunId = 2391, if (bRICH && geoSetup->IsActive(ECbmModuleId::kRich)) { // ----- Local reconstruction of RICH Hits ------------------------------ CbmRichMCbmHitProducer* hitProd = new CbmRichMCbmHitProducer(); - hitProd->SetMappingFile("mRICH_Mapping_vert_20190318_elView.geo"); + 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(); 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();