Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STrackCutStudy.ana.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file STrackCutStudy.ana.h
1 // ----------------------------------------------------------------------------
2 // 'STrackCutStudy.ana.h'
3 // Derek Anderson
4 // 03.14.2022
5 //
6 // Reads in the 'ntp_track' Ntuple
7 // generated by the SVtxEvaluator
8 // class and studies the impact
9 // of cutting on various quantities.
10 // ----------------------------------------------------------------------------
11 
12 #pragma once
13 
14 using namespace std;
15 
16 
17 
18 // analysis methods -----------------------------------------------------------
19 
20 Bool_t STrackCutStudy::ApplyCuts(const Bool_t isPrimary, const UInt_t trkNMVtx, const UInt_t trkNTpc, const Double_t trkVz, const Double_t trkDcaXY, const Double_t trkDcaZ, const Double_t trkQuality) {
21 
22  // check if track falls in cuts
23  const Bool_t isInMVtxCut = ((trkNMVtx > nMVtxCut.first) && (trkNMVtx < nMVtxCut.second));
24  const Bool_t isInTpcCut = ((trkNTpc > nTpcCut.first) && (trkNTpc < nTpcCut.second));
25  const Bool_t isInVzCut = ((trkVz > vzCut.first) && (trkVz < vzCut.second));
26  const Bool_t isInDcaXyCut = ((trkDcaXY > dcaXyCut.first) && (trkDcaXY < dcaXyCut.second));
27  const Bool_t isInDcaZCut = ((trkDcaZ > dcaZCut.first) && (trkDcaZ < dcaZCut.second));
28  const Bool_t isInQualityCut = ((trkQuality > qualityCut.first) && (trkQuality < qualityCut.second));
29 
30  // determine which cuts to check against
31  Bool_t isInTrkCut(true);
32  if (doPrimaryCut && !isPrimary) isInTrkCut = false;
33  if (doMVtxCut && !isInMVtxCut) isInTrkCut = false;
34  if (doTpcCut && !isInTpcCut) isInTrkCut = false;
35  if (doVzCut && !isInVzCut) isInTrkCut = false;
36  if (doDcaXyCut && !isInDcaXyCut) isInTrkCut = false;
37  if (doDcaZCut && !isInDcaZCut) isInTrkCut = false;
38  if (doQualityCut && !isInQualityCut) isInTrkCut = false;
39  return isInTrkCut;
40 
41 } // end 'ApplyCuts(Bool_t, UInt_t, UInt_t, Double_t, Double_t, Double_t, Double_t)'
42 
43 
44 
46 
47  /* cluster calc will go here */
48  return true;
49 
50 } // end 'DoClusterCalculation'
51 
52 // end ------------------------------------------------------------------------