<commit_before>// $Id$

AliEMCALTenderSupply* ConfigEmcalTenderSupply(
  const Bool_t distBC         = kFALSE,  //distance to bad channel
  const Bool_t recalibClus    = kFALSE,  //recalibrate cluster energy
  const Bool_t recalcClusPos  = kFALSE,  //recalculate cluster position
  const Bool_t nonLinearCorr  = kFALSE,  //apply non-linearity
  const Bool_t remExoticCell  = kFALSE,  //remove exotic cells
  const Bool_t remExoticClus  = kTRUE,   //remove exotic clusters
  const Bool_t fidRegion      = kFALSE,  //apply fiducial cuts
  const Bool_t calibEnergy    = kFALSE,  //calibrate energy
  const Bool_t calibTime      = kFALSE,  //calibrate timing
  const Bool_t remBC          = kFALSE,  //remove bad channels
  const UInt_t nonLinFunct    = AliEMCALRecoUtils::kNoCorrection,
  const Bool_t reclusterize   = kTRUE,   //reclusterize
  const Float_t seedthresh    = 0.100,   //seed threshold
  const Float_t cellthresh    = 0.050,   //cell threshold
  const UInt_t clusterizer    = AliEMCALRecParam::kClusterizerv1,
  const Bool_t trackMatch     = kTRUE,   //track matching
  const Bool_t updateCellOnly = kFALSE,  //only change if you run your own clusterizer task
  const Float_t timeMin       = -1,      //minimum time of physical signal in a cell/digit (s)
  const Float_t timeMax       = +1,      //maximum time of physical signal in a cell/digit (s)
  const Float_t timeCut       =  1       //maximum time difference between the digits inside EMC cluster (s)
)
{
  AliEMCALTenderSupply *EMCALSupply = new AliEMCALTenderSupply("EMCALtender");  
  EMCALSupply->SetDebugLevel(2);

  AliEMCALRecParam *params = new AliEMCALRecParam();
  params->SetClusteringThreshold(seedthresh); 
  params->SetMinECut(cellthresh);             
  params->SetW0(4.5);
  if (reclusterize) {
    params->SetClusterizerFlag(clusterizer);
    if (clusterizer == AliEMCALRecParam::kClusterizerNxN)
      params->SetNxM(1,1); // -> (1,1) means 3x3!
  }
  params->SetTimeMin(timeMin);
  params->SetTimeMax(timeMax);
  params->SetTimeCut(timeCut);

  EMCALSupply->SetRecParam(params);

  if (reclusterize) {
    EMCALSupply->SwitchOnReclustering();
  }
  else {
    EMCALSupply->SwitchOffReclustering();
  }

  if (remBC) {
    EMCALSupply->SwitchOnClusterBadChannelCheck();
    EMCALSupply->SwitchOnBadCellRemove();
    EMCALSupply->SwitchOnUpdateCell();
  } else {
    EMCALSupply->SwitchOffClusterBadChannelCheck();
    EMCALSupply->SwitchOffBadCellRemove();
  }

  if (distBC) {
    EMCALSupply->SwitchOnRecalDistBadChannel();
  } else {
    EMCALSupply->SwitchOffRecalDistBadChannel();
  }
  
  if (recalibClus) {
    EMCALSupply->SwitchOnReCalibrateCluster();
    EMCALSupply->SwitchOnUpdateCell();
  } else {
    EMCALSupply->SwitchOffReCalibrateCluster();
    EMCALSupply->SwitchOffUpdateCell();
  }
  
  if (recalcClusPos)
    EMCALSupply->SwitchOnRecalculateClusPos();
  else
    EMCALSupply->SwitchOffRecalculateClusPos();
  
  if (nonLinearCorr) {
    EMCALSupply->SetNonLinearityFunction(nonLinFunct);
    EMCALSupply->SwitchOnNonLinearityCorrection();
  } else {
    EMCALSupply->SwitchOffNonLinearityCorrection();
  }
  
  if (remExoticCell) {
    EMCALSupply->SwitchOnExoticCellRemove();
  } else {
    EMCALSupply->SwitchOffExoticCellRemove();
  }

  if (remExoticClus) {
    EMCALSupply->SwitchOnClusterExoticChannelCheck();
  } else {
    EMCALSupply->SwitchOffClusterExoticChannelCheck();
  }<commit_msg>Do not switch off update cells<commit_after>// $Id$

AliEMCALTenderSupply* ConfigEmcalTenderSupply(
  const Bool_t distBC         = kFALSE,  //distance to bad channel
  const Bool_t recalibClus    = kFALSE,  //recalibrate cluster energy
  const Bool_t recalcClusPos  = kFALSE,  //recalculate cluster position
  const Bool_t nonLinearCorr  = kFALSE,  //apply non-linearity
  const Bool_t remExoticCell  = kFALSE,  //remove exotic cells
  const Bool_t remExoticClus  = kTRUE,   //remove exotic clusters
  const Bool_t fidRegion      = kFALSE,  //apply fiducial cuts
  const Bool_t calibEnergy    = kFALSE,  //calibrate energy
  const Bool_t calibTime      = kFALSE,  //calibrate timing
  const Bool_t remBC          = kFALSE,  //remove bad channels
  const UInt_t nonLinFunct    = AliEMCALRecoUtils::kNoCorrection,
  const Bool_t reclusterize   = kTRUE,   //reclusterize
  const Float_t seedthresh    = 0.100,   //seed threshold
  const Float_t cellthresh    = 0.050,   //cell threshold
  const UInt_t clusterizer    = AliEMCALRecParam::kClusterizerv1,
  const Bool_t trackMatch     = kTRUE,   //track matching
  const Bool_t updateCellOnly = kFALSE,  //only change if you run your own clusterizer task
  const Float_t timeMin       = -1,      //minimum time of physical signal in a cell/digit (s)
  const Float_t timeMax       = +1,      //maximum time of physical signal in a cell/digit (s)
  const Float_t timeCut       =  1       //maximum time difference between the digits inside EMC cluster (s)
)
{
  AliEMCALTenderSupply *EMCALSupply = new AliEMCALTenderSupply("EMCALtender");  
  EMCALSupply->SetDebugLevel(2);

  AliEMCALRecParam *params = new AliEMCALRecParam();
  params->SetClusteringThreshold(seedthresh); 
  params->SetMinECut(cellthresh);             
  params->SetW0(4.5);
  if (reclusterize) {
    params->SetClusterizerFlag(clusterizer);
    if (clusterizer == AliEMCALRecParam::kClusterizerNxN)
      params->SetNxM(1,1); // -> (1,1) means 3x3!
  }
  params->SetTimeMin(timeMin);
  params->SetTimeMax(timeMax);
  params->SetTimeCut(timeCut);

  EMCALSupply->SetRecParam(params);

  if (reclusterize) {
    EMCALSupply->SwitchOnReclustering();
  }
  else {
    EMCALSupply->SwitchOffReclustering();
  }

  if (remBC) {
    EMCALSupply->SwitchOnClusterBadChannelCheck();
    EMCALSupply->SwitchOnBadCellRemove();
    EMCALSupply->SwitchOnUpdateCell();
  } else {
    EMCALSupply->SwitchOffClusterBadChannelCheck();
    EMCALSupply->SwitchOffBadCellRemove();
  }

  if (distBC) {
    EMCALSupply->SwitchOnRecalDistBadChannel();
  } else {
    EMCALSupply->SwitchOffRecalDistBadChannel();
  }
  
  if (recalibClus) {
    EMCALSupply->SwitchOnReCalibrateCluster();
    EMCALSupply->SwitchOnUpdateCell();
  } else {
    EMCALSupply->SwitchOffReCalibrateCluster();
    //EMCALSupply->SwitchOffUpdateCell();
  }
  
  if (recalcClusPos)
    EMCALSupply->SwitchOnRecalculateClusPos();
  else
    EMCALSupply->SwitchOffRecalculateClusPos();
  
  if (nonLinearCorr) {
    EMCALSupply->SetNonLinearityFunction(nonLinFunct);
    EMCALSupply->SwitchOnNonLinearityCorrection();
  } else {
    EMCALSupply->SwitchOffNonLinearityCorrection();
  }
  
  if (remExoticCell) {
    EMCALSupply->SwitchOnExoticCellRemove();
  } else {
    EMCALSupply->SwitchOffExoticCellRemove();
  }

  if (remExoticClus) {
    EMCALSupply->SwitchOnClusterExoticChannelCheck();
  } else {
    EMCALSupply->SwitchOffClusterExoticChannelCheck();
  }
{'fraction_non_alphanumeric': 0.09951704961217621, 'fraction_numerical': 0.006439338504317283, 'mean_word_length': 3.700137551581843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 69, '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': '3301313', 'n_tokens_mistral': 2441, 'n_tokens_neox': 2293, 'n_words': 461}