]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/macros/AddTaskJetRespPtHard.C
Updates from Redmer
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / macros / AddTaskJetRespPtHard.C
CommitLineData
4643d2e8 1// $Id$
2
cfc2ac24 3AliJetResponseMaker* AddTaskJetRespPtHard(
4 const char *ntracks1 = "Tracks",
5 const char *nclusters1 = "CaloClusters",
6 const char *njets1 = "Jets",
7 const char *nrho1 = "Rho",
f304dbe7 8 Double_t jetradius1 = 0.2,
cfc2ac24 9 const char *ntracks2 = "MCParticles",
10 const char *nclusters2 = "",
11 const char *njets2 = "MCJets",
12 const char *nrho2 = "",
f304dbe7 13 Double_t jetradius2 = 0.2,
cfc2ac24 14 Double_t jetptcut = 1,
15 Double_t jetareacut = 0.557,
16 Double_t jetBiasTrack = 5,
cfc2ac24 17 UInt_t matching = AliJetResponseMaker::kGeometrical,
7f76e479 18 Double_t maxDistance1 = 0.25,
19 Double_t maxDistance2 = 0.25,
cfc2ac24 20 UInt_t type = AliAnalysisTaskEmcal::kTPC,
cfc2ac24 21 Int_t minPtHardBin = -999,
507f74bc 22 Int_t maxPtHardBin = -999,
23 Int_t ncent = 0,
cfc2ac24 24 const char *taskname = "AliJetResponseMaker",
03d2dab9 25 Bool_t biggerMatrix = kFALSE
4643d2e8 26)
c8a63f73 27{
28 TCollection *funct = gROOT->GetListOfGlobalFunctions();
29 if (!funct->Contains("AddTaskJetResponseMaker"))
30 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskJetResponseMaker.C");
31 else
32 Printf("Function AddTaskJetResponseMaker already loaded, will not load again...");
507f74bc 33
34 Double_t centRanges[5] = {0,10,30,50,100};
35
36 if (ncent == 0) {
37 ncent = 1;
38 centRanges[0] = -999;
39 centRanges[1] = -999;
40 }
41
42 if (ncent > 4)
43 ncent = 4;
44
45 Int_t ntasks = (maxPtHardBin - minPtHardBin + 1) * ncent;
46
47 if (jetBiasTrack > 5)
48 ntasks *= 5;
49 else if (jetBiasTrack > 0)
50 ntasks *= 5;
51
52 AliJetResponseMaker *jetTask = new AliJetResponseMaker[ntasks];
53
54 Int_t itask = 0;
4643d2e8 55
d6cdb093 56 for (Int_t i = minPtHardBin; i <= maxPtHardBin; i++) {
507f74bc 57 for (Int_t j = 0; j < ncent; j++) {
58 Printf("Adding AliJetResponseMaker n. %d", itask);
f304dbe7 59 AddTaskJetResponseMaker(ntracks1, nclusters1, njets1, nrho1, jetradius1, ntracks2, nclusters2, njets2, nrho2, jetradius2,
60 jetptcut, jetareacut, 0, 0,
507f74bc 61 matching, maxDistance1, maxDistance2, type, i, centRanges[j], centRanges[j+1], taskname, biggerMatrix, jetTask + itask);
62 itask++;
63
64 if (jetBiasTrack > 5) {
65 Printf("Adding AliJetResponseMaker n. %d", itask);
f304dbe7 66 AddTaskJetResponseMaker(ntracks1, nclusters1, njets1, nrho1, jetradius1, ntracks2, nclusters2, njets2, nrho2, jetradius2,
67 jetptcut, jetareacut, 5, 1000,
507f74bc 68 0, 1, 1, type, i, centRanges[j], centRanges[j+1], taskname, biggerMatrix, jetTask + itask);
69 itask++;
70 }
71
72 if (jetBiasTrack > 0) {
73 Printf("Adding AliJetResponseMaker n. %d", itask);
f304dbe7 74 AddTaskJetResponseMaker(ntracks1, nclusters1, njets1, nrho1, jetradius1, ntracks2, nclusters2, njets2, nrho2, jetradius2,
75 jetptcut, jetareacut, jetBiasTrack, 1000,
507f74bc 76 0, 1, 1, type, i, centRanges[j], centRanges[j+1], taskname, biggerMatrix, jetTask + itask);
77 itask++;
78 }
79 }
4643d2e8 80 }
81
82 return jetTask;
83}