|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +#ifndef PWGUD_CORE_SGCUTPARHOLDER_H_ |
| 13 | +#define PWGUD_CORE_SGCUTPARHOLDER_H_ |
| 14 | + |
| 15 | +#include <Rtypes.h> |
| 16 | +#include <vector> |
| 17 | + |
| 18 | +// object to hold customizable cut values |
| 19 | +class SGCutParHolder |
| 20 | +{ |
| 21 | + public: |
| 22 | + // constructor |
| 23 | + SGCutParHolder(int ndtcoll = 4, int nMinBCs = 7, |
| 24 | + bool withFwdTracks = false, |
| 25 | + bool globalTracksOnly = false, |
| 26 | + bool ITSonlyTracks = true, |
| 27 | + float minrgtrwTOF = 0., |
| 28 | + int MinNTracks = 0, int MaxNTracks = 10000, |
| 29 | + std::vector<int> NetCharges = {0}, |
| 30 | + int pidHypo = 211, |
| 31 | + float MinPosz = -1000., float MaxPosz = 1000., |
| 32 | + float minPt = 0., float maxPt = 1000., |
| 33 | + float minEta = -1.0, float maxEta = 1.0, |
| 34 | + float minIVM = 0.0, float maxIVM = 1000., |
| 35 | + float maxNSigmaTPC = 1000., float maxNSigmaTOF = 1000., |
| 36 | + float maxFITtime = 4, |
| 37 | + std::vector<float> FITAmpLimits = {0., 0., 0., 0., 0.}) : mNDtcoll{ndtcoll}, mMinNBCs{nMinBCs}, mWithFwdTracks{withFwdTracks}, mGlobalTracksOnly{globalTracksOnly}, mITSOnlyTracks{ITSonlyTracks}, mMinRgtrwTOF{minrgtrwTOF}, mMinNTracks{MinNTracks}, mMaxNTracks{MaxNTracks}, mNetCharges{NetCharges}, mPidHypo{pidHypo}, mMinVertexPosz{MinPosz}, mMaxVertexPosz{MaxPosz}, mMinPt{minPt}, mMaxPt{maxPt}, mMinEta{minEta}, mMaxEta{maxEta}, mMinIVM{minIVM}, mMaxIVM{maxIVM}, mMaxNSigmaTPC{maxNSigmaTPC}, mMaxNSigmaTOF{maxNSigmaTOF}, mMaxFITtime{maxFITtime}, mFITAmpLimits{FITAmpLimits} |
| 38 | + { |
| 39 | + } |
| 40 | + |
| 41 | + // setter |
| 42 | + void SetNDtcoll(int); |
| 43 | + void SetMinNBCs(int); |
| 44 | + void SetWithFwdTracks(bool); |
| 45 | + void SetGlobalTracksOnly(bool); |
| 46 | + void SetITSOnlyTracks(bool); |
| 47 | + void SetMinRgtrwTOF(float); |
| 48 | + void SetNTracks(int MinNTracks, int MaxNTracks); |
| 49 | + void SetNetCharges(std::vector<int> netCharges); |
| 50 | + void SetPidHypothesis(int pidHypo); |
| 51 | + void SetPoszRange(float MinPosz, float MaxPosz); |
| 52 | + void SetPtRange(float minPt, float maxPt); |
| 53 | + void SetEtaRange(float minEta, float maxEta); |
| 54 | + void SetIVMRange(float minIVM, float maxIVM); |
| 55 | + void SetMaxNSigmaTPC(float maxnSigma); |
| 56 | + void SetMaxNSigmaTOF(float maxnSigma); |
| 57 | + void SetMaxFITtime(float maxFITtime); |
| 58 | + void SetFITAmpLimits(std::vector<float> FITAmpLimits); |
| 59 | + |
| 60 | + // getter |
| 61 | + int NDtcoll() const; |
| 62 | + int minNBCs() const; |
| 63 | + bool withFwdTracks() const; |
| 64 | + bool globalTracksOnly() const; |
| 65 | + bool ITSOnlyTracks() const; |
| 66 | + float minRgtrwTOF() const; |
| 67 | + int minNTracks() const; |
| 68 | + int maxNTracks() const; |
| 69 | + std::vector<int> netCharges() const; |
| 70 | + int pidHypothesis() const; |
| 71 | + float minPosz() const; |
| 72 | + float maxPosz() const; |
| 73 | + float minPt() const; |
| 74 | + float maxPt() const; |
| 75 | + float minEta() const; |
| 76 | + float maxEta() const; |
| 77 | + float minIVM() const; |
| 78 | + float maxIVM() const; |
| 79 | + float maxNSigmaTPC() const; |
| 80 | + float maxNSigmaTOF() const; |
| 81 | + float maxFITtime() const; |
| 82 | + std::vector<float> FITAmpLimits() const; |
| 83 | + |
| 84 | + private: |
| 85 | + // number of collision time resolutions to consider |
| 86 | + int mNDtcoll; |
| 87 | + int mMinNBCs; |
| 88 | + |
| 89 | + // allow forward tracks |
| 90 | + bool mWithFwdTracks; |
| 91 | + |
| 92 | + // require all vertex tracks to be global tracks |
| 93 | + bool mGlobalTracksOnly; |
| 94 | + bool mITSOnlyTracks; |
| 95 | + |
| 96 | + // required minimum fraction of global tracks with TOF hit |
| 97 | + float mMinRgtrwTOF; |
| 98 | + |
| 99 | + // number of tracks |
| 100 | + int mMinNTracks, mMaxNTracks; // Number of allowed tracks |
| 101 | + |
| 102 | + // net charge of all tracks |
| 103 | + std::vector<int> mNetCharges; |
| 104 | + |
| 105 | + // PID hypothesis |
| 106 | + int mPidHypo; |
| 107 | + |
| 108 | + // vertex z-position |
| 109 | + float mMinVertexPosz, mMaxVertexPosz; // Vertex z-position |
| 110 | + |
| 111 | + // kinematic cuts |
| 112 | + float mMinPt, mMaxPt; // range of track pT |
| 113 | + float mMinEta, mMaxEta; // range of track eta |
| 114 | + float mMinIVM, mMaxIVM; // range of invariant mass |
| 115 | + |
| 116 | + // maximum nSigma for PID |
| 117 | + float mMaxNSigmaTPC; // maximum nSigma TPC |
| 118 | + float mMaxNSigmaTOF; // maximum nSigma TOF |
| 119 | + |
| 120 | + // maximum FIT time |
| 121 | + float mMaxFITtime; |
| 122 | + |
| 123 | + // lower limits for FIT signals |
| 124 | + std::vector<float> mFITAmpLimits; |
| 125 | + |
| 126 | + ClassDefNV(SGCutParHolder, 1); |
| 127 | +}; |
| 128 | + |
| 129 | +#endif // PWGUD_CORE_SGCUTPARHOLDER_H_ |
| 130 | + |
0 commit comments