ROOT logo
AliAnalysisTaskElecV2* ConfigHFEElecV2(Bool_t useMC){
  //
  // HFE standard task configuration
  //

  Bool_t kAnalyseTaggedTracks = kTRUE;
  
  AliHFEcuts *hfecuts = new AliHFEcuts("hfeCutsEMCAL","HFE Standard Cuts");
  hfecuts->CreateStandardCuts();
  hfecuts->SetMinNClustersTPC(100);
  hfecuts->SetMinRatioTPCclusters(0.6);
  hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
  hfecuts->SetMinNClustersITS(3);
  hfecuts->SetCutITSpixel(AliHFEextraCuts::kFirst);
  hfecuts->SetCheckITSLayerStatus(kFALSE);
  hfecuts->SetVertexRange(10.);
  hfecuts->SetTOFPIDStep(kFALSE);
  hfecuts->SetPtRange(2, 50);
  hfecuts->SetMaxImpactParam(1,2);
  
  AliAnalysisTaskElecV2 *task = new AliAnalysisTaskElecV2("HFE v2");
  printf("task ------------------------ %p\n ", task);
  task->SetHFECuts(hfecuts);
  task->SetInvariantMassCut(0.05);

  // Define PID
  AliHFEpid *pid = task->GetPID();
  if(useMC) pid->SetHasMCData(kTRUE);
  pid->AddDetector("TPC", 0);
  pid->AddDetector("EMCAL", 1);
  // change E/p cuts
  AliHFEpidEMCAL *emcpid = pid->AliHFEpid::GetDetPID(AliHFEpid::kEMCALpid);
  emcpid->SetEoPMax(1.2);
  emcpid->SetEoPMim(0.9);

  Double_t params[4];
  char *cutmodel;
  if(useMC){
	  // Monte-Carlo needs modelling of the falling mean with momentum at low momentum
	  // for high momentum it is consistent with a flat -0.94
	  cutmodel = "[0]*TMath::Exp([1]*x) + [2] + [3]*x";
	  Double_t paramsMC[4] = {0.7174, -1.588, -0.9395, 0.0246};
	  for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar];
  } else {
	  // Data is consistent with a flat 0.12
	  cutmodel = "pol0";
	  //params[0] = -0.0015;
	  //params[0] = -3.0;
	  //params[0] = -0.05; //sigma min
	  params[0] = -1.0; //sigma min
  }
  pid->ConfigureTPCdefaultCut(cutmodel, params,3.0); 

  printf("*************************************\n");
  printf("Configuring standard Task:\n");
//  task->PrintStatus();
  pid->PrintStatus();
  printf("*************************************\n"); 
  return task;
}
 ConfigHFEElecV2.C:1
 ConfigHFEElecV2.C:2
 ConfigHFEElecV2.C:3
 ConfigHFEElecV2.C:4
 ConfigHFEElecV2.C:5
 ConfigHFEElecV2.C:6
 ConfigHFEElecV2.C:7
 ConfigHFEElecV2.C:8
 ConfigHFEElecV2.C:9
 ConfigHFEElecV2.C:10
 ConfigHFEElecV2.C:11
 ConfigHFEElecV2.C:12
 ConfigHFEElecV2.C:13
 ConfigHFEElecV2.C:14
 ConfigHFEElecV2.C:15
 ConfigHFEElecV2.C:16
 ConfigHFEElecV2.C:17
 ConfigHFEElecV2.C:18
 ConfigHFEElecV2.C:19
 ConfigHFEElecV2.C:20
 ConfigHFEElecV2.C:21
 ConfigHFEElecV2.C:22
 ConfigHFEElecV2.C:23
 ConfigHFEElecV2.C:24
 ConfigHFEElecV2.C:25
 ConfigHFEElecV2.C:26
 ConfigHFEElecV2.C:27
 ConfigHFEElecV2.C:28
 ConfigHFEElecV2.C:29
 ConfigHFEElecV2.C:30
 ConfigHFEElecV2.C:31
 ConfigHFEElecV2.C:32
 ConfigHFEElecV2.C:33
 ConfigHFEElecV2.C:34
 ConfigHFEElecV2.C:35
 ConfigHFEElecV2.C:36
 ConfigHFEElecV2.C:37
 ConfigHFEElecV2.C:38
 ConfigHFEElecV2.C:39
 ConfigHFEElecV2.C:40
 ConfigHFEElecV2.C:41
 ConfigHFEElecV2.C:42
 ConfigHFEElecV2.C:43
 ConfigHFEElecV2.C:44
 ConfigHFEElecV2.C:45
 ConfigHFEElecV2.C:46
 ConfigHFEElecV2.C:47
 ConfigHFEElecV2.C:48
 ConfigHFEElecV2.C:49
 ConfigHFEElecV2.C:50
 ConfigHFEElecV2.C:51
 ConfigHFEElecV2.C:52
 ConfigHFEElecV2.C:53
 ConfigHFEElecV2.C:54
 ConfigHFEElecV2.C:55
 ConfigHFEElecV2.C:56
 ConfigHFEElecV2.C:57
 ConfigHFEElecV2.C:58
 ConfigHFEElecV2.C:59
 ConfigHFEElecV2.C:60
 ConfigHFEElecV2.C:61