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