]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/macros/AddTaskEMCALMesonGGSDMpPb.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskEMCALMesonGGSDMpPb.C
1 void AddTaskEMCALMesonGGSDMpPb(Int_t calibration = 0) 
2 {
3         
4   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5   if (!mgr) {
6     ::Error("AddTaskAliEMCALMesonGGSDMpPb", "No analysis manager to connect to.");
7     return NULL;
8   }  
9
10   //#####################################################
11   // Private Recalibrator:
12      Int_t GoodTasks  [4] = {1, 0,0,0};
13      Int_t RecalScheme[4] = {calibration, 3,5,7};
14   
15   // Int_t calibration: 
16   // 0:  no recalibration! 
17   // 1:  constant scale factor.
18   // 2:  Symmetric Decay Method
19   // 3:  J's fit to LHC12f1a MC single photons, 4 Aug 2013
20   // 4:  J's fit to the test beam data, 4 Aug 2013
21   // 5:  Based on kSDM/kTBCv3 (for MC)
22   // 6:  kBeamTestCorrectedv2 - in AliROOT! 
23   // 7:  kPi0MCv3 - in AliROOT! 
24   // 8:  kSDMv5 - based on J's fit to the noNL MC/data and kPi0MCv5 - 28 Oct 2013 (call it kSDMv5)
25   // 9:  kPi0MCv5 - J's fit to LHC12f1a/b MC single photons, 28 Oct 2013 (call it kPi0MCv5)
26   // 10: kBTCv6 - J played with test beam data - 19 Nov 2013
27   // 11: kPi0MCv6 - J played with test beam mc - 19 Nov 2013
28   //
29   //#####################################################  
30
31   AliAnalysisTaskEMCALMesonGGSDMpPb* task[4];
32   AliAnalysisDataContainer*  coutput[4];  
33   char saythis[500];
34
35   for(int i=0; i<4; i++){
36     if(GoodTasks[i]==0)
37       continue;
38     
39     sprintf(saythis,"EMCALMesonGGSDMpPbTask_%d",i);
40     task[i] = new AliAnalysisTaskEMCALMesonGGSDMpPb(saythis);
41     //task[i]->SelectCollisionCandidates(AliVEvent::kAny);
42     //task[i]->SelectCollisionCandidates(AliVEvent::kMB);//LHC11a
43     task[i]->SelectCollisionCandidates(AliVEvent::kINT7);//LHC13b/c
44     task[i]->SetRecalScheme(RecalScheme[i]);
45
46     task[i]->SetdRmin_ClustTrack(0.025);//not used at the moment! (Gustavo uses 0.04)
47     task[i]->SetFidPhiMinMax(1.39626, 3.15); // full emcal. 
48     //task[i]->SetFidPhiMinMax(1.39626, 2.10); //pPb no TRD
49     //task[i]->SetFidPhiMinMax(2.10, 3.15); //pPb with TRD
50     task[i]->SetFidEtaMinMax(-0.65, 0.65);
51     
52     mgr->AddTask(task[i]);
53     sprintf(saythis,"cont_AliAnalysisTaskEMCALMesonGGSDMpPb_%d",RecalScheme[i]);
54     coutput[i] = 
55       mgr->CreateContainer(saythis,
56                            TList::Class(),
57                            AliAnalysisManager::kOutputContainer,
58                            "EMCALMesonGGSDMpPbTask.root");
59     mgr->ConnectInput (task[i],0,mgr->GetCommonInputContainer());
60     mgr->ConnectOutput(task[i],1,coutput[i]); 
61     //AliMCEventHandler* handler = new AliMCEventHandler;
62     //handler->SetReadTR(kFALSE);
63     //mgr->SetMCtruthEventHandler(handler);
64   }
65
66 }