]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/trains/MakeRespMatrTrain.C
Added scripts for Casper/Valentina style P(N_{ch}) analysis
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / trains / MakeRespMatrTrain.C
1 /**
2  * @file   CreateRespMatrTrain.C
3  * @author Valentina Zaccolo
4  * @date   Fri Jan  11 14:47:26 2013
5  * 
6  * @brief  
7  * 
8  * @ingroup pwglf_forward_trains_specific
9  * 
10  */
11
12 #include "TrainSetup.C"
13
14 //====================================================================
15 /**
16  * Analysis train to make @f$ Response Matrices@f$
17  * 
18  *
19  * @ingroup pwglf_forward_mult
20  * @ingroup pwglf_forward_trains_specific
21  */
22 class MakeRespMatrTrain : public TrainSetup
23 {
24 public:
25   /** 
26    * Constructor.  
27    * 
28    * @param name     Name of train (free form)
29    * @param trig     "NSD" for Non-Single-Diffractive, "INEL" for inelastic
30    * @param nBins    For pp set 500, for central PbPb set 30000
31    */
32  MakeRespMatrTrain(const char* name)
33   : TrainSetup(name)
34   {
35     fOptions.Add("trig",  "TYPE",       "Trigger type", "V0AND");
36     fOptions.Add("vzMin", "CENTIMETER", "Min Ip Z",     -4);
37     fOptions.Add("vzMax", "CENTIMETER", "Max Ip Z",     +4);
38   }
39 protected:
40   /** 
41    * Make the tasks 
42    * 
43    * @param par  Whether to use par files 
44    */
45   void CreateTasks(AliAnalysisManager*)
46   {
47     // --- Output file name ------------------------------------------
48     AliAnalysisManager::SetCommonFileName("forward_response.root");
49
50     // --- Load libraries/pars ---------------------------------------
51     fHelper->LoadLibrary("PWGLFforward2");
52     
53     // --- Set load path ---------------------------------------------
54     gROOT->SetMacroPath(Form("%s:$(ALICE_ROOT)/PWGLF/FORWARD/analysis2",
55                              gROOT->GetMacroPath()));
56
57     // --- Get parameters --------------------------------------------
58     TString  trig    = fOptions.Get("trig");
59     Double_t vzMin   = fOptions.AsDouble("vzmin", -4);
60     Double_t vzMax   = fOptions.AsDouble("vzmax", +4);
61
62     // --- Form arguments --------------------------------------------
63     TString args;
64     args.Form("\"%s\",%f,%f",
65               trig.Data(), vzMin, vzMax);
66     // --- Add the task ----------------------------------------------
67     gROOT->Macro(Form("AddTaskCreateRespMatr.C(%s);", args.Data()));
68   }
69   //__________________________________________________________________
70   /** 
71    * Do not the centrality selection
72    */
73   void CreateCentralitySelection(Bool_t, AliAnalysisManager*) {}
74   //__________________________________________________________________
75   /** 
76    * Crete output handler - we don't want one here. 
77    * 
78    * @return 0
79    */
80   AliVEventHandler* CreateOutputHandler(UShort_t) { return 0; }
81   /** 
82    * Never ever make an MC input handler! (we're working on AODs,
83    * right?)
84    */
85   AliVEventHandler* CreateMCHandler(UShort_t type, bool mc) { return 0; }
86   //__________________________________________________________________
87   const char* ClassName() const { return "MakeRespMatrTrain"; }
88   //__________________________________________________________________
89   
90 };
91 //
92 // EOF
93 //