AliPhysics  vAN-20150630 (513c479)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddTaskEMCALTimeCalibration.C
Go to the documentation of this file.
1 
22 AliAnalysisTaskEMCALTimeCalib * AddTaskEMCALTimeCalibration(TString outputFile = "", // timeResults.root
23  TString geometryName = "EMCAL_COMPLETE12SMV1_DCAL_8SM",
24  Double_t minClusterEne = 1.0,
25  Double_t maxClusterEne = 500,
26  Int_t minNcells = 2,
27  Int_t maxNcells = 200,
28  Double_t minLambda0 = 0.1,
29  Double_t maxLambda0 = 0.4,
30  Double_t maxRtrack = 0.025,
31  Double_t minCellEne = 0.4,
32  Double_t minTime = -20.,
33  Double_t maxTime = 20.,
34  Bool_t pileupFromSPDFlag = kFALSE,
35  TString referenceFileName = "Reference.root")
36 {
37  // Get the pointer to the existing analysis manager via the static access method.
38  //==============================================================================
39  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
40  if (!mgr)
41  {
42  ::Error("AddTaskEMCALTimeCalibration", "No analysis manager to connect to.");
43  return NULL;
44  }
45 
46  // Check the analysis type using the event handlers connected to the analysis manager.
47  //==============================================================================
48  if (!mgr->GetInputEventHandler())
49  {
50  ::Error("AddTaskEMCALTimeCalibration", "This task requires an input event handler");
51  return NULL;
52  }
53 
54  AliAnalysisTaskEMCALTimeCalib *taskmbemcal = new AliAnalysisTaskEMCALTimeCalib("TimeCalibTask");
55  taskmbemcal->SelectCollisionCandidates(AliVEvent::kEMC1|AliVEvent::kEMC7|AliVEvent::kEMC8|AliVEvent::kEMCEJE|AliVEvent::kEMCEGA);
56  taskmbemcal->SetGeometryName(geometryName);
57  taskmbemcal->SetMinClusterEnergy (minClusterEne);
58  taskmbemcal->SetMaxClusterEnergy (maxClusterEne);
59  taskmbemcal->SetMinNcells (minNcells);
60  taskmbemcal->SetMaxNcells (maxNcells);
61  taskmbemcal->SetMinLambda0 (minLambda0);
62  taskmbemcal->SetMaxLambda0 (maxLambda0);
63  taskmbemcal->SetMaxRtrack (maxRtrack);
64  taskmbemcal->SetMinCellEnergy (minCellEne);
65  taskmbemcal->SetMinTime (minTime);
66  taskmbemcal->SetMaxTime (maxTime);
67  taskmbemcal->SetReferenceFileName(referenceFileName);
68  if(pileupFromSPDFlag==kTRUE) taskmbemcal->SwitchOnPileupFromSPD();
69  else taskmbemcal->SwitchOffPileupFromSPD();
70  //taskmbemcal->PrintInfo();
71 
72  if(outputFile.Length()==0) outputFile = AliAnalysisManager::GetCommonFileName();
73 
74  // Create containers for input/output
75  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
76  AliAnalysisDataContainer *coutput = mgr->CreateContainer("chistolist", TList::Class(),
77  AliAnalysisManager::kOutputContainer,
78  outputFile.Data());
79 
80  mgr->AddTask(taskmbemcal);
81 
82 
83  mgr->ConnectInput (taskmbemcal, 0, cinput1);
84  mgr->ConnectOutput (taskmbemcal, 1, coutput);
85 
86 
87  return taskmbemcal;
88 }
Task to work on Time Calibration for EMCal/DCal.
AliAnalysisTaskEMCALTimeCalib * AddTaskEMCALTimeCalibration(TString outputFile="", TString geometryName="EMCAL_COMPLETE12SMV1_DCAL_8SM", Double_t minClusterEne=1.0, Double_t maxClusterEne=500, Int_t minNcells=2, Int_t maxNcells=200, Double_t minLambda0=0.1, Double_t maxLambda0=0.4, Double_t maxRtrack=0.025, Double_t minCellEne=0.4, Double_t minTime=-20., Double_t maxTime=20., Bool_t pileupFromSPDFlag=kFALSE, TString referenceFileName="Reference.root")