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