]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AddTaskMultDists.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AddTaskMultDists.C
1 /**
2  * @file   AddTaskMultDists.C
3  * @author Valentina Zaccolo
4  * @date   Thu Nov 22 11:29:26 2012
5  * 
6  * @brief Script to add a multiplicity task
7  * 
8  * 
9  * @ingroup pwglf_forward_scripts_tasks
10  */
11 /** 
12  * Function to add task to train 
13  * 
14  * @param trig      Trigger to use 
15  * @param vzMin     Least z-coordinate of the interaction point
16  * @param vzMax     Largest z-coordinate of the interaction point
17  * @param lowCent   Least centrality to consider 
18  * @param highCent  Largest centrality to consider 
19  * @param nBins     Number of bins to use 
20  * 
21  * @return Newly allocated task, or null 
22  */
23 AliAnalysisTask*
24 AddTaskMultDists(const char* trig     = "V0AND",
25                  Double_t    vzMin    = -4,
26                  Double_t    vzMax    = 4,
27                  Int_t       lowCent  = 0,
28                  Int_t       highCent = 0, 
29                  Int_t       nBins    = 400)
30 {
31   // Make our object.  2nd argumenent is absolute max Eta 
32   // 3rd argument is absolute max Vz
33   AliForwardMultiplicityDistribution* task = 
34     new AliForwardMultiplicityDistribution("Mult");
35   // Set the Vertex Range to Use
36   task->SetIpZRange(vzMin, vzMax);
37   // Set the Trigger Mask to Use (INEL, NSD, ...)
38   task->SetTriggerMask(trig);
39   // Set the Centrality limits
40   task->SetCentrality(lowCent, highCent);
41   // Set the Number of Bins
42   task->SetNBins(nBins);
43
44   //Add Full eta-ranges
45   task->AddBin(-3.4,5.1);
46   
47   //Add Symmetric eta bins.
48   Double_t limits[] = { 3.4, 3.0, 2.5, 2.4, 2.0, 1.5, 1.4, 1.0, 0.5, 0. };
49   Double_t* limit = limits;
50   while ((*limit) > 0.1) { 
51     task->AddBin(-(*limit), +(*limit));
52     // task->AddBin(0,+(*limit));
53     // task->AddBin(0,-(*limit));
54     limit++;
55   }
56   // task->AddBin(0,5.0);
57   // task->AddBin(0,4.5);
58   // task->AddBin(0,4.0); 
59   // task->AddBin(0,3.5); 
60
61   // Add 0.5 eta intervals
62   // for (Double_t l = -3; l < 5; l += 0.5) task->AddBin(l, l+.5);
63  
64   // Add 0.20 eta intervals
65   // for (Double_t l = -3; l < 5; l += 0.2) task->AddBin(l, l+.2);
66
67   task->Connect();
68   return task;
69 }
70
71   
72 //________________________________________________________________________
73 //
74 // EOF
75 //