AliPhysics  master (3d17d9d)
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 
37 Bool_t CheckActiveEMCalTriggerPerPeriod(Bool_t simulation, TString & trigger, TString period, Int_t year)
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 first LHC16 periods
166  //
167  if ( year == 2016 && trigger.Contains("L") )
168  {
169  if ( period == "LHC16b" || period == "LHC16c" || period == "LHC16d" ||
170  period == "LHC16e" || period == "LHC16f" || period == "LHC16g" ||
171  period == "LHC16h" )
172  {
173  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal for period %s, SKIP \n",
174  trigger.Data(),period.Data());
175 
176  return kFALSE;
177  }
178  }
179 
180  // Run2: triggers not used in first LHC17 periods and LHC17n period XeXe
181  //
182  if ( year == 2017 && trigger.Contains("L") )
183  {
184  if ( period == "LHC17a" || period == "LHC17b" || period == "LHC17c" ||
185  period == "LHC17d" || period == "LHC17e" || period == "LHC17f" ||
186  period == "LHC17g" || period == "LHC17n" )
187  {
188  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal triggers for period %s, SKIP \n",
189  trigger.Data(),period.Data());
190 
191  return kFALSE;
192  }
193  }
194 
195  // Run2: L1 trigger not used in LHC17pq period
196  //
197  if ( year == 2017 && ( period == "LHC17p" || period == "LHC17q" ) && ( trigger.Contains("L1") ) )
198  {
199  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal L1 trigger for period %s, SKIP \n",
200  trigger.Data(),period.Data());
201 
202  return kFALSE;
203  }
204 
205  // Some periods with triggered events do not have TPC and the trigger mask is kCaloOnly,
206  // indicate this via the trigger string, so that in macro ConfigureAndGetEventTriggerMaskAndCaloTriggerString.C
207  // the proper trigger mask AliVEvent::kCaloOnly is applied.
208  if ( !trigger.Contains("CaloOnly") &&
209  ( period == "LHC15n" || period == "LHC17p" || period == "LHC17q") )
210  {
211  trigger+="_CaloOnly";
212  printf("CheckActiveEMCalTriggerPerPeriod() - Add <_CaloOnly> to trigger string: %s!!!\n",trigger.Data());
213  }
214 
215 
216  // Run2: triggers not used in first LHC18 periods
217  //
218  if ( year == 2018 && trigger.Contains("L") )
219  {
220  if ( period == "LHC18a" || period == "LHC18b" || period == "LHC18c" )
221  {
222  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal triggers for period %s, SKIP \n",
223  trigger.Data(),period.Data());
224 
225  return kFALSE;
226  }
227  }
228 
229  // Run2: triggers EG2 and L0 not used in LHC18 Pb-Pb periods
230  //
231  if ( year == 2018 && (trigger.Contains("L2") || trigger.Contains("L0")) )
232  {
233  if ( period == "LHC18q" || period == "LHC18r" )
234  {
235  printf("CheckActiveEMCalTriggerPerPeriod() - REMARK! : No %s triggered events by EMCal triggers for period %s, SKIP \n",
236  trigger.Data(),period.Data());
237 
238  return kFALSE;
239  }
240  }
241 
242  // Everything is ok accept this configuration
243  return kTRUE;
244 }
245 
246 
247 
int Int_t
Definition: External.C:63
bool Bool_t
Definition: External.C:53
Bool_t CheckActiveEMCalTriggerPerPeriod(Bool_t simulation, TString &trigger, TString period, Int_t year)