]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMCCorrectionsTask.cxx
Renamed some member functions for more logical names
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardMCCorrectionsTask.cxx
1 // 
2 // Calculate the corrections in the forward regions
3 // 
4 // Inputs: 
5 //   - AliESDEvent 
6 //
7 // Outputs: 
8 //   - AliAODForwardMult 
9 // 
10 // Histograms 
11 //   
12 // Corrections used 
13 // 
14 #include "AliForwardMCCorrectionsTask.h"
15 #include "AliTriggerAnalysis.h"
16 #include "AliPhysicsSelection.h"
17 #include "AliLog.h"
18 #include "AliHeader.h"
19 #include "AliGenEventHeader.h"
20 #include "AliESDEvent.h"
21 #include "AliAODHandler.h"
22 #include "AliMultiplicity.h"
23 #include "AliInputEventHandler.h"
24 #include "AliStack.h"
25 #include "AliMCEvent.h"
26 #include "AliAODForwardMult.h"
27 #include "AliFMDStripIndex.h"
28 #include "AliFMDCorrSecondaryMap.h"
29 #include <TH1.h>
30 #include <TH2D.h>
31 #include <TDirectory.h>
32 #include <TTree.h>
33 #include <TList.h>
34 #include <TROOT.h>
35 #include <iostream>
36
37 //====================================================================
38 namespace {
39   const char* GetEventName(Bool_t tr, Bool_t vtx) 
40   {
41     return Form("nEvents%s%s", (tr ? "Tr" : ""), (vtx ? "Vtx" : ""));
42   }
43 #if 0
44   const char* GetHitsName(UShort_t d, Char_t r) 
45   {
46     return Form("hitsFMD%d%c", d, r);
47   }
48   const char* GetStripsName(UShort_t d, Char_t r)
49   {
50     return Form("stripsFMD%d%c", d, r);
51   }
52   const char* GetPrimaryName(Char_t r, Bool_t trVtx)
53   {
54     return Form("primaries%s%s", 
55                 ((r == 'I' || r == 'i') ? "Inner" : "Outer"), 
56                 (trVtx ? "TrVtx" : "All"));
57   }
58 #endif
59 }
60
61 //====================================================================
62 AliForwardMCCorrectionsTask::AliForwardMCCorrectionsTask()
63   : AliAnalysisTaskSE(),
64     fInspector(),
65     fTrackDensity(),
66     fESDFMD(),
67     fVtxBins(0),
68     fFirstEvent(true),
69     fHEvents(0), 
70     fHEventsTr(0), 
71     fHEventsTrVtx(0),
72     fVtxAxis(),
73     fEtaAxis(),
74     fList()
75 {
76   // 
77   // Constructor 
78   // 
79   // Parameters:
80   //    name Name of task 
81   //
82 }
83
84 //____________________________________________________________________
85 AliForwardMCCorrectionsTask::AliForwardMCCorrectionsTask(const char* name)
86   : AliAnalysisTaskSE(name),
87     fInspector("eventInspector"), 
88     fTrackDensity("trackDensity"),
89     fESDFMD(),
90     fVtxBins(0),
91     fFirstEvent(true),
92     fHEvents(0), 
93     fHEventsTr(0), 
94     fHEventsTrVtx(0),
95     fVtxAxis(10,-10,10), 
96     fEtaAxis(200,-4,6),
97     fList()
98 {
99   // 
100   // Constructor 
101   // 
102   // Parameters:
103   //    name Name of task 
104   //
105   DefineOutput(1, TList::Class());
106   DefineOutput(2, TList::Class());
107   fBranchNames = 
108     "ESD:AliESDRun.,AliESDHeader.,AliMultiplicity.,"
109     "AliESDFMD.,SPDVertex.,PrimaryVertex.";
110 }
111
112 //____________________________________________________________________
113 AliForwardMCCorrectionsTask::AliForwardMCCorrectionsTask(const AliForwardMCCorrectionsTask& o)
114   : AliAnalysisTaskSE(o),
115     fInspector(o.fInspector),
116     fTrackDensity(),
117     fESDFMD(o.fESDFMD),
118     fVtxBins(0),
119     fFirstEvent(o.fFirstEvent),
120     fHEvents(o.fHEvents), 
121     fHEventsTr(o.fHEventsTr), 
122     fHEventsTrVtx(o.fHEventsTrVtx),
123     fVtxAxis(10,-10,10), 
124     fEtaAxis(200,-4,6),
125     fList(o.fList)
126 {
127   // 
128   // Copy constructor 
129   // 
130   // Parameters:
131   //    o Object to copy from 
132   //
133 }
134
135 //____________________________________________________________________
136 AliForwardMCCorrectionsTask&
137 AliForwardMCCorrectionsTask::operator=(const AliForwardMCCorrectionsTask& o)
138 {
139   // 
140   // Assignment operator 
141   // 
142   // Parameters:
143   //    o Object to assign from 
144   // 
145   // Return:
146   //    Reference to this object 
147   //
148   if (&o == this) return *this;
149   fInspector         = o.fInspector;
150   fTrackDensity      = o.fTrackDensity;
151   fESDFMD            = o.fESDFMD;
152   fVtxBins           = o.fVtxBins;
153   fFirstEvent        = o.fFirstEvent;
154   fHEvents           = o.fHEvents;
155   fHEventsTr         = o.fHEventsTr;
156   fHEventsTrVtx      = o.fHEventsTrVtx;
157   SetVertexAxis(o.fVtxAxis);
158   SetEtaAxis(o.fEtaAxis);
159
160   return *this;
161 }
162
163 //____________________________________________________________________
164 void
165 AliForwardMCCorrectionsTask::Init()
166 {
167   // 
168   // Initialize the task 
169   // 
170   //
171 }
172
173 //____________________________________________________________________
174 void
175 AliForwardMCCorrectionsTask::SetVertexAxis(Int_t nBin, Double_t min, 
176                                            Double_t max)
177 {
178   // 
179   // Set the vertex axis to use
180   // 
181   // Parameters:
182   //    nBins Number of bins
183   //    vzMin Least @f$z@f$ coordinate of interation point
184   //    vzMax Largest @f$z@f$ coordinate of interation point
185   //
186   if (max < min) { 
187     Double_t tmp = min;
188     min          = max;
189     max          = tmp;
190   }
191 /*
192   if (min < -10) 
193     AliWarning(Form("Minimum vertex %f < -10, make sure you want this",min));
194   if (max > +10) 
195     AliWarning(Form("Minimum vertex %f > +10, make sure you want this",max));
196 */
197   fVtxAxis.Set(nBin, min, max);
198 }
199 //____________________________________________________________________
200 void
201 AliForwardMCCorrectionsTask::SetVertexAxis(const TAxis& axis)
202 {
203   // 
204   // Set the vertex axis to use
205   // 
206   // Parameters:
207   //    axis Axis
208   //
209   SetVertexAxis(axis.GetNbins(),axis.GetXmin(),axis.GetXmax());
210 }
211
212 //____________________________________________________________________
213 void
214 AliForwardMCCorrectionsTask::SetEtaAxis(Int_t nBin, Double_t min, Double_t max)
215 {
216   // 
217   // Set the eta axis to use
218   // 
219   // Parameters:
220   //    nBins Number of bins
221   //    vzMin Least @f$\eta@f$ 
222   //    vzMax Largest @f$\eta@f$ 
223   //
224   if (max < min) { 
225     Double_t tmp = min;
226     min          = max;
227     max          = tmp;
228   }
229   if (min < -4) 
230     AliWarning(Form("Minimum eta %f < -4, make sure you want this",min));
231   if (max > +6) 
232     AliWarning(Form("Minimum eta %f > +6, make sure you want this",max));
233   fEtaAxis.Set(nBin, min, max);
234 }
235 //____________________________________________________________________
236 void
237 AliForwardMCCorrectionsTask::SetEtaAxis(const TAxis& axis)
238 {
239   // 
240   // Set the eta axis to use
241   // 
242   // Parameters:
243   //    axis Axis
244   //
245   SetEtaAxis(axis.GetNbins(),axis.GetXmin(),axis.GetXmax());
246 }
247
248 //____________________________________________________________________
249 void
250 AliForwardMCCorrectionsTask::DefineBins(TList* l)
251 {
252   if (!fVtxBins) fVtxBins = new TObjArray(fVtxAxis.GetNbins(), 1);
253   if (fVtxBins->GetEntries() > 0) return;
254
255   fVtxBins->SetOwner();
256   for (Int_t  i    = 1; i <= fVtxAxis.GetNbins(); i++) { 
257     Double_t  low  = fVtxAxis.GetBinLowEdge(i);
258     Double_t  high = fVtxAxis.GetBinUpEdge(i);
259     VtxBin*   bin  = new VtxBin(low, high, fEtaAxis);
260     fVtxBins->AddAt(bin, i);
261     bin->CreateOutputObjects(l);
262   }
263 }
264
265 //____________________________________________________________________
266 void
267 AliForwardMCCorrectionsTask::UserCreateOutputObjects()
268 {
269   // 
270   // Create output objects 
271   // 
272   //
273   fList = new TList;
274   fList->SetOwner();
275   fList->SetName(Form("%sSums", GetName()));
276
277   DefineBins(fList);
278
279   fHEvents = new TH1I(GetEventName(false,false),
280                       "Number of all events", 
281                       fVtxAxis.GetNbins(), 
282                       fVtxAxis.GetXmin(), 
283                       fVtxAxis.GetXmax());
284   fHEvents->SetXTitle("v_{z} [cm]");
285   fHEvents->SetYTitle("# of events");
286   fHEvents->SetFillColor(kBlue+1);
287   fHEvents->SetFillStyle(3001);
288   fHEvents->SetDirectory(0);
289   fList->Add(fHEvents);
290
291   fHEventsTr = new TH1I(GetEventName(true, false), 
292                         "Number of triggered events",
293                         fVtxAxis.GetNbins(), 
294                         fVtxAxis.GetXmin(), 
295                         fVtxAxis.GetXmax());
296   fHEventsTr->SetXTitle("v_{z} [cm]");
297   fHEventsTr->SetYTitle("# of events");
298   fHEventsTr->SetFillColor(kRed+1);
299   fHEventsTr->SetFillStyle(3001);
300   fHEventsTr->SetDirectory(0);
301   fList->Add(fHEventsTr);
302
303   fHEventsTrVtx = new TH1I(GetEventName(true,true),
304                            "Number of events w/trigger and vertex", 
305                            fVtxAxis.GetNbins(), 
306                            fVtxAxis.GetXmin(), 
307                            fVtxAxis.GetXmax());
308   fHEventsTrVtx->SetXTitle("v_{z} [cm]");
309   fHEventsTrVtx->SetYTitle("# of events");
310   fHEventsTrVtx->SetFillColor(kBlue+1);
311   fHEventsTrVtx->SetFillStyle(3001);
312   fHEventsTrVtx->SetDirectory(0);
313   fList->Add(fHEventsTrVtx);
314
315   // Copy axis objects to output 
316   TH1* vtxAxis = new TH1D("vtxAxis", "Vertex axis", 
317                           fVtxAxis.GetNbins(), 
318                           fVtxAxis.GetXmin(), 
319                           fVtxAxis.GetXmax());
320   TH1* etaAxis = new TH1D("etaAxis", "Eta axis", 
321                           fEtaAxis.GetNbins(), 
322                           fEtaAxis.GetXmin(), 
323                           fEtaAxis.GetXmax());
324   fList->Add(vtxAxis);
325   fList->Add(etaAxis);
326
327   AliInfo(Form("Initialising sub-routines: %p, %p", 
328                &fInspector, &fTrackDensity));
329   fInspector.CreateOutputObjects(fList);
330   fTrackDensity.CreateOutputObjects(fList);
331
332   PostData(1, fList);
333 }
334 //____________________________________________________________________
335 void
336 AliForwardMCCorrectionsTask::UserExec(Option_t*)
337 {
338   // 
339   // Process each event 
340   // 
341   // Parameters:
342   //    option Not used
343   //  
344
345   // Get the input data - MC event
346   AliMCEvent*  mcEvent = MCEvent();
347   if (!mcEvent) { 
348     AliWarning("No MC event found");
349     return;
350   }
351
352   // Get the input data - ESD event
353   AliESDEvent* esd = dynamic_cast<AliESDEvent*>(InputEvent());
354   if (!esd) { 
355     AliWarning("No ESD event found for input event");
356     return;
357   }
358
359   // --- Read in the data --------------------------------------------
360   LoadBranches();
361
362   //--- Read run information -----------------------------------------
363   if (fFirstEvent && esd->GetESDRun()) {
364     fInspector.ReadRunDetails(esd);
365     
366     AliInfo(Form("Initializing with parameters from the ESD:\n"
367                  "         AliESDEvent::GetBeamEnergy()   ->%f\n"
368                  "         AliESDEvent::GetBeamType()     ->%s\n"
369                  "         AliESDEvent::GetCurrentL3()    ->%f\n"
370                  "         AliESDEvent::GetMagneticField()->%f\n"
371                  "         AliESDEvent::GetRunNumber()    ->%d\n",
372                  esd->GetBeamEnergy(),
373                  esd->GetBeamType(),
374                  esd->GetCurrentL3(),
375                  esd->GetMagneticField(),
376                  esd->GetRunNumber()));
377
378     fInspector.SetupForData(fVtxAxis);
379
380     Print();
381     fFirstEvent = false;
382   }
383
384   // Some variables 
385   UInt_t   triggers  = 0;    // Trigger bits
386   Bool_t   lowFlux   = true; // Low flux flag
387   UShort_t iVz       = 0;    // Vertex bin from ESD
388   TVector3 ip(1024,1024,1000);
389   Double_t cent      = -1;   // Centrality 
390   UShort_t iVzMc     = 0;    // Vertex bin from MC
391   Double_t vZMc      = 1000; // Z coordinate of IP vertex from MC
392   Double_t b         = -1;   // Impact parameter
393   Double_t cMC       = -1;   // Centrality estimate from b
394   Int_t    nPart     = -1;   // Number of participants 
395   Int_t    nBin      = -1;   // Number of binary collisions 
396   Double_t phiR      = 100;  // Reaction plane from MC
397   UShort_t nClusters = 0;    // Number of SPD clusters 
398   // Process the data 
399   UInt_t retESD = fInspector.Process(esd, triggers, lowFlux, iVz, ip, 
400                                      cent, nClusters);
401   fInspector.ProcessMC(mcEvent, triggers, iVzMc, vZMc, 
402                        b, cMC, nPart, nBin, phiR);
403
404   Bool_t isInel   = triggers & AliAODForwardMult::kInel;
405   Bool_t hasVtx   = retESD == AliFMDMCEventInspector::kOk;
406
407   // Fill the event count histograms 
408   if (isInel)           fHEventsTr->Fill(vZMc);
409   if (isInel && hasVtx) fHEventsTrVtx->Fill(vZMc);
410   fHEvents->Fill(vZMc);
411
412   // Now find our vertex bin object 
413   VtxBin* bin = 0;
414   if (iVzMc > 0 && iVzMc <= fVtxAxis.GetNbins()) 
415     bin = static_cast<VtxBin*>(fVtxBins->At(iVzMc));
416   if (!bin) { 
417     // AliError(Form("No vertex bin object @ %d (%f)", iVzMc, vZMc));
418     return;
419   }
420
421   // Clear our ESD object 
422   fESDFMD.Clear();
423
424   // Get FMD data 
425   AliESDFMD* esdFMD = esd->GetFMDData();
426   
427   // Now process our input data and store in own ESD object 
428   fTrackDensity.Calculate(*esdFMD, *mcEvent, vZMc, fESDFMD, bin->fPrimary);
429   bin->fCounts->Fill(0.5);
430
431   // And then bin the data in our vtxbin 
432   for (UShort_t d=1; d<=3; d++) { 
433     UShort_t nr = (d == 1 ? 1 : 2);
434     for (UShort_t q=0; q<nr; q++) { 
435       Char_t      r = (q == 0 ? 'I' : 'O');
436       UShort_t    ns= (q == 0 ?  20 :  40);
437       UShort_t    nt= (q == 0 ? 512 : 256);
438       TH2D*       h = bin->fHists.Get(d,r);
439
440       for (UShort_t s=0; s<ns; s++) { 
441         for (UShort_t t=0; t<nt; t++) {
442           Float_t mult = fESDFMD.Multiplicity(d,r,s,t);
443           
444           if (mult == 0 || mult > 20) continue;
445
446           Float_t phi = fESDFMD.Phi(d,r,s,t) / 180 * TMath::Pi();
447           Float_t eta = fESDFMD.Eta(d,r,s,t);
448           h->Fill(eta,phi,mult);
449         } // for t
450       } // for s 
451     } // for q 
452   } // for d
453
454   PostData(1, fList);
455 }
456 //____________________________________________________________________
457 void
458 AliForwardMCCorrectionsTask::Terminate(Option_t*)
459 {
460   // 
461   // End of job
462   // 
463   // Parameters:
464   //    option Not used 
465   //
466
467   fList = dynamic_cast<TList*>(GetOutputData(1));
468   if (!fList) {
469     AliError("No output list defined");
470     return;
471   }
472
473   DefineBins(fList);
474
475   // Output list 
476   TList* output = new TList;
477   output->SetOwner();
478   output->SetName(Form("%sResults", GetName()));
479
480   // --- Fill correction object --------------------------------------
481   AliFMDCorrSecondaryMap* corr = new AliFMDCorrSecondaryMap;
482   corr->SetVertexAxis(fVtxAxis);
483   corr->SetEtaAxis(fEtaAxis);
484   
485   TIter     next(fVtxBins);
486   VtxBin*   bin = 0;
487   UShort_t  iVz = 1;
488   while ((bin = static_cast<VtxBin*>(next()))) 
489     bin->Terminate(fList, output, iVz++, corr);
490
491   output->Add(corr);
492
493   PostData(2, output);
494 }
495
496 //____________________________________________________________________
497 void
498 AliForwardMCCorrectionsTask::Print(Option_t* option) const
499 {
500   std::cout << ClassName() << "\n"
501             << "  Vertex bins:      " << fVtxAxis.GetNbins() << '\n'
502             << "  Vertex range:     [" << fVtxAxis.GetXmin() 
503             << "," << fVtxAxis.GetXmax() << "]\n"
504             << "  Eta bins:         " << fEtaAxis.GetNbins() << '\n'
505             << "  Eta range:        [" << fEtaAxis.GetXmin() 
506             << "," << fEtaAxis.GetXmax() << "]"
507             << std::endl;
508   gROOT->IncreaseDirLevel();
509   fInspector.Print(option);
510   fTrackDensity.Print(option);
511   gROOT->DecreaseDirLevel();
512 }
513
514 //====================================================================
515 const char*
516 AliForwardMCCorrectionsTask::VtxBin::BinName(Double_t low, 
517                                              Double_t high) 
518 {
519   static TString buf;
520   buf = Form("vtx%+05.1f_%+05.1f", low, high);
521   buf.ReplaceAll("+", "p");
522   buf.ReplaceAll("-", "m");
523   buf.ReplaceAll(".", "d");
524   return buf.Data();
525 }
526
527
528 //____________________________________________________________________
529 AliForwardMCCorrectionsTask::VtxBin::VtxBin()
530   : fHists(), 
531     fPrimary(0),
532     fCounts(0)
533 {
534 }
535 //____________________________________________________________________
536 AliForwardMCCorrectionsTask::VtxBin::VtxBin(Double_t low, 
537                                             Double_t high, 
538                                             const TAxis& axis)
539   : TNamed(BinName(low, high), 
540            Form("%+5.1fcm<v_{z}<%+5.1fcm", low, high)),
541     fHists(), 
542     fPrimary(0),
543     fCounts(0)
544 {
545   fHists.Init(axis);
546
547   fPrimary = new TH2D("primary", "Primaries", 
548                       axis.GetNbins(), axis.GetXmin(), axis.GetXmax(), 
549                       40, 0, 2*TMath::Pi());
550   fPrimary->SetXTitle("#eta");
551   fPrimary->SetYTitle("#varphi [radians]");
552   fPrimary->Sumw2();
553   fPrimary->SetDirectory(0);
554
555   fCounts = new TH1D("counts", "Counts", 1, 0, 1);
556   fCounts->SetXTitle("Events");
557   fCounts->SetYTitle("# of Events");
558   fCounts->SetDirectory(0);
559 }
560
561 //____________________________________________________________________
562 AliForwardMCCorrectionsTask::VtxBin::VtxBin(const VtxBin& o)
563   : TNamed(o),
564     fHists(o.fHists),
565     fPrimary(0), 
566     fCounts(0)
567 {
568   if (o.fPrimary) {
569     fPrimary = static_cast<TH2D*>(o.fPrimary->Clone());
570     fPrimary->SetDirectory(0);
571   }
572   if (o.fCounts) {
573     fCounts = static_cast<TH1D*>(o.fCounts->Clone());
574     fCounts->SetDirectory(0);
575   }
576 }
577
578 //____________________________________________________________________
579 AliForwardMCCorrectionsTask::VtxBin&
580 AliForwardMCCorrectionsTask::VtxBin::operator=(const VtxBin& o)
581 {
582   if (&o == this) return *this;
583   TNamed::operator=(o);
584   fHists   = o.fHists;
585   fPrimary = 0;
586   fCounts  = 0;
587   if (o.fPrimary) {
588     fPrimary = static_cast<TH2D*>(o.fPrimary->Clone());
589     fPrimary->SetDirectory(0);
590   }
591   if (o.fCounts) {
592     fCounts = static_cast<TH1D*>(o.fCounts->Clone());
593     fCounts->SetDirectory(0);
594   }
595   return *this;
596 }
597
598 //____________________________________________________________________
599 void
600 AliForwardMCCorrectionsTask::VtxBin::CreateOutputObjects(TList* l)
601 {
602   TList* d = new TList;
603   d->SetName(GetName());
604   d->SetOwner();
605   l->Add(d);
606
607   d->Add(fHists.fFMD1i);
608   d->Add(fHists.fFMD2i);
609   d->Add(fHists.fFMD2o);
610   d->Add(fHists.fFMD3i);
611   d->Add(fHists.fFMD3o);
612
613   d->Add(fPrimary);
614   d->Add(fCounts);
615 }
616
617 //____________________________________________________________________
618 TH2D*
619 AliForwardMCCorrectionsTask::VtxBin::MakeBg(const TH2D* hits, 
620                                             const TH2D* primary) const
621 {
622   TH2D* h = static_cast<TH2D*>(hits->Clone());
623   h->SetDirectory(0);
624   TString n(h->GetName());
625   n.ReplaceAll("_cache", "");
626   h->SetName(n);
627   h->Divide(primary);
628   
629   return h;
630 }
631   
632 //____________________________________________________________________
633 void
634 AliForwardMCCorrectionsTask::VtxBin::Terminate(const TList* input, 
635                                             TList* output, 
636                                             UShort_t iVz,
637                                             AliFMDCorrSecondaryMap* map)
638 {
639   TList* out = new TList;
640   out->SetName(GetName());
641   out->SetOwner();
642   output->Add(out);
643
644   TList* l = static_cast<TList*>(input->FindObject(GetName()));
645   if (!l) { 
646     AliError(Form("List %s not found in %s", GetName(), input->GetName()));
647     return;
648   }
649
650   TH2D*   fmd1i = static_cast<TH2D*>(l->FindObject("FMD1I_cache"));
651   TH2D*   fmd2i = static_cast<TH2D*>(l->FindObject("FMD2I_cache"));
652   TH2D*   fmd2o = static_cast<TH2D*>(l->FindObject("FMD2O_cache"));
653   TH2D*   fmd3i = static_cast<TH2D*>(l->FindObject("FMD3I_cache"));
654   TH2D*   fmd3o = static_cast<TH2D*>(l->FindObject("FMD3O_cache"));
655   TH2D*   primO = static_cast<TH2D*>(l->FindObject("primary"));
656   if (!fmd1i || !fmd2i || !fmd2o || !fmd3i || !fmd3o || !primO) {
657     AliError(Form("Missing histogram(s): %p,%p,%p,%p,%p,%p",
658                   fmd1i, fmd2i, fmd2o, fmd3i, fmd3o, primO));
659     return;
660   }
661
662   // Half coverage in phi for inners
663   TH2D*   primI = static_cast<TH2D*>(primO->Clone());
664   primI->SetDirectory(0);
665   primI->RebinY(2); 
666
667   TH2D* bg1i = MakeBg(fmd1i, primI);
668   TH2D* bg2i = MakeBg(fmd2i, primI);
669   TH2D* bg2o = MakeBg(fmd2o, primO);
670   TH2D* bg3i = MakeBg(fmd3i, primI);
671   TH2D* bg3o = MakeBg(fmd3o, primO);
672   map->SetCorrection(1, 'I', iVz, bg1i);
673   map->SetCorrection(2, 'I', iVz, bg2i);
674   map->SetCorrection(2, 'O', iVz, bg2o);
675   map->SetCorrection(3, 'I', iVz, bg3i);
676   map->SetCorrection(3, 'O', iVz, bg3o);
677   out->Add(bg1i);
678   out->Add(bg2i);
679   out->Add(bg2o);
680   out->Add(bg3i);
681   out->Add(bg3o);
682  
683 }
684
685 //
686 // EOF
687 //