AliPhysics  a8afd6c (a8afd6c)
GetAlienGlobalProductionVariables.C
Go to the documentation of this file.
1 
9 // Set includes for compilation
10 
11 #if !defined(__CINT__) || defined(__MAKECINT__)
12 
13 #include <TString.h>
14 #include <TSystem.h>
15 
16 #endif
17 
29  TString & col, TString & period, Int_t & year,
30  Bool_t print = kFALSE)
31 {
32  if ( col != "" && year >= 2009 )
33  {
34  printf("GetAlienGlobalProductionVariables() - Use values set via configuration:"
35  " collision <%s>, period <%s>, year %d, MC %d\n",
36  col.Data(), period.Data(), year, simulation);
37  return;
38  }
39 
40  TString colType = gSystem->Getenv("ALIEN_JDL_LPMINTERACTIONTYPE");
41  TString prodTag = gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTAG");
42  TString prodType = gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTYPE");
43 
44  // In case of environmental name for child meta data
45  if ( colType == "" )
46  {
47  printf("GetAlienGlobalProductionVariables() - Default environment not found? check childs\n");
48  for(Int_t ichild = 0; ichild < 100; ichild++)
49  {
50  colType = gSystem->Getenv(Form("ALIEN_JDL_child_%d_LPMINTERACTIONTYPE",ichild));
51  prodTag = gSystem->Getenv(Form("ALIEN_JDL_child_%d_LPMPRODUCTIONTAG" ,ichild));
52  prodType = gSystem->Getenv(Form("ALIEN_JDL_child_%d_LPMPRODUCTIONTYPE" ,ichild));
53 
54  printf("\t child %d col <%s>, tag <%s>, type <%s>\n",
55  ichild,colType.Data(),prodTag.Data(),prodType.Data());
56 
57  if ( colType != "" ) break;
58  }
59  }
60 
61  if (colType.Contains( "PbPb")) col = "PbPb";
62  else if (colType.Contains( "XeXe")) col = "PbPb";
63  else if (colType.Contains( "AA" )) col = "PbPb";
64  else if (colType.Contains( "pA" )) col = "pPb";
65  else if (colType.Contains( "Ap" )) col = "pPb";
66  else if (colType.Contains( "pPb" )) col = "pPb";
67  else if (colType.Contains( "Pbp" )) col = "pPb";
68  else if (colType.Contains( "pp" )) col = "pp" ;
69 
70  // Check if production is MC or data, of data recover period name
71  if ( prodType.Contains("MC") ) simulation = kTRUE;
72  else simulation = kFALSE;
73 
74  if ( !simulation && period == "" ) period = prodTag;
75 
76  // print check on global settings once
77  if ( print )
78  printf("GetAlienGlobalProductionVariables() - Get the data features from global parameters: "
79  "collision <%s> (<%s>), period <%s>, tag <%s>, type <%s>, MC bool <%d> \n",
80  colType.Data(),col.Data(),period.Data(),prodTag.Data(),prodType.Data(),simulation);
81 
82  if ( year < 2009 && !simulation )
83  {
84  if (period.Contains("18")) year = 2018;
85  else if(period.Contains("17")) year = 2017;
86  else if(period.Contains("16")) year = 2016;
87  else if(period.Contains("15")) year = 2015;
88  else if(period.Contains("13")) year = 2013;
89  else if(period.Contains("12")) year = 2012;
90  else if(period.Contains("11")) year = 2011;
91  else if(period.Contains("10")) year = 2010;
92  else year = 2018;
93 
94  if ( print )
95  printf("GetAlienGlobalProductionVariables() - Data year <%d> \n", year);
96  }
97 
98  // Check MC production tag name to match with data year and production name
99  if ( simulation )
100  {
101  // 2011 MC productions
102  if ( prodTag.Contains("14j") )
103  {
104  year = 2010;
105  period = "LHC10";
106  }
107 
108  // 2011 MC productions
109  else if ( prodTag.Contains("14ka1") || prodTag.Contains("14k1b") || // 7 TeV jet-jet+gamma
110  prodTag.Contains("12a15g")|| prodTag.Contains("13e4") || // 7 TeV gamma-jet
111  prodTag.Contains("13e5") || // jet-jet pi0
112  prodTag.Contains("13d1") || // MB+pi0
113  prodTag.Contains("12f2a") || prodTag.Contains("12f2b") || // 7 TeV jet-jet+pi0, jet-jet+hadron
114  prodTag.Contains("12a15f")|| prodTag.Contains("12a15a")|| // 7 TeV and 2.76 jet-jet
115  prodTag.Contains("12a17") || prodTag.Contains("14a1") ) // Pb-Pb LHC11h
116  {
117  year = 2011;
118  period = "LHC11";
119  }
120 
121  // 2012 MC productions
122  else if ( prodTag.Contains("13d6") || prodTag.Contains("13d7") ||
123  prodTag.Contains("13d8") || prodTag.Contains("13d9") || //MB
124  prodTag.Contains("14i") ||
125  prodTag.Contains("15h1") || // 8 TeV min bias PYTHIA8
126  prodTag.Contains("15h2") || // 8 TeV min bias PHOJET
127  prodTag.Contains("16c2") || // 8 TeV jet-jet
128  prodTag.Contains("17g5") ) // 8 TeV jet-jet+gamma, gamma-jet
129  {
130  year = 2012;
131  period = "LHC12";
132  }
133 
134  // 2013 MC productions
135  else if ( prodTag.Contains("LHC13") || prodTag.Contains("LHC14") ||
136  prodTag.Contains("15b1") ||
137  prodTag.Contains("15a3") || // pp 2.76 GJ, JJ
138  prodTag.Contains("15a1") ||
139  prodTag.Contains("16c3") || // JJ+G, GJ Pythia6
140  prodTag.Contains("17g6") || // JJ+G, GJ, + BKG Pythia8
141  prodTag.Contains("16k1a") ||
142  prodTag.Contains("15g") )
143  {
144  year = 2013;
145  period = "LHC13";
146  }
147  else if ( prodTag.Contains("16k") || prodTag.Contains("16h") || // LHC15o,n
148  prodTag.Contains("16g") || // LHC15o
149  prodTag.Contains("17d5") || prodTag.Contains("17d6") || // general purpose and other
150  prodTag.Contains("17d7") || prodTag.Contains("17d8") || // general purpose and other
151  prodTag.Contains("17e2") || prodTag.Contains("17h5") || // PbPb
152  prodTag.Contains("LHC17i4")|| prodTag.Contains("LHC17l1")||
153  prodTag.Contains("18a5a") ||
154  prodTag.Contains("18a7") ||
155  prodTag.Contains("18b10") ||
156  prodTag.Contains("18b11") ) // jet-jet PbPb
157  {
158  year = 2015;
159  period = "LHC15";
160  }
161 
162  // 2016 MC productions
163  else if ( prodTag.Contains("17f") || prodTag.Contains("17e") ||// general purpose and other
164  prodTag.Contains("17d") || prodTag.Contains("17l2") ||
165  prodTag.Contains("17l6") || prodTag.Contains("17l7") ||
166  prodTag.Contains("17h6") || // pPb
167  prodTag.Contains("17h2") || // pp 13
168  prodTag.Contains("17h10b") ||
169  prodTag.Contains("17h4") || prodTag.Contains("17h8") ||
170  prodTag.Contains("17h9") || prodTag.Contains("18b3_")||
171  prodTag.Contains("17i3") ) // pp 13 TeV jet-jet+gamma, gamma-jet
172  {
173  year = 2016;
174  period = "LHC16";
175  }
176 
177  // 2017 MC productions
178  else if ( prodTag.Contains("17h") || prodTag.Contains("17l") ||
179  prodTag.Contains("17k") ||
180  prodTag.Contains("18b8") || // Jet-Jet 5 TeV
181  prodTag.Contains("18b10") || // Gamma-Jet 5 TeV
182  prodTag.Contains("18c12") || prodTag.Contains("18c13")||
183  prodTag.Contains("18a1") || prodTag.Contains("18a3") ||
184  prodTag.Contains("18a4") || prodTag.Contains("18a8") ||
185  prodTag.Contains("18a9") )
186  {
187  year = 2017;
188  period = "LHC17";
189  }
190  else
191  {
192  year = 2018;
193  period = "LHC18";
194  }
195 
196  if ( print )
197  printf("GetAlienGlobalProductionVariables() - Simulation period <%s>, year <%d> \n",
198  period.Data(),year);
199  } // Prod MC names
200 
201 }
TSystem * gSystem
int Int_t
Definition: External.C:63
void GetAlienGlobalProductionVariables(Bool_t &simulation, TString &col, TString &period, Int_t &year, Bool_t print=kFALSE)
bool Bool_t
Definition: External.C:53