File indexing completed on 2025-08-05 08:11:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef DOTRACKCUTSTUDY_C
0012 #define DOTRACKCUTSTUDY_C
0013
0014
0015 #include <cstdlib>
0016 #include <utility>
0017
0018 #include "TROOT.h"
0019 #include "TString.h"
0020
0021 #include </sphenix/user/danderson/install/include/strackcutstudy/STrackCutStudy.h>
0022
0023 using namespace std;
0024
0025
0026 R__LOAD_LIBRARY(/sphenix/user/danderson/install/lib/libstrackcutstudy.so)
0027
0028
0029 static const Ssiz_t NTxt = 3;
0030 static const Bool_t DefBatch = false;
0031
0032
0033
0034 void DoTrackCutStudy(const Bool_t inBatchMode = DefBatch) {
0035
0036
0037 gErrorIgnoreLevel = kWarning;
0038
0039
0040 const TString sOutFile("trackCutStudy.testFastCutStudy_slow.pt020n20pim.d30m3y2023.root");
0041 const TString sInFileEO("input/embed_only/final_merge/sPhenixG4_run6hijing50khz_embedScanOn_embedOnly.pt020n20pim.d24m3y2023.root");
0042 const TString sInFilePU("input/with_pileup/merged/sPhenixG4_forTrackCutStudy_hijing50khz_embedOnly0t19_g4svtxeval.d14m11y2022.root");
0043 const TString sInTupleEO("ntp_track");
0044 const TString sInTuplePU("ntp_gtrack");
0045 const TString sInClusterEO("ntp_cluster");
0046
0047
0048 const Bool_t makePlots(true);
0049 const Bool_t doPileup(true);
0050 const Bool_t doIntNorm(false);
0051 const Bool_t doBeforeCuts(true);
0052 const Bool_t doAvgClusterCalc(false);
0053 const Double_t normalPtFracMin(0.20);
0054 const Double_t normalPtFracMax(1.20);
0055
0056
0057 const Bool_t doPrimaryCut = false;
0058 const Bool_t doMVtxCut = true;
0059 const Bool_t doTpcCut = true;
0060 const Bool_t doVzCut = true;
0061 const Bool_t doDcaXyCut = false;
0062 const Bool_t doDcaZcut = false;
0063 const Bool_t doQualityCut = true;
0064
0065
0066 const pair<UInt_t, UInt_t> nMVtxRange = {2, 100};
0067 const pair<UInt_t, UInt_t> nTpcRange = {20, 100};
0068 const pair<Double_t, Double_t> vzRange = {-10., 10.};
0069 const pair<Double_t, Double_t> dcaXyRange = {-20., 20.};
0070 const pair<Double_t, Double_t> dcaZrange = {-20., 20.};
0071 const pair<Double_t, Double_t> qualityRange = {0., 10.};
0072
0073
0074 const TString sTxtEO[NTxt] = {"#bf{#it{sPHENIX}} Simulation", "20 #pi^{-}/event, p_{T} #in (0, 20) GeV/c", "#bf{Only #pi^{-}}"};
0075 const TString sTxtPU[NTxt] = {"#bf{#it{sPHENIX}} Simulation", "0-20 fm Hijing, 50 kHz pileup #oplus 5 #pi^{-}/event", "#bf{With pileup}"};
0076
0077
0078 STrackCutStudy *study = new STrackCutStudy();
0079 study -> SetBatchMode(inBatchMode);
0080 study -> SetInputOutputFiles(sInFileEO, sInFilePU, sOutFile);
0081 study -> SetInputTuples(sInTupleEO, sInTuplePU);
0082 study -> SetStudyParameters(makePlots, doPileup, doIntNorm, doBeforeCuts, doAvgClusterCalc, normalPtFracMin, normalPtFracMax);
0083 study -> SetCutFlags(doPrimaryCut, doMVtxCut, doTpcCut, doVzCut, doDcaXyCut, doDcaZcut, doQualityCut);
0084 study -> SetTrackCuts(nMVtxRange, nTpcRange, vzRange, dcaXyRange, dcaZrange, qualityRange);
0085 study -> SetPlotText(NTxt, NTxt, sTxtEO, sTxtPU);
0086 study -> Init();
0087 study -> Analyze();
0088 study -> End();
0089
0090 }
0091
0092 #endif
0093
0094