AliPhysics  master (3d17d9d)
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("SemiCentral") )
47  {
48  mask = ( AliVEvent::kSemiCentral );
49  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set SemiCentral mask %d\n",mask);
50  }
51  else if( trigger.Contains("Central") )
52  {
53  mask = ( AliVEvent::kCentral );
54  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set Central mask %d\n",mask);
55  }
56  else if(trigger.Contains("EMDCAL_L0"))
57  {
58  mask = ( AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMC1 );
59  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L0 EMC/DMC/1/7/8 mask %d\n",mask);
60  }
61  else if(trigger.Contains("EMCAL_L0"))
62  {
63  triggerString = "EMC";
64  mask = ( AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMC1 );
65  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L0 EMC1/7/8 mask %d and string %s\n",mask,triggerString.Data());
66  }
67  else if(trigger.Contains("DCAL_L0"))
68  {
69  triggerString = "DMC";
70  mask = ( AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMC1 );
71  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L0 EMC1/7/8 mask %d and string %s\n",mask,triggerString.Data());
72  }
73  else if(trigger.Contains("EMDCAL_L1"))
74  {
75  if(year > 2012) triggerString = "G1";
76 
77  mask = ( AliVEvent::kEMCEGA );
78  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
79  }
80  else if(trigger.Contains("EMCAL_L1"))
81  {
82  if(year > 2012) triggerString = "EG1";
83  // before 2013 only one kind of L1 trigger
84 
85  mask = ( AliVEvent::kEMCEGA );
86  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
87  }
88  else if(trigger.Contains("DCAL_L1"))
89  {
90  triggerString = "DG1";
91  mask = ( AliVEvent::kEMCEGA );
92  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
93  }
94  else if(trigger.Contains("EMDCAL_L2"))
95  {
96  triggerString = "G2";
97  mask = ( AliVEvent::kEMCEGA );
98  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
99  }
100  else if(trigger.Contains("EMCAL_L2"))
101  {
102  triggerString = "EG2";
103  mask = ( AliVEvent::kEMCEGA );
104  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
105  }
106  else if(trigger.Contains("DCAL_L2"))
107  {
108  triggerString = "DG2";
109  mask = ( AliVEvent::kEMCEGA );
110  printf("ConfigureAndGetEventTriggerCaloTrackCorr - Set L1 EMCEGA mask %d and string %s\n",mask,triggerString.Data());
111  }
112 
113  if ( trigger.Contains("CaloOnly") )
114  {
115  mask = AliVEvent::kCaloOnly;
116  printf("\t Periods without TPC, change trigger mask %d!!!!\n",mask);
117  }
118 
119  return mask;
120 }
121 
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)