<commit_before>/***************************************************************************
<EMAIL> - created on 2019 with the help of <NAME> and 
other scripts in the repo.  
Configuration script for SigmaStar(9801385) analysis
****************************************************************************/

Bool_t ConfigSigPM(AliRsnMiniAnalysisTask *task, 
		Bool_t                 isMC, 
		AliPIDResponse::EBeamType collSys = AliPIDResponse::kPBPB, //=0, kPPB=1, kPBPB=2
		AliRsnCutSet           *cutsPair,             //cuts on the pair
                AliRsnCutSet           *cutsPairY,             //cuts on the pair Y only
		Bool_t                 enaMultSel = kTRUE,    //enable multiplicity axis
      		Float_t                masslow = 1.2,         //inv mass axis low edge 
		Float_t                massup = 2.,          //inv mass axis upper edge 
		Int_t                  nbins = 800,           //inv mass axis n bins
		Float_t                nsigma = 3.0,          //nsigma of TPC PID cut
		Bool_t                 enableMonitor = kTRUE, //enable single track QA plots
                Float_t                pi_Ls_PIDCut=4.,        //nsigma V0 daughters
                Float_t                LsDCA = 0.3,             //V0 vtx to PV
                Float_t                LsCosPoinAn = 0.98,      // cos of Pointing Angle
                Float_t                LsDaughDCA=0.8,          // dca V0 daughters
                Float_t                massTol = 0.006,         // mass tolerance 6 MeV
                Float_t                massTolVeto = 0.0043,    // mass tol veto
                Bool_t                 Switch = kFALSE,         // switch
                Float_t                pLife = 25,              // life
                Float_t                v0rapidity= 0.5,         // V0 rapidity
                Float_t                radiuslow=5.,            // radius low
                Bool_t                 doCustomDCAcuts=kTRUE,   //custom dca cuts for V0 daughters
                Double_t               dcaProton=0.1,           // proton dca
		Double_t               dcaPion=0.1,             //pion dca
		Int_t                  pidCUT=1)             //pion PID cut set, 1 for nominal, 2 for systematic check
{
  //-----------------------
  //General 
  //-----------------------
  TString partname="SigmaStar";
//  RSNPID  d1 = AliRsnDaughter::kPion;
//  RSNPID  d2 = AliRsnDaughter::kLambda;
  Int_t   aodFilterBit = 0;

  //Additional options for monitoring plots
  TString monitorOpt = "NoSIGN";
  
  //-----------------------
  // CUTS
  //-----------------------
  //use default quality cuts std 2010 with crossed rows TPC
  Bool_t useCrossedRows = 1;

  AliRsnCutTrackQuality * fCutQuality = new AliRsnCutTrackQuality("CutQuality");
  fCutQuality->SetDefaults2011(useCrossedRows, kFALSE);
  
  AliRsnCutTOFMatch  *iCutTOFMatch     = new AliRsnCutTOFMatch("CutTOFMatch");
  AliRsnCutPIDNSigma *iCutTPCNSigma    = new AliRsnCutPIDNSigma("CutTPCNSigma", AliPID::kPion, AliRsnCutPIDNSigma::kTPC);//, AliRsnCutPIDNSigma::kTPCinnerP );
  AliRsnCutPIDNSigma *iCutTOFNSigma    = new AliRsnCutPIDNSigma("CutTOFNSigma", AliPID::kPion, AliRsnCutPIDNSigma::kTOF);//, AliRsnCutPIDNSigma::kP );
  AliRsnCutPIDNSigma *iCutTPCTOFNSigma = new AliRsnCutPIDNSigma("CutTPCTOFNSigma", AliPID::kPion, AliRsnCutPIDNSigma::kTPC);
  //for setting PID cuts without any selection in pT
  //iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);

  if (pidCUT==1) {
    //for setting PID cuts in given pT ranges
    iCutTPCNSigma->AddPIDRange(5.0, 0.0, 0.35);
    iCutTPCNSigma->AddPIDRange(3.0, 0.35, 0.5);
    iCutTPCNSigma->AddPIDRange(2.0, 0.5, 20.);
    
    iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1.5);
    iCutTOFNSigma->AddPIDRange(2.5, 1.5, 1E20);

     AliRsnCutSet * myCutSet = new AliRsnCutSet("MyCutSet", AliRsnTarget::kDaughter);
     myCutSet->AddCut(fCutQuality);
     myCutSet->AddCut(iCutTPCNSigma);
     myCutSet->AddCut(iCutTOFMatch);
     myCutSet->AddCut(iCutTOFNSigma);
     // myCutSet->AddCut(iCutTPCTOFNSigma); 
     
     myCutSet->SetCutScheme( Form("%s & ((%s & (!%s))|(%s&%s))",fCutQuality->GetName(), iCutTPCNSigma->GetName(), iCutTOFMatch->GetName(),iCutTOFNSigma->GetName(), iCutTPCNSigma->GetName()) ) ;
    
  }

  if (pidCUT==2) {
    //for setting PID cuts in given pT ranges
    iCutTPCNSigma->AddPIDRange(3.0, 0.0, 0.5);
    iCutTPCNSigma->AddPIDRange(2.0, 0.5, 1E20);
    iCutTPCTOFNSigma->SinglePIDRange(5.0);
    iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1E20);

     AliRsnCutSet * myCutSet = new AliRsnCutSet("MyCutSet", AliRsnTarget::kDaughter);
     myCutSet->AddCut(fCutQuality);
     myCutSet->AddCut(iCutTPCNSigma);
     myCutSet->AddCut(iCutTOFMatch);
     myCutSet->AddCut(iCutTOFNSigma);
     myCutSet->AddCut(iCutTPCTOFNSigma);

     // scheme:
     // quality & [ (TOF & TPCTOF) || (!TOFmatch & TPConly) ]
     myCutSet->SetCutScheme(Form("%s&((%s&%s)|((!%s)&%s))",fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName(), iCutTOFMatch->GetName(), iCutTPCNSigma->GetName())) ;
  }

  Int_t icutPi = task->AddTrackCuts(myCutSet);
 
  //set daughter cuts
  Int_t icut1 = icutPi;
  //Int_t icut2 = icutPi;

   // selections for daugthers of Lambdas

  Float_t crossedRows = 70;
  Float_t rowsbycluster = 0.8;
  Float_t DCAxy = 0.1; //0.06;
     
  AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("qualityDaughterLs");
  esdTrackCuts->SetEtaRange(-0.8,0.8);
  esdTrackCuts->SetPtRange(0.15,1.E10);
  esdTrackCuts->SetRequireTPCRefit();<commit_msg>Request from Evi<commit_after>/***************************************************************************
<EMAIL> - created on 2019 with the help of <NAME> and 
other scripts in the repo.  
Configuration script for SigmaStar(9801385) analysis
****************************************************************************/

Bool_t ConfigSigPM(AliRsnMiniAnalysisTask *task, 
		Bool_t                 isMC, 
		AliPIDResponse::EBeamType collSys = AliPIDResponse::kPBPB, //=0, kPPB=1, kPBPB=2
		AliRsnCutSet           *cutsPair,             //cuts on the pair
                AliRsnCutSet           *cutsPairY,             //cuts on the pair Y only
		Bool_t                 enaMultSel = kTRUE,    //enable multiplicity axis
      		Float_t                masslow = 1.2,         //inv mass axis low edge 
		Float_t                massup = 2.,          //inv mass axis upper edge 
		Int_t                  nbins = 800,           //inv mass axis n bins
		Float_t                nsigma = 3.0,          //nsigma of TPC PID cut
		Bool_t                 enableMonitor = kTRUE, //enable single track QA plots
                Float_t                pi_Ls_PIDCut=4.,        //nsigma V0 daughters
                Float_t                LsDCA = 0.3,             //V0 vtx to PV
                Float_t                LsCosPoinAn = 0.98,      // cos of Pointing Angle
                Float_t                LsDaughDCA=0.8,          // dca V0 daughters
                Float_t                massTol = 0.006,         // mass tolerance 6 MeV
                Float_t                massTolVeto = 0.0043,    // mass tol veto
                Bool_t                 Switch = kFALSE,         // switch
                Float_t                pLife = 25,              // life
                Float_t                v0rapidity= 0.5,         // V0 rapidity
                Float_t                radiuslow=5.,            // radius low
                Bool_t                 doCustomDCAcuts=kTRUE,   //custom dca cuts for V0 daughters
                Double_t               dcaProton=0.1,           // proton dca
		Double_t               dcaPion=0.1,             //pion dca
		Int_t                  pidCUT=1)             //pion PID cut set, 1 for nominal, 2 for systematic check
{
  //-----------------------
  //General 
  //-----------------------
  TString partname="SigmaStar";
//  RSNPID  d1 = AliRsnDaughter::kPion;
//  RSNPID  d2 = AliRsnDaughter::kLambda;
  Int_t   aodFilterBit = 0;

  //Additional options for monitoring plots
  TString monitorOpt = "NoSIGN";
  
  //-----------------------
  // CUTS
  //-----------------------
  //use default quality cuts std 2010 with crossed rows TPC
  Bool_t useCrossedRows = 1;

  AliRsnCutTrackQuality * fCutQuality = new AliRsnCutTrackQuality("CutQuality");
  fCutQuality->SetDefaults2011(useCrossedRows, kFALSE);
  
  AliRsnCutTOFMatch  *iCutTOFMatch     = new AliRsnCutTOFMatch("CutTOFMatch");
  AliRsnCutPIDNSigma *iCutTPCNSigma    = new AliRsnCutPIDNSigma("CutTPCNSigma", AliPID::kPion, AliRsnCutPIDNSigma::kTPC);//, AliRsnCutPIDNSigma::kTPCinnerP );
  AliRsnCutPIDNSigma *iCutTOFNSigma    = new AliRsnCutPIDNSigma("CutTOFNSigma", AliPID::kPion, AliRsnCutPIDNSigma::kTOF);//, AliRsnCutPIDNSigma::kP );
  AliRsnCutPIDNSigma *iCutTPCTOFNSigma = new AliRsnCutPIDNSigma("CutTPCTOFNSigma", AliPID::kPion, AliRsnCutPIDNSigma::kTPC);
  //for setting PID cuts without any selection in pT
  //iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);

  if (pidCUT==1) {
    //for setting PID cuts in given pT ranges
    iCutTPCNSigma->AddPIDRange(5.0, 0.0, 0.35);
    iCutTPCNSigma->AddPIDRange(3.0, 0.35, 0.5);
    iCutTPCNSigma->AddPIDRange(2.0, 0.5, 20.);
    
    iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1.5);
    iCutTOFNSigma->AddPIDRange(2.5, 1.5, 1E20);

     AliRsnCutSet * myCutSet = new AliRsnCutSet("MyCutSet", AliRsnTarget::kDaughter);
     myCutSet->AddCut(fCutQuality);
     myCutSet->AddCut(iCutTPCNSigma);
     myCutSet->AddCut(iCutTOFMatch);
     myCutSet->AddCut(iCutTOFNSigma);
     // myCutSet->AddCut(iCutTPCTOFNSigma); 
     
     myCutSet->SetCutScheme( Form("%s & ((%s & (!%s))|(%s&%s))",fCutQuality->GetName(), iCutTPCNSigma->GetName(), iCutTOFMatch->GetName(),iCutTOFNSigma->GetName(), iCutTPCNSigma->GetName()) ) ;
    
  }

  if (pidCUT==2) {
    //for setting PID cuts in given pT ranges
    iCutTPCNSigma->AddPIDRange(3.0, 0.0, 0.5);
    iCutTPCNSigma->AddPIDRange(2.0, 0.5, 1E20);
    iCutTPCTOFNSigma->SinglePIDRange(5.0);
    iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1E20);

     AliRsnCutSet * myCutSet = new AliRsnCutSet("MyCutSet", AliRsnTarget::kDaughter);
     myCutSet->AddCut(fCutQuality);
     myCutSet->AddCut(iCutTPCNSigma);
     myCutSet->AddCut(iCutTOFMatch);
     myCutSet->AddCut(iCutTOFNSigma);
     myCutSet->AddCut(iCutTPCTOFNSigma);

     // scheme:
     // quality & [ (TOF & TPCTOF) || (!TOFmatch & TPConly) ]
     myCutSet->SetCutScheme(Form("%s&((%s&%s)|((!%s)&%s))",fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName(), iCutTOFMatch->GetName(), iCutTPCNSigma->GetName())) ;
  }

    if (pidCUT==3) {
    //for setting PID cuts in given pT ranges
      iCutTPCNSigma->SinglePIDRange(3.0);
      //
      iCutTOFNSigma->AddPIDRange(0.00, 0.00, 0.40);  
      iCutTOFNSigma->AddPIDRange(3.00, 0.40, 1.e6);  
      //
      iCutTPCTOFNSigma->SinglePIDRange(5.0);

     AliRsnCutSet * myCutSet = new AliRsnCutSet("MyCutSet", AliRsnTarget::kDaughter);
     myCutSet->AddCut(fCutQuality);
     myCutSet->AddCut(iCutTPCNSigma);
     myCutSet->AddCut(iCutTOFMatch);
     myCutSet->AddCut(iCutTOFNSigma);
     myCutSet->AddCut(iCutTPCTOFNSigma);

     // scheme:
      // quality & [ ( TOFmatch & TOF & TPCTOF ) || ( TPConly ) ]
     myCutSet->SetCutScheme( Form(" %s & ( ( %s & %s & %s ) | ( %s ) )",
			 fCutQuality->GetName(),
			 iCutTOFMatch->GetName(), iCutTOFNSigma->GetName(), iCutTPCTOFNSigma->GetName(),
			 iCutTPCNSigma->GetName()) ) ;
  }

  Int_t icutPi = task->AddTrackCuts(myCutSet);
 
  //set daughter cuts
  Int_t icut1 = icutPi;
  //Int_t icut2 = icutPi;

   // selections for daugthers of Lambdas

  Float_t crossedRows = 70;
  Float_t rowsbycluster = 0.8;
  Float_t DCAxy = 0.1; //0.06;
     
  AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("qualityDaughterLs");
  esdTrackCuts->SetEtaRange(-0.8,0.8);
  esdTrackCuts->SetPtRange(0.15,1.E10);
  esdTrackCuts->SetRequireTPCRefit();
{'fraction_non_alphanumeric': 0.15489519319808065, 'fraction_numerical': 0.02676993012879872, 'mean_word_length': 2.2203849281648145, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 96, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1072102', 'n_tokens_mistral': 4526, 'n_tokens_neox': 4078, 'n_words': 779}