Skip to content

Commit

Permalink
Merge pull request #14201 from fprino/master
Browse files Browse the repository at this point in the history
Add cut on TPC vs ITS n. of clusters to remove TPC pileup
  • Loading branch information
alibuild authored Apr 30, 2020
2 parents d639eb1 + 3f70ef2 commit 1913a86
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
16 changes: 15 additions & 1 deletion OADB/AliEventCuts.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ AliEventCuts::AliEventCuts(bool saveplots) : TList(),
fUseVariablesCorrelationCuts{false},
fUseEstimatorsCorrelationCut{false},
fUseStrongVarCorrelationCut{false},
fUseITSTPCCluCorrelationCut{false},
fEstimatorsCorrelationCoef{0.,1.},
fEstimatorsSigmaPars{10000.,0.,0.,0.},
fDeltaEstimatorNsigma{1.,1.},
Expand All @@ -82,6 +83,7 @@ AliEventCuts::AliEventCuts(bool saveplots) : TList(),
fMultiplicityV0McorrCut{nullptr},
fFB128vsTrklLinearCut{1.e8,0.},
fVZEROvsTPCoutPolCut{1.e8,0.,0.,0.,0.},
fITSvsTPCcluPolCut{0.,0.,0.},
fRequireExactTriggerMask{false},
fTriggerMask{AliVEvent::kAny},
fTriggerClasses{},
Expand Down Expand Up @@ -226,6 +228,12 @@ bool AliEventCuts::AcceptEvent(AliVEvent *ev) {
bool usePileUpSPD = (fUseCombinedMVSPDcut && vtx == vtSPD) || fUseSPDpileUpCut;
AliVMultiplicity* mult = ev->GetMultiplicity();
const int ntrkl = mult->GetNumberOfTracklets();
int nCluSDDSSD=0;
for(Int_t iLay=2; iLay<6; iLay++) nCluSDDSSD+=mult->GetNumberOfITSClusters(iLay);
int nCluTPC=0;
if (dynamic_cast<AliAODEvent*>(ev)) nCluTPC=dynamic_cast<AliAODEvent*>(ev)->GetNumberOfTPCClusters();
else if (dynamic_cast<AliESDEvent*>(ev)) nCluTPC=dynamic_cast<AliESDEvent*>(ev)->GetNumberOfTPCClusters();

if (fUseMultiplicityDependentPileUpCuts) {
if (ntrkl < 20) fSPDpileupMinContributors = 3;
else if (ntrkl < 50) fSPDpileupMinContributors = 4;
Expand All @@ -235,6 +243,9 @@ bool AliEventCuts::AcceptEvent(AliVEvent *ev) {
(!fTrackletBGcut || !fUtils.IsSPDClusterVsTrackletBG(ev)) &&
(!usePileUpMV || !fUtils.IsPileUpMV(ev)))
fFlag |= BIT(kPileUp);

const double its_tpcclus_limit = PolN(double(nCluTPC),fITSvsTPCcluPolCut,2);
if(!fUseITSTPCCluCorrelationCut || (nCluSDDSSD > its_tpcclus_limit)) fFlag |= BIT(kTPCPileUp);

/// Centrality cuts:
/// * Check for min and max centrality
Expand Down Expand Up @@ -790,7 +801,10 @@ void AliEventCuts::SetupPbPb2018() {

array<double,5> vzero_tpcout_polcut = {-2000.,2.1,3.5e-5,0.,0.};
std::copy(vzero_tpcout_polcut.begin(),vzero_tpcout_polcut.end(),fVZEROvsTPCoutPolCut);


array<double,3> its_tpcclus_polcut = {-3000.,0.0099,9.426e-10};
std::copy(its_tpcclus_polcut.begin(),its_tpcclus_polcut.end(),fITSvsTPCcluPolCut);

if (fCentralityFramework != 0) {
if(!fMultiplicityV0McorrCut) fMultiplicityV0McorrCut = new TF1("fMultiplicityV0McorrCut","[0]+[1]*x+[2]*exp([3]-[4]*x) - 5.*([5]+[6]*exp([7]-[8]*x))",0,100);
fMultiplicityV0McorrCut->SetParameters(-6.15980e+02, 4.89828e+00, 4.84776e+03, -5.22988e-01, 3.04363e-02, -1.21144e+01, 2.95321e+02, -9.20062e-01, 2.17372e-02);
Expand Down
7 changes: 5 additions & 2 deletions OADB/AliEventCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class AliEventCuts : public TList {
kCorrelations,
kTimeRangeCut,
kEMCALEDCut,
kTPCPileUp,
kAllCuts
};

Expand Down Expand Up @@ -168,6 +169,7 @@ class AliEventCuts : public TList {
bool fUseVariablesCorrelationCuts; ///< Switch on/off the cuts on the correlation between event variables
bool fUseEstimatorsCorrelationCut; ///< Switch on/off the cut on the correlation between centrality estimators
bool fUseStrongVarCorrelationCut; ///< Switch on/off the strong cuts on the correlation between event variables
bool fUseITSTPCCluCorrelationCut; ///< Switch on/off the strong cuts on the correlation between event variables
double fEstimatorsCorrelationCoef[2]; ///< fCentEstimators[0] = [0] + [1] * fCentEstimators[1]
double fEstimatorsSigmaPars[4]; ///< Sigma parametrisation fCentEstimators[1] vs fCentEstimators[0]
double fDeltaEstimatorNsigma[2]; ///< Number of sigma to cut on fCentEstimators[1] vs fCentEstimators[0]
Expand All @@ -178,7 +180,8 @@ class AliEventCuts : public TList {
TF1 *fMultiplicityV0McorrCut; //!<! Cut on the FB128 vs V0M plane
double fFB128vsTrklLinearCut[2]; ///< Cut on the FB128 vs Tracklet plane
double fVZEROvsTPCoutPolCut[5]; ///< Cut on VZERO multipliciy vs the number of tracks with kTPCout on

double fITSvsTPCcluPolCut[3]; ///< Cut on SDD+SSD clusters vs TPC clusters

bool fRequireExactTriggerMask; ///< If true the event selection mask is required to be equal to fTriggerMask
unsigned long fTriggerMask; ///< Trigger mask
std::vector<std::string> fTriggerClasses; ///< Trigger classes
Expand Down Expand Up @@ -239,7 +242,7 @@ class AliEventCuts : public TList {
AliESDtrackCuts* fFB32trackCuts; //!<! Cuts corresponding to FB32 in the ESD (used only for correlations cuts in ESDs)
AliESDtrackCuts* fTPConlyCuts; //!<! Cuts corresponding to the standalone TPC cuts in the ESDs (used only for correlations cuts in ESDs)

ClassDef(AliEventCuts, 13)
ClassDef(AliEventCuts, 14)
};

template<typename F> F AliEventCuts::PolN(F x,F* coef, int n) {
Expand Down

0 comments on commit 1913a86

Please sign in to comment.