AliPhysics  9b6b435 (9b6b435)
ConfigureAndGetEventTriggerMaskAndCaloTriggerString.C
Go to the documentation of this file.
1 
15 #if !defined(__CINT__) || defined(__MAKECINT__)
16 
17 #include <TString.h>
18 
19 #include "AliVEvent.h"
20 
21 #endif
22 
32 (TString trigger, Int_t year, TString & triggerString)
33 {
34  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set event trigger class for %s in year %d\n",
35  trigger.Data(),year);
36 
37  triggerString = "";
38 
39  UInt_t mask = AliVEvent::kAny;
40 
41  if( trigger.Contains("INT") || trigger.Contains("MB") || trigger.Contains("default") )
42  {
43  mask = ( AliVEvent::kINT7 | AliVEvent::kMB );
44  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set MB/INT7 mask %d\n",mask);
45  }
46  else if(trigger.Contains("EMCAL_L0"))
47  {
48  triggerString = "EMC";
49  mask = ( AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMC1 );
50  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L0 EMC1/7/8 mask %d and string %s\n",mask,triggerString.Data());
51  }
52  else if(trigger.Contains("DCAL_L0"))
53  {
54  triggerString = "DMC";
55  mask = ( AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMC1 );
56  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L0 EMC1/7/8 mask %d and string %s\n",mask,triggerString.Data());
57  }
58  else if(trigger.Contains("EMCAL_L1"))
59  {
60  if(year > 2012) triggerString = "EG1";
61  // before 2013 only one kind of L1 trigger
62 
63  mask = ( AliVEvent::kEMCEGA );
64  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
65  }
66  else if(trigger.Contains("DCAL_L1"))
67  {
68  triggerString = "DG1";
69  mask = ( AliVEvent::kEMCEGA );
70  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
71  }
72  else if(trigger.Contains("EMCAL_L2"))
73  {
74  triggerString = "EG2";
75  mask = ( AliVEvent::kEMCEGA );
76  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
77  }
78  else if(trigger.Contains("DCAL_L2"))
79  {
80  triggerString = "DG2";
81  mask = ( AliVEvent::kEMCEGA );
82  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
83  }
84 
85  if ( trigger.Contains("CaloOnly") )
86  {
87  mask = AliVEvent::kCaloOnly;
88  printf("\t Periods without TPC, change trigger mask %d!!!!\n",mask);
89  }
90 
91  return mask;
92 }
93 
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
UInt_t ConfigureAndGetEventTriggerMaskAndCaloTriggerString(TString trigger, Int_t year, TString &triggerString)