Fix in physics selection OADB
[u/mrichter/AliRoot.git] / ANALYSIS / macros / BrowseAndFillPhysicsSelectionOADB.C
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include <Riostream.h>
3
4 // ROOT includes
5 #include "TFile.h"
6 #include "TString.h"
7 #include "TSystem.h"
8 #include "TBrowser.h"
9 #include "TH2.h"
10 #include "TCanvas.h"
11
12 // STEER includes
13 #include "AliVEvent.h"
14
15 // ANALYSIS include
16 #include "AliAnalysisManager.h"
17
18 // OADB includes
19 #include "AliOADBContainer.h"
20 #include "AliOADBTriggerAnalysis.h"
21 #include "AliOADBPhysicsSelection.h"
22 #include "AliOADBFillingScheme.h"
23 #endif
24
25
26 void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
27
28   // Load stuff
29   gSystem->Load("libCore.so");  
30   gSystem->Load("libTree.so");
31   gSystem->Load("libGeom.so");
32   gSystem->Load("libVMC.so");
33   gSystem->Load("libPhysics.so");
34   gSystem->Load("libMinuit");
35   gSystem->Load("libSTEERBase");
36   gSystem->Load("libESD");
37   gSystem->Load("libAOD");
38   gSystem->Load("libANALYSIS");
39   gSystem->Load("libANALYSISalice");   
40   gSystem->Load("libOADB");   
41
42
43
44   TString oadbfilename(Form("%s/COMMON/PHYSICSSELECTION/data/physicsSelection.root", AliAnalysisManager::GetOADBPath()));
45   if (!fill) {
46     TFile * f = new TFile(oadbfilename);
47     new TBrowser();
48     return;
49   }
50
51
52   AliOADBContainer * oadbContPS = new AliOADBContainer("physSel");
53   AliOADBContainer * oadbContFillingScheme = new AliOADBContainer("fillScheme");
54   AliOADBContainer * oadbContTriggerAnalysis = new AliOADBContainer("trigAnalysis");
55
56   // Defaults
57   AliOADBFillingScheme * fsDefault = new AliOADBFillingScheme("Default");
58   fsDefault->SetFillingSchemeName("Default");
59   fsDefault->SetBXIDs("B","");
60   fsDefault->SetBXIDs("A","" ); 
61   fsDefault->SetBXIDs("AC","" ); 
62   fsDefault->SetBXIDs("ACE","" ); 
63   fsDefault->SetBXIDs("C","");
64   fsDefault->SetBXIDs("E",""       );      
65   oadbContFillingScheme->AddDefaultObject(fsDefault);
66
67   // DefaultPP
68   AliOADBPhysicsSelection * oadbDefaultPP = new AliOADBPhysicsSelection("oadbDefaultPP");
69   Int_t triggerCount = 0;
70   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-[I|B|S]-NOPF-ALLNOTRD,CINT7-[B|S]-NOPF-CENTNOTRD","B",triggerCount);
71   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",  triggerCount);
72   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",    triggerCount);  
73   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
74   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-[I|B|S]-NOPF-FASTNOTRD -CINT7-[I|B|S]-NOPF-ALLNOTRD,CINT7-B-NOPF-CENTNOTRD","B",triggerCount);
75   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-AC-NOPF-FASTNOTRD -CINT7-AC-NOPF-ALLNOTRD","AC",     triggerCount);
76   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-E-NOPF-FASTNOTRD -CINT7-E-NOPF-ALLNOTRD","E",        triggerCount); 
77   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-ACE-NOPF-FASTNOTRD -CINT7-ACE-NOPF-ALLNOTRD","ACE",  triggerCount); 
78   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                             
79   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
80     
81   triggerCount++;
82   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kINT8,"+CINT8-S-NOPF-ALLNOTRD,CINT8-B-NOPF-CENTNOTRD,CINT8-B-NOPF-ALLNOTRD","B",triggerCount);
83   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kINT8,"+CINT8-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
84   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                                             
85   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
86
87   triggerCount++;
88   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-[B|S]-NOPF-ALLNOTRD","B",    triggerCount);
89   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",  triggerCount);
90   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",    triggerCount);
91   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
92   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-[B|S]-NOPF-FASTNOTRD -CINT1-[B|S]-NOPF-ALLNOTRD","B",     triggerCount);
93   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-AC-NOPF-FASTNOTRD -CINT1-AC-NOPF-ALLNOTRD","AC",  triggerCount);
94   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-E-NOPF-FASTNOTRD -CINT1-E-NOPF-ALLNOTRD","E",     triggerCount);  
95   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-ACE-NOPF-FASTNOTRD -CINT1-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
96   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"SPDGFO >= 1 || V0A || V0C");                                              
97   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
98
99   triggerCount++;
100   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMSH7-[B|S]-NOPF-MUON,CMSH7-S-NOPF-ALLNOTRD","B",    triggerCount);
101   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMSH7-ACE-NOPF-MUON,CMSH7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
102   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
103   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
104
105   triggerCount++;
106   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMSL7-[B|S|SC]-NOPF-MUON,CMSL7-S-NOPF-ALLNOTRD","B",    triggerCount);
107   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMSL7-ACE-NOPF-MUON,CMSL7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
108   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
109   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
110
111   triggerCount++;    
112   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMLL7-[B|S]-NOPF-MUON","B",    triggerCount);
113   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMLL7-ACE-NOPF-MUON","ACE",triggerCount);
114   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
115   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
116
117   triggerCount++;
118   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUL7-[B|S]-NOPF-ALLNOTRD,CMUL7-[B|S]-NOPF-MUON","B",    triggerCount);
119   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUL7-ACE-NOPF-ALLNOTRD,CMUL7-ACE-NOPF-MUON","ACE",triggerCount);
120   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
121   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
122     
123   triggerCount++;
124   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMuonSingleHighPt8,"+CMSH8-S-NOPF-MUON,CMSH8-S-NOPF-ALLNOTRD","B",    triggerCount);
125   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMuonSingleHighPt8,"+CMSH8-ACE-NOPF-MUON,CMSH8-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
126   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                                         
127   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
128     
129   triggerCount++;
130   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMuonSingleLowPt8,"+CMSL8-S-NOPF-MUON,CMSL8-S-NOPF-ALLNOTRD","B",    triggerCount);
131   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMuonSingleLowPt8,"+CMSL8-ACE-NOPF-MUON,CMSL8-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
132   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                                         
133   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
134     
135   triggerCount++;    
136   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMuonLikeLowPt8,"+CMLL8-S-NOPF-MUON","B",    triggerCount);
137   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMuonLikeLowPt8,"+CMLL8-ACE-NOPF-MUON","ACE",triggerCount);
138   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                                         
139   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
140     
141   triggerCount++;
142   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMuonUnlikeLowPt8,"+CMUL8-S-NOPF-ALLNOTRD,CMUL8-[B|S]-NOPF-MUON","B",    triggerCount);
143   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kMuonUnlikeLowPt8,"+CMUL8-ACE-NOPF-ALLNOTRD,CMUL8-ACE-NOPF-MUON","ACE",triggerCount);
144   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                                         
145   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
146
147   triggerCount++;  
148   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-[B|S]-NOPF-ALLNOTRD,CEMC7-B-NOPF-CENTNOTRD","B",    triggerCount);
149   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
150   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                      
151   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
152
153   triggerCount++;  
154   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kEMC8,"+CEMC8-S-NOPF-ALLNOTRD,CEMC8-B-NOPF-CENTNOTRD","B",    triggerCount);
155   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kEMC8,"+CEMC8-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
156   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                      
157   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
158
159   triggerCount++;  
160   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-[I|B|S]-NOPF-ALLNOTRD,CPHI7-B-NOPF-CENTNOTRD","B",triggerCount);
161   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
162   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
163   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
164
165   triggerCount++;  
166   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kPHI8,"+CPHI8-S-NOPF-ALLNOTRD,CPHI8-B-NOPF-CENTNOTRD","B",triggerCount);
167   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kPHI8,"+CPHI8-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
168   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");
169   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
170
171   triggerCount++;  
172   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kDG5,"+CDG5-[I|B|S]-NOPF-ALLNOTRD","B",triggerCount);
173   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kDG5,"+CDG5-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
174   // TODO TOF condition needs to be implemented (Savannah bug #87064)
175   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"!V0A && !V0C && SPDGFOL1 >= 2");
176   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!V0A && !V0C && !V0ABG && !V0CBG && SPDGFOL1 >= 2 && !TPCLaserWarmUp");
177
178     /*
179   triggerCount++;
180   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kZED,"+C1ZED-[B|S]-NOPF-CENTNOTRD", "B",  triggerCount);
181   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-AC-NOPF-CENTNOTRD","AC", triggerCount);
182   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-E-NOPF-CENTNOTRD", "E",  triggerCount);
183   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
184   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"1");
185   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(ZDCTDCA || ZDCTDCC) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !SPDClsVsTrkBG");
186 */
187     
188   triggerCount++;
189   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSHM7-[B|S]-NOPF-ALLNOTRD","B",    triggerCount);
190   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSHM7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
191   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"SPDGFOL1 >= 100 && (V0A && V0C)");                                         
192   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 100 && V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
193
194   triggerCount++;
195   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSHM8-S-NOPF-ALLNOTRD","B",    triggerCount);
196   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSHM8-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
197   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"(SPDGFOL1 >= 120) && T0");                                         
198   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 120) && !T0BG && !T0Pileup && !TPCLaserWarmUp");
199
200
201   triggerCount++;  
202   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CEMC7EJE-[B|S]-NOPF-CENTNOTRD,CEMC7EJE-[B|S]-NOPF-ALLNOTRD","B",    triggerCount);
203   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CEMC7EJE-ACE-NOPF-CENTNOTRD,CEMC7EJE-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
204   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
205   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
206   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp");
207
208   triggerCount++;  
209   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CEMC7EGA-[B|S]-NOPF-CENTNOTRD,CEMC7EGA-[B|S]-NOPF-ALLNOTRD","B",    triggerCount);
210   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CEMC7EGA-ACE-NOPF-CENTNOTRD,CEMC7EGA-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
211   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
212   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
213   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp");
214
215   triggerCount++;  
216   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CEMC8EJE-S-NOPF-CENTNOTRD,CEMC8EJE-S-NOPF-ALLNOTRD","B",    triggerCount);
217   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CEMC8EJE-ACE-NOPF-CENTNOTRD,CEMC8EJE-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
218   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");
219   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
220   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
221
222   triggerCount++;  
223   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CEMC8EGA-S-NOPF-CENTNOTRD,CEMC8EGA-S-NOPF-ALLNOTRD","B",    triggerCount);
224   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CEMC8EGA-ACE-NOPF-CENTNOTRD,CEMC8EGA-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
225   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");
226   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
227   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp");
228
229   triggerCount++;  
230   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kSPI7,"+CSPI7-[B|S]-NOPF-ALLNOTRD","B",     triggerCount);
231   //  oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kSPI7,"CSPI7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
232   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"SPDGFOL1 >= 10 && (V0A && V0C)");                      
233   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 10 && V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
234
235   triggerCount++;  
236   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kSPI,"+CSPI8-[B|S]-NOPF-ALLNOTRD,CSPI8-[B|S]-NOPF-CENTNOTRD","B",     triggerCount);
237   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");                      
238   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 10) && !T0BG && !T0Pileup && !TPCLaserWarmUp");
239
240   triggerCount++;  
241   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kMuonUnlikeLowPt0,"+C0MUL-[SA|SC]-NOPF-MUON","B",     triggerCount);
242   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"1");
243   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"1");
244
245   triggerCount++;
246   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHJT-S-NOPF-CENT", "B",   triggerCount);
247   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHJT-ACE-NOPF-CENT","ACE",triggerCount);
248   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
249   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHJT");
250
251   triggerCount++;
252   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHSE-S-NOPF-CENT", "B",   triggerCount);
253   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHSE-ACE-NOPF-CENT","ACE",triggerCount);
254   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
255   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHSE");
256
257   triggerCount++;
258   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHQU-S-NOPF-CENT", "B",   triggerCount);
259   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHQU-ACE-NOPF-CENT","ACE",triggerCount);
260   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
261   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHQU");
262
263   triggerCount++;
264   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CEMC7WUHQU-S-NOPF-CENT", "B",   triggerCount);
265   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CEMC7WUHQU-ACE-NOPF-CENT","ACE",triggerCount);
266   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
267   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHQU");
268
269   triggerCount++;
270   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT8WUHJT-S-NOPF-CENT", "B",   triggerCount);
271   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT8WUHJT-ACE-NOPF-CENT","ACE",triggerCount);
272   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");
273   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp && TRDHJT");
274
275   triggerCount++;
276   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT8WUHSE-S-NOPF-CENT", "B",   triggerCount);
277   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT8UHSE-ACE-NOPF-CENT","ACE",triggerCount);
278   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");
279   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp && TRDHSE");
280
281   triggerCount++;
282   oadbDefaultPP->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT8WUHQU-S-NOPF-CENT", "B",   triggerCount);
283   oadbDefaultPP->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT8WUHQU-ACE-NOPF-CENT","ACE",triggerCount);
284   oadbDefaultPP->SetHardwareTrigger         ( triggerCount,"T0");
285   oadbDefaultPP->SetOfflineTrigger          ( triggerCount,"!T0BG && !T0Pileup && !TPCLaserWarmUp && TRDHQU");
286
287
288   oadbContPS->AddDefaultObject(oadbDefaultPP);
289   triggerCount = 0;
290
291   // DefaultPbPb
292   AliOADBPhysicsSelection * oadbDefaultPbPb = new AliOADBPhysicsSelection("oadbDefaultPbPb");
293   
294   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CPBI1-B-NOPF-ALLNOTRD,CPBI2_B1-B-[NOPF|PF]-ALLNOTRD","B",triggerCount);
295   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kMB,"+CPBI[1|2_B1]-AC-NOPF-ALLNOTRD","AC",triggerCount);
296   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kMB,"+CPBI[1|2_B1]-E-NOPF-ALLNOTRD","E",triggerCount);
297   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
298   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
299
300   triggerCount++;
301   // Bug in early running, CVHN_R2-B-NOPF-ALLNOTRD needed explicitly up to run 167814 (to be moved to custom object as soon as all other things are fine)
302   //   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVHN-B-NOPF-ALLNOTRD,CVHN_R2-B-NOPF-ALLNOTRD,CVHN-B-NOPF-CENTNOTRD,CVHN-B-NOPF-CENTNOTRD,CVHN-B-PF-ALLNOTRD,CVHN-B-PF-CENTNOTRD","B",triggerCount);
303   // oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD","B",triggerCount);
304   // oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-AC-NOPF-[ALL|CENT]NOTRD","AC",triggerCount);
305   // oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-E-NOPF-[ALL|CENT]NOTRD","E",triggerCount);
306   // Also include the semicentral class in the online classes selection (in order not to loose event due to the different time sharing of central and semi-central)
307   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD,CVLN[|_B2|_R1]-B-[NOPF|PF]-ALLNOTRD,CSEMI_R1-B-NOPF-ALLNOTRD,CCENT_R2-B-NOPF-ALLNOTRD","B",triggerCount);
308   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-AC-NOPF-[ALL|CENT]NOTRD,CVLN-AC-NOPF-ALLNOTRD,CCENT_R2-AC-NOPF-ALLNOTRD","AC",triggerCount);
309   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-E-NOPF-[ALL|CENT]NOTRD,CVLN-E-NOPF-ALLNOTRD,CCENT_R2-E-NOPF-ALLNOTRD","E",triggerCount);
310   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C && Central");
311   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
312
313   triggerCount++;
314   // semicentral includes central ones (and might have different downscaling)
315   // Bug in early running, CVHN_R2-B-NOPF-ALLNOTRD,CVLN_B2-B-NOPF-ALLNOTRD needed explicitly up to run 167814 (to be moved to custom object as soon as all other things are fine)
316 //   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kSemiCentral,"+CVHN-B-NOPF-ALLNOTRD,CVHN_R2-B-NOPF-ALLNOTRD,CVHN-B-NOPF-CENTNOTRD,CVHN-B-PF-ALLNOTRD,CVHN-B-PF-CENTNOTRD,CVLN-B-NOPF-ALLNOTRD,CVLN_B2-B-NOPF-ALLNOTRD,CVLN-B-PF-ALLNOTRD","B",triggerCount);
317 //  oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kSemiCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD,CVLN[|_B2]-B-[NOPF|PF]-ALLNOTRD","B",triggerCount);
318   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kSemiCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD,CVLN[|_B2|_R1]-B-[NOPF|PF]-ALLNOTRD,CSEMI_R1-B-NOPF-ALLNOTRD,CCENT_R2-B-NOPF-ALLNOTRD","B",triggerCount);
319   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kSemiCentral,"+CVHN-AC-NOPF-[ALL|CENT]NOTRD,CVLN-AC-NOPF-ALLNOTRD,CSEMI_R1-AC-NOPF-ALLNOTRD","AC",triggerCount);
320   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kSemiCentral,"+CVHN-E-NOPF-[ALL|CENT]NOTRD,CVLN-E-NOPF-ALLNOTRD,CSEMI_R1-E-NOPF-ALLNOTRD","E",triggerCount);
321   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C && SemiCentral && !Central");
322   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
323
324   triggerCount++;
325   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CPBI2EJE-B-NOPF-CENTNOTRD","B",triggerCount);
326   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CPBI2EJE-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
327   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
328   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
329   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
330   
331   triggerCount++;
332   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CPBI2EGA-B-NOPF-CENTNOTRD","B",triggerCount);
333   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CPBI2EGA-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
334   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
335   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
336   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
337   
338   triggerCount++;
339   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kMUSPB,"+CPBI1MSL-B-NOPF-MUON","B",  triggerCount);
340   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kMUSPB,"+CPBI1MSL-ACE-NOPF-MUON","ACE",triggerCount);
341   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
342   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
343
344   triggerCount++;
345   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kMUSHPB,"+CPBI1MSH-B-NOPF-MUON","B",  triggerCount);
346   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kMUSHPB,"+CPBI1MSH-ACE-NOPF-MUON","ACE",triggerCount);
347   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
348   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
349     
350   triggerCount++;
351   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kMuonUnlikePB,"+CPBI1MUL-B-NOPF-MUON","B",  triggerCount);
352   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kMuonUnlikePB,"+CPBI1MUL-ACE-NOPF-MUON","ACE",triggerCount);
353   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
354   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
355
356   triggerCount++;
357   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kMuonLikePB,"+CPBI1MLL-B-NOPF-MUON","B",  triggerCount);
358   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kMuonLikePB,"+CPBI1MLL-ACE-NOPF-MUON","ACE",triggerCount);
359   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
360   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
361
362   triggerCount++;
363   oadbDefaultPbPb->AddCollisionTriggerClass   ( AliVEvent::kPHOSPb,"+CPBI2PHS-B-NOPF-CENTNOTRD","B",  triggerCount);
364   oadbDefaultPbPb->AddBGTriggerClass          ( AliVEvent::kPHOSPb,"+CPBI2PHS-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
365   oadbDefaultPbPb->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
366   oadbDefaultPbPb->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
367
368   oadbContPS->AddDefaultObject(oadbDefaultPbPb);
369
370   // Trigger analysis defaults
371   AliOADBTriggerAnalysis * oadbTrigAnalysis = new AliOADBTriggerAnalysis("Default");
372   oadbTrigAnalysis->SetZDCCorrParameters(0.5, 0, 4*0.7, 4*0.7);
373   oadbContTriggerAnalysis->AddDefaultObject(oadbTrigAnalysis);  
374
375   // proton-proton 2010
376   AliOADBPhysicsSelection * oadbLHCpp2010 = new AliOADBPhysicsSelection("oadbLHCpp2010");
377   oadbLHCpp2010->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1B-ABCE-NOPF-ALL,CINT1-B-NOPF-ALLNOTRD","B",0);
378   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1A-ABCE-NOPF-ALL","A",0);
379   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1C-ABCE-NOPF-ALL","C",0);
380   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
381   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALL,CINT1-E-NOPF-ALLNOTRD","E",0);
382   oadbLHCpp2010->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
383   oadbLHCpp2010->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
384
385   oadbLHCpp2010->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1B-ABCE-NOPF-MUON,CMUS1-B-NOPF-ALLNOTRD","B",1);
386   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1A-ABCE-NOPF-MUON,","A",1);
387   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1C-ABCE-NOPF-MUON","C",1);
388   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALLNOTRD","AC",1);
389   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-MUON,CMUS1-E-NOPF-ALLNOTRD","E",1);
390   oadbLHCpp2010->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");
391   oadbLHCpp2010->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
392
393   oadbLHCpp2010->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSH1-B-NOPF-ALLNOTRD","B",2);
394   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-AC-NOPF-ALLNOTRD","AC",2);
395   oadbLHCpp2010->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-E-NOPF-ALLNOTRD","E",2);
396   oadbLHCpp2010->SetHardwareTrigger         ( 2,"SPDGFO >= 1 || V0A || V0C");
397   oadbLHCpp2010->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
398
399   oadbContPS->AppendObject(oadbLHCpp2010,         104065,118555);
400   oadbContPS->AppendObject(oadbLHCpp2010->Clone(),118562,134775);
401   oadbContPS->AppendObject(oadbLHCpp2010->Clone(),134932,136377);
402
403   // LHC10c, fill 1069 (problems with the V0 online trigger in ESD)
404   AliOADBPhysicsSelection * oadbLHC10cV0Bug = new AliOADBPhysicsSelection("oadbLHC10cV0Bug");
405   oadbLHC10cV0Bug->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1B-ABCE-NOPF-ALL","B",0);
406   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1A-ABCE-NOPF-ALL","A",0);
407   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1C-ABCE-NOPF-ALL","C",0);
408   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALL","E",0);  
409   oadbLHC10cV0Bug->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || CTPV0A || CTPV0C");
410   oadbLHC10cV0Bug->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
411   
412   oadbLHC10cV0Bug->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1B-ABCE-NOPF-MUON","B",1);
413   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1A-ABCE-NOPF-MUON","A",1);
414   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1C-ABCE-NOPF-MUON","C",1);
415   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-MUON","E",1);
416   oadbLHC10cV0Bug->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || CTPV0A || CTPV0C");
417   oadbLHC10cV0Bug->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
418
419   oadbContPS->AppendObject(oadbLHC10cV0Bug, 118556,118561);
420   
421   // LHC10f2
422   AliOADBPhysicsSelection * oadbLHC10f2 = new AliOADBPhysicsSelection("oadbLHC10f2");
423   oadbLHC10f2->AddCollisionTriggerClass   ( AliVEvent::kCINT5,"+CINT5-B-NOPF-ALLNOTRD","B",0);
424   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-AC-NOPF-ALLNOTRD","AC",0);
425   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-E-NOPF-ALLNOTRD","E",0);
426   oadbLHC10f2->SetHardwareTrigger         ( 0,"V0A || V0C");
427   oadbLHC10f2->SetOfflineTrigger          ( 0,"(V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
428   
429   oadbLHC10f2->AddCollisionTriggerClass   ( AliVEvent::kCMUS5,"+CMUS5-B-NOPF-ALLNOTRD","B",1);
430   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCMUS5,"+CMUS5-AC-NOPF-ALLNOTRD","AC",1);
431   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCMUS5,"+CMUS5-E-NOPF-ALLNOTRD","E",1);
432   oadbLHC10f2->SetHardwareTrigger         ( 1,"V0A || V0C");
433   oadbLHC10f2->SetOfflineTrigger          ( 1,"(V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
434     
435   oadbContPS->AppendObject(oadbLHC10f2, 134776,134931);
436
437   // filling schemes
438
439   AliOADBFillingScheme * fs4by4a = new AliOADBFillingScheme("4x4a");
440   fs4by4a->SetFillingSchemeName("4x4a");
441   fs4by4a->SetBXIDs("B"," #2128 #3019");
442   fs4by4a->SetBXIDs("A"," #346 #3465" ); 
443   fs4by4a->SetBXIDs("AC",""); 
444   fs4by4a->SetBXIDs("C"," #1234 #1680");
445   fs4by4a->SetBXIDs("E"," #790");          
446   oadbContFillingScheme->AppendObject(fs4by4a, 104065, 104160);
447
448   AliOADBFillingScheme * fs4by4astar = new AliOADBFillingScheme("4x4a*");
449   fs4by4astar->SetFillingSchemeName("4x4a*");
450   fs4by4astar->SetBXIDs("B"," #2000 #2891");
451   fs4by4astar->SetBXIDs("A"," #218 #3337" ); 
452   fs4by4astar->SetBXIDs("AC",""); 
453   fs4by4astar->SetBXIDs("C"," #1106 #1552");
454   fs4by4astar->SetBXIDs("E"," #790");      
455   oadbContFillingScheme->AppendObject(fs4by4astar, 104315, 104321);
456
457   AliOADBFillingScheme * fs4by4b = new AliOADBFillingScheme("4x4b");
458   fs4by4b->SetFillingSchemeName("4x4b");
459   fs4by4b->SetBXIDs("B"," #2228 #3119");
460   fs4by4b->SetBXIDs("A"," #2554 #446" ); 
461   fs4by4b->SetBXIDs("AC",""); 
462   fs4by4b->SetBXIDs("C"," #1334 #769");
463   fs4by4b->SetBXIDs("E"," #790");          
464   oadbContFillingScheme->AppendObject(fs4by4b, 104792, 104803);
465
466   AliOADBFillingScheme * fs4by4c = new AliOADBFillingScheme("4x4c");
467   fs4by4c->SetFillingSchemeName("4x4c");
468   fs4by4c->SetBXIDs("B"," #3119 #769");
469   fs4by4c->SetBXIDs("A"," #2554 #446" ); 
470   fs4by4c->SetBXIDs("AC"," "); 
471   fs4by4c->SetBXIDs("C"," #1334 #2228");
472   fs4by4c->SetBXIDs("E"," #790");          
473   oadbContFillingScheme->AppendObject(fs4by4c, 104824, 104892);
474
475   AliOADBFillingScheme * fs16by16a = new AliOADBFillingScheme("16x16a");
476   fs16by16a->SetFillingSchemeName("16x16a");
477   fs16by16a->SetBXIDs("B"," #1337 #1418 #2228 #2309 #3119 #3200 #446 #527");
478   fs16by16a->SetBXIDs("A"," #1580  #1742  #1904  #2066  #2630  #2792  #2954  #3362" ); 
479   fs16by16a->SetBXIDs("AC",""); 
480   fs16by16a->SetBXIDs("C"," #845  #1007  #1169   #1577 #3359 #3521 #119  #281");
481   fs16by16a->SetBXIDs("E"," #790");        
482   oadbContFillingScheme->AppendObject(fs16by16a, 105143, 105160);
483
484   oadbContFillingScheme->AppendObject(fs4by4c->Clone(), 105256, 105268);
485
486   AliOADBFillingScheme * fsSingle_2b_1_1_1 = new AliOADBFillingScheme("Single_2b_1_1_1");
487   fsSingle_2b_1_1_1->SetFillingSchemeName("Single_2b_1_1_1");
488   fsSingle_2b_1_1_1->SetBXIDs("B"," #346");
489   fsSingle_2b_1_1_1->SetBXIDs("A"," #2131" ); 
490   fsSingle_2b_1_1_1->SetBXIDs("AC",""); 
491   fsSingle_2b_1_1_1->SetBXIDs("C"," #3019");
492   fsSingle_2b_1_1_1->SetBXIDs("E"," #1238");       
493   oadbContFillingScheme->AppendObject(fsSingle_2b_1_1_1, 114786, 116684);
494
495   AliOADBFillingScheme * fsSingle_3b_2_2_2 = new AliOADBFillingScheme("Single_3b_2_2_2");
496   fsSingle_3b_2_2_2->SetFillingSchemeName("Single_3b_2_2_2");
497   fsSingle_3b_2_2_2->SetBXIDs("B","   #346  #1240");
498   fsSingle_3b_2_2_2->SetBXIDs("A","  #2131" ); 
499   fsSingle_3b_2_2_2->SetBXIDs("AC",""); 
500   fsSingle_3b_2_2_2->SetBXIDs("C"," #3019 ");
501   fsSingle_3b_2_2_2->SetBXIDs("E"," #1238");       
502   oadbContFillingScheme->AppendObject(fsSingle_3b_2_2_2, 117048, 117120);
503
504
505   oadbContFillingScheme->AppendObject(fsSingle_2b_1_1_1, 117220, 118555);
506
507   AliOADBFillingScheme * fsSingle_2b_1_1_1_mis = new AliOADBFillingScheme("Single_2b_1_1_1 - 1 misaligned bx");
508   fsSingle_2b_1_1_1_mis->SetFillingSchemeName("Single_2b_1_1_1 - 1 misaligned BX");
509   fsSingle_2b_1_1_1_mis->SetBXIDs("B"," #345");
510   fsSingle_2b_1_1_1_mis->SetBXIDs("A"," #2130" ); 
511   fsSingle_2b_1_1_1_mis->SetBXIDs("AC",""); 
512   fsSingle_2b_1_1_1_mis->SetBXIDs("C"," #3018");
513   fsSingle_2b_1_1_1_mis->SetBXIDs("E"," #1238");           
514   oadbContFillingScheme->AppendObject(fsSingle_2b_1_1_1_mis, 118556, 118783);
515
516   oadbContFillingScheme->AppendObject(fsSingle_2b_1_1_1->Clone(), 118784, 119163);
517
518   AliOADBFillingScheme * fsSingle_4b_2_2_2 = new AliOADBFillingScheme("Single_4b_2_2_2");
519   fsSingle_4b_2_2_2->SetFillingSchemeName("Single_4b_2_2_2");
520   fsSingle_4b_2_2_2->SetBXIDs("B","   #669  #3019 ");
521   fsSingle_4b_2_2_2->SetBXIDs("A","  #346  #2454 " ); 
522   fsSingle_4b_2_2_2->SetBXIDs("AC",""); 
523   fsSingle_4b_2_2_2->SetBXIDs("C","  #1234  #2128 ");
524   fsSingle_4b_2_2_2->SetBXIDs("E"," #1681 #3463");         
525   oadbContFillingScheme->AppendObject(fsSingle_4b_2_2_2, 119837, 119862);
526
527   AliOADBFillingScheme * fsSingle_6b_3_3_3 = new AliOADBFillingScheme("Single_6b_3_3_3");
528   fsSingle_6b_3_3_3->SetFillingSchemeName("Single_6b_3_3_3");
529   fsSingle_6b_3_3_3->SetBXIDs("B","   #346  #546  #746 ");
530   fsSingle_6b_3_3_3->SetBXIDs("A","  #2131  #2331  #2531 " ); 
531   fsSingle_6b_3_3_3->SetBXIDs("AC",""); 
532   fsSingle_6b_3_3_3->SetBXIDs("C"," #3019  #3219  #3419");
533   fsSingle_6b_3_3_3->SetBXIDs("E"," #1296 #1670");         
534   oadbContFillingScheme->AppendObject(fsSingle_6b_3_3_3, 119902, 120691);
535
536   AliOADBFillingScheme * fsSingle_13b_8_8_8 = new AliOADBFillingScheme("Single_13b_8_8_8");
537   fsSingle_13b_8_8_8->SetFillingSchemeName("Single_13b_8_8_8");
538   fsSingle_13b_8_8_8->SetBXIDs("B","  #346  #446  #546  #646  #1240  #1340  #1440  #1540");
539   fsSingle_13b_8_8_8->SetBXIDs("A","  #946  #2131  #2231  #2331  #2431 " ); 
540   fsSingle_13b_8_8_8->SetBXIDs("AC",""); 
541   fsSingle_13b_8_8_8->SetBXIDs("C"," #3019  #3119  #3219  #3319  #3519 ");
542   fsSingle_13b_8_8_8->SetBXIDs("E"," #1835 #2726");        
543   oadbContFillingScheme->AppendObject(fsSingle_13b_8_8_8, 120741, 122375);
544
545   AliOADBFillingScheme * fs125n_48b_36_16_36 = new AliOADBFillingScheme("125n_48b_36_16_36");
546   fs125n_48b_36_16_36->SetFillingSchemeName("125n_48b_36_16_36");
547   fs125n_48b_36_16_36->SetBXIDs("B","   #346  #396  #446  #496  #546  #596  #646  #696  #1240  #1290  #1340  #1390  #1440  #1490  #1540  #1590 ");
548   fs125n_48b_36_16_36->SetBXIDs("A"," #755  #805  #855  #905  #955  #1005  #1799  #1849  #1899  #2131  #2181  #2231  #2281  #2331  #2381  #2431  #2481  #2531  #2581  #2631  #2846  #3016  #3066  #3116  #3166  #3216  #3266  #3316  #3366  #3425  #3475  #3525 " ); 
549   fs125n_48b_36_16_36->SetBXIDs("AC",""); 
550   fs125n_48b_36_16_36->SetBXIDs("C","  #3019  #3069  #3119  #3169  #3219  #3269  #3319  #3369  #14  #64  #114  #746  #796  #846  #908  #958  #1008  #1640  #1690  #1740  #2055  #2125  #2175  #2225  #2275  #2325  #2375  #2425  #2475  #2534  #2584  #2634 ");
551   fs125n_48b_36_16_36->SetBXIDs("E","");           
552   oadbContFillingScheme->AppendObject(fs125n_48b_36_16_36, 130148, 130375);
553
554   AliOADBFillingScheme * fs1000ns_50b_35_14_35 = new AliOADBFillingScheme("1000ns_50b_35_14_35");
555   fs1000ns_50b_35_14_35->SetFillingSchemeName("1000ns_50b_35_14_35");
556   fs1000ns_50b_35_14_35->SetBXIDs("B","  #346  #386  #426  #466  #506  #546  #586  #1240  #1280  #1320  #1360  #1400  #1440  #1480 ");
557   fs1000ns_50b_35_14_35->SetBXIDs("A","  #626  #666  #706  #746  #786  #826  #866  #1520  #1560  #1600  #1640  #1680  #1720  #1760  #2076  #2131  #2171  #2211  #2251  #2291  #2331  #2371  #2414  #2454  #2494  #2534  #2574  #2614  #2654  #2694  #2734  #2774  #2814 " ); //#2854  #2894  #2934 not present in this run
558   fs1000ns_50b_35_14_35->SetBXIDs("AC",""); 
559   fs1000ns_50b_35_14_35->SetBXIDs("C"," #3019  #3059  #3099  #3139  #3179  #3219  #3259  #3299  #3339  #3379  #3419  #3459  #3499  #3539  #115  #629  #669  #709  #749  #789  #829  #869  #909  #949  #989  #1029  #1069  #1109  #1149  #1523  #1563  #1603  #1643 "); //#1683  #1723  #1763 not present in this run
560   fs1000ns_50b_35_14_35->SetBXIDs("E","");         
561   oadbContFillingScheme->AppendObject(fs1000ns_50b_35_14_35, 130601, 130640);
562
563
564   AliOADBFillingScheme * fs200ns_192Pb_216p_9inj24bpi = new AliOADBFillingScheme("200ns_192Pb_216p_9inj24bpi");
565   fs200ns_192Pb_216p_9inj24bpi->SetFillingSchemeName("200ns_192Pb_216p_9inj24bpi");
566   fs200ns_192Pb_216p_9inj24bpi->SetBXIDs("B","  #346  #354  #363  #371  #380  #388  #397  #405  #414  #422  #431  #439  #448  #456  #465  #473  #482  #490  #499  #507  #516  #524  #533  #541  #578  #586  #595  #603  #612  #620  #629  #637  #646  #654  #663  #671  #680  #688  #697  #705  #714  #722  #731  #739  #748  #756  #765  #773  #810  #818  #827  #835  #844  #852  #861  #869  #878  #886  #895  #903  #912  #920  #929  #937  #946  #954  #963  #971  #980  #988  #997  #1005  #1237  #1245  #1254  #1262  #1271  #1279  #1288  #1296  #1305  #1313  #1322  #1330  #1339  #1347  #1356  #1364  #1373  #1381  #1390  #1398  #1407  #1415  #1424  #1432  #1469  #1477  #1486  #1494  #1503  #1511  #1520  #1528  #1537  #1545  #1554  #1562  #1571  #1579  #1588  #1596  #1605  #1613  #1622  #1630  #1639  #1647  #1656  #1664  #1701  #1709  #1718  #1726  #1735  #1743  #1752  #1760  #1769  #1777  #1786  #1794  #1803  #1811  #1820  #1828  #1837  #1845  #1854  #1862  #1871  #1879  #1888  #1896  #2128  #2136  #2145  #2153  #2162  #2170  #2179  #2187  #2196  #2204  #2213  #2221  #2230  #2238  #2247  #2255  #2264  #2272  #2281  #2289  #2298  #2306  #2315  #2323  #3019  #3027  #3036  #3044  #3053  #3061  #3070  #3078  #3087  #3095  #3104  #3112  #3121  #3129  #3138  #3146  #3155  #3163  #3172  #3180  #3189  #3197  #3206  #3214 ");
567   fs200ns_192Pb_216p_9inj24bpi->SetBXIDs("A","");
568   fs200ns_192Pb_216p_9inj24bpi->SetBXIDs("C","  #1  #9  #18  #26  #35  #43  #52  #60  #69  #77  #86  #94  #103  #111  #120  #128  #3497  #3505  #3514  #3522  #3531  #3539  #3548  #3556 ");
569   fs200ns_192Pb_216p_9inj24bpi->SetBXIDs("E","  #176  #261 ");     
570   oadbContFillingScheme->AppendObject(fs200ns_192Pb_216p_9inj24bpi, 196474, 196474);
571
572
573   // 2010 ----- Heavy Ion -------
574
575   // LHC10h1
576   AliOADBPhysicsSelection * oadbLHC10h1 = new AliOADBPhysicsSelection("oadbLHC10h1");
577   oadbLHC10h1->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",0);
578   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",0);
579   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",0);  
580   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",0);  
581   oadbLHC10h1->SetHardwareTrigger         ( 0,"V0A && V0C");
582   oadbLHC10h1->SetOfflineTrigger          ( 0,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
583   
584   oadbLHC10h1->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBS2A-B-NOPF-ALL","B",1);
585   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-A-NOPF-ALL","A",1);
586   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-C-NOPF-ALL","C",1);  
587   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-E-NOPF-ALL","E",1);  
588   oadbLHC10h1->SetHardwareTrigger         ( 1,"SPDGFOL1 > 1 && V0A");
589   oadbLHC10h1->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
590
591   oadbLHC10h1->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBS2C-B-NOPF-ALL","B",2);
592   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-A-NOPF-ALL","A",2);
593   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-C-NOPF-ALL","C",2);  
594   oadbLHC10h1->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-E-NOPF-ALL","E",2);  
595   oadbLHC10h1->SetHardwareTrigger         ( 2,"SPDGFOL1 > 1 && V0C");
596   oadbLHC10h1->SetOfflineTrigger          ( 2,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
597     
598   oadbContPS->AppendObject(oadbLHC10h1, 136851,136879);
599
600   // LHC10h2
601   AliOADBPhysicsSelection * oadbLHC10h2 = new AliOADBPhysicsSelection("oadbLHC10h2");
602   oadbLHC10h2->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
603   oadbLHC10h2->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
604   oadbLHC10h2->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
605   oadbLHC10h2->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
606   oadbLHC10h2->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
607   oadbLHC10h2->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
608   
609   oadbLHC10h2->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",1);
610   oadbLHC10h2->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",1);
611   oadbLHC10h2->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",1);
612   oadbLHC10h2->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",1);
613   oadbLHC10h2->SetHardwareTrigger         ( 1,"V0A && V0C");
614   oadbLHC10h2->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
615  
616   oadbContPS->AppendObject(oadbLHC10h2, 137042,137133);
617
618   // LHC10h3
619   AliOADBPhysicsSelection * oadbLHC10h3 = new AliOADBPhysicsSelection("oadbLHC10h3");
620   oadbLHC10h3->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
621   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
622   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
623   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
624   oadbLHC10h3->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
625   oadbLHC10h3->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
626   
627   oadbLHC10h3->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",1);
628   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",1);
629   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",1);
630   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",1);
631   oadbLHC10h3->SetHardwareTrigger         ( 1,"V0A && V0C");
632   oadbLHC10h3->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
633     
634   oadbLHC10h3->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBS2A-B-NOPF-ALL","B",2);
635   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-A-NOPF-ALL","A",2);
636   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-C-NOPF-ALL","C",2);
637   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-E-NOPF-ALL","E",2);
638   oadbLHC10h3->SetHardwareTrigger         ( 2,"SPDGFOL1 > 1 && V0A");
639   oadbLHC10h3->SetOfflineTrigger          ( 2,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
640
641   oadbLHC10h3->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBS2C-B-NOPF-ALL","B",3);
642   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-A-NOPF-ALL","A",3);
643   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-C-NOPF-ALL","C",3);
644   oadbLHC10h3->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-E-NOPF-ALL","E",3);
645   oadbLHC10h3->SetHardwareTrigger         ( 3,"SPDGFOL1 > 1 && V0C");
646   oadbLHC10h3->SetOfflineTrigger          ( 3,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
647
648   oadbContPS->AppendObject(oadbLHC10h3, 137135,137364);
649
650  // LHC10h, run 137365
651   AliOADBPhysicsSelection * oadbLHC10h_137365 = new AliOADBPhysicsSelection("oadbLHC10h_x9");
652   oadbLHC10h_137365->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",0);
653   oadbLHC10h_137365->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",0);
654   oadbLHC10h_137365->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",0);
655   oadbLHC10h_137365->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",0);
656   oadbLHC10h_137365->SetHardwareTrigger         ( 0,"V0A && V0C");
657   oadbLHC10h_137365->SetOfflineTrigger          ( 0,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
658
659   oadbContPS->AppendObject(oadbLHC10h_137365, 137365,137365);
660
661   AliOADBPhysicsSelection * oadbLHC10h4 = new AliOADBPhysicsSelection("oadbLHC10h4");
662   oadbLHC10h4->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
663   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
664   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
665   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
666   oadbLHC10h4->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
667   oadbLHC10h4->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
668   
669   oadbLHC10h4->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",1);
670   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",1);
671   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",1);
672   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",1);
673   oadbLHC10h4->SetHardwareTrigger         ( 1,"V0A && V0C");
674   oadbLHC10h4->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
675     
676   oadbLHC10h4->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBS2A-B-NOPF-ALL","B",2);
677   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-A-NOPF-ALL","A",2);
678   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-C-NOPF-ALL","C",2);
679   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2A-E-NOPF-ALL","E",2);
680   oadbLHC10h4->SetHardwareTrigger         ( 2,"SPDGFOL1 > 1 && V0A");
681   oadbLHC10h4->SetOfflineTrigger          ( 2,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
682
683   oadbLHC10h4->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBS2C-B-NOPF-ALL","B",3);
684   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-A-NOPF-ALL","A",3);
685   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-C-NOPF-ALL","C",3);
686   oadbLHC10h4->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBS2C-E-NOPF-ALL","E",3);
687   oadbLHC10h4->SetHardwareTrigger         ( 3,"SPDGFOL1 > 1 && V0C");
688   oadbLHC10h4->SetOfflineTrigger          ( 3,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
689
690   oadbContPS->AppendObject(oadbLHC10h4, 137366,137595);
691
692
693
694   // LHC10h5
695   AliOADBPhysicsSelection * oadbLHC10h5 = new AliOADBPhysicsSelection("oadbLHC10h5");
696   oadbLHC10h5->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
697   oadbLHC10h5->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
698   oadbLHC10h5->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
699   oadbLHC10h5->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
700   oadbLHC10h5->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
701   oadbLHC10h5->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
702   
703   oadbLHC10h5->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",1);
704   oadbLHC10h5->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",1);
705   oadbLHC10h5->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",1);
706   oadbLHC10h5->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",1);
707   oadbLHC10h5->SetHardwareTrigger         ( 1,"V0A && V0C");
708   oadbLHC10h5->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
709
710   oadbContPS->AppendObject(oadbLHC10h5, 137608,137848); // 138982,138983);
711
712   // LHC10h6
713   AliOADBPhysicsSelection * oadbLHC10h6 = new AliOADBPhysicsSelection("oadbLHC10h6");
714   oadbLHC10h6->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
715   oadbLHC10h6->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
716   oadbLHC10h6->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
717   oadbLHC10h6->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
718   oadbLHC10h6->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
719   oadbLHC10h6->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
720   
721   oadbLHC10h6->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBACS2-B-NOPF-ALL","B",1);
722   oadbLHC10h6->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-A-NOPF-ALL","A",1);
723   oadbLHC10h6->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-C-NOPF-ALL","C",1);
724   oadbLHC10h6->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-E-NOPF-ALL","E",1);
725   oadbLHC10h6->SetHardwareTrigger         ( 1,"(V0A && V0C && SPDGFOL1 > 1)");
726   oadbLHC10h6->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
727
728   oadbContPS->AppendObject(oadbLHC10h6, 138125,138980);// 139028, 139316);
729
730
731   AliOADBPhysicsSelection * oadbLHC10h7 = new AliOADBPhysicsSelection("oadbLHC10h7");
732   oadbLHC10h7->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
733   oadbLHC10h7->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
734   oadbLHC10h7->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
735   oadbLHC10h7->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
736   oadbLHC10h7->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
737   oadbLHC10h7->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
738   
739   oadbLHC10h7->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBAC-B-NOPF-ALL","B",1);
740   oadbLHC10h7->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-A-NOPF-ALL","A",1);
741   oadbLHC10h7->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-C-NOPF-ALL","C",1);
742   oadbLHC10h7->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBAC-E-NOPF-ALL","E",1);
743   oadbLHC10h7->SetHardwareTrigger         ( 1,"(V0A && V0C)");
744   oadbLHC10h7->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
745
746
747   oadbContPS->AppendObject(oadbLHC10h7, 138982,138983);
748
749
750   // LHC10h8
751   AliOADBPhysicsSelection * oadbLHC10h8 = new AliOADBPhysicsSelection("oadbLHC10h8");
752   oadbLHC10h8->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALL","B",0);
753   oadbLHC10h8->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALL","A",0);
754   oadbLHC10h8->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALL","C",0);
755   oadbLHC10h8->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALL","E",0);  
756   oadbLHC10h8->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
757   oadbLHC10h8->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
758   
759   oadbLHC10h8->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBACS2-B-NOPF-ALL","B",1);
760   oadbLHC10h8->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-A-NOPF-ALL","A",1);
761   oadbLHC10h8->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-C-NOPF-ALL","C",1);
762   oadbLHC10h8->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-E-NOPF-ALL","E",1);
763   oadbLHC10h8->SetHardwareTrigger         ( 1,"(V0A && V0C && SPDGFOL1 > 1)");
764   oadbLHC10h8->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
765
766   oadbContPS->AppendObject(oadbLHC10h8,  139028, 139316);
767
768
769   // LHC10h9
770   AliOADBPhysicsSelection * oadbLHC10h9 = new AliOADBPhysicsSelection("oadbLHC10h9");
771   oadbLHC10h9->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+C0SMH-B-NOPF-ALLNOTRD","B",0);
772   oadbLHC10h9->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-A-NOPF-ALLNOTRD","A",0);
773   oadbLHC10h9->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-C-NOPF-ALLNOTRD","C",0);
774   oadbLHC10h9->AddBGTriggerClass          ( AliVEvent::kHighMult,"+C0SMH-E-NOPF-ALLNOTRD","E",0);  
775   oadbLHC10h9->SetHardwareTrigger         ( 0,"SPDGFO >= 100");
776   oadbLHC10h9->SetOfflineTrigger          ( 0,"SPDGFO >= 100 && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
777   
778   oadbLHC10h9->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CMBACS2-B-NOPF-ALLNOTRD","B",1);
779   oadbLHC10h9->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-A-NOPF-ALLNOTRD","A",1);
780   oadbLHC10h9->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-C-NOPF-ALLNOTRD","C",1);
781   oadbLHC10h9->AddBGTriggerClass          ( AliVEvent::kMB,"+CMBACS2-E-NOPF-ALLNOTRD","E",1);
782   oadbLHC10h9->SetHardwareTrigger         ( 1,"(V0A && V0C && SPDGFOL1 > 1)");
783   oadbLHC10h9->SetOfflineTrigger          ( 1,"(V0A && V0C && SPDGFOL1 > 1) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && ZDCTime");
784
785   oadbContPS->AppendObject(oadbLHC10h9, 139328,139517);
786
787
788   // ----- 2011 -----
789   // ----- proton-proton -----
790   
791   // Default LHC11a/b/c, cint1b configuration
792   AliOADBPhysicsSelection * oadbLHC11ab = new AliOADBPhysicsSelection("oadbLHC11abc");
793   oadbLHC11ab->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-B-NOPF-ALLNOTRD","B",0);
794   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
795   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",0);  
796   oadbLHC11ab->AddCollisionTriggerClass   ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-B-NOPF-FASTNOTRD -CINT1-B-NOPF-ALLNOTRD","B",0);
797   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-AC-NOPF-FASTNOTRD -CINT1-AC-NOPF-ALLNOTRD","AC",0);
798   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-E-NOPF-FASTNOTRD -CINT1-E-NOPF-ALLNOTRD","E",0);  
799   oadbLHC11ab->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");                                           
800   oadbLHC11ab->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
801
802   oadbLHC11ab->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-MUON","B",1);
803   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-MUON","AC",1);
804   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-MUON","E",1);
805   oadbLHC11ab->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
806   oadbLHC11ab->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
807     
808   oadbLHC11ab->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSH1-B-NOPF-ALLNOTRD","B",2);
809   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-AC-NOPF-ALLNOTRD","AC",2);
810   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-E-NOPF-ALLNOTRD","E",2);
811   oadbLHC11ab->SetHardwareTrigger         ( 2,"SPDGFO >= 1 || V0A || V0C");                      
812   oadbLHC11ab->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
813
814   oadbLHC11ab->AddCollisionTriggerClass   ( AliVEvent::kEMC1,"+CEMC1-B-NOPF-ALLNOTRD","B",3);
815   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kEMC1,"+CEMC1-AC-NOPF-ALLNOTRD","AC",3);
816   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kEMC1,"+CEMC1-E-NOPF-ALLNOTRD","E",3);
817   // already defined before
818   oadbLHC11ab->SetHardwareTrigger         ( 3,"SPDGFO >= 1 || V0A || V0C");                      
819   oadbLHC11ab->SetOfflineTrigger          ( 3,"(SPDGFO >= 1 || V0A || V0C) && EMCAL && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
820
821   oadbLHC11ab->AddCollisionTriggerClass   ( AliVEvent::kPHI1,"+CPHI1-B-NOPF-ALLNOTRD","B",4);
822   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kPHI1,"+CPHI1-AC-NOPF-ALLNOTRD","AC",4);
823   oadbLHC11ab->AddBGTriggerClass          ( AliVEvent::kPHI1,"+CPHI1-E-NOPF-ALLNOTRD","E",4);
824   oadbLHC11ab->SetHardwareTrigger         ( 4,"SPDGFO >= 1 || V0A || V0C");
825   oadbLHC11ab->SetOfflineTrigger          ( 4,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
826
827   oadbContPS->AppendObject(oadbLHC11ab,  144871, 146856);
828   oadbContPS->AppendObject(oadbLHC11ab->Clone(),  146858, 152935);
829   oadbContPS->AppendObject(oadbLHC11ab->Clone(),  153360, 153361);
830   
831   // LHC11a1, "ALL" exceptions, cint1b configuration
832   AliOADBPhysicsSelection * oadbLHC11a1 = new AliOADBPhysicsSelection("oadbLHC11a1");
833   oadbLHC11a1->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-B-NOPF-ALL","B",0);
834   oadbLHC11a1->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALL","AC",0);
835   oadbLHC11a1->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALL","E",0);  
836   oadbLHC11a1->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");                                           
837   oadbLHC11a1->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
838
839   oadbLHC11a1->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-ALL","B",1);
840   oadbLHC11a1->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALL","AC",1);
841   oadbLHC11a1->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-ALL","E",1);
842   oadbLHC11a1->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
843   oadbLHC11a1->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
844   
845   oadbContPS->AppendObject(oadbLHC11a1, 146857,146857);
846   
847   
848   //LHC11c1, MUU7 read out with MUON cluster (default then changed to ALLNOTRD)
849   AliOADBPhysicsSelection * oadbLHC11c1 = new AliOADBPhysicsSelection("oadbLHC11c1");
850   oadbLHC11c1->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B",0);
851   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",0);
852   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",0);
853   oadbLHC11c1->SetHardwareTrigger         ( 0, "V0A && V0C");
854   oadbLHC11c1->SetOfflineTrigger          ( 0, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
855
856   oadbLHC11c1->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMUSH7-B-NOPF-MUON","B",1);
857   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-AC-NOPF-MUON","AC",1);
858   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-E-NOPF-MUON","E",1);
859   oadbLHC11c1->SetHardwareTrigger         ( 1, "V0A && V0C");
860   oadbLHC11c1->SetOfflineTrigger          ( 1, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
861
862   oadbLHC11c1->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMUL7-B-NOPF-MUON","B",2);
863   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-AC-NOPF-MUON","AC",2);
864   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-E-NOPF-MUON","E",2);
865   oadbLHC11c1->SetHardwareTrigger         ( 2, "V0A && V0C");
866   oadbLHC11c1->SetOfflineTrigger          ( 2, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
867
868   oadbLHC11c1->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUU7-B-NOPF-MUON","B",3);
869   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-AC-NOPF-MUON","AC",3);
870   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-E-NOPF-MUON","E",3);
871   oadbLHC11c1->SetHardwareTrigger         ( 3, "V0A && V0C");
872   oadbLHC11c1->SetOfflineTrigger          ( 3, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
873
874   oadbLHC11c1->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-ALLNOTRD","B",4);
875   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-AC-NOPF-ALLNOTRD","AC",4);
876   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-E-NOPF-ALLNOTRD","E",4);
877   oadbLHC11c1->SetHardwareTrigger         ( 4, "V0A && V0C");
878   oadbLHC11c1->SetOfflineTrigger          ( 4, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
879
880   oadbLHC11c1->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-B-NOPF-ALLNOTRD","B",  5);
881   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-AC-NOPF-ALLNOTRD","AC",5);
882   oadbLHC11c1->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-E-NOPF-ALLNOTRD","E",  5);
883   oadbLHC11c1->SetHardwareTrigger         ( 5,"V0A && V0C");
884   oadbLHC11c1->SetOfflineTrigger          ( 5,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
885
886   oadbContPS->AppendObject(oadbLHC11c1, 153056 , 153296);
887   oadbContPS->AppendObject(oadbLHC11c1->Clone(), 153362 , 153578);
888   oadbContPS->AppendObject(oadbLHC11c1->Clone(), 153583 , 153583);
889   oadbContPS->AppendObject(oadbLHC11c1->Clone(), 153587 , 153733);
890   
891   // Tests with CMUS7
892   //LHC11c3
893 //  AliOADBPhysicsSelection * oadbLHC11c3 = new AliOADBPhysicsSelection("oadbLHC11c3");
894 //  oadbLHC11c3->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B",0);
895 //  oadbLHC11c3->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",0);
896 //  oadbLHC11c3->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",0);
897 //  oadbLHC11c3->SetHardwareTrigger         ( 0, "V0A && V0C");
898 //  oadbLHC11c3->SetOfflineTrigger          ( 0, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
899 //  
900 //  oadbLHC11c3->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMUS7-B-NOPF-MUON","B",1);
901 //  oadbLHC11c3->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-AC-NOPF-MUON","AC",1);
902 //  oadbLHC11c3->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-E-NOPF-MUON","E",1);
903 //  oadbLHC11c3->SetHardwareTrigger         ( 1, "V0A && V0C");
904 //  oadbLHC11c3->SetOfflineTrigger          ( 1, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
905 //  
906 //  oadbContPS->AppendObject(oadbLHC11c3, 151664 , 151680);
907 //  
908 //  //LHC11c4
909 //  AliOADBPhysicsSelection * oadbLHC11c4 = new AliOADBPhysicsSelection("oadbLHC11c4");
910 //  oadbLHC11c4->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B",0);
911 //  oadbLHC11c4->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",0);
912 //  oadbLHC11c4->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",0);
913 //  oadbLHC11c4->SetHardwareTrigger         ( 0, "V0A && V0C");
914 //  oadbLHC11c4->SetOfflineTrigger          ( 0, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
915 //  
916 //  oadbLHC11c4->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMUS7-B-NOPF-MUON","B",1);
917 //  oadbLHC11c4->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-AC-NOPF-MUON","AC",1);
918 //  oadbLHC11c4->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-E-NOPF-MUON","E",1);
919 //  oadbLHC11c4->SetHardwareTrigger         ( 1, "V0A && V0C");
920 //  oadbLHC11c4->SetOfflineTrigger          ( 1, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
921 //  
922 //  oadbLHC11c4->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-ALLNOTRD","B",2);
923 //  oadbLHC11c4->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-AC-NOPF-ALLNOTRD","AC",2);
924 //  oadbLHC11c4->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-E-NOPF-ALLNOTRD","E",2);
925 //  oadbLHC11c4->SetHardwareTrigger         ( 2, "V0A && V0C");
926 //  oadbLHC11c4->SetOfflineTrigger          ( 2, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
927 //  
928 //  oadbContPS->AppendObject(oadbLHC11c4, 152002 , 152007);
929 //  oadbContPS->AppendObject(oadbLHC11c4->Clone(), 152011 , 152011);
930 //  oadbContPS->AppendObject(oadbLHC11c4->Clone(), 152082 , 152082);
931 //  oadbContPS->AppendObject(oadbLHC11c4->Clone(), 152137 , 152137);
932   
933   
934
935 //  //LHC11c5 (Current default)
936 //  AliOADBPhysicsSelection * oadbLHC11c5 = new AliOADBPhysicsSelection("oadbLHC11c5");
937 //  oadbLHC11c5->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B",0);
938 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",0);
939 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",0);
940 //  oadbLHC11c5->SetHardwareTrigger         ( 0, "V0A && V0C");
941 //  oadbLHC11c5->SetOfflineTrigger          ( 0, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
942 //
943 //  oadbLHC11c5->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMUSH7-B-NOPF-MUON","B",1);
944 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-AC-NOPF-MUON","AC",1);
945 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-E-NOPF-MUON","E",1);
946 //  oadbLHC11c5->SetHardwareTrigger         ( 1, "V0A && V0C");
947 //  oadbLHC11c5->SetOfflineTrigger          ( 1, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
948 //
949 //  oadbLHC11c5->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMUL7-B-NOPF-MUON","B",2);
950 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-AC-NOPF-MUON","AC",2);
951 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-E-NOPF-MUON","E",2);
952 //  oadbLHC11c5->SetHardwareTrigger         ( 2, "V0A && V0C");
953 //  oadbLHC11c5->SetOfflineTrigger          ( 2, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
954 //
955 //  oadbLHC11c5->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUU7-B-NOPF-ALLNOTRD","B",3);
956 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-AC-NOPF-ALLNOTRD","AC",3);
957 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-E-NOPF-ALLNOTRD","E",3);
958 //  oadbLHC11c5->SetHardwareTrigger         ( 3, "V0A && V0C");
959 //  oadbLHC11c5->SetOfflineTrigger          ( 3, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
960 //
961 //  oadbLHC11c5->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-ALLNOTRD","B",4);
962 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-AC-NOPF-ALLNOTRD","AC",4);
963 //  oadbLHC11c5->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-E-NOPF-ALLNOTRD","E",4);
964 //  oadbLHC11c5->SetHardwareTrigger         ( 4, "V0A && V0C");
965 //  oadbLHC11c5->SetOfflineTrigger          ( 4, "(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
966 //
967 //  oadbContPS->AppendObject(oadbLHC11c5, 153776 , 154570);
968
969   //LHC11d1, CINT7-B and CPHI-7B (before I transition)
970   AliOADBPhysicsSelection * oadbLHC11d1 = new AliOADBPhysicsSelection("oadbLHC11d1");
971
972   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B",0);
973   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",0);
974   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",0);  
975   oadbLHC11d1->SetHardwareTrigger         ( 0,"V0A && V0C");                                          
976   oadbLHC11d1->SetOfflineTrigger          ( 0,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
977
978   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMUSH7-B-NOPF-MUON","B",  1);
979   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-AC-NOPF-MUON","AC",1);
980   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-E-NOPF-MUON","E",  1);
981   oadbLHC11d1->SetHardwareTrigger         ( 1,"V0A && V0C");                                         
982   oadbLHC11d1->SetOfflineTrigger          ( 1,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
983     
984   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMUL7-B-NOPF-MUON","B",  2);
985   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-AC-NOPF-MUON","AC",2);
986   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-E-NOPF-MUON","E",  2);
987   oadbLHC11d1->SetHardwareTrigger         ( 2,"V0A && V0C");                                         
988   oadbLHC11d1->SetOfflineTrigger          ( 2,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
989
990   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUU7-B-NOPF-ALLNOTRD","B",  3);
991   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-AC-NOPF-ALLNOTRD","AC",3);
992   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-E-NOPF-ALLNOTRD","E",  3);
993   oadbLHC11d1->SetHardwareTrigger         ( 3,"V0A && V0C");                                         
994   oadbLHC11d1->SetOfflineTrigger          ( 3,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
995   
996   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-ALLNOTRD","B",  4);
997   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-AC-NOPF-ALLNOTRD","AC",4);
998   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-E-NOPF-ALLNOTRD","E",  4);
999   oadbLHC11d1->SetHardwareTrigger         ( 4,"V0A && V0C");                      
1000   oadbLHC11d1->SetOfflineTrigger          ( 4,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1001   
1002   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMUS7-B-NOPF-MUON","B",  5);
1003   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-AC-NOPF-MUON","AC",5);
1004   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-E-NOPF-MUON","E",  5);
1005   oadbLHC11d1->SetHardwareTrigger         ( 5,"V0A && V0C");                                         
1006   oadbLHC11d1->SetOfflineTrigger          ( 5,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");  
1007   
1008   oadbLHC11d1->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-B-NOPF-ALLNOTRD,CPHI7-I-NOPF-ALLNOTRD","B",  6);
1009   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-AC-NOPF-ALLNOTRD","AC",6);
1010   oadbLHC11d1->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-E-NOPF-ALLNOTRD","E",  6);
1011   oadbLHC11d1->SetHardwareTrigger         ( 6,"V0A && V0C");
1012   oadbLHC11d1->SetOfflineTrigger          ( 6,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1013
1014   oadbContPS->AppendObject(oadbLHC11d1, 153738, 158793);
1015   
1016   // LHC11d-f
1017   AliOADBPhysicsSelection * oadbLHC11df = new AliOADBPhysicsSelection("oadbLHC11df");
1018   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-[I|B]-NOPF-ALLNOTRD","B",0);
1019   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",0);
1020   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",0);  
1021   oadbLHC11df->SetHardwareTrigger         ( 0,"V0A && V0C");                                          
1022   oadbLHC11df->SetOfflineTrigger          ( 0,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1023
1024   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMUSH7-B-NOPF-MUON","B",  1);
1025   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-AC-NOPF-MUON","AC",1);
1026   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMUSH7-E-NOPF-MUON","E",  1);
1027   oadbLHC11df->SetHardwareTrigger         ( 1,"V0A && V0C");                                         
1028   oadbLHC11df->SetOfflineTrigger          ( 1,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1029     
1030   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMUL7-B-NOPF-MUON","B",  2);
1031   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-AC-NOPF-MUON","AC",2);
1032   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMUL7-E-NOPF-MUON","E",  2);
1033   oadbLHC11df->SetHardwareTrigger         ( 2,"V0A && V0C");                                         
1034   oadbLHC11df->SetOfflineTrigger          ( 2,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1035
1036   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUU7-B-NOPF-ALLNOTRD","B",  3);
1037   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-AC-NOPF-ALLNOTRD","AC",3);
1038   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUU7-E-NOPF-ALLNOTRD","E",  3);
1039   oadbLHC11df->SetHardwareTrigger         ( 3,"V0A && V0C");                                         
1040   oadbLHC11df->SetOfflineTrigger          ( 3,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1041   
1042   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-ALLNOTRD","B",  4);
1043   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-AC-NOPF-ALLNOTRD","AC",4);
1044   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-E-NOPF-ALLNOTRD","E",  4);
1045   oadbLHC11df->SetHardwareTrigger         ( 4,"V0A && V0C");                      
1046   oadbLHC11df->SetOfflineTrigger          ( 4,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1047   
1048   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMUS7-B-NOPF-MUON","B",  5);
1049   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-AC-NOPF-MUON","AC",5);
1050   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMUS7-E-NOPF-MUON","E",  5);
1051   oadbLHC11df->SetHardwareTrigger         ( 5,"V0A && V0C");                                         
1052   oadbLHC11df->SetOfflineTrigger          ( 5,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1053
1054   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-[I|B]-NOPF-ALLNOTRD","B",  6);
1055   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-AC-NOPF-ALLNOTRD","AC",6);
1056   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-E-NOPF-ALLNOTRD","E",  6);
1057   oadbLHC11df->SetHardwareTrigger         ( 6,"V0A && V0C");
1058   oadbLHC11df->SetOfflineTrigger          ( 6,"(V0A && V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
1059   
1060   oadbLHC11df->AddCollisionTriggerClass   ( AliVEvent::kDG5,"+CDG5-I-NOPF-ALLNOTRD","B",  7);
1061   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kDG5,"+CDG5-AC-NOPF-ALLNOTRD","AC",7);
1062   oadbLHC11df->AddBGTriggerClass          ( AliVEvent::kDG5,"+CDG5-E-NOPF-ALLNOTRD","E",  7);
1063   // TODO TOF condition needs to be implemented (Savannah bug #87064)
1064   oadbLHC11df->SetHardwareTrigger         ( 7,"!V0A && !V0C && SPDGFOL1 >= 2");
1065   oadbLHC11df->SetOfflineTrigger          ( 7,"!V0A && !V0C && !V0ABG && !V0CBG && SPDGFOL1 >= 2 && !TPCLaserWarmUp");
1066
1067   oadbContPS->AppendObject(oadbLHC11df, 158794, 165747);
1068
1069
1070   AliOADBPhysicsSelection * oadbLHC11h = new AliOADBPhysicsSelection("oadbDefaultlhc11h");
1071   triggerCount=0;
1072   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CPBI1-B-NOPF-ALLNOTRD,CPBI2_B1-B-[NOPF|PF]-ALLNOTRD","B",triggerCount);
1073   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kMB,"+CPBI[1|2_B1]-AC-NOPF-ALLNOTRD","AC",triggerCount);
1074   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kMB,"+CPBI[1|2_B1]-E-NOPF-ALLNOTRD","E",triggerCount);
1075   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1076   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1077
1078   triggerCount++;
1079   // Bug in early running, CVHN_R2-B-NOPF-ALLNOTRD needed explicitly up to run 167814 (to be moved to custom object as soon as all other things are fine)
1080   //   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVHN-B-NOPF-ALLNOTRD,CVHN_R2-B-NOPF-ALLNOTRD,CVHN-B-NOPF-CENTNOTRD,CVHN-B-NOPF-CENTNOTRD,CVHN-B-PF-ALLNOTRD,CVHN-B-PF-CENTNOTRD","B",triggerCount);
1081   // oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD","B",triggerCount);
1082   // oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-AC-NOPF-[ALL|CENT]NOTRD","AC",triggerCount);
1083   // oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-E-NOPF-[ALL|CENT]NOTRD","E",triggerCount);
1084   // Also include the semicentral class in the online classes selection (in order not to loose event due to the different time sharing of central and semi-central)
1085   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD,CVLN[|_B2|_R1]-B-[NOPF|PF]-ALLNOTRD,CSEMI_R1-B-NOPF-ALLNOTRD,CCENT_R2-B-NOPF-ALLNOTRD","B",triggerCount);
1086   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-AC-NOPF-[ALL|CENT]NOTRD,CVLN-AC-NOPF-ALLNOTRD,CCENT_R2-AC-NOPF-ALLNOTRD","AC",triggerCount);
1087   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kCentral,"+CVHN-E-NOPF-[ALL|CENT]NOTRD,CVLN-E-NOPF-ALLNOTRD,CCENT_R2-E-NOPF-ALLNOTRD","E",triggerCount);
1088   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C && Central");
1089   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1090
1091   triggerCount++;
1092   // semicentral includes central ones (and might have different downscaling)
1093   // Bug in early running, CVHN_R2-B-NOPF-ALLNOTRD,CVLN_B2-B-NOPF-ALLNOTRD needed explicitly up to run 167814 (to be moved to custom object as soon as all other things are fine)
1094 //   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kSemiCentral,"+CVHN-B-NOPF-ALLNOTRD,CVHN_R2-B-NOPF-ALLNOTRD,CVHN-B-NOPF-CENTNOTRD,CVHN-B-PF-ALLNOTRD,CVHN-B-PF-CENTNOTRD,CVLN-B-NOPF-ALLNOTRD,CVLN_B2-B-NOPF-ALLNOTRD,CVLN-B-PF-ALLNOTRD","B",triggerCount);
1095 //  oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kSemiCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD,CVLN[|_B2]-B-[NOPF|PF]-ALLNOTRD","B",triggerCount);
1096   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kSemiCentral,"+CVHN[|_R2]-B-[NOPF|PF]-[ALL|CENT]NOTRD,CVLN[|_B2|_R1]-B-[NOPF|PF]-ALLNOTRD,CSEMI_R1-B-NOPF-ALLNOTRD,CCENT_R2-B-NOPF-ALLNOTRD","B",triggerCount);
1097   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kSemiCentral,"+CVHN-AC-NOPF-[ALL|CENT]NOTRD,CVLN-AC-NOPF-ALLNOTRD,CSEMI_R1-AC-NOPF-ALLNOTRD","AC",triggerCount);
1098   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kSemiCentral,"+CVHN-E-NOPF-[ALL|CENT]NOTRD,CVLN-E-NOPF-ALLNOTRD,CSEMI_R1-E-NOPF-ALLNOTRD","E",triggerCount);
1099   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C && SemiCentral && !Central");
1100   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1101
1102   triggerCount++;
1103   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CPBI2EJE-B-NOPF-CENTNOTRD","B",triggerCount);
1104   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CPBI2EJE-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
1105   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1106   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
1107   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1108   
1109   triggerCount++;
1110   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CPBI2EGA-B-NOPF-CENTNOTRD","B",triggerCount);
1111   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CPBI2EGA-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
1112   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1113   // TODO EMC offline check missing, https://savannah.cern.ch/bugs/index.php?87104
1114   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1115   
1116   triggerCount++;
1117   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kMUSPB,"+CPBI1MSL-B-NOPF-MUON","B",  triggerCount);
1118   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kMUSPB,"+CPBI1MSL-ACE-NOPF-MUON","ACE",triggerCount);
1119   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
1120   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1121
1122   triggerCount++;
1123   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kMUSHPB,"+CPBI1MSH-B-NOPF-MUON","B",  triggerCount);
1124   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kMUSHPB,"+CPBI1MSH-ACE-NOPF-MUON","ACE",triggerCount);
1125   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
1126   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1127     
1128   triggerCount++;
1129   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kMuonUnlikePB,"+CPBI1MUL-B-NOPF-MUON","B",  triggerCount);
1130   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kMuonUnlikePB,"+CPBI1MUL-ACE-NOPF-MUON","ACE",triggerCount);
1131   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
1132   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1133
1134   triggerCount++;
1135   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kMuonLikePB,"+CPBI1MLL-B-NOPF-MUON","B",  triggerCount);
1136   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kMuonLikePB,"+CPBI1MLL-ACE-NOPF-MUON","ACE",triggerCount);
1137   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                         
1138   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1139
1140   triggerCount++;
1141   oadbLHC11h->AddCollisionTriggerClass   ( AliVEvent::kPHOSPb,"+CPBI2PHS-B-NOPF-CENTNOTRD","B",  triggerCount);
1142   oadbLHC11h->AddBGTriggerClass          ( AliVEvent::kPHOSPb,"+CPBI2PHS-ACE-NOPF-CENTNOTRD","ACE",triggerCount);
1143   oadbLHC11h->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1144   oadbLHC11h->SetOfflineTrigger          ( triggerCount,"V0A && V0C && !V0ABG && !V0CBG && !TPCLaserWarmUp && ZDCTime");
1145
1146   oadbContPS->AppendObject(oadbLHC11h, 166529, 170593);
1147   triggerCount=0;
1148
1149   //
1150   // OADB Object for pA run (Sept 2012)
1151   //
1152   AliOADBPhysicsSelection * oadbLHC12g = new AliOADBPhysicsSelection("oadbLHC12g");
1153   oadbLHC12g->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-[I|B]-NOPF-ALLNOTRD,CINT7-B-NOPF-CENTNOTRD","B",triggerCount);
1154   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-AC-NOPF-ALLNOTRD","AC",  triggerCount);
1155   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E",    triggerCount);  
1156   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
1157   oadbLHC12g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");                                        
1158   oadbLHC12g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !ZNCBG && !TPCLaserWarmUp");
1159
1160   triggerCount++;
1161   oadbLHC12g->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-B-NOPF-ALLNOTRD","B",    triggerCount);
1162   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-A-NOPF-ALLNOTRD","A",  triggerCount);
1163   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-C-NOPF-ALLNOTRD","C",  triggerCount);
1164   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",    triggerCount);  
1165   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
1166   oadbLHC12g->SetHardwareTrigger         ( triggerCount,"SPDGFO >= 1 || V0A || V0C");                                         
1167   oadbLHC12g->SetOfflineTrigger          ( triggerCount,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
1168
1169   triggerCount++;
1170   oadbLHC12g->AddCollisionTriggerClass   ( AliVEvent::kCINT5,"+CINT5-B-NOPF-ALLNOTRD","B",triggerCount);
1171   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-AC-NOPF-ALLNOTRD","AC",triggerCount);
1172   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
1173   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-A-NOPF-ALLNOTRD","A",triggerCount);
1174   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-C-NOPF-ALLNOTRD","C",triggerCount);
1175   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-E-NOPF-ALLNOTRD","E",triggerCount);  
1176   oadbLHC12g->SetHardwareTrigger         ( triggerCount,"V0A || V0C");
1177   oadbLHC12g->SetOfflineTrigger          ( triggerCount,"(V0A || V0C) && !V0ABG && !V0CBG && !ZNABG && !ZNCBG && !TPCLaserWarmUp");
1178
1179   triggerCount++;
1180   oadbLHC12g->AddCollisionTriggerClass   ( AliVEvent::kZED,"+C1ZED-B-NOPF-ALLNOTRD", "B",  triggerCount);
1181   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-A-NOPF-ALLNOTRD","A", triggerCount);
1182   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-C-NOPF-ALLNOTRD","C", triggerCount);
1183   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-E-NOPF-ALLNOTRD", "E",  triggerCount);
1184   oadbLHC12g->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-ACE-NOPF-ALLNOTRD","ACE",triggerCount);
1185   oadbLHC12g->SetHardwareTrigger         ( triggerCount,"1");
1186   oadbLHC12g->SetOfflineTrigger          ( triggerCount,"(ZDCTDCA || ZDCTDCC) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
1187
1188   triggerCount++;  
1189   oadbLHC12g->AddCollisionTriggerClass   ( AliVEvent::kSPI7,"+CSPI7-B-NOPF-ALLNOTRD","B",     triggerCount);
1190   oadbLHC12g->SetHardwareTrigger         ( triggerCount,"SPDGFOL1 >= 10 && (V0A && V0C)");                      
1191   oadbLHC12g->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 10 && V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp");
1192
1193   oadbContPS->AppendObject(oadbLHC12g, 188124, 188374);
1194
1195   //
1196   // OADB Object for pA run (Jan 2013)
1197   //
1198   AliOADBPhysicsSelection * oadbLHC13b = new AliOADBPhysicsSelection("oadbLHC13b");
1199   triggerCount=0;
1200   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-B-NOPF-ALLNOTRD","B", triggerCount);
1201   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-A-NOPF-ALLNOTRD","A", triggerCount);
1202   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-C-NOPF-ALLNOTRD","C", triggerCount);
1203   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E", triggerCount);  
1204   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);  
1205   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-B-NOPF-FASTNOTRD -CINT1-B-NOPF-ALLNOTRD","B", triggerCount);
1206   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-A-NOPF-FASTNOTRD -CINT1-A-NOPF-ALLNOTRD","A", triggerCount);
1207   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-C-NOPF-FASTNOTRD -CINT1-C-NOPF-ALLNOTRD","C", triggerCount);
1208   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-E-NOPF-FASTNOTRD -CINT1-E-NOPF-ALLNOTRD","E", triggerCount);  
1209   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-ACE-NOPF-FASTNOTRD -CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1210   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"SPDGFO >= 1 || V0A || V0C");
1211   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !ZNABG && !TPCLaserWarmUp && !TPCHVdip");
1212
1213   triggerCount++;
1214   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B", triggerCount);
1215   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-A-NOPF-ALLNOTRD","A", triggerCount);
1216   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-C-NOPF-ALLNOTRD","C", triggerCount);
1217   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E", triggerCount);
1218   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1219   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-B-NOPF-FASTNOTRD -CINT7-B-NOPF-ALLNOTRD","B", triggerCount);
1220   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-A-NOPF-FASTNOTRD -CINT7-A-NOPF-ALLNOTRD","A", triggerCount);
1221   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-C-NOPF-FASTNOTRD -CINT7-C-NOPF-ALLNOTRD","C", triggerCount);
1222   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-E-NOPF-FASTNOTRD -CINT7-E-NOPF-ALLNOTRD","E", triggerCount);
1223   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-ACE-NOPF-FASTNOTRD -CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1224   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1225   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip");
1226
1227   triggerCount++;
1228   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVLN-B-NOPF-ALLNOTRD","B", triggerCount);
1229   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1230   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip");
1231
1232   triggerCount++;
1233   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-[ALL|CENT]NOTRD", "B", triggerCount);
1234   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-ACE-NOPF-[ALL|CENT]NOTRD", "ACE", triggerCount);
1235   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kEMC7 | AliVEvent::kFastOnly,"+CEMC7-B-NOPF-FASTNOTRD -CEMC7-B-NOPF-[ALL|CENT]NOTRD", "B", triggerCount);
1236   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kEMC7 | AliVEvent::kFastOnly,"+CEMC7-ACE-NOPF-FASTNOTRD -CEMC7-ACE-NOPF-[ALL|CENT]NOTRD", "ACE", triggerCount);
1237   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1238   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip");
1239
1240   triggerCount++;  
1241   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CEMC7EG1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1242   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CEMC7EG1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-ACE-NOPF-[ALL|CENT]CENTNOTRD","ACE",triggerCount);
1243   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA | AliVEvent::kFastOnly,"+CEMC7EG1-B-NOPF-FASTNOTRD,CEMC7EG2-B-NOPF-FASTNOTRD -CEMC7EG1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1244   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kEMCEGA | AliVEvent::kFastOnly,"+CEMC7EG1-ACE-NOPF-FASTNOTRD,CEMC7EG2-ACE-NOPF-FASTNOTRD -CEMC7EG1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1245   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1246   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip");
1247
1248   triggerCount++;  
1249   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CEMC7EJ1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1250   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CEMC7EJ1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1251   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE | AliVEvent::kFastOnly,"+CEMC7EJ1-B-NOPF-FASTNOTRD,CEMC7EJ2-B-NOPF-FASTNOTRD -CEMC7EJ1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1252   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kEMCEJE | AliVEvent::kFastOnly,"+CEMC7EJ1-ACE-NOPF-FASTNOTRD,CEMC7EJ2-ACE-NOPF-FASTNOTRD -CEMC7EJ1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1253   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1254   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip");
1255
1256   triggerCount++;  
1257   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-B-NOPF-[ALL|CENT]NOTRD","B",triggerCount);
1258   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1259   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1260   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1261
1262   triggerCount++;  
1263   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMSL7-B-NOPF-MUON,CMSL7-B-NOPF-ALLNOTRD","B",       triggerCount);
1264   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMSL7-ACE-NOPF-MUON,CMSL7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1265   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1266   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG");
1267
1268   triggerCount++;  
1269   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMSH7-B-NOPF-MUON","B",       triggerCount);
1270   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMSH7-ACE-NOPF-MUON","ACE", triggerCount);
1271   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1272   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG");
1273
1274   triggerCount++;    
1275   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMLL7-B-NOPF-MUON","B",    triggerCount);
1276   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMLL7-ACE-NOPF-MUON","ACE",triggerCount);
1277   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1278   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG");
1279
1280   triggerCount++;    
1281   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUL7-B-NOPF-MUON","B",    triggerCount);
1282   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUL7-ACE-NOPF-MUON","ACE",triggerCount);
1283   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1284   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG");
1285
1286   triggerCount++;
1287   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kZED,"+C1ZED-B-NOPF-[ALL|CENT]NOTRD", "B",   triggerCount);
1288   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1289   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"1");
1290   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(ZDCTDCA || ZDCTDCC) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !SPDClsVsTrkBG && !TPCHVdip");
1291
1292   triggerCount++;
1293   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHJT-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1294   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHJT-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1295   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHJT-B-NOPF-FAST -CINT7WUHJT-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1296   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHJT-ACE-NOPF-FAST -CINT7WUHJT-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1297   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1298   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHJT && !TPCHVdip");
1299
1300   triggerCount++;
1301   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHSE-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1302   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHSE-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1303   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHSE-B-NOPF-FAST -CINT7WUHSE-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1304   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHSE-ACE-NOPF-FAST -CINT7WUHSE-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1305   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1306   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHSE && !TPCHVdip");
1307
1308   triggerCount++;
1309   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHQU-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1310   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHQU-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1311   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHQU-B-NOPF-FAST -CINT7WUHQU-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1312   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHQU-ACE-NOPF-FAST -CINT7WUHQU-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1313   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1314   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHQU && !TPCHVdip");
1315
1316   triggerCount++;
1317   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CEMC7WUHEE-B-NOPF-CENT", "B",   triggerCount);
1318   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kTRD,"+CEMC7WUHEE-ACE-NOPF-CENT","ACE",triggerCount);
1319   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1320   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHEE && !TPCHVdip");
1321
1322   triggerCount++;
1323   oadbLHC13b->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSHM7-B-NOPF-ALLNOTRD","B",   triggerCount);
1324   oadbLHC13b->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSHM7-ACE-NOPF-ALLNOTRD","ACE",   triggerCount);
1325   oadbLHC13b->SetHardwareTrigger         ( triggerCount,"SPDGFOL1 >= 10 && (V0A && V0C)");                                         //<------------ FIX ME : SPDFO threshold
1326   oadbLHC13b->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 10 && V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip"); //<------------ FIX ME : SPDFO threshold
1327
1328   //  oadbContPS->AppendObject(oadbLHC13b, 194713, 196345);
1329   oadbContPS->AppendObject(oadbLHC13b, 194713, 195388);
1330   oadbContPS->AppendObject(oadbLHC13b->Clone(), 195390, 195530);
1331   oadbContPS->AppendObject(oadbLHC13b->Clone(), 195532, 196345);
1332
1333
1334   //
1335   // OADB Object for pA run (Jan 2013) for run 195389, 195531 (for incomplete events)
1336   //
1337   AliOADBPhysicsSelection * oadbLHC13bIncompleteEvents = new AliOADBPhysicsSelection("oadbLHC13bIncompleteEvents");
1338
1339   triggerCount=0;
1340   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-B-NOPF-ALLNOTRD","B", triggerCount);
1341   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-A-NOPF-ALLNOTRD","A", triggerCount);
1342   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-C-NOPF-ALLNOTRD","C", triggerCount);
1343   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E", triggerCount);  
1344   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);  
1345   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-B-NOPF-FASTNOTRD -CINT1-B-NOPF-ALLNOTRD","B", triggerCount);
1346   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-A-NOPF-FASTNOTRD -CINT1-A-NOPF-ALLNOTRD","A", triggerCount);
1347   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-C-NOPF-FASTNOTRD -CINT1-C-NOPF-ALLNOTRD","C", triggerCount);
1348   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-E-NOPF-FASTNOTRD -CINT1-E-NOPF-ALLNOTRD","E", triggerCount);  
1349   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-ACE-NOPF-FASTNOTRD -CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1350   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"SPDGFO >= 1 || V0A || V0C");
1351   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1352
1353   triggerCount++;
1354   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B", triggerCount);
1355   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-A-NOPF-ALLNOTRD","A", triggerCount);
1356   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-C-NOPF-ALLNOTRD","C", triggerCount);
1357   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E", triggerCount);
1358   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1359   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-B-NOPF-FASTNOTRD -CINT7-B-NOPF-ALLNOTRD","B", triggerCount);
1360   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-A-NOPF-FASTNOTRD -CINT7-A-NOPF-ALLNOTRD","A", triggerCount);
1361   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-C-NOPF-FASTNOTRD -CINT7-C-NOPF-ALLNOTRD","C", triggerCount);
1362   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-E-NOPF-FASTNOTRD -CINT7-E-NOPF-ALLNOTRD","E", triggerCount);
1363   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-ACE-NOPF-FASTNOTRD -CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1364   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1365   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1366
1367   triggerCount++;
1368   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVLN-B-NOPF-ALLNOTRD","B", triggerCount);
1369   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1370   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1371
1372   triggerCount++;
1373   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-[ALL|CENT]NOTRD", "B", triggerCount);
1374   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-ACE-NOPF-[ALL|CENT]NOTRD", "ACE", triggerCount);
1375   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kEMC7 | AliVEvent::kFastOnly,"+CEMC7-B-NOPF-FASTNOTRD -CEMC7-B-NOPF-[ALL|CENT]NOTRD", "B", triggerCount);
1376   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kEMC7 | AliVEvent::kFastOnly,"+CEMC7-ACE-NOPF-FASTNOTRD -CEMC7-ACE-NOPF-[ALL|CENT]NOTRD", "ACE", triggerCount);
1377   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1378   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1379
1380   triggerCount++;  
1381   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CEMC7EG1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1382   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CEMC7EG1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-ACE-NOPF-[ALL|CENT]CENTNOTRD","ACE",triggerCount);
1383   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA | AliVEvent::kFastOnly,"+CEMC7EG1-B-NOPF-FASTNOTRD,CEMC7EG2-B-NOPF-FASTNOTRD -CEMC7EG1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1384   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kEMCEGA | AliVEvent::kFastOnly,"+CEMC7EG1-ACE-NOPF-FASTNOTRD,CEMC7EG2-ACE-NOPF-FASTNOTRD -CEMC7EG1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1385   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1386   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1387
1388   triggerCount++;  
1389   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CEMC7EJ1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1390   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CEMC7EJ1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1391   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE | AliVEvent::kFastOnly,"+CEMC7EJ1-B-NOPF-FASTNOTRD,CEMC7EJ2-B-NOPF-FASTNOTRD -CEMC7EJ1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1392   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kEMCEJE | AliVEvent::kFastOnly,"+CEMC7EJ1-ACE-NOPF-FASTNOTRD,CEMC7EJ2-ACE-NOPF-FASTNOTRD -CEMC7EJ1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1393   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1394   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1395
1396   triggerCount++;  
1397   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-B-NOPF-[ALL|CENT]NOTRD","B",triggerCount);
1398   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1399   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1400   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent");
1401
1402   triggerCount++;  
1403   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMSL7-B-NOPF-MUON,CMSL7-B-NOPF-ALLNOTRD","B",       triggerCount);
1404   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMSL7-ACE-NOPF-MUON,CMSL7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1405   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1406   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !IncompleteEvent");
1407
1408   triggerCount++;  
1409   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMSH7-B-NOPF-MUON","B",       triggerCount);
1410   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMSH7-ACE-NOPF-MUON","ACE", triggerCount);
1411   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1412   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !IncompleteEvent");
1413
1414   triggerCount++;    
1415   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMLL7-B-NOPF-MUON","B",    triggerCount);
1416   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMLL7-ACE-NOPF-MUON","ACE",triggerCount);
1417   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1418   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !IncompleteEvent");
1419
1420   triggerCount++;    
1421   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUL7-B-NOPF-MUON","B",    triggerCount);
1422   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUL7-ACE-NOPF-MUON","ACE",triggerCount);
1423   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1424   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !IncompleteEvent");
1425
1426   triggerCount++;
1427   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kZED,"+C1ZED-B-NOPF-[ALL|CENT]NOTRD", "B",   triggerCount);
1428   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1429   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"1");
1430   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(ZDCTDCA || ZDCTDCC) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !SPDClsVsTrkBG && !TPCHVdip && !IncompleteEvent");
1431
1432   triggerCount++;
1433   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHJT-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1434   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHJT-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1435   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHJT-B-NOPF-FAST -CINT7WUHJT-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1436   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHJT-ACE-NOPF-FAST -CINT7WUHJT-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1437   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1438   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHJT && !TPCHVdip && !IncompleteEvent");
1439
1440   triggerCount++;
1441   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHSE-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1442   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHSE-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1443   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHSE-B-NOPF-FAST -CINT7WUHSE-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1444   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHSE-ACE-NOPF-FAST -CINT7WUHSE-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1445   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1446   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHSE && !TPCHVdip && !IncompleteEvent");
1447
1448   triggerCount++;
1449   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHQU-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1450   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHQU-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1451   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHQU-B-NOPF-FAST -CINT7WUHQU-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1452   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHQU-ACE-NOPF-FAST -CINT7WUHQU-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1453   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1454   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHQU && !TPCHVdip && !IncompleteEvent");
1455
1456   triggerCount++;
1457   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CEMC7WUHEE-B-NOPF-CENT", "B",   triggerCount);
1458   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kTRD,"+CEMC7WUHEE-ACE-NOPF-CENT","ACE",triggerCount);
1459   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1460   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && TRDHEE && !TPCHVdip && !IncompleteEvent");
1461
1462   triggerCount++;
1463   oadbLHC13bIncompleteEvents->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSHM7-B-NOPF-ALLNOTRD","B",   triggerCount);
1464   oadbLHC13bIncompleteEvents->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSHM7-ACE-NOPF-ALLNOTRD","ACE",   triggerCount);
1465   oadbLHC13bIncompleteEvents->SetHardwareTrigger         ( triggerCount,"SPDGFOL1 >= 10 && (V0A && V0C)");                                         //<------------ FIX ME : SPDFO threshold
1466   oadbLHC13bIncompleteEvents->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 10 && V0A && V0C) && !V0ABG && !V0CBG && !ZNABG && !TPCLaserWarmUp && !TPCHVdip && !IncompleteEvent"); //<------------ FIX ME : SPDFO threshold
1467
1468   oadbContPS->AppendObject(oadbLHC13bIncompleteEvents, 195389, 195389);
1469   oadbContPS->AppendObject(oadbLHC13bIncompleteEvents->Clone(), 195531, 195531);
1470
1471
1472   // 
1473   // Changing the ZN background rejection side for Pbp collisions (LHC13f)
1474   //
1475   AliOADBPhysicsSelection * oadbLHC13f = new AliOADBPhysicsSelection("oadbLHC13f");
1476
1477   triggerCount=0;
1478   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-B-NOPF-ALLNOTRD","B", triggerCount);
1479   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-A-NOPF-ALLNOTRD","A", triggerCount);
1480   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-C-NOPF-ALLNOTRD","C", triggerCount);
1481   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E", triggerCount);  
1482   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);  
1483   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-B-NOPF-FASTNOTRD -CINT1-B-NOPF-ALLNOTRD","B", triggerCount);
1484   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-A-NOPF-FASTNOTRD -CINT1-A-NOPF-ALLNOTRD","A", triggerCount);
1485   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-C-NOPF-FASTNOTRD -CINT1-C-NOPF-ALLNOTRD","C", triggerCount);
1486   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-E-NOPF-FASTNOTRD -CINT1-E-NOPF-ALLNOTRD","E", triggerCount);  
1487   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMB | AliVEvent::kFastOnly,"+CINT1-ACE-NOPF-FASTNOTRD -CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1488   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"SPDGFO >= 1 || V0A || V0C");
1489   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip");
1490
1491   triggerCount++;
1492   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-B-NOPF-ALLNOTRD","B", triggerCount);
1493   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-A-NOPF-ALLNOTRD","A", triggerCount);
1494   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-C-NOPF-ALLNOTRD","C", triggerCount);
1495   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-E-NOPF-ALLNOTRD","E", triggerCount);
1496   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1497   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-B-NOPF-FASTNOTRD -CINT7-B-NOPF-ALLNOTRD","B", triggerCount);
1498   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-A-NOPF-FASTNOTRD -CINT7-A-NOPF-ALLNOTRD","A", triggerCount);
1499   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-C-NOPF-FASTNOTRD -CINT7-C-NOPF-ALLNOTRD","C", triggerCount);
1500   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-E-NOPF-FASTNOTRD -CINT7-E-NOPF-ALLNOTRD","E", triggerCount);
1501   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kINT7 | AliVEvent::kFastOnly,"+CINT7-ACE-NOPF-FASTNOTRD -CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1502   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1503   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip");
1504
1505   triggerCount++;
1506   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kCentral,"+CVLN-B-NOPF-ALLNOTRD","B", triggerCount);
1507   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1508   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip");
1509
1510   triggerCount++;
1511   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-B-NOPF-[ALL|CENT]NOTRD", "B", triggerCount);
1512   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-ACE-NOPF-[ALL|CENT]NOTRD", "ACE", triggerCount);
1513   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kEMC7 | AliVEvent::kFastOnly,"+CEMC7-B-NOPF-FASTNOTRD -CEMC7-B-NOPF-[ALL|CENT]NOTRD", "B", triggerCount);
1514   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kEMC7 | AliVEvent::kFastOnly,"+CEMC7-ACE-NOPF-FASTNOTRD -CEMC7-ACE-NOPF-[ALL|CENT]NOTRD", "ACE", triggerCount);
1515   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1516   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip");
1517
1518   triggerCount++;  
1519   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CEMC7EG1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1520   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CEMC7EG1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-ACE-NOPF-[ALL|CENT]CENTNOTRD","ACE",triggerCount);
1521   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA | AliVEvent::kFastOnly,"+CEMC7EG1-B-NOPF-FASTNOTRD,CEMC7EG2-B-NOPF-FASTNOTRD -CEMC7EG1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1522   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kEMCEGA | AliVEvent::kFastOnly,"+CEMC7EG1-ACE-NOPF-FASTNOTRD,CEMC7EG2-ACE-NOPF-FASTNOTRD -CEMC7EG1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EG2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1523   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1524   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip");
1525
1526   triggerCount++;  
1527   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CEMC7EJ1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1528   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CEMC7EJ1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1529   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE | AliVEvent::kFastOnly,"+CEMC7EJ1-B-NOPF-FASTNOTRD,CEMC7EJ2-B-NOPF-FASTNOTRD -CEMC7EJ1-B-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-B-NOPF-[ALL|CENT]NOTRD","B",  triggerCount);
1530   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kEMCEJE | AliVEvent::kFastOnly,"+CEMC7EJ1-ACE-NOPF-FASTNOTRD,CEMC7EJ2-ACE-NOPF-FASTNOTRD -CEMC7EJ1-ACE-NOPF-[ALL|CENT]NOTRD,CEMC7EJ2-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1531   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1532   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip");
1533
1534   triggerCount++;  
1535   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-B-NOPF-[ALL|CENT]NOTRD","B",triggerCount);
1536   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1537   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1538   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1539
1540   triggerCount++;  
1541   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMSL7-B-NOPF-MUON,CMSL7-B-NOPF-ALLNOTRD","B",       triggerCount);
1542   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMSL7-ACE-NOPF-MUON,CMSL7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1543   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1544   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG");
1545
1546   triggerCount++;  
1547   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMSH7-B-NOPF-MUON","B",       triggerCount);
1548   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMSH7-ACE-NOPF-MUON","ACE", triggerCount);
1549   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1550   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG");
1551
1552   triggerCount++;    
1553   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMLL7-B-NOPF-MUON","B",    triggerCount);
1554   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMLL7-ACE-NOPF-MUON","ACE",triggerCount);
1555   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1556   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG");
1557
1558   triggerCount++;    
1559   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUL7-B-NOPF-MUON","B",    triggerCount);
1560   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUL7-ACE-NOPF-MUON","ACE",triggerCount);
1561   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1562   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG");
1563
1564   triggerCount++;
1565   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kZED,"+C1ZED-B-NOPF-[ALL|CENT]NOTRD", "B",   triggerCount);
1566   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kZED,"+C1ZED-ACE-NOPF-[ALL|CENT]NOTRD","ACE",triggerCount);
1567   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"1");
1568   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(ZDCTDCA || ZDCTDCC) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !SPDClsVsTrkBG && !TPCHVdip");
1569
1570   triggerCount++;
1571   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHJT-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1572   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHJT-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1573   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHJT-B-NOPF-FAST -CINT7WUHJT-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1574   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHJT-ACE-NOPF-FAST -CINT7WUHJT-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1575   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1576   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && TRDHJT && !TPCHVdip");
1577
1578   triggerCount++;
1579   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHSE-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1580   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHSE-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1581   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHSE-B-NOPF-FAST -CINT7WUHSE-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1582   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHSE-ACE-NOPF-FAST -CINT7WUHSE-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1583   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1584   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && TRDHSE && !TPCHVdip");
1585
1586   triggerCount++;
1587   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHQU-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1588   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHQU-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1589   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHQU-B-NOPF-FAST -CINT7WUHQU-B-NOPF-[ALL|CENT]", "B",   triggerCount);
1590   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD | AliVEvent::kFastOnly,"+CINT7WUHQU-ACE-NOPF-FAST -CINT7WUHQU-ACE-NOPF-[ALL|CENT]","ACE",triggerCount);
1591   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1592   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && TRDHQU && !TPCHVdip");
1593
1594   triggerCount++;
1595   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CEMC7WUHEE-B-NOPF-CENT", "B",   triggerCount);
1596   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kTRD,"+CEMC7WUHEE-ACE-NOPF-CENT","ACE",triggerCount);
1597   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1598   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && TRDHEE && !TPCHVdip");
1599
1600   triggerCount++;
1601   oadbLHC13f->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSHM7-B-NOPF-ALLNOTRD","B",   triggerCount);
1602   oadbLHC13f->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSHM7-ACE-NOPF-ALLNOTRD","ACE",   triggerCount);
1603   oadbLHC13f->SetHardwareTrigger         ( triggerCount,"SPDGFOL1 >= 10 && (V0A && V0C)");                                         //<------------ FIX ME : SPDFO threshold
1604   oadbLHC13f->SetOfflineTrigger          ( triggerCount,"(SPDGFOL1 >= 10 && V0A && V0C) && !V0ABG && !V0CBG && !ZNCBG && !TPCLaserWarmUp && !TPCHVdip"); //<------------ FIX ME : SPDFO threshold
1605
1606   oadbContPS->AppendObject(oadbLHC13f, 196346, 197411);
1607
1608
1609   //
1610   // Low energy pp 2.76 TeV data in 2013
1611   //
1612   
1613   AliOADBPhysicsSelection * oadbLHC13g = new AliOADBPhysicsSelection("oadbLHC13g");
1614   
1615   triggerCount=0;
1616   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kMB,"+CINT1-[B|I]-NOPF-ALLNOTRD","B", triggerCount);
1617   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1618   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"SPDGFO >= 1 || V0A || V0C");
1619   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1620
1621   triggerCount++;
1622   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kINT7,"+CINT7-[B|I]-NOPF-ALLNOTRD","B", triggerCount);
1623   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kINT7,"+CINT7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1624   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1625   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1626
1627   triggerCount++;
1628   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kPHI7,"+CPHI7-[B|I]-NOPF-ALLNOTRD","B", triggerCount);
1629   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kPHI7,"+CPHI7-ACE-NOPF-ALLNOTRD","ACE", triggerCount);
1630   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1631   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1632
1633   triggerCount++;
1634   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kEMC7,"+CEMC7-[B|I]-NOPF-CENTNOTRD","B", triggerCount);
1635   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kEMC7,"+CEMC7-ACE-NOPF-CENTNOTRD","ACE", triggerCount);
1636   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1637   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1638
1639   triggerCount++;
1640   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kEMCEGA,"+CEMC7EG1-[B|I]-NOPF-CENTNOTRD,CEMC7EG2-[B|I]-NOPF-CENTNOTRD","B", triggerCount);
1641   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kEMCEGA,"+CEMC7EG1-ACE-NOPF-CENTNOTRD,CEMC7EG2-ACE-NOPF-CENTNOTRD","ACE", triggerCount);
1642   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1643   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1644
1645   triggerCount++;
1646   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kEMCEJE,"+CEMC7EJ1-[B|I]-NOPF-CENTNOTRD,CEMC7EJ2-[B|I]-NOPF-CENTNOTRD","B", triggerCount);
1647   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kEMCEJE,"+CEMC7EJ1-ACE-NOPF-CENTNOTRD,CEMC7EJ2-ACE-NOPF-CENTNOTRD","ACE", triggerCount);
1648   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1649   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && !TPCHVdip");
1650
1651   triggerCount++;
1652   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHJT-[B|I|S]-NOPF-[CENT,FAST]","B", triggerCount);
1653   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHJT-ACE-NOPF-[CENT,FAST]","ACE", triggerCount);
1654   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1655   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHJT && !TPCHVdip");
1656
1657   triggerCount++;
1658   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHSE-[B|I|S]-NOPF-[CENT,FAST]","B", triggerCount);
1659   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHSE-ACE-NOPF-[CENT,FAST]","ACE", triggerCount);
1660   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1661   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHSE && !TPCHVdip");
1662
1663   triggerCount++;
1664   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kTRD,"+CINT7WUHQU-[B|I|S]-NOPF-[CENT,FAST]","B", triggerCount);
1665   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kTRD,"+CINT7WUHQU-ACE-NOPF-[CENT,FAST]","ACE", triggerCount);
1666   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1667   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG && !TPCLaserWarmUp && TRDHQU && !TPCHVdip");
1668
1669   triggerCount++;
1670   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kMUS7,"+CMSL7-[B|I]-NOPF-MUON","B", triggerCount);
1671   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kMUS7,"+CMSL7-ACE-NOPF-MUON","ACE", triggerCount);
1672   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1673   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG");
1674
1675   triggerCount++;
1676   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kMUSH7,"+CMSH7-[B|I]-NOPF-MUON","B", triggerCount);
1677   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kMUSH7,"+CMSH7-ACE-NOPF-MUON","ACE", triggerCount);
1678   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1679   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG");
1680
1681   triggerCount++;
1682   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kMUU7,"+CMUL7-[B|I]-NOPF-MUON","B", triggerCount);
1683   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kMUU7,"+CMUL7-ACE-NOPF-MUON","ACE", triggerCount);
1684   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1685   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG");
1686
1687   triggerCount++;
1688   oadbLHC13g->AddCollisionTriggerClass   ( AliVEvent::kMUL7,"+CMLL7-[B|I]-NOPF-MUON","B", triggerCount);
1689   oadbLHC13g->AddBGTriggerClass          ( AliVEvent::kMUL7,"+CMLL7-ACE-NOPF-MUON","ACE", triggerCount);
1690   oadbLHC13g->SetHardwareTrigger         ( triggerCount,"V0A && V0C");
1691   oadbLHC13g->SetOfflineTrigger          ( triggerCount,"(V0A && V0C) && !V0ABG && !V0CBG");
1692
1693   oadbContPS->AppendObject(oadbLHC13g, 197412, 250000);
1694   // ------------------------------------------------------------------------------------------------------------
1695
1696   // Trigger Analysis: ZDC timing cuts
1697  
1698   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC1 = new AliOADBTriggerAnalysis("ZDCCut1");
1699   oadbTrigAnalysisZDC1->SetZDCCorrParameters(-66.9, -2.1, 4*0.58, 4*0.5);
1700   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC1->Clone("ZDCCut1_pass1"), 136851, 137848,"pass1");  
1701   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC1->Clone("ZDCCut1_pass2"), 136851, 137848,"pass2");  
1702
1703   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC2 = new AliOADBTriggerAnalysis("ZDCCut2");
1704   oadbTrigAnalysisZDC2->SetZDCCorrParameters(-66.2, -2.1, 4*0.58, 4*0.5);
1705   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC2->Clone("ZDCCut2_pass1"), 138125, 138275,"pass1");  
1706   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC2->Clone("ZDCCut2_pass2"), 138125, 138275,"pass2");  
1707
1708   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC3 = new AliOADBTriggerAnalysis("ZDCCut3");
1709   oadbTrigAnalysisZDC3->SetZDCCorrParameters(-65.4, -2.1, 4*0.58, 4*0.5);
1710   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC3->Clone("ZDCCut3_pass1"), 138359, 138469,"pass1");  
1711   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC3->Clone("ZDCCut3_pass2"), 138359, 138469,"pass2");  
1712
1713   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC4 = new AliOADBTriggerAnalysis("ZDCCut4");
1714   oadbTrigAnalysisZDC4->SetZDCCorrParameters(-67.7, -2.1, 4*0.58, 4*0.5);
1715   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC4->Clone("ZDCCut4_pass1"), 138533, 138742,"pass1");  
1716   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC4->Clone("ZDCCut4_pass2"), 138533, 138742,"pass2");  
1717
1718   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC5 = new AliOADBTriggerAnalysis("ZDCCut5");
1719   oadbTrigAnalysisZDC5->SetZDCCorrParameters(-67.2, -2.1, 4*0.58, 4*0.5);
1720   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC5->Clone("ZDCCut5_pass1"), 138795, 138872,"pass1");  
1721   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC5->Clone("ZDCCut5_pass2"), 138795, 138872,"pass2");  
1722
1723   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC6 = new AliOADBTriggerAnalysis("ZDCCut6");
1724   oadbTrigAnalysisZDC6->SetZDCCorrParameters(-65.6, -2.1, 4*0.58, 4*0.5);
1725   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC6->Clone("ZDCCut6_pass1"), 138924, 139517,"pass1");  
1726   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC6->Clone("ZDCCut6_pass2"), 138924, 139517,"pass2");  
1727
1728   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC7 = new AliOADBTriggerAnalysis("ZDCCut7");
1729   oadbTrigAnalysisZDC7->SetZNCorrParameters(2.0,100,5.,100);
1730   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC7, 194713, 196345);
1731
1732   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC8 = new AliOADBTriggerAnalysis("ZDCCut8");
1733   oadbTrigAnalysisZDC8->SetZNCorrParameters(5.0,100,2.0,100);
1734   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC8, 196346, 197411);
1735
1736   AliOADBTriggerAnalysis * oadbTrigAnalysisZDC9 = new AliOADBTriggerAnalysis("ZDCCut9");
1737   oadbTrigAnalysisZDC9->SetZDCCorrParameters(-2.1, 0, 4*0.58, 4*0.5);
1738   oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC9, 136851, 139517);  
1739   
1740   oadbTrigAnalysisZDC1->Print();
1741   oadbTrigAnalysisZDC2->Print();
1742   oadbTrigAnalysisZDC3->Print();
1743   oadbTrigAnalysisZDC4->Print();
1744   oadbTrigAnalysisZDC5->Print();
1745   oadbTrigAnalysisZDC6->Print();
1746   oadbTrigAnalysisZDC7->Print();
1747   oadbTrigAnalysisZDC8->Print();
1748   oadbTrigAnalysisZDC9->Print();
1749
1750   
1751   // ----------------- visualize coverage
1752   
1753   //   oadbContPS->List();
1754   
1755   // one can get a list of all runs from the RCT with http://alimonitor.cern.ch/configuration/index.jsp?partition=%25&raw_run=&filling_scheme=&filling_config=&fillno=&energy=&intensity_per_bunch=&mu=&interaction_trigger=&rate=&beam_empty_trigger=&empty_empty_trigger=&muon_trigger=&high_multiplicity_trigger=&quality=&muon_quality=&mean_vertex_xyz=&vertex_quality=&comment=&field=&det_aco=&det_emc=&det_fmd=&det_hlt=&det_hmp=&det_mch=&det_mtr=&det_phs=&det_pmd=&det_spd=&det_sdd=&det_ssd=&det_tof=&det_tpc=&det_trd=&det_t00=&det_v00=&det_zdc=&hlt_mode=&changedon=
1756   Int_t nRuns = 2281;
1757   Int_t allRuns[] = { 170593, 170572, 170556, 170552, 170546, 170390, 170389, 170388, 170387, 170315, 170313, 170312, 170311, 170309, 170308, 170306, 170270, 170269, 170268, 170267, 170264, 170230, 170228, 170208, 170207, 170205, 170204, 170203, 170195, 170193, 170163, 170162, 170159, 170155, 170152, 170091, 170089, 170088, 170085, 170084, 170083, 170081, 170040, 170038, 170036, 170027, 169981, 169975, 169969, 169965, 169961, 169956, 169926, 169924, 169923, 169922, 169919, 169918, 169914, 169859, 169858, 169855, 169846, 169838, 169837, 169835, 169683, 169628, 169591, 169590, 169588, 169587, 169586, 169584, 169557, 169555, 169554, 169553, 169550, 169515, 169512, 169506, 169504, 169498, 169475, 169420, 169419, 169418, 169417, 169415, 169411, 169238, 169236, 169167, 169160, 169156, 169148, 169145, 169144, 169143, 169138, 169099, 169094, 169091, 169045, 169044, 169040, 169035, 168992, 168988, 168984, 168826, 168777, 168514, 168512, 168511, 168467, 168464, 168461, 168460, 168458, 168362, 168361, 168356, 168342, 168341, 168325, 168322, 168318, 168311, 168310, 168213, 168212, 168208, 168207, 168206, 168205, 168204, 168203, 168181, 168177, 168175, 168173, 168172, 168171, 168115, 168108, 168107, 168105, 168104, 168103, 168076, 168069, 168068, 168066, 167988, 167987, 167986, 167985, 167921, 167920, 167915, 167909, 167903, 167902, 167818, 167814, 167813, 167808, 167807, 167806, 167713, 167712, 167711, 167706, 167693, 166532, 166530, 166529, 165746, 165745, 165744, 165741, 165740, 165702, 165701, 165700, 165699, 165467, 165465, 165444, 165438, 165430, 165429, 165421, 165419, 165413, 165309, 165179, 165178, 165139, 165137, 165136, 165133, 164866, 164865, 164864, 164863, 164861, 164848, 164847, 164787, 164762, 164759, 164758, 164757, 164756, 164750, 164748, 164743, 164741, 164739, 164734, 164729, 164728, 164727, 164726, 164725, 164724, 164723, 164599, 164598, 164596, 164595, 164594, 164593, 164591, 164567, 164476, 164475, 164224, 164223, 164222, 164221, 164220, 164218, 164216, 164212, 164144, 164143, 164108, 164107, 164106, 164105, 164104, 164103, 164101, 164100, 164096, 164092, 164090, 164089, 164086, 164078, 164077, 164076, 164074, 164073, 164072, 164071, 164031, 164010, 163986, 163959, 163958, 163957, 163911, 163910, 163908, 163794, 163793, 163792, 163791, 163790, 163680, 163678, 163674, 163672, 163671, 163670, 163668, 163667, 163666, 163665, 163661, 163658, 163657, 163568, 163532, 163531, 163530, 163527, 163270, 163268, 163267, 163266, 163265, 163263, 163250, 163210, 163208, 163207, 163199, 163146, 163136, 163133, 163132, 163124, 163109, 163107, 163101, 163100, 163096, 163073, 163071, 162936, 162934, 162933, 162740, 162731, 162730, 162729, 162724, 162723, 162717, 162714, 162713, 162711, 162644, 162643, 162642, 162640, 162638, 162636, 162635, 162633, 162632, 162630, 162629, 162628, 162627, 162626, 162625, 162550, 162548, 162547, 162545, 162504, 162500, 162497, 162494, 162493, 162492, 162491, 162490, 162489, 162488, 162487, 162340, 162339, 162338, 162335, 162329, 162328, 162316, 162315, 162181, 162180, 162179, 162178, 162042, 161937, 161865, 161864, 161827, 161826, 161825, 161822, 161813, 161812, 161811, 161810, 161789, 161788, 161756, 161724, 161723, 161722, 161721, 161688, 161665, 161664, 161634, 161633, 161631, 161630, 161625, 161612, 161610, 161609, 161586, 161585, 161583, 161581, 161580, 161577, 161573, 161567, 161562, 161556, 161525, 161521, 161500, 161494, 161489, 161488, 161487, 161486, 161467, 161457, 161387, 161382, 161381, 161379, 161373, 161304, 161297, 161296, 161257, 161256, 161148, 161147, 161145, 161139, 161135, 161133, 161130, 161129, 161128, 161088, 161085, 160775, 160769, 160764, 160761, 160757, 160731, 160730, 160726, 160724, 160723, 160722, 160687, 160683, 160680, 160679, 160677, 160676, 159635, 159606, 159602, 159599, 159595, 159593, 159586, 159582, 159581, 159580, 159577, 159575, 159571, 159539, 159538, 159536, 159535, 159532, 159379, 159378, 159318, 159286, 159285, 159283, 159260, 159259, 159258, 159257, 159255, 159254, 159090, 159085, 159076, 159044, 159042, 159040, 158879, 158878, 158877, 158876, 158875, 158868, 158856, 158848, 158844, 158794, 158793, 158792, 158791, 158790, 158788, 158784, 158782, 158781, 158780, 158779, 158777, 158776, 158745, 158729, 158722, 158718, 158717, 158714, 158706, 158673, 158626, 158622, 158617, 158615, 158613, 158611, 158608, 158604, 158602, 158598, 158592, 158533, 158531, 158528, 158526, 158522, 158521, 158520, 158518, 158516, 158511, 158509, 158508, 158496, 158495, 158492, 158471, 158469, 158468, 158467, 158341, 158338, 158304, 158303, 158301, 158299, 158293, 158288, 158287, 158285, 158258, 158252, 158201, 158200, 158196, 158194, 158192, 158191, 158189, 158188, 158185, 158182, 158179, 158177, 158176, 158175, 158173, 158171, 158137, 158136, 158135, 158124, 158120, 158118, 158115, 158114, 158112, 158111, 158110, 158086, 158084, 157976, 157975, 157857, 157848, 157819, 157818, 157770, 157766, 157765, 157734, 157713, 157708, 157707, 157698, 157645, 157569, 157567, 157564, 157562, 157561, 157560, 157496, 157476, 157475, 157277, 157275, 157273, 157272, 157268, 157262, 157261, 157260, 157257, 157227, 157220, 157214, 157212, 157211, 157210, 157209, 157203, 157100, 157098, 157096, 157094, 157092, 157091, 157090, 157087, 157083, 157082, 157079, 157028, 157027, 157025, 157003, 156896, 156895, 156891, 156889, 156829, 156797, 156794, 156629, 156626, 156621, 156620, 156481, 156480, 156479, 156477, 155384, 155367, 155365, 155337, 154808, 154796, 154793, 154789, 154787, 154786, 154783, 154780, 154773, 154770, 154763, 154755, 154753, 154750, 154748, 154745, 154742, 154733, 154732, 154726, 154570, 154495, 154485, 154483, 154482, 154480, 154478, 154448, 154385, 154383, 154382, 154296, 154293, 154289, 154286, 154283, 154281, 154273, 154270, 154269, 154266, 154264, 154261, 154257, 154252, 154222, 154221, 154220, 154219, 154211, 154207, 154163, 154158, 154151, 154145, 154143, 154141, 154138, 154136, 154132, 154131, 154130, 154129, 154126, 154125, 154091, 154083, 154081, 154039, 154031, 154030, 154026, 154024, 154018, 153954, 153946, 153944, 153939, 153938, 153935, 153929, 153924, 153916, 153911, 153909, 153906, 153876, 153875, 153873, 153812, 153808, 153807, 153805, 153798, 153796, 153794, 153784, 153781, 153779, 153778, 153777, 153776, 153738, 153733, 153728, 153727, 153726, 153725, 153718, 153709, 153702, 153594, 153591, 153589, 153588, 153587, 153583, 153578, 153571, 153570, 153566, 153560, 153558, 153552, 153548, 153544, 153542, 153541, 153539, 153536, 153533, 153513, 153465, 153415, 153413, 153373, 153371, 153369, 153363, 153362, 153360, 153296, 153234, 153232, 153227, 153223, 153127, 153121, 153120, 153117, 153116, 153115, 153059, 153056, 152935, 152934, 152907, 152823, 152822, 152821, 152820, 152819, 152817, 152780, 152773, 152772, 152751, 152750, 152718, 152717, 152716, 152715, 152708, 152702, 152701, 152698, 152697, 152696, 152695, 152658, 152581, 152513, 152512, 152488, 152455, 152377, 152371, 152369, 152368, 152367, 152334, 152332, 152323, 152322, 152321, 152320, 152319, 152318, 152314, 152313, 152312, 152311, 152310, 152309, 152307, 152306, 152304, 152285, 152284, 152257, 152256, 152214, 152209, 152208, 152207, 152206, 152146, 152138, 152137, 152136, 152091, 152090, 152089, 152087, 152086, 152083, 152082, 152081, 152079, 152078, 152046, 152015, 152011, 152008, 152007, 152005, 152003, 152002, 151852, 151851, 151850, 151849, 151810, 151809, 151752, 151751, 151732, 151724, 151689, 151681, 151680, 151678, 151674, 151672, 151671, 151669, 151666, 151665, 151664, 151661, 151660, 151655, 151638, 151636, 150629, 150518, 150500, 150499, 150440, 150438, 150437, 150434, 150428, 150427, 150423, 150421, 150420, 150375, 150374, 150259, 150256, 150254, 150252, 150250, 150248, 150212, 150211, 150163, 150162, 150160, 150060, 150059, 149975, 149970, 149960, 149931, 149930, 149929, 149927, 149890, 149884, 149883, 149881, 149880, 149790, 149789, 149785, 149781, 149775, 149774, 149773, 149772, 149771, 149769, 149767, 149761, 149757, 149748, 149746, 149740, 149736, 149734, 149732, 149725, 149723, 149722, 149718, 149717, 149688, 149687, 149680, 149678, 149677, 149676, 149675, 149671, 149669, 149665, 149664, 149663, 149656, 149647, 149643, 149608, 149602, 149601, 149597, 149595, 149593, 149591, 149587, 149586, 149581, 149548, 149546, 149542, 149541, 149532, 149531, 149527, 149498, 149497, 149496, 149489, 149487, 149484, 149473, 149469, 149460, 149459, 149451, 149448, 149441, 149436, 149432, 149396, 149395, 149391, 149388, 149387, 149386, 149384, 149380, 149379, 149375, 149367, 149134, 149133, 149130, 149129, 149127, 149113, 149102, 149072, 149071, 149070, 149068, 148857, 148856, 148854, 148853, 148852, 148850, 148847, 148845, 148844, 148843, 148839, 148838, 148835, 148834, 148800, 148797, 148791, 148719, 148711, 148708, 148704, 148697, 148665, 148663, 148659, 148648, 148645, 148630, 148625, 148601, 148592, 148582, 148576, 148569, 148565, 148559, 148556, 148553, 148549, 148547, 148544, 148541, 148538, 148534, 148531, 148374, 148372, 148371, 148370, 146860, 146859, 146858, 146857, 146856, 146824, 146817, 146814, 146813, 146812, 146808, 146807, 146806, 146805, 146804, 146803, 146802, 146801, 146748, 146747, 146746, 146689, 146688, 146686, 146459, 146453, 146402, 146401, 146400, 146394, 146393, 146390, 146388, 146386, 146385, 146382, 146381, 146380, 146376, 146374, 146369, 146292, 146287, 146282, 146278, 146277, 146273, 146272, 146223, 146220, 146208, 146205, 146158, 146156, 146153, 146152, 146148, 146147, 146144, 146141, 146105, 146099, 146090, 146089, 146079, 146072, 146071, 146066, 146027, 146026, 146025, 146024, 146023, 146021, 146020, 146018, 146017, 145975, 145974, 145973, 145972, 145967, 145960, 145957, 145956, 145955, 145954, 145681, 145680, 145679, 145674, 145455, 145454, 145448, 145385, 145384, 145383, 145379, 145355, 145354, 145353, 145314, 145309, 145300, 145299, 145294, 145292, 145291, 145290, 145289, 145288, 145182, 145157, 145156, 145145, 145144, 144991, 144871, 139517, 139514, 139513, 139511, 139510, 139507, 139505, 139504, 139503, 139471, 139470, 139467, 139466, 139465, 139441, 139440, 139439, 139438, 139437, 139360, 139329, 139328, 139316, 139314, 139311, 139310, 139309, 139308, 139173, 139172, 139110, 139107, 139105, 139104, 139042, 139038, 139037, 139036, 139034, 139031, 139030, 139029, 139028, 139025, 139024, 138983, 138982, 138980, 138979, 138978, 138977, 138976, 138973, 138972, 138965, 138924, 138872, 138871, 138870, 138837, 138836, 138831, 138830, 138828, 138826, 138796, 138795, 138742, 138740, 138737, 138736, 138732, 138731, 138730, 138666, 138662, 138653, 138652, 138638, 138637, 138624, 138621, 138620, 138583, 138582, 138579, 138578, 138534, 138533, 138469, 138442, 138439, 138438, 138396, 138364, 138359, 138275, 138225, 138201, 138200, 138197, 138192, 138190, 138154, 138153, 138151, 138150, 138126, 138125, 137848, 137847, 137844, 137843, 137752, 137751, 137748, 137724, 137722, 137718, 137704, 137693, 137692, 137691, 137689, 137686, 137685, 137639, 137638, 137609, 137608, 137595, 137549, 137546, 137544, 137541, 137539, 137531, 137530, 137443, 137441, 137440, 137439, 137434, 137432, 137431, 137430, 137370, 137366, 137365, 137243, 137236, 137235, 137232, 137231, 137230, 137165, 137163, 137162, 137161, 137137, 137136, 137135, 137133, 137132, 137125, 137124, 137045, 137042, 136879, 136854, 136851, 136377, 136376, 136375, 136374, 136373, 136372, 136290, 136288, 136199, 136194, 136193, 136192, 136191, 136189, 136181, 136180, 136179, 136177, 136136, 136133, 136130, 136129, 136128, 136125, 136124, 136123, 136118, 136117, 136116, 136115, 136114, 136108, 136107, 136106, 136105, 136104, 136103, 136102, 136101, 135986, 135985, 135983, 135976, 135971, 135969, 135966, 135965, 135958, 135957, 135951, 135949, 135947, 135941, 135900, 135892, 135808, 135795, 135792, 135791, 135788, 135784, 135782, 135780, 135776, 135773, 135771, 135765, 135762, 135761, 135758, 135756, 135751, 135748, 135712, 135711, 135710, 135709, 135707, 135705, 135704, 135701, 135686, 135680, 135674, 135670, 135660, 135658, 135657, 135654, 135029, 134931, 134929, 134925, 134919, 134914, 134905, 134841, 134781, 134780, 134779, 134778, 134691, 134690, 134685, 134681, 134679, 134674, 134672, 134671, 134670, 134667, 134666, 134660, 134657, 134497, 134306, 134305, 134304, 134302, 134301, 134299, 134298, 134297, 134204, 134203, 134202, 134201, 134200, 134199, 134198, 134094, 133985, 133982, 133981, 133979, 133969, 133924, 133920, 133800, 133762, 133761, 133680, 133675, 133674, 133673, 133672, 133671, 133670, 133563, 133419, 133418, 133414, 133330, 133329, 133328, 133327, 133282, 133010, 133007, 133006, 133005, 133004, 130850, 130848, 130847, 130844, 130842, 130840, 130834, 130833, 130831, 130804, 130803, 130802, 130799, 130798, 130795, 130793, 130704, 130696, 130640, 130628, 130627, 130623, 130621, 130620, 130619, 130612, 130609, 130608, 130601, 130526, 130524, 130520, 130519, 130517, 130481, 130480, 130479, 130375, 130369, 130365, 130360, 130358, 130356, 130354, 130353, 130348, 130343, 130342, 130179, 130178, 130172, 130170, 130168, 130158, 130157, 130156, 130151, 130149, 130148, 129983, 129966, 129962, 129961, 129960, 129959, 129763, 129760, 129750, 129748, 129747, 129745, 129744, 129742, 129738, 129736, 129735, 129734, 129731, 129729, 129726, 129725, 129723, 129667, 129666, 129665, 129659, 129655, 129654, 129653, 129652, 129651, 129650, 129649, 129648, 129647, 129641, 129639, 129599, 129598, 129597, 129587, 129586, 129541, 129540, 129536, 129529, 129528, 129527, 129526, 129525, 129524, 129523, 129522, 129521, 129520, 129519, 129516, 129515, 129514, 129513, 129512, 129510, 129508, 129042, 129041, 128913, 128912, 128911, 128910, 128855, 128853, 128850, 128849, 128843, 128836, 128835, 128834, 128833, 128824, 128823, 128820, 128819, 128818, 128817, 128814, 128813, 128778, 128777, 128776, 128678, 128677, 128621, 128615, 128611, 128610, 128609, 128605, 128596, 128594, 128592, 128590, 128589, 128582, 128581, 128507, 128506, 128505, 128504, 128503, 128498, 128495, 128494, 128486, 128483, 128452, 128366, 128359, 128357, 128263, 128262, 128260, 128257, 128256, 128192, 128191, 128190, 128189, 128186, 128185, 128183, 128182, 128180, 128175, 128053, 128050, 127942, 127941, 127940, 127937, 127936, 127935, 127933, 127932, 127931, 127930, 127822, 127820, 127819, 127817, 127815, 127814, 127813, 127730, 127729, 127724, 127723, 127719, 127718, 127715, 127714, 127712, 126437, 126432, 126425, 126424, 126422, 126421, 126420, 126419, 126416, 126411, 126409, 126408, 126407, 126406, 126405, 126404, 126403, 126359, 126352, 126351, 126350, 126285, 126284, 126283, 126177, 126168, 126167, 126162, 126160, 126158, 126097, 126090, 126088, 126087, 126086, 126082, 126081, 126078, 126073, 126008, 126007, 126004, 125855, 125851, 125850, 125849, 125848, 125847, 125844, 125843, 125842, 125841, 125634, 125633, 125632, 125630, 125628, 125296, 125295, 125294, 125292, 125186, 125156, 125140, 125139, 125134, 125133, 125131, 125101, 125100, 125097, 125085, 125083, 125078, 125077, 125076, 125023, 125022, 124886, 124850, 124751, 124750, 124746, 124745, 124702, 124608, 124607, 124606, 124605, 124604, 124603, 124602, 124600, 124400, 124388, 124385, 124383, 124381, 124380, 124378, 124374, 124371, 124367, 124364, 124362, 124360, 124359, 124358, 124355, 124191, 124187, 124186, 124183, 122375, 122374, 122373, 122372, 122195, 121040, 121039, 120829, 120828, 120825, 120824, 120823, 120822, 120821, 120820, 120819, 120818, 120758, 120750, 120746, 120744, 120743, 120742, 120741, 120693, 120692, 120691, 120689, 120688, 120687, 120685, 120683, 120682, 120681, 120679, 120678, 120677, 120675, 120673, 120672, 120671, 120670, 120625, 120624, 120622, 120619, 120618, 120617, 120616, 120615, 120614, 120613, 120612, 120611, 120505, 120504, 120503, 120500, 120498, 120496, 120495, 120494, 120493, 120492, 120490, 120489, 120488, 120487, 120486, 120485, 120483, 120482, 120481, 120480, 120479, 120476, 120244, 120243, 120242, 120241, 120079, 120078, 120076, 120075, 120073, 120072, 120071, 120069, 120068, 120067, 120066, 120065, 120064, 120004, 120003, 120002, 120001, 120000, 119999, 119998, 119994, 119979, 119978, 119973, 119971, 119970, 119969, 119967, 119965, 119963, 119961, 119959, 119954, 119952, 119948, 119946, 119941, 119935, 119934, 119932, 119926, 119924, 119923, 119917, 119915, 119913, 119909, 119907, 119904, 119903, 119902, 119865, 119862, 119859, 119856, 119854, 119853, 119849, 119846, 119845, 119844, 119843, 119842, 119841, 119840, 119838, 119837, 119164, 119163, 119162, 119161, 119160, 119159, 119158, 119156, 119086, 119085, 119084, 119079, 119077, 119068, 119067, 119061, 119057, 119055, 119048, 119047, 119045, 119043, 119042, 119041, 119040, 119038, 119037, 119035, 119033, 119022, 118903, 118561, 118560, 118558, 118557, 118556, 118518, 118512, 118507, 118506, 118504, 118503, 117223, 117222, 117221, 117220, 117121, 117120, 117119, 117118, 117117, 117116, 117113, 117112, 117110, 117109, 117100, 117099, 117098, 117092, 117086, 117082, 117078, 117077, 117065, 117064, 117063, 117061, 117060, 117059, 117054, 117053, 117052, 117051, 117050, 117049, 117048, 117046, 117045, 117042, 117041, 117039, 117035, 117034, 116948, 116684, 116682, 116681, 116645, 116644, 116643, 116642, 116640, 116611, 116610, 116609, 116574, 116572, 116571, 116562, 116561, 116559, 116403, 116402, 116401, 116288, 116287, 116204, 116203, 116198, 116197, 116134, 116130, 116123, 116118, 116112, 116111, 116102, 116081, 116079, 115892, 115890, 115889, 115888, 115887, 115882, 115881, 115880, 115521, 115516, 115514, 115414, 115413, 115401, 115393, 115345, 115338, 115335, 115328, 115325, 115322, 115318, 115315, 115310, 115237, 115193, 115186, 115173, 115165, 114931, 114930, 114924, 114920, 114919, 114918, 114917, 114916, 114798, 114786, 114785, 114783, 114778, 114757, 114753, 114750, 114747, 114746, 114745, 114744, 114743, 114740, 114737, 114448, 114201, 112980, 105268, 105258, 105257, 105256, 105255, 105254, 105160, 105143, 105108, 104892, 104890, 104876, 104867, 104865, 104861, 104852, 104849, 104845, 104841, 104825, 104824, 104821, 104803, 104802, 104801, 104800, 104799, 104798, 104793, 104792, 104618, 104603, 104439, 104321, 104320, 104316, 104315, 104160, 104159, 104157, 104155, 104065, 101278, 101275, 101268, 101266, 101259, 101235
1758   };
1759   
1760   Int_t min = 1234567890;
1761   Int_t max = -1;
1762   for (Int_t i=0; i<oadbContPS->GetNumberOfEntries(); i++)
1763   {
1764     Printf("%3d: %d --> %d", i, oadbContPS->LowerLimit(i), oadbContPS->UpperLimit(i));
1765     min = TMath::Min(min, oadbContPS->LowerLimit(i));
1766     max = TMath::Max(max, oadbContPS->UpperLimit(i));
1767   }
1768   
1769   for (Int_t i=0; i<nRuns; i++)
1770   {
1771     min = TMath::Min(min, allRuns[i]);
1772     max = TMath::Max(max, allRuns[i]);
1773   }
1774   
1775   
1776   TH2* coverageHist = new TH2F("coverageHist", "Run coverage;run number", max - min + 1, min - 0.5, max + 0.5, 3, 0, 3);
1777   coverageHist->SetStats(0);
1778   coverageHist->GetYaxis()->SetBinLabel(1, "OADB");
1779   coverageHist->GetYaxis()->SetBinLabel(2, "Physics run");
1780   coverageHist->GetYaxis()->SetBinLabel(3, "Run w/o OADB");
1781   
1782   for (Int_t i=0; i<oadbContPS->GetNumberOfEntries(); i++)
1783   {
1784     for (Int_t j=oadbContPS->LowerLimit(i); j <= oadbContPS->UpperLimit(i); j++)
1785       coverageHist->Fill(j, 0.5, i+1);
1786   }
1787   
1788   for (Int_t i=0; i<nRuns; i++)
1789   {
1790     coverageHist->Fill(allRuns[i], 1.5);
1791     if (coverageHist->GetBinContent(coverageHist->GetXaxis()->FindBin(allRuns[i]), 1) == 0)
1792       coverageHist->Fill(allRuns[i], 2.5);
1793   }
1794   
1795   new TCanvas;
1796   coverageHist->Draw("COLZ");
1797   
1798   // ----------------- write to file
1799
1800   oadbContPS->WriteToFile(oadbfilename.Data());
1801   oadbContFillingScheme->WriteToFile(oadbfilename.Data());
1802   oadbContTriggerAnalysis->WriteToFile(oadbfilename.Data());
1803
1804   TFile * fopen = new TFile (oadbfilename); 
1805   new TBrowser;
1806
1807 }