ROOT logo
// $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();
  }
  
  if (fidRegion)
    EMCALSupply->SwitchOnCellFiducialRegion();
  else
    EMCALSupply->SwitchOffCellFiducialRegion();

  if (calibTime) {
    EMCALSupply->SwitchOnCalibrateTime();
    EMCALSupply->SwitchOnUpdateCell();
  }
  else
    EMCALSupply->SwitchOffCalibrateTime();

  if (calibEnergy) {
    EMCALSupply->SwitchOnCalibrateEnergy();
    EMCALSupply->SwitchOnUpdateCell();
  }
  else
    EMCALSupply->SwitchOffCalibrateEnergy();

  if (trackMatch) {
    EMCALSupply->SetMass(0.139);
    EMCALSupply->SwitchOnCutEtaPhiSeparate();
    EMCALSupply->SetEtaCut(0.025);
    EMCALSupply->SetPhiCut(0.05);
    EMCALSupply->SwitchOnTrackMatch();
  } else {
    EMCALSupply->SwitchOffTrackMatch();
  }
  
  if (updateCellOnly) 
    EMCALSupply->SwitchOnUpdateCellOnly();
  else
    EMCALSupply->SwitchOffUpdateCellOnly();

  return EMCALSupply;
}
 ConfigEmcalTenderSupply.C:1
 ConfigEmcalTenderSupply.C:2
 ConfigEmcalTenderSupply.C:3
 ConfigEmcalTenderSupply.C:4
 ConfigEmcalTenderSupply.C:5
 ConfigEmcalTenderSupply.C:6
 ConfigEmcalTenderSupply.C:7
 ConfigEmcalTenderSupply.C:8
 ConfigEmcalTenderSupply.C:9
 ConfigEmcalTenderSupply.C:10
 ConfigEmcalTenderSupply.C:11
 ConfigEmcalTenderSupply.C:12
 ConfigEmcalTenderSupply.C:13
 ConfigEmcalTenderSupply.C:14
 ConfigEmcalTenderSupply.C:15
 ConfigEmcalTenderSupply.C:16
 ConfigEmcalTenderSupply.C:17
 ConfigEmcalTenderSupply.C:18
 ConfigEmcalTenderSupply.C:19
 ConfigEmcalTenderSupply.C:20
 ConfigEmcalTenderSupply.C:21
 ConfigEmcalTenderSupply.C:22
 ConfigEmcalTenderSupply.C:23
 ConfigEmcalTenderSupply.C:24
 ConfigEmcalTenderSupply.C:25
 ConfigEmcalTenderSupply.C:26
 ConfigEmcalTenderSupply.C:27
 ConfigEmcalTenderSupply.C:28
 ConfigEmcalTenderSupply.C:29
 ConfigEmcalTenderSupply.C:30
 ConfigEmcalTenderSupply.C:31
 ConfigEmcalTenderSupply.C:32
 ConfigEmcalTenderSupply.C:33
 ConfigEmcalTenderSupply.C:34
 ConfigEmcalTenderSupply.C:35
 ConfigEmcalTenderSupply.C:36
 ConfigEmcalTenderSupply.C:37
 ConfigEmcalTenderSupply.C:38
 ConfigEmcalTenderSupply.C:39
 ConfigEmcalTenderSupply.C:40
 ConfigEmcalTenderSupply.C:41
 ConfigEmcalTenderSupply.C:42
 ConfigEmcalTenderSupply.C:43
 ConfigEmcalTenderSupply.C:44
 ConfigEmcalTenderSupply.C:45
 ConfigEmcalTenderSupply.C:46
 ConfigEmcalTenderSupply.C:47
 ConfigEmcalTenderSupply.C:48
 ConfigEmcalTenderSupply.C:49
 ConfigEmcalTenderSupply.C:50
 ConfigEmcalTenderSupply.C:51
 ConfigEmcalTenderSupply.C:52
 ConfigEmcalTenderSupply.C:53
 ConfigEmcalTenderSupply.C:54
 ConfigEmcalTenderSupply.C:55
 ConfigEmcalTenderSupply.C:56
 ConfigEmcalTenderSupply.C:57
 ConfigEmcalTenderSupply.C:58
 ConfigEmcalTenderSupply.C:59
 ConfigEmcalTenderSupply.C:60
 ConfigEmcalTenderSupply.C:61
 ConfigEmcalTenderSupply.C:62
 ConfigEmcalTenderSupply.C:63
 ConfigEmcalTenderSupply.C:64
 ConfigEmcalTenderSupply.C:65
 ConfigEmcalTenderSupply.C:66
 ConfigEmcalTenderSupply.C:67
 ConfigEmcalTenderSupply.C:68
 ConfigEmcalTenderSupply.C:69
 ConfigEmcalTenderSupply.C:70
 ConfigEmcalTenderSupply.C:71
 ConfigEmcalTenderSupply.C:72
 ConfigEmcalTenderSupply.C:73
 ConfigEmcalTenderSupply.C:74
 ConfigEmcalTenderSupply.C:75
 ConfigEmcalTenderSupply.C:76
 ConfigEmcalTenderSupply.C:77
 ConfigEmcalTenderSupply.C:78
 ConfigEmcalTenderSupply.C:79
 ConfigEmcalTenderSupply.C:80
 ConfigEmcalTenderSupply.C:81
 ConfigEmcalTenderSupply.C:82
 ConfigEmcalTenderSupply.C:83
 ConfigEmcalTenderSupply.C:84
 ConfigEmcalTenderSupply.C:85
 ConfigEmcalTenderSupply.C:86
 ConfigEmcalTenderSupply.C:87
 ConfigEmcalTenderSupply.C:88
 ConfigEmcalTenderSupply.C:89
 ConfigEmcalTenderSupply.C:90
 ConfigEmcalTenderSupply.C:91
 ConfigEmcalTenderSupply.C:92
 ConfigEmcalTenderSupply.C:93
 ConfigEmcalTenderSupply.C:94
 ConfigEmcalTenderSupply.C:95
 ConfigEmcalTenderSupply.C:96
 ConfigEmcalTenderSupply.C:97
 ConfigEmcalTenderSupply.C:98
 ConfigEmcalTenderSupply.C:99
 ConfigEmcalTenderSupply.C:100
 ConfigEmcalTenderSupply.C:101
 ConfigEmcalTenderSupply.C:102
 ConfigEmcalTenderSupply.C:103
 ConfigEmcalTenderSupply.C:104
 ConfigEmcalTenderSupply.C:105
 ConfigEmcalTenderSupply.C:106
 ConfigEmcalTenderSupply.C:107
 ConfigEmcalTenderSupply.C:108
 ConfigEmcalTenderSupply.C:109
 ConfigEmcalTenderSupply.C:110
 ConfigEmcalTenderSupply.C:111
 ConfigEmcalTenderSupply.C:112
 ConfigEmcalTenderSupply.C:113
 ConfigEmcalTenderSupply.C:114
 ConfigEmcalTenderSupply.C:115
 ConfigEmcalTenderSupply.C:116
 ConfigEmcalTenderSupply.C:117
 ConfigEmcalTenderSupply.C:118
 ConfigEmcalTenderSupply.C:119
 ConfigEmcalTenderSupply.C:120
 ConfigEmcalTenderSupply.C:121
 ConfigEmcalTenderSupply.C:122
 ConfigEmcalTenderSupply.C:123
 ConfigEmcalTenderSupply.C:124
 ConfigEmcalTenderSupply.C:125
 ConfigEmcalTenderSupply.C:126
 ConfigEmcalTenderSupply.C:127
 ConfigEmcalTenderSupply.C:128
 ConfigEmcalTenderSupply.C:129
 ConfigEmcalTenderSupply.C:130
 ConfigEmcalTenderSupply.C:131
 ConfigEmcalTenderSupply.C:132
 ConfigEmcalTenderSupply.C:133
 ConfigEmcalTenderSupply.C:134