AliPhysics  8d00e07 (8d00e07)
AliAnalysisTaskEmcalTriggerBase.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 #include <algorithm>
16 #include <array>
17 #include <cfloat>
18 #include <functional>
19 #include <iostream>
20 #include <memory>
21 
22 #include <TClonesArray.h>
23 #include <TGrid.h>
24 #include <THistManager.h>
25 #include <TObjArray.h>
26 #include <TObjString.h>
27 #include <TParameter.h>
28 
30 #include "AliAnalysisUtils.h"
31 #include "AliAODEvent.h"
32 #include "AliAODInputHandler.h"
35 #include "AliEMCALGeometry.h"
36 #include "AliEMCALTriggerPatchInfo.h"
37 #include "AliEMCALTriggerMapping.h"
39 #include "AliESDEvent.h"
40 #include "AliInputEventHandler.h"
41 #include "AliLog.h"
42 #include "AliOADBContainer.h"
43 #include "AliVVertex.h"
44 
48 
49 namespace EMCalTriggerPtAnalysis {
50 
51 AliAnalysisTaskEmcalTriggerBase::AliAnalysisTaskEmcalTriggerBase():
53  fTriggerSelection(nullptr),
54  fUseTriggerBits(kTRUE),
55  fRequireBunchCrossing(kTRUE),
56  fUseDownscaleCorrectionFormOCDB(kFALSE),
57  fHistos(nullptr),
58  fTriggerStringFromPatches(kFALSE),
59  fSelectedTriggers(),
60  fNameClusterContainer(""),
61  fRequireAnalysisUtils(kTRUE),
62  fUseSPDVertex(false),
63  fApplyVertexCuts(true),
64  fVertexCut(-10., 10.),
65  fNameDownscaleOADB(""),
66  fDownscaleOADB(nullptr),
67  fDownscaleFactors(nullptr),
68  fNameMaskedFastorOADB(),
69  fMaskedFastorOADB(nullptr),
70  fMaskedFastors(),
71  fOnlineTriggerThresholds(),
72  fNameAcceptanceOADB(),
73  fNameTriggerSelectionContainer("EmcalTriggerDecision"),
74  fSelectNoiseEvents(false),
75  fRejectNoiseEvents(false),
76  fEnableDCALTriggers(true),
77  fEnableCentralityTriggers(false),
78  fEnableV0Triggers(true),
79  fEnableT0Triggers(false),
80  fEnableNoINTTriggers(false),
81  fRequireL0forL1(false),
82  fExclusiveMinBias(false),
83  fUseTriggerSelectionContainer(false)
84 {
85  SetNeedEmcalGeom(true);
87  SetCaloTriggerPatchInfoName("EmcalTriggers");
88 }
89 
91  AliAnalysisTaskEmcal(name, true),
93  fUseTriggerBits(kTRUE),
94  fRequireBunchCrossing(kTRUE),
100  fRequireAnalysisUtils(kTRUE),
101  fUseSPDVertex(false),
102  fApplyVertexCuts(true),
103  fVertexCut(-10., 10.),
104  fNameDownscaleOADB(""),
109  fMaskedFastors(),
112  fNameTriggerSelectionContainer("EmcalTriggerDecision"),
113  fSelectNoiseEvents(false),
114  fRejectNoiseEvents(false),
115  fEnableDCALTriggers(true),
117  fEnableV0Triggers(true),
118  fEnableT0Triggers(false),
119  fEnableNoINTTriggers(false),
120  fRequireL0forL1(false),
121  fExclusiveMinBias(false),
123 {
124  SetNeedEmcalGeom(true);
126  SetCaloTriggerPatchInfoName("EmcalTriggers");
127 }
128 
131  if(fHistos) delete fHistos;
132  if(fDownscaleOADB) delete fDownscaleOADB;
135 }
136 
139  if(fRequireAnalysisUtils && !fAliAnalysisUtils) fAliAnalysisUtils = new AliAnalysisUtils;
140 
141  if((!fNameClusterContainer.Length()) || fNameClusterContainer == "usedefault") fNameClusterContainer = AliEmcalAnalysisFactory::ClusterContainerNameFactory(fInputHandler->IsA() == AliAODInputHandler::Class());
144  }
145 
146  fHistos = new THistManager(Form("Histos_%s", GetName()));
147 
148  // Create trigger correlation histogram
149  fHistos->CreateTH2("hTriggerCorrelation", "Correlation selected trigger classes", 6, -0.5, 5.5, 6, -0.5, 5.5);
150  std::array<TString, 6> binlabels = {"MB", "EMC7", "EG1", "EG2", "EJ1", "EJ2"};
151  TH1 *correlationHist = static_cast<TH1 *>(fHistos->FindObject("hTriggerCorrelation"));
152  for(int ib = 0; ib < 6; ib++){
153  correlationHist->GetXaxis()->SetBinLabel(ib+1, binlabels[ib]);
154  correlationHist->GetYaxis()->SetBinLabel(ib+1, binlabels[ib]);
155  }
156 
159 
160  for(auto h : *(fHistos->GetListOfHistograms())) fOutput->Add(h);
161  fHistos->GetListOfHistograms()->SetOwner(false);
162 
163  PostData(1, fOutput);
164 }
165 
167  // Apply trigger selection
169  if(!fSelectedTriggers.size()) {
170  AliDebugStream(1) << "Failed trigger selection" << std::endl;
171  return false;
172  }
173 
175 
176  if(fApplyVertexCuts){
177  const AliVVertex *vtx = fUseSPDVertex ? fInputEvent->GetPrimaryVertexSPD() : fInputEvent->GetPrimaryVertex();
178  //if(!fInputEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5.)) return; // reject pileup event
179  if(vtx->GetNContributors() < 1) {
180  AliDebugStream(1) << "Failed Vertex Selection" << std::endl;
181  return false;
182  }
184  AliDebugStream(1) << "Failed vertex-z cut" << std::endl;
185  return false;
186  }
187  }
188 
190  AliDebugStream(1) << "Checking cuts in AliAnalysisUtils" << std::endl;
191  if(fInputEvent->IsA() == AliESDEvent::Class() && fAliAnalysisUtils->IsFirstEventInChunk(fInputEvent)) return false;
192  if(fAliAnalysisUtils->IsPileUpEvent(fInputEvent)) return false; // Apply new vertex cut
193  if(!fAliAnalysisUtils->IsVertexSelected2013pA(fInputEvent))return false; // Apply new vertex cut
194  }
195 
196  if(!IsUserEventSelected()) {
197  AliDebugStream(1) << "Failed user extra cuts" << std::endl;
198  return false;
199  }
200 
201  // Do MC outlier cut
202  if(fIsPythia){
203  if(!CheckMCOutliers()){
204  AliDebugStream(1) << GetName() << ": Reject MC outliers" << std::endl;
205  return false;
206  }
207  }
208 
209  // Fill histogram with trigger correlation
210  // self-correlations included
211  std::array<TString, 6> kAbsTriggers = {"MB", "EMC7", "EG1", "EG2", "EJ1", "EJ2"};
212  for(int itrg = 0; itrg < 6; itrg++){
213  bool hasTriggerA = (std::find(fSelectedTriggers.begin(), fSelectedTriggers.end(), kAbsTriggers[itrg]) != fSelectedTriggers.end());
214  if(hasTriggerA) {
215  for(int jtrg = 0; jtrg < 6; jtrg++){
216  bool hasTriggerB = (std::find(fSelectedTriggers.begin(), fSelectedTriggers.end(), kAbsTriggers[jtrg]) != fSelectedTriggers.end());
217  if(hasTriggerB)
218  fHistos->FillTH2("hTriggerCorrelation", kAbsTriggers[itrg], kAbsTriggers[jtrg]);
219  }
220  }
221  }
222 
224  AliDebugStream(1) << "Event is selected" << std::endl;
225  return true;
226 }
227 
228 
230  AliDebugStream(1) << "Entering trigger selection\n";
231  fSelectedTriggers.clear();
232  Bool_t isMC = MCEvent() != nullptr;
233 
234  TString triggerstring = "";
237  } else {
238  triggerstring = fInputEvent->GetFiredTriggerClasses();
239  }
240 
241 
242  UInt_t selectionstatus = fInputHandler->IsEventSelected();
243  Bool_t isMinBias = selectionstatus & AliVEvent::kINT7,
244  isMinBiasT0 = selectionstatus & AliVEvent::kINT8,
245  isCENT = selectionstatus & AliVEvent::kCentral,
246  isSemiCENT = selectionstatus & AliVEvent::kSemiCentral,
249  emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgn];
250 
251  if(fExclusiveMinBias){
252  AliDebugStream(1) << "Min bias mode\n";
253  // do not perform EMCAL trigger selection in case only
254  // min. bias trigger is requested:w
255  if(isMinBias) fSelectedTriggers.push_back("MB");
256  if(isMinBiasT0 && fEnableT0Triggers) fSelectedTriggers.push_back("MBT0");
258  if(isCENT) fSelectedTriggers.push_back("CENT");
259  if(isSemiCENT) fSelectedTriggers.push_back("SEMICENT");
260  }
261  return;
262  }
263 
266  triggersel = dynamic_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(fInputEvent->GetList()->FindObject(fNameTriggerSelectionContainer.Data()));
267  if(!triggersel) {
268  AliErrorStream() << "Trigger selection container requested but not found - not possible to select EMCAL triggers" << std::endl;
269  return;
270  }
271  }
272 
273  AliDebugStream(1) << "Found triggers " << fInputEvent->GetFiredTriggerClasses() << std::endl;
274 
275  for(int itrg = 0; itrg < AliEmcalTriggerOfflineSelection::kTrgn; itrg++) emcalTriggers[itrg] = true;
276  if(fEnableT0Triggers) for(int itrg = 0; itrg < AliEmcalTriggerOfflineSelection::kTrgn; itrg++) emc8Triggers[itrg] = true;
277  if(fEnableNoINTTriggers) for(int itrg = 0; itrg < AliEmcalTriggerOfflineSelection::kTrgn; itrg++) emcNoIntTriggers[itrg] = true;
278  if(!isMC){
279  // In case of data select events as bunch-bunch (-B-) events.
280  // Cut not applied in simulations
281  if(fRequireBunchCrossing && ! (triggerstring.Contains("-B-") || triggerstring.Contains("-S-"))) return;
282 
283  // In case of data use information from the physics selection and event record
284  // Further cleanup of trigger events can be performed depending on the presence
285  // of recalc patches (after masking hot fastors in the trigger maker) above
286  // threshold
287  if(fUseTriggerBits){
288  AliDebugStream(1) << "Require trigger bits" << std::endl;
289  const std::array<ULong_t, AliEmcalTriggerOfflineSelection::kTrgn> kSelectTriggerBits = {
290  AliVEvent::kEMC7|AliVEvent::kEMC8, AliVEvent::kEMCEGA, AliVEvent::kEMCEGA, AliVEvent::kEMCEJE, AliVEvent::kEMCEJE,
291  AliVEvent::kEMC7|AliVEvent::kEMC8, AliVEvent::kEMCEGA, AliVEvent::kEMCEGA, AliVEvent::kEMCEJE, AliVEvent::kEMCEJE
292  };
293  for(int iclass = 0; iclass < AliEmcalTriggerOfflineSelection::kTrgn; iclass++){
294  emcalTriggers[iclass] &= bool(selectionstatus & kSelectTriggerBits[iclass]);
295  emc8Triggers[iclass] &= bool(selectionstatus & kSelectTriggerBits[iclass]);
296  if(fRequireL0forL1 && !bool(selectionstatus & (AliVEvent::kEMC7|AliVEvent::kEMC8))) {
297  emcalTriggers[iclass] = false;
298  emc8Triggers[iclass] = false;
299  }
300  }
301  }
302 
303  // Apply cut on the trigger string - this basically discriminates high- and low-threshold
304  // triggers
305  const std::array<TString, AliEmcalTriggerOfflineSelection::kTrgn> kSelectTriggerStrings = {
306  "CEMC7-|CEMC8-|C0EMC-", "EG1|EGA", "EG2", "EJ1|EJE", "EJ2", "CDMC7-|CDMC8-|C0DMC-", "DG1", "DG2", "DJ1", "DJ2"
307  };
308  if(triggerstring.Contains("EMC")) AliDebugStream(1) << GetName() << ": Trigger string " << triggerstring << std::endl;
309  bool isT0trigger = triggerstring.Contains("INT8") || triggerstring.Contains("TVX") || triggerstring.Contains("EMC8") || triggerstring.Contains("DMC8"),
310  isVZEROtrigger = triggerstring.Contains("INT7") || triggerstring.Contains("EMC7") || triggerstring.Contains("DMC7");
311  for(int iclass = 0; iclass < AliEmcalTriggerOfflineSelection::kTrgn; iclass++){
312  AliDebugStream(1) << "Next trigger: " << kSelectTriggerStrings[iclass] << std::endl;
313  bool selectionStatus = false;
314  if(kSelectTriggerStrings[iclass].Contains("|")){
315  std::unique_ptr<TObjArray> options(kSelectTriggerStrings[iclass].Tokenize("|"));
316  for(auto o : *options){
317  TObjString *optstring = static_cast<TObjString *>(o);
318  AliDebugStream(1) << "Checking trigger " << optstring->String() << std::endl;
319  if(triggerstring.Contains(optstring->String())){
320  AliDebugStream(1) << "Found " << optstring->String() << " ... " << std::endl;
321  selectionStatus = true;
323  AliDebugStream(1) << "Checking trigger patch container for additional online patch" << std::endl;
324  selectionStatus = selectionStatus && triggersel->IsEventSelected(optstring->String().Data());
325  }
326  }
327  }
328  } else {
329  selectionStatus = triggerstring.Contains(kSelectTriggerStrings[iclass]);
330  if(selectionStatus){
331  AliDebugStream(1) << "Found " << kSelectTriggerStrings[iclass] << " ... " << std::endl;
332 
333  }
335  AliDebugStream(1) << "Checking trigger patch container for additional online patch" << std::endl;
336  selectionStatus = selectionStatus && triggersel->IsEventSelected(kSelectTriggerStrings[iclass]);
337  }
338  }
339  if(isT0trigger) {
340  emc8Triggers[iclass] &= selectionStatus;
341  emcalTriggers[iclass] = false;
342  emcNoIntTriggers[iclass] = false;
343  } else if(isVZEROtrigger){
344  emcalTriggers[iclass] &= selectionStatus;
345  emc8Triggers[iclass] = false;
346  emcNoIntTriggers[iclass] = false;
347  } else {
348  // No coincidence with interaction trigger
349  emcNoIntTriggers[iclass] &= selectionStatus;
350  emcalTriggers[iclass] = false;
351  emc8Triggers[iclass] = false;
352  }
353  if(emcalTriggers[iclass])
354  AliDebugStream(1) << GetName() << ": Event selected as trigger " << kSelectTriggerStrings[iclass] << " (INT7 suite)" << std::endl;
355  if(emc8Triggers[iclass])
356  AliDebugStream(1) << GetName() << ": Event selected as trigger " << kSelectTriggerStrings[iclass] << " (INT8 suite)" << std::endl;
357  if(emcNoIntTriggers[iclass])
358  AliDebugStream(1) << GetName() << ": Event selected as trigger " << kSelectTriggerStrings[iclass] << " (No INT coincidence)" << std::endl;
359  }
360 
361  // Online selection / rejection
363  for(int itrg = 0; itrg < AliEmcalTriggerOfflineSelection::kTrgn; itrg++){
364  if(emcalTriggers[itrg] || emc8Triggers[itrg]){
366  if(fRejectNoiseEvents){
367  if(emcalTriggers[itrg]) emcalTriggers[itrg] &= onlinestatus;
368  if(emc8Triggers[itrg]) emc8Triggers[itrg] &= onlinestatus;
369  } else {
370  if(emcalTriggers[itrg]) emcalTriggers[itrg] &= !onlinestatus;
371  if(emc8Triggers[itrg]) emc8Triggers[itrg] &= !onlinestatus;
372  }
373  }
374  }
375  }
376  }
377  // Apply offline trigger selection: In this case cuts are performed on the
378  // patch energy from EMCAL cells after calibration. This method is most relevant
379  // for simulations. It can have a special use case in data in case a stronger
380  // offline selection is applied in addition to the online selection.
382  for(int itrg = 0; itrg < AliEmcalTriggerOfflineSelection::kTrgn; itrg++)
384  }
385  if(fEnableV0Triggers){
386  if(isMinBias) fSelectedTriggers.push_back("MB");
388  if(isCENT) fSelectedTriggers.push_back("CENT");
389  if(isSemiCENT) fSelectedTriggers.push_back("SEMICENT");
390  }
391  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0]){
392  AliDebugStream(1) << "Event selected as EMC7" << std::endl;
393  fSelectedTriggers.push_back("EMC7");
394  if(!isMinBias) fSelectedTriggers.push_back("EMC7excl");
395  }
396  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEJ2]){
397  AliDebugStream(1) << "Event selected as EJ2" << std::endl;
398  fSelectedTriggers.push_back("EJ2");
399  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0])) fSelectedTriggers.push_back("EJ2excl");
400  }
401  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEJ1]){
402  AliDebugStream(1) << "Event selected as EJ1" << std::endl;
403  fSelectedTriggers.push_back("EJ1");
404  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0] || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEJ2])) fSelectedTriggers.push_back("EJ1excl");
405  }
406  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEG2]){
407  AliDebugStream(1) << "Event selected as EG2" << std::endl;
408  fSelectedTriggers.push_back("EG2");
409  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0])) fSelectedTriggers.push_back("EG2excl");
410  }
411  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEG1]){
412  AliDebugStream(1) << "Event selected as EG1" << std::endl;
413  fSelectedTriggers.push_back("EG1");
414  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0] || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgEG2])) fSelectedTriggers.push_back("EG1excl");
415  }
416 
418  // Handle DCAL triggers only in case DCAL triggers are enabled,
419  // otherwise ignore results of the online/offline trigger selection
420  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0]){
421  AliDebugStream(1) << "Event selected as DMC7" << std::endl;
422  fSelectedTriggers.push_back("DMC7");
423  if(!isMinBias) fSelectedTriggers.push_back("DMC7excl");
424  }
425  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDJ2]){
426  AliDebugStream(1) << "Event selected as DJ2" << std::endl;
427  fSelectedTriggers.push_back("DJ2");
428  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0])) fSelectedTriggers.push_back("DJ2excl");
429  }
430  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDJ1]){
431  AliDebugStream(1) << "Event selected as DJ1" << std::endl;
432  fSelectedTriggers.push_back("DJ1");
433  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0] || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDJ2])) fSelectedTriggers.push_back("DJ1excl");
434  }
435  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDG2]){
436  AliDebugStream(1) << "Event selected as DG2" << std::endl;
437  fSelectedTriggers.push_back("DG2");
438  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0])) fSelectedTriggers.push_back("DG2excl");
439  }
440  if(emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDG1]){
441  AliDebugStream(1) << "Event selected as DG1" << std::endl;
442  fSelectedTriggers.push_back("DG1");
443  if(!(isMinBias || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0] || emcalTriggers[AliEmcalTriggerOfflineSelection::kTrgDG2])) fSelectedTriggers.push_back("DG1excl");
444  }
445  }
446  }
447 
448  if(fEnableT0Triggers) {
449  if(isMinBiasT0) fSelectedTriggers.push_back("MBT0");
450  if(emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEL0]) {
451  // EMC8 trigger
452  AliDebugStream(1) << "Event selected as EMC8" << std::endl;
453  fSelectedTriggers.push_back("EMC8");
454  if(!isMinBiasT0) fSelectedTriggers.push_back("EMC8excl");
455  }
457  AliDebugStream(1) << "Event selected as EJ2 (EMC8)" << std::endl;
458  fSelectedTriggers.push_back("EMC8EJ2");
459  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEL0])) fSelectedTriggers.push_back("EMC8EJ2excl");
460  }
462  AliDebugStream(1) << "Event selected as EJ1 (EMC8)" << std::endl;
463  fSelectedTriggers.push_back("EMC8EJ1");
464  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEL0] || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEJ2])) fSelectedTriggers.push_back("EMC8EJ1excl");
465  }
467  AliDebugStream(1) << "Event selected as EG2 (EMC8)" << std::endl;
468  fSelectedTriggers.push_back("EMC8EG2");
469  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEL0])) fSelectedTriggers.push_back("EMC8EG2excl");
470  }
472  AliDebugStream(1) << "Event selected as EG1 (EMC8)" << std::endl;
473  fSelectedTriggers.push_back("EMC8EG1");
474  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEL0] || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgEG2])) fSelectedTriggers.push_back("EMC8EG1excl");
475  }
476 
478  // Handle DCAL triggers only in case DCAL triggers are enabled,
479  // otherwise ignore results of the online/offline trigger selection
481  AliDebugStream(1) << "Event selected as DMC8" << std::endl;
482  fSelectedTriggers.push_back("DMC8");
483  if(!isMinBiasT0) fSelectedTriggers.push_back("DMC8excl");
484  }
486  AliDebugStream(1) << "Event selected as DJ2 (DMC8)" << std::endl;
487  fSelectedTriggers.push_back("DMC8DJ2");
488  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgDL0])) fSelectedTriggers.push_back("DMC8DJ2excl");
489  }
491  AliDebugStream(1) << "Event selected as DJ1 (DMC8)" << std::endl;
492  fSelectedTriggers.push_back("DMC8DJ1");
493  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgDL0] || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgDJ2])) fSelectedTriggers.push_back("DMC8DJ1excl");
494  }
496  AliDebugStream(1) << "Event selected as DG2 (DMC8)" << std::endl;
497  fSelectedTriggers.push_back("DMC8DG2");
498  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgDL0])) fSelectedTriggers.push_back("DMC8DG2excl");
499  }
501  AliDebugStream(1) << "Event selected as DG1 (DMC8)" << std::endl;
502  fSelectedTriggers.push_back("DMC8DG1");
503  if(!(isMinBiasT0 || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgDL0] || emc8Triggers[AliEmcalTriggerOfflineSelection::kTrgDG2])) fSelectedTriggers.push_back("DMC8DG1excl");
504  }
505  }
506  }
507 
509  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0]) {
510  // EMC8 trigger
511  AliDebugStream(1) << "Event selected as 0EMC" << std::endl;
512  fSelectedTriggers.push_back("0EMC");
513  }
514  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEJ2]){
515  AliDebugStream(1) << "Event selected as EJ2 (E0MC)" << std::endl;
516  fSelectedTriggers.push_back("0EMCEJ2");
517  if(!emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0]) fSelectedTriggers.push_back("0EMCEJ2excl");
518  }
519  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEJ1]){
520  AliDebugStream(1) << "Event selected as EJ1 (0EMC)" << std::endl;
521  fSelectedTriggers.push_back("0EMCEJ1");
522  if(!(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0] || emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEJ2])) fSelectedTriggers.push_back("0EMCEJ1excl");
523  }
524  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEG2]){
525  AliDebugStream(1) << "Event selected as EG2 (0EMC)" << std::endl;
526  fSelectedTriggers.push_back("0EMCEG2");
527  if(!emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0]) fSelectedTriggers.push_back("0EMCEG2excl");
528  }
530  AliDebugStream(1) << "Event selected as EG1 (EMC8)" << std::endl;
531  fSelectedTriggers.push_back("0EMCEG1");
532  if(!(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEL0] || emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgEG2])) fSelectedTriggers.push_back("0EMCEG1excl");
533  }
534 
536  // Handle DCAL triggers only in case DCAL triggers are enabled,
537  // otherwise ignore results of the online/offline trigger selection
538  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0]){
539  AliDebugStream(1) << "Event selected as 0DMC" << std::endl;
540  fSelectedTriggers.push_back("0DMC");
541  }
542  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDJ2]){
543  AliDebugStream(1) << "Event selected as DJ2 (0DMC)" << std::endl;
544  fSelectedTriggers.push_back("0DMCDJ2");
545  if(!emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0]) fSelectedTriggers.push_back("0DMCDJ2excl");
546  }
547  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDJ1]){
548  AliDebugStream(1) << "Event selected as DJ1 (0DMC)" << std::endl;
549  fSelectedTriggers.push_back("0DMCDJ1");
550  if(!(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0] || emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDJ2])) fSelectedTriggers.push_back("0DMCDJ1excl");
551  }
552  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDG2]){
553  AliDebugStream(1) << "Event selected as DG2 (0DMC)" << std::endl;
554  fSelectedTriggers.push_back("0DMCDG2");
555  if(!emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0]) fSelectedTriggers.push_back("0DMCDG2excl");
556  }
557  if(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDG1]){
558  AliDebugStream(1) << "Event selected as DG1 (0DMC)" << std::endl;
559  fSelectedTriggers.push_back("0DMCDG1");
560  if(!(emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDL0] || emcNoIntTriggers[AliEmcalTriggerOfflineSelection::kTrgDG2])) fSelectedTriggers.push_back("0DMCDG1excl");
561  }
562  }
563  }
564 }
565 
568 
569  if(!fLocalInitialized){
570  return;
571  }
572 
573  // Handle OADB container with downscaling factors
574  if(fNameDownscaleOADB.Length()){
575  if(fNameDownscaleOADB.Contains("alien://") && ! gGrid) TGrid::Connect("alien://");
576  fDownscaleOADB = new AliOADBContainer("AliEmcalDownscaleFactors");
577  fDownscaleOADB->InitFromFile(fNameDownscaleOADB.Data(), "AliEmcalDownscaleFactors");
578  }
579 
580  if(!fExclusiveMinBias){
581  // Load EMCAL trigger OADB in case EMCAL triggers
582  // are enabled
583 
584  // Load OADB container with masked fastors (in case fastor masking is switched on)
586  if(fNameMaskedFastorOADB.Contains("alien://") && ! gGrid) TGrid::Connect("alien://");
587  fMaskedFastorOADB = new AliOADBContainer("AliEmcalMaskedFastors");
588  fMaskedFastorOADB->InitFromFile(fNameMaskedFastorOADB.Data(), "AliEmcalMaskedFastors");
589  }
590 
591  // Setting online threshold for trigger
593  if(fInputEvent->GetRunNumber() >= 15344 && fInputEvent->GetRunNumber() <= 197388){
598  SetOnlineTriggerThreshold("DG1", 0);
599  SetOnlineTriggerThreshold("DG2", 0);
600  SetOnlineTriggerThreshold("DJ1", 0);
601  SetOnlineTriggerThreshold("DJ2", 0);
602  SetOnlineTriggerThreshold("EMC7", 0);
603  SetOnlineTriggerThreshold("DMC7", 0);
604  }
605  }
606 
607  // Load acceptance OADB
608  if(fNameAcceptanceOADB.Length() && fTriggerSelection){
609  AliDebugStream(1) << GetName() << ": Loading acceptance map from OADB file " << fNameAcceptanceOADB << std::endl;
610  AliOADBContainer acceptanceCont("AliEmcalTriggerAcceptance");
611  acceptanceCont.InitFromFile(fNameAcceptanceOADB.Data(), "AliEmcalTriggerAcceptance");
612  TObjArray *acceptanceMaps = dynamic_cast<TObjArray *>(acceptanceCont.GetObject(fInputEvent->GetRunNumber()));
613  TH2 *map(nullptr);
614  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("EG1")))){
615  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger EG1" << std::endl;
616  map->SetDirectory(nullptr);
618  }
619  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("EG2")))){
620  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger EG2" << std::endl;
621  map->SetDirectory(nullptr);
623  }
624  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("DG1")))){
625  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger DG1" << std::endl;
626  map->SetDirectory(nullptr);
628  }
629  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("DG2")))){
630  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger DG2" << std::endl;
631  map->SetDirectory(nullptr);
633  }
634  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("EJ1")))){
635  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger EJ1" << std::endl;
636  map->SetDirectory(nullptr);
638  }
639  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("EJ2")))){
640  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger EJ2" << std::endl;
641  map->SetDirectory(nullptr);
643  }
644  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("DJ1")))){
645  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger DJ1" << std::endl;
646  map->SetDirectory(nullptr);
648  }
649  if((map = dynamic_cast<TH2 *>(acceptanceMaps->FindObject("DJ2")))){
650  AliDebugStream(1) << GetName() << ": Found acceptance map for trigger DJ2" << std::endl;
651  map->SetDirectory(nullptr);
653  }
654  }
655  }
656 }
657 
659  if(fDownscaleOADB){
660  fDownscaleFactors = static_cast<TObjArray *>(fDownscaleOADB->GetObject(runnumber));
661  }
663 
664  // Log info for downscale factors
665  if(!fDownscaleFactors || !fDownscaleFactors->GetEntries()){
666  AliInfoStream() << GetName() << ": No downscale factors provided for run " << runnumber << std::endl;
667  } else {
668  AliInfoStream() << GetName() << ": Downscale factors used for run " << runnumber << std::endl;
669  for(auto e : *fDownscaleFactors){
670  TParameter<double> *dfactor = static_cast<TParameter<double> *>(e);
671  AliInfoStream() << GetName() << ": Trigger " << dfactor->GetName() << ", downscale factor " << dfactor->GetVal() << std::endl;
672  }
673  }
674 
675  if(!fExclusiveMinBias){
676  if(fMaskedFastorOADB){
677  fMaskedFastors.clear();
678  TObjArray *ids = static_cast<TObjArray *>(fMaskedFastorOADB->GetObject(runnumber));
679  for(auto m : *ids){
680  TParameter<int> *id = static_cast<TParameter<int> *>(m);
681  fMaskedFastors.push_back(id->GetVal());
682  }
683  }
684  }
685 }
686 
687 std::vector<TString> AliAnalysisTaskEmcalTriggerBase::GetSupportedTriggers(Bool_t useExclusiveTriggers) const {
688  // Exclusive means classes without lower trigger classes (which are downscaled) -
689  // in order to make samples statistically independent: MBExcl means MinBias && !EMCAL trigger
690  std::vector<TString> triggers;
691  const std::array<TString, 5> emcaltriggers = {{"EMC7", "EJ1", "EJ2", "EG1", "EG2"}},
692  dcaltriggers = {{"DMC7", "DJ1", "DJ2", "DG1", "DG2"}},
693  emcalexclusive = {{"EMC7excl", "EG2excl", "EJ2excl", "EJ1excl", "EG1excl"}},
694  dcalexclusive = {{"DMC7excl", "DG2excl", "DJ2excl", "DJ1excl", "DG1excl"}},
695  t0triggers = {{"EMC8", "EMC8EJ1", "EMC8EJ2", "EMC8EG1", "EMC8EG2"}},
696  t0exclusive = {{"EMC8excl", "EMC8EG2excl", "EMC8EJ2excl", "EMC8EJ1excl", "EMC8EG1excl"}},
697  t0dcaltriggers = {{"DMC8", "DMC8DJ1", "DMC8DJ2", "DMC8DG1", "DMC8DG2"}},
698  t0dcalexclusive = {{"DMC8excl", "DMC8DG2excl", "DMC8DJ2excl", "DMC8DJ1excl", "DMC8DG1excl"}},
699  nointEMCAL = {{"0EMC", "0EMCEJ1", "0EMCEJ2", "0EMCEG1", "0EMCEG2"}},
700  nointDCAL = {{"0DMC", "0DMCDJ1", "0DMCDJ2", "0DMCDG1", "0DMCDG2"}};
701  const std::array<TString, 4> nointemcalexclusive = {{"0EMCEG2excl", "0EMCEJ2excl", "0EMCEJ1excl", "0EMCEG1excl"}},
702  nointdcalexclusive = {{"0DMCDG2excl", "0DMCDJ2excl", "0DMCDJ1excl", "0DMCDG1excl"}};
703  const std::array<TString, 2> centralitytriggers = {{"CENT", "SEMICENT"}};
704  if(fEnableV0Triggers){
705  triggers.push_back("MB"); // Min. Bias always enabled
706  if(!fExclusiveMinBias){
707  for(const auto &t : emcaltriggers) triggers.push_back(t);
708  if(useExclusiveTriggers)
709  for(const auto &t : emcalexclusive) triggers.push_back(t);
710  }
712  for(const auto &t : dcaltriggers) triggers.push_back(t);
713  if(useExclusiveTriggers)
714  for(const auto &t : dcalexclusive) triggers.push_back(t);
715  }
717  for(const auto &t : centralitytriggers) triggers.push_back(t);
718  }
719  }
720  if(fEnableT0Triggers){
721  triggers.push_back("MBT0");
722  if(!fExclusiveMinBias){
723  for(const auto &t: t0triggers) triggers.push_back(t);
724  if(useExclusiveTriggers)
725  for(const auto &t : t0exclusive) triggers.push_back(t);
726  }
728  for(const auto &t: t0dcaltriggers) triggers.push_back(t);
729  if(useExclusiveTriggers)
730  for(const auto &t : t0dcalexclusive) triggers.push_back(t);
731  }
732  }
733  if(fEnableNoINTTriggers) {
734  // No MB trigger since no interaction trigger
735  if(!fExclusiveMinBias){
736  for(const auto &t: nointEMCAL) triggers.push_back(t);
737  if(useExclusiveTriggers)
738  for(const auto &t : nointemcalexclusive) triggers.push_back(t);
739  }
741  for(const auto &t: nointDCAL) triggers.push_back(t);
742  if(useExclusiveTriggers)
743  for(const auto &t : nointdcalexclusive) triggers.push_back(t);
744  }
745  }
746  return triggers;
747 }
748 
750  AliDebugStream(1) << "Using V1 online trigger selector" << std::endl;
752  int ngood(0);
753  for(auto p : *fTriggerPatchInfo){
754  AliEMCALTriggerPatchInfo *patch = static_cast<AliEMCALTriggerPatchInfo *>(p);
755  if((AliEmcalTriggerOfflineSelection::IsSingleShower(trigger) && patch->IsGammaLowRecalc()) ||
756  (!AliEmcalTriggerOfflineSelection::IsSingleShower(trigger) && patch->IsJetLowRecalc())){
757  if(patch->GetADCAmp() >= GetOnlineTriggerThresholdByIndex(trigger)) ngood++;
758  }
759  }
760  return ngood > 0;
761 }
762 
764  if(fDownscaleFactors){
765  TParameter<double> *result(nullptr);
766  // Downscaling only done on MB, L0 and the low threshold triggers
767  if(triggerclass.Contains("MB")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("INT7"));
768  else if(triggerclass.Contains("EMC7")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("EMC7"));
769  else if(triggerclass.Contains("DMC7")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("DMC7"));
770  else if(triggerclass.Contains("EJ2")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("EJ2"));
771  else if(triggerclass.Contains("EJ1")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("EJ1"));
772  else if(triggerclass.Contains("EG2")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("EG2"));
773  else if(triggerclass.Contains("EG1")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("EG1"));
774  else if(triggerclass.Contains("DG2")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("DG2"));
775  else if(triggerclass.Contains("DG1")) result = static_cast<TParameter<double> *>(fDownscaleFactors->FindObject("DG1"));
776  double triggerweight = 1.;
777  if(result) triggerweight = 1./result->GetVal();
778  AliDebugStream(1) << "Using trigger weight " << triggerweight << " for trigger " << triggerclass << std::endl;
779  return triggerweight;
780  } else {
781  AliDebugStream(1) << "No downscale factors loaded - using trigger weight 1" << std::endl;
782  }
783  return 1.;
784 }
785 
787  AliInfoStream() << "Reading downscale factors from OCDB for run " << fInputEvent->GetRunNumber() << std::endl;
788  if(!fDownscaleFactors){
790  fDownscaleFactors->SetOwner(true);
791  }
792  fDownscaleFactors->Clear();
794  if(downscaleOCDB->GetCurrentRun() != fInputEvent->GetRunNumber()) downscaleOCDB->SetRun(fInputEvent->GetRunNumber());
795  const std::array<TString, 11> khwtriggers = {"INT7", "EMC7", "DMC7", "EJ1", "EJ2", "DJ1", "DJ2", "EG1", "EG2", "DG1", "DG2"};
796  std::vector<TString> runtriggers = downscaleOCDB->GetTriggerClasses();
797  for(const auto &t : khwtriggers){
798  std::function<bool (TString)> triggerfinder = [t](const TString &test) -> bool {
799  if(!test.Contains(t + "-B-")) return false;
800  return true;
801  };
802  auto entry = std::find_if(runtriggers.begin(), runtriggers.end(), triggerfinder);
803  if(entry != runtriggers.end()){
804  TString triggername = *entry;
805  double downscalefactor = downscaleOCDB->GetDownscaleFactorForTriggerClass(triggername);
806  AliInfoStream() << "Applying downscale factor " << downscalefactor << " for trigger " << t << " (" << triggername << ") for run " << fInputEvent->GetRunNumber() << std::endl;
807  fDownscaleFactors->Add(new TParameter<double>(t, TMath::Abs(downscalefactor) < DBL_EPSILON ? 1 : downscalefactor));
808  } else {
809  AliErrorStream() << "No downscale factor found for trigger " << t << " for run " << fInputEvent->GetRunNumber() << std::endl;
810  }
811  }
812 }
813 
815  TParameter<int> *threshpar(nullptr);
816  if((threshpar = static_cast<TParameter<int> *>(fOnlineTriggerThresholds.FindObject(triggerclass.Data())))){
817  threshpar->SetVal(threshold);
818  } else {
819  fOnlineTriggerThresholds.Add(new TParameter<int>(triggerclass.Data(), threshold));
820  }
821 }
822 
824  Int_t threshold(0);
825  TParameter<int> *val(nullptr);
826  if((val = static_cast<TParameter<int> *>(fOnlineTriggerThresholds.FindObject(name))))
827  threshold = val->GetVal();
828  return threshold;
829 }
830 
832  const TString triggernames[AliEmcalTriggerOfflineSelection::kTrgn] = {"EMC7", "EG1", "EG2", "EJ1", "EJ2", "DMC7",
833  "DG1", "DG2", "DJ1", "DJ2"};
834  return GetOnlineTriggerThresholdByName(triggernames[trigger]);
835 }
836 
838  const TString triggernames[AliEmcalTriggerOfflineSelection::kTrgn] = {"EMC7", "EG1", "EG2", "EJ1", "EJ2", "DMC7",
839  "DG1", "DG2", "DJ1", "DJ2"};
840  bool isInitialized = true;
841  for(int itrg = 0; itrg < AliEmcalTriggerOfflineSelection::kTrgn; itrg++){
842  if(!fOnlineTriggerThresholds.FindObject(triggernames[itrg].Data())) {
843  isInitialized = false;
844  break;
845  }
846  }
847  return isInitialized;
848 }
849 
851  return adc > GetOnlineTriggerThresholdByName(triggerclass);
852 }
853 
855  TString triggerstring = "";
856  Int_t nEJ1 = 0, nEJ2 = 0, nEG1 = 0, nEG2 = 0, nDJ1 = 0, nDJ2 = 0, nDG1 = 0, nDG2 = 0;
857  for(auto patchIter : *triggerpatches){
858  AliEMCALTriggerPatchInfo *patch = dynamic_cast<AliEMCALTriggerPatchInfo *>(patchIter);
859  if(!patch->IsRecalc()) continue;
860  if(patch->IsEMCal()){
861  if(patch->IsGammaLowRecalc() && SelectFiredPatch("EG1", patch->GetADCAmp())) nEG1++;
862  if(patch->IsGammaLowRecalc() && SelectFiredPatch("EG2", patch->GetADCAmp())) nEG2++;
863  if(patch->IsJetLowRecalc() && SelectFiredPatch("EJ1", patch->GetADCAmp())) nEJ1++;
864  if(patch->IsJetLowRecalc() && SelectFiredPatch("EJ2", patch->GetADCAmp())) nEJ2++;
865  } else {
866  if(patch->IsGammaLowRecalc() && SelectFiredPatch("DG1", patch->GetADCAmp())) nDG1++;
867  if(patch->IsGammaLowRecalc() && SelectFiredPatch("DG2", patch->GetADCAmp())) nDG2++;
868  if(patch->IsJetLowRecalc() && SelectFiredPatch("DJ1", patch->GetADCAmp())) nDJ1++;
869  if(patch->IsJetLowRecalc() && SelectFiredPatch("DJ2", patch->GetADCAmp())) nDJ2++;
870  }
871  }
872  if(nEJ1) triggerstring += "EJ1";
873  if(nEJ2){
874  if(triggerstring.Length()) triggerstring += ",";
875  triggerstring += "EJ2";
876  }
877  if(nEG1){
878  if(triggerstring.Length()) triggerstring += ",";
879  triggerstring += "EG1";
880  }
881  if(nEG2){
882  if(triggerstring.Length()) triggerstring += ",";
883  triggerstring += "EG2";
884  }
885  if(nDJ1){
886  if(triggerstring.Length()) triggerstring += ",";
887  triggerstring += "DJ2";
888  }
889  if(nDJ2){
890  if(triggerstring.Length()) triggerstring += ",";
891  triggerstring += "DJ2";
892  }
893  if(nDG1){
894  if(triggerstring.Length()) triggerstring += ",";
895  triggerstring += "DG1";
896  }
897  if(nDG2){
898  if(triggerstring.Length()) triggerstring += ",";
899  triggerstring += "DG2";
900  }
901  return triggerstring;
902 }
903 
904 } /* namespace EMCalTriggerPtAnalysis */
std::vector< TString > fSelectedTriggers
! Triggers selected for given event
bool IsEventSelected(const char *name) const
Checks whether the events is selected for a given trigger type.
Bool_t IsOfflineSelected(EmcalTriggerClass trgcls, const AliVEvent *const data) const
Select event as triggered event.
Bool_t fIsPythia
trigger, if it is a PYTHIA production
double Double_t
Definition: External.C:58
Int_t GetOnlineTriggerThresholdByIndex(AliEmcalTriggerOfflineSelection::EmcalTriggerClass trg) const
Bool_t fRejectNoiseEvents
Reject events triggered by noisy fastors.
Double_t fVertexSPD[3]
!event Svertex
Base task in the EMCAL framework.
void SetOnlineTriggerThreshold(const TString &triggerclass, Int_t threshold)
Setting trigger threshold for online trigger selection.
Bool_t fLocalInitialized
whether or not the task has been already initialized
TString GetFiredTriggerClassesFromPatches(const TClonesArray *triggerpatches) const
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Bool_t fEnableV0Triggers
Enable VZERO-based triggers (default)
static AliEmcalDownscaleFactorsOCDB * Instance()
Bool_t fEnableNoINTTriggers
Process EMCAL triggers without coincidence with INT triggers - exotic case - default off...
AliEmcalTriggerOfflineSelection * fTriggerSelection
Offline trigger selection.
void PrepareDownscaleFactorsFormOCDB()
Read the downscale factors from the OCDB.
TObjArray fOnlineTriggerThresholds
Trigger thresholds applied at online level.
Bool_t fEnableDCALTriggers
Enable / Disable event selection for DCAL trigger classes.
void SetCaloTriggerPatchInfoName(const char *n)
TString fNameMaskedFastorOADB
Name of the masked fastor OADB container.
Bool_t fRequireAnalysisUtils
Switch whether to require event selection in AliAnalysisUtils.
bool SelectOnlineTrigger(AliEmcalTriggerOfflineSelection::EmcalTriggerClass trigger) const
Bool_t CheckMCOutliers()
Filter the mc tails in pt-hard distributions.
Bool_t fRequireBunchCrossing
Require bunch-bunch events (tag -B- in trigger string)
void SetAcceptanceMap(EmcalTriggerClass trgcls, const TH2 *accmap)
Set acceptance map for a given trigger class.
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
TObject * FindObject(const char *name) const
Find an object inside the container.
int Int_t
Definition: External.C:63
TString fNameClusterContainer
Name of the cluster container in the event.
TString fNameTriggerSelectionContainer
Name of the trigger selection container.
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
EmcalTriggerClass
Definition of the various supported trigger types.
AliAnalysisUtils * fAliAnalysisUtils
!vertex selection (optional)
TString fNameDownscaleOADB
Name of the downscale OADB container.
static Bool_t IsSingleShower(EmcalTriggerClass cls)
Checks if the trigger class is a single shower patch trigger class.
Bool_t fEnableT0Triggers
Enable triggers depending on T0 (INT8, EMC8, EMC8EGA, EMC8EJE) - default off.
TString fNameAcceptanceOADB
Name of the OADB container with the trigger acceptance.
const TString & GetNameClusterContainer() const
Get the name of the cluster container.
AliOADBContainer * fMaskedFastorOADB
! Container with masked fastors
Bool_t fSelectNoiseEvents
Explicitly select events triggered only by noisy fastors.
Bool_t fEnableCentralityTriggers
Enable central / semi-central trigger.
Bool_t fUseTriggerBits
Switch whether using trigger bits (relies on physics selection)
Bool_t fTriggerStringFromPatches
Do rebuild the trigger string from trigger patches.
Bool_t isMC
AliEmcalList * fOutput
!output list
Definition: External.C:220
AliOADBContainer * fDownscaleOADB
! Container with downscale factors for different triggers
Analysis of high- tracks in triggered events.
Bool_t fUseSPDVertex
Use SPD vertex (for productions without TPC)
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
void SetNeedEmcalGeom(Bool_t n)
Container class for histograms.
Definition: THistManager.h:99
virtual void ExecOnce()
Perform steps needed to initialize the analysis.
void test(int runnumber=195345)
void UserCreateOutputObjects()
Main initialization function on the worker.
AliCutValueRange< double > fVertexCut
Cut on the z-position of the primary vertex.
bool Bool_t
Definition: External.C:53
Bool_t SelectFiredPatch(const TString &triggerclass, Int_t adc) const
Bool_t fUseTriggerSelectionContainer
Use trigger decision in trigger selection container.
std::vector< TString > GetSupportedTriggers(Bool_t useExclusiveTriggers=true) const
Definition: External.C:196
static TString ClusterContainerNameFactory(Bool_t isAOD)
Get name of the default cluster container.