AliPhysics  f6e6b3f (f6e6b3f)
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  TString colType = gSystem->Getenv("ALIEN_JDL_LPMINTERACTIONTYPE");
33  TString prodTag = gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTAG");
34  TString prodType = gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTYPE");
35 
36  if(col=="") // Check the alien environment
37  {
38  if (colType.Contains( "PbPb")) col = "PbPb";
39  else if (colType.Contains( "XeXe")) col = "PbPb";
40  else if (colType.Contains( "AA" )) col = "PbPb";
41  else if (colType.Contains( "pA" )) col = "pPb";
42  else if (colType.Contains( "Ap" )) col = "pPb";
43  else if (colType.Contains( "pPb" )) col = "pPb";
44  else if (colType.Contains( "Pbp" )) col = "pPb";
45  else if (colType.Contains( "pp" )) col = "pp" ;
46 
47  // Check if production is MC or data, of data recover period name
48  if ( prodType.Contains("MC") ) simulation = kTRUE;
49  else simulation = kFALSE;
50 
51  if ( !simulation && period!="" ) period = prodTag;
52 
53  // print check on global settings once
54  if(print)
55  printf("GetAlienGlobalProductionVariables() - Get the data features from global parameters: "
56  "collision <%s> (<%s>), period <%s>, tag <%s>, type <%s>, MC bool <%d> \n",
57  colType.Data(),col.Data(),
58  period.Data(),prodType.Data(),prodTag.Data(),simulation);
59  }
60 
61  if ( year < 2009 && !simulation )
62  {
63  if (period.Contains("16")) year = 2016;
64  else if(period.Contains("15")) year = 2015;
65  else if(period.Contains("13")) year = 2013;
66  else if(period.Contains("12")) year = 2012;
67  else if(period.Contains("11")) year = 2011;
68  else if(period.Contains("10")) year = 2010;
69  }
70 
71  // Check MC production tag name to match with data year and production name
72  if ( simulation && period=="" )
73  {
74  // 2011 MC productions
75  if ( prodType.Contains("14ka1") || prodType.Contains("14k1b") || // 7 TeV jet-jet+gamma
76  prodType.Contains("12a15g") || prodType.Contains("13e4") || // 7 TeV gamma-jet
77  prodType.Contains("12f2a") || prodType.Contains("12f2b") || // 7 TeV jet-jet+pi0, jet-jet+hadron
78  prodType.Contains("12a15f") || prodType.Contains("12a15a")|| // 7 TeV and 2.76 jet-jet
79  prodType.Contains("12a17") || prodType.Contains("14a1") ) // Pb-Pb LHC11h
80  {
81  year = 2011;
82  period = "LHC11";
83  }
84 
85  // 2012 MC productions
86  if ( prodType.Contains("15h1") || // 8 TeV min bias
87  prodType.Contains("16c2") || // 8 TeV jet-jet
88  prodType.Contains("17g5") ) // 8 TeV jet-jet+gamma, gamma-jet
89  {
90  year = 2012;
91  period = "LHC12";
92  }
93  } // Prod MC names
94 
95 }
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