AliPhysics  31210d0 (31210d0)
CheckActiveEMCalTriggerPerPeriod.C
Go to the documentation of this file.
1 
19 #if !defined(__CINT__) || defined(__MAKECINT__)
20 
21 #include <TString.h>
22 
23 #endif
24 
38 {
39  // Accept directly all MB kind of events
40  //
41  if ( trigger.Contains("default") || trigger.Contains("INT") || trigger.Contains("MB") )
42  return kTRUE;
43 
44  // MC analysis has no trigger dependence, execute only for the default case
45  //
46  if ( simulation )
47  {
48  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : Triggered events not checked in simulation, SKIP trigger %s! \n",
49  trigger.Data());
50 
51  return kFALSE;
52  }
53 
54  // Triggers introduced in 2011
55  //
56  if ( year < 2011 && ( trigger.Contains("EMCAL") || trigger.Contains("DCAL") ) )
57  {
58  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No triggered events for year < 2011, SKIP trigger %s! \n",
59  trigger.Data());
60 
61  return kFALSE;
62  }
63 
64  // DCal Triggers introduced in 2015
65  //
66  if ( year < 2014 && trigger.Contains("DCAL") )
67  {
68  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No triggered events by DCal for year < 2014, SKIP trigger %s! \n",
69  trigger.Data());
70 
71  return kFALSE;
72  }
73 
74  // EG2 trigger only activated from 2013
75  //
76  if ( year < 2013 && trigger.Contains("L2") )
77  {
78  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : EG2 trigger not available for year < 2012, SKIP trigger %s in %s \n",
79  trigger.Data(),period.Data());
80 
81  return kFALSE;
82  }
83 
84  // Triggers only activated in 2013 from LHC13d for physics (it might be there are in b and c but not taking data)
85  //
86  if ( year == 2013 && trigger.Contains("L") && ( period.Contains("b") || period.Contains("c") ) )
87  {
88  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : Triggers not available for year 2013 in period %s, SKIP trigger %s! \n",
89  period.Data(), trigger.Data());
90 
91  return kFALSE;
92  }
93 
94  // DCal Triggers introduced in 2015
95  //
96  if ( year < 2014 && ( trigger.Contains("DCAL") ) )
97  {
98  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No triggered events by DCal for year < 2014, SKIP trigger %s! \n",
99  trigger.Data());
100 
101  return kFALSE;
102  }
103 
104  // L0 trigger used for periods below LHC11e?
105  //
106  if ( period == "LHC11h" && trigger.Contains("EMCAL_L0") )
107  {
108  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No EMCAL_L0 triggered events by EMCal for period LHC11h, SKIP trigger %s! \n",
109  trigger.Data());
110 
111  return kFALSE;
112  }
113 
114  // L1 trigger not used until LHC11e? period, what about LHC11f?
115  //
116  if ( period.Contains("LHC11") && period != "LHC11h" && trigger.Contains("EMCAL_L1") )
117  {
118  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal for period %s, SKIP \n",
119  trigger.Data(),period.Data());
120 
121  return kFALSE;
122  }
123 
124  // L1 trigger not used again until LHC12c period
125  //
126  if ( ( period == "LHC12a" || period == "LHC12b" ) && trigger.Contains("EMCAL_L1") )
127  {
128  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal for period %s, SKIP \n",
129  trigger.Data(),period.Data());
130 
131  return kFALSE;
132  }
133 
134  // Run2: No trigger used again until LHC15i period
135  //
136  if ( year == 2015 && ( period == "LHC15h" || period == "LHC15g" || period == "LHC15f" || period == "LHC15e" ||
137  period == "LHC15d" || period == "LHC15c" || period == "LHC15b" || period == "LHC15a" ) )
138  {
139  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal for period %s, SKIP \n",
140  trigger.Data(),period.Data());
141 
142  return kFALSE;
143  }
144 
145  // Run2: L1 trigger not used again until LHC15o period
146  //
147  if ( year == 2015 && period != "LHC15o" && !trigger.Contains("L0") )
148  {
149  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal for period %s, SKIP \n",
150  trigger.Data(),period.Data());
151 
152  return kFALSE;
153  }
154 
155  // Run2: L0 and L2 trigger not used in LHC15o period
156  //
157  if ( year == 2015 && period == "LHC15o" && ( trigger.Contains("L0") || trigger.Contains("L2") ) )
158  {
159  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal for period %s, SKIP \n",
160  trigger.Data(),period.Data());
161 
162  return kFALSE;
163  }
164 
165  // Run2: triggers not used in LHC17n period XeXe
166  //
167  if ( year == 2017 && period == "LHC17n" && trigger.Contains("L") )
168  {
169  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal triggers for period %s XeXe, SKIP \n",
170  trigger.Data(),period.Data());
171 
172  return kFALSE;
173  }
174 
175  // Run2: L1 trigger not used in LHC17pq period
176  //
177  if ( year == 2017 && ( period == "LHC17p" || period == "LHC17q" ) && ( trigger.Contains("L1") ) )
178  {
179  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal L1 trigger for period %s, SKIP \n",
180  trigger.Data(),period.Data());
181 
182  return kFALSE;
183  }
184 
185  return kTRUE;
186 }
187 
Bool_t CheckActiveEMCalTriggerPerPeriod(Bool_t simulation, TString trigger, TString period, Int_t year)
int Int_t
Definition: External.C:63
bool Bool_t
Definition: External.C:53