<commit_before>#include "AliFMDMultCuts.h"
#include "AliForwardCorrectionManager.h"
#include "AliFMDCorrELossFit.h"
#include <iostream>
#include <TROOT.h>
#include <TParameter.h>

ClassImp(AliFMDMultCuts)
#if 0
; // This is for Emacs
#endif

//____________________________________________________________________
AliFMDMultCuts::AliFMDMultCuts()
  : TObject(),
    fMPVFraction(0), 
    fNXi(0), 
    fIncludeSigma(true)
{
  for (Int_t i = 0; i < 5; i++) fMultCuts[i] = 0;
}
//____________________________________________________________________
AliFMDMultCuts::AliFMDMultCuts(const AliFMDMultCuts& o)
  : TObject(o),
    fMPVFraction(o.fMPVFraction), 
    fNXi(o.fNXi), 
    fIncludeSigma(o.fIncludeSigma)
{
  for (Int_t i = 0; i < 5; i++) fMultCuts[i] = o.fMultCuts[i];
}
//____________________________________________________________________
AliFMDMultCuts&
AliFMDMultCuts::operator=(const AliFMDMultCuts& o)
{
  fMPVFraction  = o.fMPVFraction;
  fNXi          = o.fNXi;
  fIncludeSigma = o.fIncludeSigma;
  for (Int_t i = 0; i < 5; i++) fMultCuts[i] = o.fMultCuts[i];
  return *this;
}

//____________________________________________________________________
Double_t
AliFMDMultCuts::GetFixedCut(UShort_t d, Char_t r) const
{
  // Int_t    idx = (d == 1 ? 0 : 2*(d - 2) + 1 + ((r=='I' || r=='i') ? 0 : 1));
  Int_t idx = -1;
  switch (d) { 
  case 1: idx = 0; break;
  case 2: idx = 1 + (r == 'I' || r == 'i') ? 0 : 1; break;
  case 3: idx = 3 + (r == 'I' || r == 'i') ? 0 : 1; break;
  }
  if (idx < 0) return 1024;
  return fMultCuts[idx];
}

//____________________________________________________________________
void
AliFMDMultCuts::SetMultCuts(Double_t fmd1i, <commit_msg>coverity fix<commit_after>#include "AliFMDMultCuts.h"
#include "AliForwardCorrectionManager.h"
#include "AliFMDCorrELossFit.h"
#include <iostream>
#include <TROOT.h>
#include <TParameter.h>

ClassImp(AliFMDMultCuts)
#if 0
; // This is for Emacs
#endif

//____________________________________________________________________
AliFMDMultCuts::AliFMDMultCuts()
  : TObject(),
    fMPVFraction(0), 
    fNXi(0), 
    fIncludeSigma(true)
{
  for (Int_t i = 0; i < 5; i++) fMultCuts[i] = 0;
}
//____________________________________________________________________
AliFMDMultCuts::AliFMDMultCuts(const AliFMDMultCuts& o)
  : TObject(o),
    fMPVFraction(o.fMPVFraction), 
    fNXi(o.fNXi), 
    fIncludeSigma(o.fIncludeSigma)
{
  for (Int_t i = 0; i < 5; i++) fMultCuts[i] = o.fMultCuts[i];
}
//____________________________________________________________________
AliFMDMultCuts&
AliFMDMultCuts::operator=(const AliFMDMultCuts& o)
{
  fMPVFraction  = o.fMPVFraction;
  fNXi          = o.fNXi;
  fIncludeSigma = o.fIncludeSigma;
  for (Int_t i = 0; i < 5; i++) fMultCuts[i] = o.fMultCuts[i];
  return *this;
}

//____________________________________________________________________
Double_t
AliFMDMultCuts::GetFixedCut(UShort_t d, Char_t r) const
{
  // Int_t    idx = (d == 1 ? 0 : 2*(d - 2) + 1 + ((r=='I' || r=='i') ? 0 : 1));
  Int_t idx = -1;
  switch (d) { 
  case 1: idx = 0; break;
  case 2: idx = 1 + ((r == 'I' || r == 'i') ? 0 : 1); break;
  case 3: idx = 3 + ((r == 'I' || r == 'i') ? 0 : 1); break;
  }
  if (idx < 0) return 1024;
  return fMultCuts[idx];
}

//____________________________________________________________________
void
AliFMDMultCuts::SetMultCuts(Double_t fmd1i, 
{'fraction_non_alphanumeric': 0.1462979482604817, 'fraction_numerical': 0.020220041629497473, 'mean_word_length': 4.569536423841059, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 9, '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': '3941200', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1241, 'n_words': 263}