|
46 | 46 | #include <TAttMarker.h> |
47 | 47 | #include <TArrayD.h> |
48 | 48 | #include <numeric> |
| 49 | +#include <unordered_set> |
49 | 50 |
|
50 | 51 | #define NLAYERS 3 |
51 | 52 |
|
@@ -291,6 +292,9 @@ class EfficiencyStudy : public Task |
291 | 292 | int nDuplicatedClusters[NLAYERS] = {0}; |
292 | 293 | int nTracksSelected[NLAYERS] = {0}; // denominator fot the efficiency calculation |
293 | 294 |
|
| 295 | + int totNClusters = 0; |
| 296 | + int nDuplClusters = 0; |
| 297 | + |
294 | 298 | std::unique_ptr<TH1D> IPOriginalxy[NLAYERS]; |
295 | 299 | std::unique_ptr<TH1D> IPOriginalz[NLAYERS]; |
296 | 300 |
|
@@ -2191,8 +2195,8 @@ void EfficiencyStudy::getEfficiency(bool isMC) |
2191 | 2195 | xbins[i] = ptcutl * std::exp(i * a); |
2192 | 2196 | } |
2193 | 2197 |
|
2194 | | - int totNClusters; |
2195 | | - int nDuplClusters; |
| 2198 | + // int totNClusters = 0; |
| 2199 | + // int nDuplClusters = 0; |
2196 | 2200 |
|
2197 | 2201 | for (unsigned int iROF = 0; iROF < mTracksROFRecords.size(); iROF++) { // loop on ROFRecords array |
2198 | 2202 |
|
@@ -2292,11 +2296,18 @@ void EfficiencyStudy::getEfficiency(bool isMC) |
2292 | 2296 | } |
2293 | 2297 |
|
2294 | 2298 | if (mUseMC) { //// excluding known bad chips in MC which are not bad in data --- to be checked based on the anchored run |
2295 | | - if (std::find(mExcludedChipMC.begin(), mExcludedChipMC.end(), clusOriginal.getChipID()) != mExcludedChipMC.end()) { |
| 2299 | + if (auto search = mExcludedChipMC.find(clusOriginal.getChipID()); search != mExcludedChipMC.end()) { |
2296 | 2300 | continue; |
2297 | 2301 | } |
2298 | 2302 | } |
2299 | 2303 |
|
| 2304 | + // /// to be excluded for 2024 runs, chip 309 was missing |
| 2305 | + // const std::unordered_set<int> mExcludedChipData = {299, 300, 301, 317, 318, 319}; |
| 2306 | + // if (auto search = mExcludedChipData.find(clusOriginal.getChipID()); search != mExcludedChipData.end()) { |
| 2307 | + // continue; |
| 2308 | + // } |
| 2309 | + |
| 2310 | + |
2300 | 2311 | if (clusOriginal.getCol() < 160 || clusOriginal.getCol() > 870) { /// excluding the gap between two chips in the same stave (comment to obtain the plot efficiency col vs eta) |
2301 | 2312 | continue; |
2302 | 2313 | } |
@@ -2487,6 +2498,12 @@ void EfficiencyStudy::process(o2::globaltracking::RecoContainer& recoData) |
2487 | 2498 |
|
2488 | 2499 | o2::base::GRPGeomHelper::instance().getGRPMagField()->print(); |
2489 | 2500 |
|
| 2501 | + auto bz = o2::base::Propagator::Instance()->getNominalBz(); |
| 2502 | + std::cout<<"Magnetic field: "<<bz<<std::endl; |
| 2503 | + |
| 2504 | + // LOG(info) << ">>>>>>>>>>>> Magnetic field: " << o2::base::Propagator::Instance()->getNominalBz();; |
| 2505 | + |
| 2506 | + |
2490 | 2507 | if (mUseMC) { |
2491 | 2508 | // getDCAClusterTrackMC(); |
2492 | 2509 | studyDCAcutsMC(); |
@@ -2588,23 +2605,23 @@ void EfficiencyStudy::endOfStream(EndOfStreamContext& ec) |
2588 | 2605 | mOutFile->cd("EfficiencyFinal/"); |
2589 | 2606 | TList listNum; |
2590 | 2607 | TList listDen; |
2591 | | - auto numPhiAll = std::unique_ptr<TH1D>((TH1D*)numPhi[0]->Clone("numPhiAll")); |
2592 | | - auto denPhiAll = std::unique_ptr<TH1D>((TH1D*)denPhi[0]->Clone("denPhiAll")); |
| 2608 | + TH1D* numPhiAll = (TH1D*)numPhi[0]->Clone("numPhiAll"); |
| 2609 | + TH1D* denPhiAll = (TH1D*)denPhi[0]->Clone("denPhiAll"); |
2593 | 2610 |
|
2594 | 2611 | TList listNumColEta; |
2595 | 2612 | TList listDenColEta; |
2596 | | - auto numColEtaAll = std::unique_ptr<TH1D>((TH1D*)mNumColEta[0]->Clone("numColEtaAll")); |
2597 | | - auto denColEtaAll = std::unique_ptr<TH1D>((TH1D*)mDenColEta[0]->Clone("denColEtaAll")); |
| 2613 | + TH1D* numColEtaAll = (TH1D*)mNumColEta[0]->Clone("numColEtaAll"); |
| 2614 | + TH1D* denColEtaAll = (TH1D*)mDenColEta[0]->Clone("denColEtaAll"); |
2598 | 2615 |
|
2599 | 2616 | TList listNumRowPhi; |
2600 | 2617 | TList listDenRowPhi; |
2601 | | - auto numRowPhiAll = std::unique_ptr<TH1D>((TH1D*)mNumRowPhi[0]->Clone("numRowPhiAll")); |
2602 | | - auto denRowPhiAll = std::unique_ptr<TH1D>((TH1D*)mDenRowPhi[0]->Clone("denRowPhiAll")); |
| 2618 | + TH1D* numRowPhiAll = (TH1D*)mNumRowPhi[0]->Clone("numRowPhiAll"); |
| 2619 | + TH1D* denRowPhiAll = (TH1D*)mDenRowPhi[0]->Clone("denRowPhiAll"); |
2603 | 2620 |
|
2604 | 2621 | TList listNumRowCol; |
2605 | 2622 | TList listDenRowCol; |
2606 | | - auto numRowColAll = std::unique_ptr<TH1D>((TH1D*)mNumRowCol[0]->Clone("numRowColAll")); |
2607 | | - auto denRowColAll = std::unique_ptr<TH1D>((TH1D*)mDenRowCol[0]->Clone("denRowColAll")); |
| 2623 | + TH1D* numRowColAll = (TH1D*)mNumRowCol[0]->Clone("numRowColAll"); |
| 2624 | + TH1D* denRowColAll = (TH1D*)mDenRowCol[0]->Clone("denRowColAll"); |
2608 | 2625 |
|
2609 | 2626 | std::unique_ptr<TEfficiency> effLayers = std::make_unique<TEfficiency>(*numLayers, *denLayers); |
2610 | 2627 | effLayers->SetName("effLayers"); |
|
0 commit comments