Skip to content

Commit efe78d5

Browse files
author
alexandr.bylinkin@cern.ch
committed
Single Gap producer, Paul's comments, mistype fixed
1 parent f36c90d commit efe78d5

File tree

9 files changed

+898
-7
lines changed

9 files changed

+898
-7
lines changed

PWGUD/Core/CMakeLists.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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.
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.
44
#
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".
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".
77
#
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
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
1010
# or submit itself to any jurisdiction.
1111

1212
o2physics_add_library(UDGoodRunSelector
@@ -33,6 +33,14 @@ o2physics_target_root_dictionary(DGCutparHolder
3333
HEADERS DGCutparHolder.h
3434
LINKDEF DGCutparHolderLinkDef.h)
3535

36+
o2physics_add_library(SGCutParHolder
37+
SOURCES SGCutParHolder.cxx
38+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
39+
40+
o2physics_target_root_dictionary(SGCutParHolder
41+
HEADERS SGCutParHolder.h
42+
LINKDEF SGCutParHolderLinkDef.h)
43+
3644
o2physics_add_library(DGPIDSelector
3745
SOURCES DGPIDSelector.cxx
3846
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore ROOT::EG)

PWGUD/Core/SGCutParHolder.cxx

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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+
#include "SGCutParHolder.h"
13+
14+
// setter
15+
void SGCutParHolder::SetNDtcoll(int ndtcoll)
16+
{
17+
mNDtcoll = ndtcoll;
18+
}
19+
void SGCutParHolder::SetMinNBCs(int nminbcs)
20+
{
21+
mMinNBCs = nminbcs;
22+
}
23+
void SGCutParHolder::SetWithFwdTracks(bool withFwdTracks)
24+
{
25+
mWithFwdTracks = withFwdTracks;
26+
}
27+
void SGCutParHolder::SetGlobalTracksOnly(bool globalTracksOnly)
28+
{
29+
mGlobalTracksOnly = globalTracksOnly;
30+
}
31+
void SGCutParHolder::SetITSOnlyTracks(bool ITSonlyTracks)
32+
{
33+
mITSOnlyTracks = ITSonlyTracks;
34+
}
35+
void SGCutParHolder::SetMinRgtrwTOF(float rgtrwTOF)
36+
{
37+
mMinRgtrwTOF = rgtrwTOF;
38+
}
39+
void SGCutParHolder::SetNTracks(int MinNTracks, int MaxNTracks)
40+
{
41+
mMinNTracks = MinNTracks;
42+
mMaxNTracks = MaxNTracks;
43+
}
44+
void SGCutParHolder::SetNetCharges(std::vector<int> netCharges)
45+
{
46+
mNetCharges = netCharges;
47+
}
48+
void SGCutParHolder::SetPidHypothesis(int pidHypo)
49+
{
50+
mPidHypo = pidHypo;
51+
}
52+
void SGCutParHolder::SetPoszRange(float MinPosz, float MaxPosz)
53+
{
54+
mMinVertexPosz = MinPosz;
55+
mMaxVertexPosz = MaxPosz;
56+
}
57+
58+
void SGCutParHolder::SetPtRange(float minPt, float maxPt)
59+
{
60+
mMinPt = minPt;
61+
mMaxPt = maxPt;
62+
}
63+
void SGCutParHolder::SetEtaRange(float minEta, float maxEta)
64+
{
65+
mMinEta = minEta;
66+
mMaxEta = maxEta;
67+
}
68+
void SGCutParHolder::SetIVMRange(float minIVM, float maxIVM)
69+
{
70+
mMinIVM = minIVM;
71+
mMaxIVM = maxIVM;
72+
}
73+
void SGCutParHolder::SetMaxNSigmaTPC(float maxnSigma)
74+
{
75+
mMaxNSigmaTPC = maxnSigma;
76+
}
77+
void SGCutParHolder::SetMaxNSigmaTOF(float maxnSigma)
78+
{
79+
mMaxNSigmaTOF = maxnSigma;
80+
}
81+
void SGCutParHolder::SetMaxFITtime(float maxFITtime)
82+
{
83+
mMaxFITtime = maxFITtime;
84+
}
85+
void SGCutParHolder::SetFITAmpLimits(std::vector<float> FITAmpLimits)
86+
{
87+
mFITAmpLimits = FITAmpLimits;
88+
}
89+
90+
// getter
91+
int SGCutParHolder::NDtcoll() const { return mNDtcoll; }
92+
int SGCutParHolder::minNBCs() const { return mMinNBCs; }
93+
bool SGCutParHolder::withFwdTracks() const { return mWithFwdTracks; }
94+
bool SGCutParHolder::globalTracksOnly() const { return mGlobalTracksOnly; }
95+
bool SGCutParHolder::ITSOnlyTracks() const { return mITSOnlyTracks; }
96+
float SGCutParHolder::minRgtrwTOF() const { return mMinRgtrwTOF; }
97+
int SGCutParHolder::minNTracks() const { return mMinNTracks; }
98+
int SGCutParHolder::maxNTracks() const { return mMaxNTracks; }
99+
std::vector<int> SGCutParHolder::netCharges() const { return mNetCharges; }
100+
int SGCutParHolder::pidHypothesis() const { return mPidHypo; }
101+
float SGCutParHolder::minPosz() const { return mMinVertexPosz; }
102+
float SGCutParHolder::maxPosz() const { return mMaxVertexPosz; }
103+
float SGCutParHolder::minPt() const { return mMinPt; }
104+
float SGCutParHolder::maxPt() const { return mMaxPt; }
105+
float SGCutParHolder::minEta() const { return mMinEta; }
106+
float SGCutParHolder::maxEta() const { return mMaxEta; }
107+
float SGCutParHolder::minIVM() const { return mMinIVM; }
108+
float SGCutParHolder::maxIVM() const { return mMaxIVM; }
109+
float SGCutParHolder::maxNSigmaTPC() const { return mMaxNSigmaTPC; }
110+
float SGCutParHolder::maxNSigmaTOF() const { return mMaxNSigmaTOF; }
111+
float SGCutParHolder::maxFITtime() const { return mMaxFITtime; }
112+
std::vector<float> SGCutParHolder::FITAmpLimits() const { return mFITAmpLimits; }

PWGUD/Core/SGCutParHolder.h

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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+

PWGUD/Core/SGCutParHolderLinkDef.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
#ifndef PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_
12+
#define PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_
13+
14+
#pragma link off all globals;
15+
#pragma link off all classes;
16+
#pragma link off all functions;
17+
#pragma link C++ class SGCutParHolder + ;
18+
19+
#endif // PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_
20+

0 commit comments

Comments
 (0)