Skip to content

Commit eb1c7c1

Browse files
author
Lucia Anna Tarasovicova
committed
small fix
1 parent 92d4242 commit eb1c7c1

1 file changed

Lines changed: 53 additions & 27 deletions

File tree

PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,19 @@
1818
#include "Framework/runDataProcessing.h"
1919
#include "Framework/AnalysisTask.h"
2020
#include "Framework/AnalysisDataModel.h"
21-
#include "Framework/ASoAHelpers.h"
2221
#include "Framework/O2DatabasePDGPlugin.h"
23-
#include "ReconstructionDataFormats/Track.h"
2422
#include "Common/Core/RecoDecay.h"
25-
#include "Common/Core/trackUtilities.h"
2623
#include "Common/CCDB/ctpRateFetcher.h"
2724
#include "PWGLF/DataModel/LFStrangenessTables.h"
2825
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
29-
#include "Common/Core/TrackSelection.h"
30-
#include "Common/DataModel/TrackSelectionTables.h"
31-
#include "Common/DataModel/EventSelection.h"
32-
#include "Common/DataModel/Centrality.h"
33-
#include "Common/DataModel/PIDResponse.h"
3426
#include "Framework/StaticFor.h"
3527

36-
#include "Framework/ConfigParamSpec.h"
3728
#include "Common/CCDB/EventSelectionParams.h"
3829
#include "Common/CCDB/TriggerAliases.h"
3930
#include "CCDB/BasicCCDBManager.h"
40-
#include "CommonConstants/LHCConstants.h"
4131
#include "Framework/HistogramRegistry.h"
42-
#include "DataFormatsFT0/Digit.h"
43-
#include "DataFormatsParameters/GRPLHCIFData.h"
44-
#include "DataFormatsParameters/GRPECSObject.h"
45-
#include "ITSMFTBase/DPLAlpideParam.h"
46-
#include "MetadataHelper.h"
47-
#include "DataFormatsParameters/AggregatedRunInfo.h"
32+
#include <Framework/Configurable.h>
33+
#include <Framework/HistogramSpec.h>
4834

4935
#include <TFile.h>
5036
#include <TH2F.h>
@@ -99,6 +85,7 @@ struct Derivedcascadeanalysis {
9985
Configurable<bool> doOccupancyCheck{"doOccupancyCheck", true, ""};
10086
Configurable<bool> doIRCheck{"doIRCheck", true, ""};
10187
Configurable<bool> doITSTPCmatchingCheck{"doITSTPCmatchingCheck", true, "fill histogram for ITS-TPC matching check"};
88+
Configurable<bool> doITSclusterCheck{"doITSclusterCheck", false, "fill histograms with number of ITS clusters, enable only is ITS only tracks used"};
10289
} qaFlags;
10390

10491
struct : ConfigurableGroup {
@@ -191,6 +178,8 @@ struct Derivedcascadeanalysis {
191178
Configurable<bool> doAtLeastOneTrackAB{"doAtLeastOneTrackAB", false, "require that at least one of the daughter tracks is from Afterburner"};
192179
Configurable<bool> doBachelorITSTracking{"doBachelorITSTracking", false, "require that the bachelor track is from the ITS tracking"};
193180
Configurable<bool> doAllTracksMinITSClusters{"doAllTracksMinITSClusters", false, "require that all daughter tracks have minimal ITS hits"};
181+
Configurable<bool> useBachelorITSStandAlone{"useBachelorITSStandAlone",false, "if enabled, the bachelor track is required to be ITS only track"};
182+
Configurable<bool> useMesonDaughterITSStandAlone{"useMesonDaughterITSStandAlone",false, "if enabled, the meson daughter track is required to be ITS only track"};
194183
} candidateSelectionFlags;
195184

196185
struct : ConfigurableGroup {
@@ -236,6 +225,7 @@ struct Derivedcascadeanalysis {
236225
Configurable<float> maxRapCut{"maxRapCut", 0.155, "maximal rapidity acceptance in case of p--o"};
237226
Configurable<float> etaDauCut{"etaDauCut", 0.8, "Pseudorapidity acceptance of the cascade daughters"};
238227
Configurable<int> minITSclusters{"minITSclusters", 3, "minimal number of ITS hits for the daughter tracks"};
228+
Configurable<int> maxTPCCrossedRows{"maxTPCCrossedRows",1,"maximal number of TPC crossed rows is ITS only tracks are requierd"};
239229
} candidateSelectionValues;
240230

241231
o2::ccdb::CcdbApi ccdbApi;
@@ -330,9 +320,13 @@ struct Derivedcascadeanalysis {
330320
histos.add("hEventGlobalTracksVsCentralityBefCuts", "hEventGlobalTracksVsCentralityBefCuts", kTH2F, {{100, 0, 100}, {2500, 0, 2500}});
331321
}
332322

333-
histos.add("hCandidate", "hCandidate", HistType::kTH1D, {{22, -0.5, 21.5}});
334-
histos.add("hCutValue", "hCutValue", HistType::kTH2D, {{22, -0.5, 21.5}, {300, 0, 3.1}});
323+
histos.add("hCandidate", "hCandidate", HistType::kTH1D, {{24, -0.5, 23.5}});
324+
histos.add("hCutValue", "hCutValue", HistType::kTH2D, {{24, -0.5, 23.5}, {300, 0, 3.1}});
335325

326+
if(qaFlags.doITSclusterCheck){
327+
histos.add("hBachelorITSclusters","hBachelorITSclusters", HistType::kTH1F, {{7,-0.5,6.6}});
328+
histos.add("hMesonDaughterITSclusters","hMesonDaughterITSclusters", HistType::kTH1F, {{7,-0.5,6.6}});
329+
}
336330
if (qaFlags.doFillNsigmaTPCHistProton) {
337331
histos.add("hNsigmaProton", "hNsigmaProton", HistType::kTH3D, {{280, -7, 7}, {nPtBinsForNsigmaTPC, 0, 6}, {100, 0, 100}});
338332
histos.add("hNsigmaProtonNeg", "hNsigmaProtonNeg", HistType::kTH3D, {{280, -7, 7}, {nPtBinsForNsigmaTPC, 0, 6}, {100, 0, 100}});
@@ -359,7 +353,7 @@ struct Derivedcascadeanalysis {
359353
histos.add("hNsigmaTOFBachelorKaon", "", HistType::kTH3D, {{70, -7, 7}, {100, 0, 10}, {100, 0, 100}});
360354
}
361355

362-
TString cutLabel[22] = {"All", "MassWin", "y", "DCACascDau", "DCAV0Dau", "rCasc", "rCascMax", "rV0", "rV0Max", "LambdaMass", "Bach-baryon", "V0CosPA", "CompDecayMass", "DCADauToPV", "EtaDau", "CascCosPA", "DCAV0ToPV", "nSigmaTPCV0Dau", "NTPCrows", "OOBRej", "nSigmaTPCbachelor", "ctau"};
356+
TString cutLabel[24] = {"All", "MassWin", "y", "DCACascDau", "DCAV0Dau", "rCasc", "rCascMax", "rV0", "rV0Max", "LambdaMass", "Bach-baryon", "V0CosPA", "CompDecayMass", "DCADauToPV", "EtaDau", "CascCosPA", "DCAV0ToPV", "nSigmaTPCV0Dau", "NTPCrows", "OOBRej", "nSigmaTPCbachelor", "ctau", "bachelor ITS only","meson ITS only"};
363357
for (int i = 1; i <= histos.get<TH1>(HIST("hCandidate"))->GetNbinsX(); i++) {
364358
histos.get<TH1>(HIST("hCandidate"))->GetXaxis()->SetBinLabel(i, cutLabel[i - 1]);
365359
histos.get<TH2>(HIST("hCutValue"))->GetXaxis()->SetBinLabel(i, cutLabel[i - 1]);
@@ -1235,15 +1229,19 @@ struct Derivedcascadeanalysis {
12351229

12361230
if (isNegative) {
12371231
if (candidateSelectionFlags.doNTPCSigmaCut) {
1238-
if (std::abs(posExtra.tpcNSigmaPr()) > candidateSelectionValues.nsigmatpcPr || std::abs(negExtra.tpcNSigmaPi()) > candidateSelectionValues.nsigmatpcPi)
1232+
if(!candidateSelectionFlags.useMesonDaughterITSStandAlone && std::abs(negExtra.tpcNSigmaPi()) > candidateSelectionValues.nsigmatpcPi)
1233+
continue;
1234+
if (std::abs(posExtra.tpcNSigmaPr()) > candidateSelectionValues.nsigmatpcPr) //proton should be always identified
12391235
continue;
12401236
histos.fill(HIST("hCandidate"), ++counter);
12411237
} else {
12421238
++counter;
12431239
}
12441240
} else {
12451241
if (candidateSelectionFlags.doNTPCSigmaCut) {
1246-
if (std::abs(posExtra.tpcNSigmaPi()) > candidateSelectionValues.nsigmatpcPi || std::abs(negExtra.tpcNSigmaPr()) > candidateSelectionValues.nsigmatpcPr)
1242+
if(!candidateSelectionFlags.useMesonDaughterITSStandAlone && std::abs(posExtra.tpcNSigmaPi()) > candidateSelectionValues.nsigmatpcPi)
1243+
continue;
1244+
if (std::abs(negExtra.tpcNSigmaPr()) > candidateSelectionValues.nsigmatpcPr) //proton should be always identified
12471245
continue;
12481246
histos.fill(HIST("hCandidate"), ++counter);
12491247
} else {
@@ -1285,8 +1283,15 @@ struct Derivedcascadeanalysis {
12851283
histos.fill(HIST("histITSTPCmatchBachTrack"), ptBachelor, centrality, 2.5);
12861284
}
12871285
}
1288-
1289-
if (std::abs(posExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows || std::abs(negExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows || std::abs(bachExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows)
1286+
if(!candidateSelectionFlags.useBachelorITSStandAlone && std::abs(bachExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows)
1287+
continue;
1288+
if(!candidateSelectionFlags.useMesonDaughterITSStandAlone && isPositive && std::abs(posExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows)
1289+
continue;
1290+
if(!candidateSelectionFlags.useMesonDaughterITSStandAlone && isNegative && std::abs(negExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows)
1291+
continue;
1292+
if (isNegative && std::abs(posExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows) // proton is always required to be TPC track
1293+
continue;
1294+
if(isPositive && std::abs(negExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows) // proton is always required to be TPC track
12901295
continue;
12911296
histos.fill(HIST("hCandidate"), ++counter);
12921297

@@ -1354,15 +1359,15 @@ struct Derivedcascadeanalysis {
13541359

13551360
if (isXi) {
13561361

1357-
if (candidateSelectionFlags.doNTPCSigmaCut) {
1362+
if (candidateSelectionFlags.doNTPCSigmaCut && !candidateSelectionFlags.useBachelorITSStandAlone) {
13581363
if (std::abs(bachExtra.tpcNSigmaPi()) > candidateSelectionValues.nsigmatpcPi)
13591364
continue;
13601365
histos.fill(HIST("hCandidate"), ++counter);
13611366
} else {
13621367
++counter;
13631368
}
13641369

1365-
if (bachExtra.hasTOF() && candidateSelectionFlags.doNTOFSigmaBachelorCut) {
1370+
if (bachExtra.hasTOF() && candidateSelectionFlags.doNTOFSigmaBachelorCut && !candidateSelectionFlags.useBachelorITSStandAlone) {
13661371
histos.fill(HIST("hNsigmaTOFBachelorPion"), casc.tofNSigmaXiPi(), fullmomentumBachelor, centrality);
13671372
if (std::abs(casc.tofNSigmaXiPi()) > candidateSelectionValues.nsigmatofBachPion)
13681373
continue;
@@ -1379,15 +1384,15 @@ struct Derivedcascadeanalysis {
13791384
++counter;
13801385
}
13811386
} else {
1382-
if (candidateSelectionFlags.doNTPCSigmaCut) {
1387+
if (candidateSelectionFlags.doNTPCSigmaCut && !candidateSelectionFlags.useBachelorITSStandAlone) {
13831388
if (std::abs(bachExtra.tpcNSigmaKa()) > candidateSelectionValues.nsigmatpcKa)
13841389
continue;
13851390
histos.fill(HIST("hCandidate"), ++counter);
13861391
} else {
13871392
++counter;
13881393
}
13891394

1390-
if (bachExtra.hasTOF() && candidateSelectionFlags.doNTOFSigmaBachelorCut) {
1395+
if (bachExtra.hasTOF() && candidateSelectionFlags.doNTOFSigmaBachelorCut && !candidateSelectionFlags.useBachelorITSStandAlone) {
13911396
histos.fill(HIST("hNsigmaTOFBachelorKaon"), casc.tofNSigmaOmKa(), std::sqrt(std::pow(casc.pxbach(), 2) + std::pow(casc.pybach(), 2) + std::pow(casc.pzbach(), 2)), centrality);
13921397
if (std::abs(casc.tofNSigmaOmKa()) > candidateSelectionValues.nsigmatofBachKaon)
13931398
continue;
@@ -1404,6 +1409,27 @@ struct Derivedcascadeanalysis {
14041409
++counter;
14051410
}
14061411
}
1412+
if(candidateSelectionFlags.useBachelorITSStandAlone && std::abs(bachExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows && std::abs(bachExtra.tpcCrossedRows()) > candidateSelectionValues.maxTPCCrossedRows)
1413+
continue;
1414+
histos.fill(HIST("hCandidate"), ++counter);
1415+
1416+
if(candidateSelectionFlags.useMesonDaughterITSStandAlone && isPositive && posExtra.tpcCrossedRows() > candidateSelectionValues.maxTPCCrossedRows)
1417+
continue;
1418+
if(candidateSelectionFlags.useMesonDaughterITSStandAlone && isNegative && negExtra.tpcCrossedRows() > candidateSelectionValues.maxTPCCrossedRows)
1419+
continue;
1420+
histos.fill(HIST("hCandidate"), ++counter);
1421+
1422+
if(qaFlags.doITSclusterCheck){
1423+
if(candidateSelectionFlags.useBachelorITSStandAlone)
1424+
histos.fill(HIST("hBachelorITSclusters"),bachExtra.itsNCls());
1425+
if(candidateSelectionFlags.useMesonDaughterITSStandAlone && isPositive)
1426+
histos.fill(HIST("hMesonDaughterITSclusters"),posExtra.itsNCls());
1427+
if(candidateSelectionFlags.useMesonDaughterITSStandAlone && isNegative)
1428+
histos.fill(HIST("hMesonDaughterITSclusters"),negExtra.itsNCls());
1429+
}
1430+
histos.fill(HIST("hPseudorapPosDaughter"), poseta);
1431+
histos.fill(HIST("hPseudorapNegDaughter"), negeta);
1432+
histos.fill(HIST("hPseudorapBachelor"), bacheta);
14071433

14081434
if (qaFlags.doOccupancyCheck) {
14091435
fillHistOccupancyCheck(recoPt, invmass, occupancy, centrality, isPositive);

0 commit comments

Comments
 (0)