Skip to content

Commit 644d159

Browse files
committed
ITS Efficiency study: Added excluded chips for 2024 run
1 parent 839dfe2 commit 644d159

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

Detectors/ITSMFT/ITS/postprocessing/studies/include/ITSStudies/Efficiency.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ float mDCACutsXY[3][2] = {{dcaXY[0] - dcaCut * sigmaDcaXY[0], dcaXY[0] + dcaCut*
4949
float mDCACutsZ[3][2] = {{dcaZ[0] - dcaCut * sigmaDcaZ[0], dcaZ[0] + dcaCut* sigmaDcaZ[0]}, {dcaZ[1] - dcaCut * sigmaDcaZ[1], dcaZ[1] + dcaCut* sigmaDcaZ[1]}, {dcaZ[2] - dcaCut * sigmaDcaZ[2], dcaZ[2] + dcaCut* sigmaDcaZ[2]}};
5050

5151
/// excluding bad chips in MC that are not present in data: to be checked based on the anchoring
52-
std::vector<int> mExcludedChipMC = {66, 67, 68, 75, 76, 77, 84, 85, 86, 93, 94, 95, 102, 103, 104, 265, 266, 267, 274, 275, 276, 283, 284, 285, 413, 414, 415, 422, 423, 424, 431, 432, 433};
52+
const std::unordered_set<int> mExcludedChipMC = {66, 67, 68, 75, 76, 77, 84, 85, 86, 93, 94, 95, 102, 103, 104, 265, 266, 267, 274, 275, 276, 283, 284, 285, 413, 414, 415, 422, 423, 424, 431, 432, 433};
5353

5454
} // namespace study
5555
} // namespace its

Detectors/ITSMFT/ITS/postprocessing/studies/src/Efficiency.cxx

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <TAttMarker.h>
4747
#include <TArrayD.h>
4848
#include <numeric>
49+
#include <unordered_set>
4950

5051
#define NLAYERS 3
5152

@@ -291,6 +292,9 @@ class EfficiencyStudy : public Task
291292
int nDuplicatedClusters[NLAYERS] = {0};
292293
int nTracksSelected[NLAYERS] = {0}; // denominator fot the efficiency calculation
293294

295+
int totNClusters = 0;
296+
int nDuplClusters = 0;
297+
294298
std::unique_ptr<TH1D> IPOriginalxy[NLAYERS];
295299
std::unique_ptr<TH1D> IPOriginalz[NLAYERS];
296300

@@ -2191,8 +2195,8 @@ void EfficiencyStudy::getEfficiency(bool isMC)
21912195
xbins[i] = ptcutl * std::exp(i * a);
21922196
}
21932197

2194-
int totNClusters;
2195-
int nDuplClusters;
2198+
// int totNClusters = 0;
2199+
// int nDuplClusters = 0;
21962200

21972201
for (unsigned int iROF = 0; iROF < mTracksROFRecords.size(); iROF++) { // loop on ROFRecords array
21982202

@@ -2292,11 +2296,18 @@ void EfficiencyStudy::getEfficiency(bool isMC)
22922296
}
22932297

22942298
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()) {
22962300
continue;
22972301
}
22982302
}
22992303

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+
23002311
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)
23012312
continue;
23022313
}
@@ -2487,6 +2498,12 @@ void EfficiencyStudy::process(o2::globaltracking::RecoContainer& recoData)
24872498

24882499
o2::base::GRPGeomHelper::instance().getGRPMagField()->print();
24892500

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+
24902507
if (mUseMC) {
24912508
// getDCAClusterTrackMC();
24922509
studyDCAcutsMC();
@@ -2588,23 +2605,23 @@ void EfficiencyStudy::endOfStream(EndOfStreamContext& ec)
25882605
mOutFile->cd("EfficiencyFinal/");
25892606
TList listNum;
25902607
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");
25932610

25942611
TList listNumColEta;
25952612
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");
25982615

25992616
TList listNumRowPhi;
26002617
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");
26032620

26042621
TList listNumRowCol;
26052622
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");
26082625

26092626
std::unique_ptr<TEfficiency> effLayers = std::make_unique<TEfficiency>(*numLayers, *denLayers);
26102627
effLayers->SetName("effLayers");

0 commit comments

Comments
 (0)