+ // Define the range for eta subevents (for SP method)
+ Double_t minA = -0.9;
+ Double_t maxA = -0.5;
+ Double_t minB = 0.5;
+ Double_t maxB = 0.9;
+ /*
+ //PMD As RP
+ Double_t minB = 2.3;
+ Double_t maxB = 3.1;
+ Double_t minA = 3.1;
+ Double_t maxA = 3.9;
+ */
+
+ // AFTERBURNER
+ Bool_t useAfterBurner=kFALSE;
+ Double_t v1=0.0;
+ Double_t v2=0.0;
+ Double_t v3=0.0;
+ Double_t v4=0.0;
+ Int_t numberOfTrackClones=0; //non-flow
+
+ // Define a range of the detector to exclude
+ Bool_t ExcludeRegion = kFALSE;
+ Double_t excludeEtaMin = -0.;
+ Double_t excludeEtaMax = 0.;
+ Double_t excludePhiMin = 0.;
+ Double_t excludePhiMax = 0.;
+
+ // use physics selection class
+ Bool_t UsePhysicsSelection = kTRUE;
+
+ // charge of poi
+ const Int_t chargePOI = 1;
+
+ // QA
+ Bool_t runQAtask=kFALSE;
+ Bool_t FillQAntuple=kFALSE;
+ Bool_t DoQAcorrelations=kFALSE;
+
+ // RUN SETTINGS
+ // Flow analysis method can be:(set to kTRUE or kFALSE)
+ Bool_t MCEP = kTRUE; // correlation with Monte Carlo reaction plane
+ Bool_t SP = kTRUE; // scalar product method (similar to eventplane method)
+ Bool_t GFC = kTRUE; // cumulants based on generating function
+ Bool_t QC = kTRUE; // cumulants using Q vectors
+ Bool_t FQD = kTRUE; // fit of the distribution of the Q vector (only integrated v)
+ Bool_t LYZ1SUM = kTRUE; // Lee Yang Zeroes using sum generating function (integrated v)
+ Bool_t LYZ1PROD = kFALSE; // Lee Yang Zeroes using product generating function (integrated v)
+ Bool_t LYZ2SUM = kFALSE; // Lee Yang Zeroes using sum generating function (second pass differential v)
+ Bool_t LYZ2PROD = kFALSE; // Lee Yang Zeroes using product generating function (second pass differential v)
+ Bool_t LYZEP = kFALSE; // Lee Yang Zeroes Event plane using sum generating function (gives eventplane + weight)
+ Bool_t MH = kTRUE; // azimuthal correlators in mixed harmonics
+ Bool_t NL = kFALSE; // nested loops (for instance distribution of phi1-phi2 for all distinct pairs)
+
+ Bool_t METHODS[] = {SP,LYZ1SUM,LYZ1PROD,LYZ2SUM,LYZ2PROD,LYZEP,GFC,QC,FQD,MCEP,MH,NL};
+
+ // Boolean to use/not use weights for the Q vector
+ Bool_t WEIGHTS[] = {kFALSE,kFALSE,kFALSE}; //Phi, v'(pt), v'(eta)
+
+ // SETTING THE CUTS
+
+ //---------Data selection----------
+ //kMC, kGlobal, kTPCstandalone, kSPDtracklet, kPMD
+ AliFlowTrackCuts::trackParameterType rptype = AliFlowTrackCuts::kGlobal;
+ AliFlowTrackCuts::trackParameterType poitype = AliFlowTrackCuts::kGlobal;
+
+ //---------Parameter mixing--------
+ //kPure - no mixing, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt
+ AliFlowTrackCuts::trackParameterMix rpmix = AliFlowTrackCuts::kPure;
+ AliFlowTrackCuts::trackParameterMix poimix = AliFlowTrackCuts::kPure;
+
+
+ const char* rptypestr = AliFlowTrackCuts::GetParamTypeName(rptype);
+ const char* poitypestr = AliFlowTrackCuts::GetParamTypeName(poitype);
+
+
+ TString centralityName("");
+ if((centrMin > 0)||(centrMax > 0)) {
+ centralityName+=Form("%.0f",centrMin);
+ centralityName+="-";
+ centralityName+=Form("%.0f",centrMax);
+ }
+
+ TString fileName(fileNameBase);
+ fileName.Append(".root");
+ //===========================================================================
+ printf("CREATE CUTS\n");
+ cout << "Used for RP: "<< rptypestr << endl;
+ cout << "Used for POI: "<< poitypestr << endl;
+ // EVENTS CUTS:
+ AliFlowEventCuts* cutsEvent = new AliFlowEventCuts("event cuts");
+ if((centrMin > 0)||(centrMax > 0)) {
+ cutsEvent->SetCentralityPercentileRange(centrMin,centrMax);
+ cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kV0);
+ cutsEvent->SetRefMultMethod(AliFlowEventCuts::kV0);
+ //cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kSPD1tracklets);
+ cutsEvent->SetNContributorsRange(2);
+ cutsEvent->SetPrimaryVertexZrange(-10.,10.);
+ cutsEvent->SetCutSPDvertexerAnomaly(); //"Francesco's cut"
+ cutsEvent->SetCutZDCtiming();
+ }
+
+ // RP TRACK CUTS:
+ AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts("rp cuts");
+ cutsRP->SetParamType(rptype);
+ cutsRP->SetParamMix(rpmix);
+ cutsRP->SetPtRange(0.2,5.);
+ cutsRP->SetEtaRange(-0.8,0.8);
+ //cutsRP->SetRequireCharge(kTRUE);
+ //cutsRP->SetCharge(chargeRP);
+ //cutsRP->SetPID(PdgRP);
+ if(rptype != AliFlowTrackCuts::kMC) {
+ cutsRP->SetMinNClustersTPC(70);
+ cutsRP->SetMinChi2PerClusterTPC(0.1);
+ cutsRP->SetMaxChi2PerClusterTPC(4.0);
+ cutsRP->SetMinNClustersITS(2);
+ cutsRP->SetRequireITSRefit(kTRUE);
+ cutsRP->SetRequireTPCRefit(kTRUE);
+ //cutsRP->SetMaxChi2PerClusterITS(1.e+09);
+ cutsRP->SetMaxDCAToVertexXY(0.3);
+ cutsRP->SetMaxDCAToVertexZ(0.3);
+ //cutsRP->SetDCAToVertex2D(kTRUE);
+ //cutsRP->SetMaxNsigmaToVertex(1.e+10);
+ //cutsRP->SetRequireSigmaToVertex(kFALSE);
+ cutsRP->SetAcceptKinkDaughters(kFALSE);
+ }
+ if(rptype == AliFlowTrackCuts::kPMD) {
+ cutsRP->SetEtaRange(2.3,3.9);
+ cutsRP->SetPmdDetPlane(0);
+ cutsRP->SetPmdAdc(270);
+ cutsRP->SetPmdNcell(1);
+ }
+
+
+ // POI TRACK CUTS:
+ AliFlowTrackCuts* cutsPOI = new AliFlowTrackCuts("poi cuts");
+ cutsPOI->SetParamType(poitype);
+ cutsPOI->SetParamMix(poimix);
+ cutsPOI->SetPtRange(0.0,10.);
+ cutsPOI->SetEtaRange(-1.2,1.2);
+ if(chargePOI != 0)
+ cutsPOI->SetCharge(chargePOI);
+ //cutsPOI->SetRequireCharge(kTRUE);
+ //cutsPOI->SetPID(PdgRP);
+ if(rptype != AliFlowTrackCuts::kMC) {
+ cutsPOI->SetMinNClustersTPC(80);
+ cutsPOI->SetMinChi2PerClusterTPC(0.1);
+ cutsPOI->SetMaxChi2PerClusterTPC(4.0);
+ cutsPOI->SetRequireITSRefit(kTRUE);
+ cutsPOI->SetRequireTPCRefit(kTRUE);
+ cutsPOI->SetMinNClustersITS(2);
+ //cutsPOI->SetMaxChi2PerClusterITS(1.e+09);
+ cutsPOI->SetMaxDCAToVertexXY(0.3);
+ cutsPOI->SetMaxDCAToVertexZ(0.3);
+ //cutsPOI->SetDCAToVertex2D(kTRUE);
+ //cutsPOI->SetMaxNsigmaToVertex(1.e+10);
+ //cutsPOI->SetRequireSigmaToVertex(kFALSE);
+ cutsPOI->SetAcceptKinkDaughters(kFALSE);
+ //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTOFpid);
+ //cutsPOI->SetPID(AliPID::kPion, AliFlowTrackCuts::kTPCpid);
+ //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTPCTOFpid);
+ //cutsPOI->SetTPCTOFpidCrossOverPt(0.4);
+ //francesco's TPC Bethe Bloch for data:
+ //cutsPOI->GetESDpid().GetTPCResponse().SetBetheBlochParameters(4.36414e-02,1.75977e+01,1.14385e-08,2.27907e+00,3.36699e+00);
+ //cutsPOI->GetESDpid().GetTPCResponse().SetMip(49);
+ }
+ if(poitype == AliFlowTrackCuts::kPMD) {
+ cutsPOI->SetEtaRange(2.3,3.9);
+ cutsPOI->SetPmdDetPlane(0);
+ cutsPOI->SetPmdAdc(270);
+ cutsPOI->SetPmdNcell(1);
+ }
+
+