]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONReconstructor.cxx
In AliMUONReconstructor:
[u/mrichter/AliRoot.git] / MUON / AliMUONReconstructor.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /* $Id$ */
16
17 //-----------------------------------------------------------------------------
18 /// \class AliMUONReconstructor
19 ///
20 /// Implementation of AliReconstructor for MUON subsystem.
21 ///
22 /// The clustering mode and the associated parameters can be changed through the
23 /// AliMUONRecoParam object set in the reconstruction macro or read from the CDB
24 /// (see methods in AliMUONRecoParam.h file for details)
25 ///
26 /// Valid modes are :
27 ///
28 /// SIMPLEFIT : use the AliMUONClusterFinderSimpleFit clusterizer
29 ///
30 /// SIMPLEFITV3 : SIMPLEFIT with preclustering=PRECLUSTERV3
31 ///
32 /// MLEM : use AliMUONClusterFinderMLEM and AliMUONPreClusterFinder for preclustering (default)
33 /// MLEMV2 : MLEM with preclustering=PRECLUSTERV2
34 /// MLEMV3 : MLEM with preclustering=PRECLUSTERV3
35 ///
36 /// PRECLUSTER : use only AliMUONPreClusterFinder. Only for debug as
37 /// the produced clusters do not have a position, hence the tracking will not
38 /// work
39 /// PRECLUSTERV2 : another version of the preclustering
40 /// PRECLUSTERV3 : yet another version of the preclustering
41 ///
42 /// COG : use AliMUONClusterFinderCOG clusterizer. Not really a production
43 /// option either, as center-of-gravity is generally not a good estimate
44 /// of the cluster position...
45 ///
46 /// PEAKCOG : COG cluster finder around local maxima
47 /// PEAKFIT : fit around local maxima with up to 3 peaks, COG otherwise
48 ///
49 /// NOCLUSTERING : bypass completely the clustering stage
50 ///
51 /// ------
52 ///
53 /// The behavior of the MUON reconstruction can also be changed, besides
54 /// the usual methods found in AliReconstruction (e.g. to disable tracking)
55 /// by using AliReconstruction::SetOption("MUON",options)
56 /// where options should be a space separated string.
57 ///
58 /// Valid options are :
59 ///
60 /// SAVEDIGITS : if you want to save in the TreeD the *calibrated* digits
61 ///     that are used for the clustering
62 ///
63 /// DIGITSTOREV1 : use the V1 implementation of the digitstore 
64 /// DIGITSTOREV2R : use the V2R implementation of the digitstore 
65 ///
66 /// NOLOCALRECONSTRUCTION : for debug, to disable local reconstruction (and hence
67 /// "recover" old behavior)
68 ///
69 /// TRIGGERDISABLE : disable the treatment of MUON trigger
70 ///
71 /// NOFASTTRKDECODER : makes the digit maker class use the non-high performance decoder
72 ///                  AliMUONPayloadTracker instead of  AliMUONTrackerDDLDecoder.
73 ///
74 /// NOFASTTRGDECODER : makes the digit maker class use the non-high performance decoder
75 ///                  AliMUONPayloadTrigger instead of AliMUONTriggerDDLDecoder.
76 ///
77 /// NOFASTDECODERS : makes the digit maker class use the non-high performance decoders
78 ///                  AliMUONPayloadTracker and AliMUONPayloadTrigger.
79 ///
80 /// \author Laurent Aphecetche, Subatech
81 //-----------------------------------------------------------------------------
82
83 #include "AliMUONReconstructor.h"
84
85 #include "AliMUONCalibrationData.h"
86 #include "AliMUONClusterFinderCOG.h"
87 #include "AliMUONClusterFinderMLEM.h"
88 #include "AliMUONClusterFinderSimpleFit.h"
89 #include "AliMUONClusterFinderPeakCOG.h"
90 #include "AliMUONClusterFinderPeakFit.h"
91 #include "AliMUONClusterStoreV1.h"
92 #include "AliMUONClusterStoreV2.h"
93 #include "AliMUONConstants.h"
94 #include "AliMUONDigitCalibrator.h"
95 #include "AliMUONDigitMaker.h"
96 #include "AliMUONDigitStoreV1.h"
97 #include "AliMUONDigitStoreV2R.h"
98 #include "AliMUONGeometryTransformer.h"
99 #include "AliMUONPreClusterFinder.h"
100 #include "AliMUONPreClusterFinderV2.h"
101 #include "AliMUONPreClusterFinderV3.h"
102 #include "AliMUONSimpleClusterServer.h"
103 #include "AliMUONTracker.h"
104 #include "AliMUONTriggerCircuit.h"
105 #include "AliMUONTriggerStoreV1.h"
106 #include "AliMUONVClusterFinder.h"
107 #include "AliMUONVClusterServer.h"
108 #include "AliMUONVTrackStore.h"
109
110 #include "AliMpArea.h"
111 #include "AliMpCDB.h"
112 #include "AliMpConstants.h"
113 #include "AliMpDDLStore.h"
114 #include "AliMpSegmentation.h"
115
116 #include "AliRawReader.h"
117 #include "AliCDBManager.h"
118 #include "AliCodeTimer.h"
119 #include "AliLog.h"
120
121 #include <Riostream.h>
122 #include <TObjArray.h>
123 #include <TClonesArray.h>
124 #include <TString.h>
125 #include <TTree.h>
126
127 /// \cond CLASSIMP
128 ClassImp(AliMUONReconstructor)
129 /// \endcond 
130
131 //_____________________________________________________________________________
132 AliMUONReconstructor::AliMUONReconstructor() : 
133 AliReconstructor(),
134 fDigitMaker(0x0),
135 fTransformer(new AliMUONGeometryTransformer()),
136 fDigitStore(0x0),
137 fTriggerCircuit(0x0),
138 fCalibrationData(0x0),
139 fDigitCalibrator(0x0),
140 fClusterServer(0x0),
141 fTriggerStore(0x0),
142 fTrackStore(0x0),
143 fClusterStore(0x0)
144 {
145   /// normal ctor
146
147   AliDebug(1,"");
148
149   // Load mapping
150   if ( ! AliMpCDB::LoadDDLStore() ) {
151     AliFatal("Could not access mapping from OCDB !");
152   }
153   
154   // Load geometry data
155   fTransformer->LoadGeometryData();
156   
157 }
158
159 //_____________________________________________________________________________
160 AliMUONReconstructor::~AliMUONReconstructor()
161 {
162   AliDebug(1,"");
163
164   /// dtor
165   delete fDigitMaker;
166   delete fDigitStore;
167   delete fTransformer;
168   delete fTriggerCircuit;
169   delete fCalibrationData;
170   delete fDigitCalibrator;
171   delete fClusterServer;
172   delete fTriggerStore;
173   delete fTrackStore;
174   delete fClusterStore;
175
176   delete AliMpSegmentation::Instance(false);
177   delete AliMpDDLStore::Instance(false);
178 }
179
180 //_____________________________________________________________________________
181 void
182 AliMUONReconstructor::Calibrate(AliMUONVDigitStore& digitStore) const
183 {
184   /// Calibrate the digitStore
185   if (!fDigitCalibrator)
186   {
187     CreateCalibrator();
188   }
189   AliCodeTimerAuto(Form("%s::Calibrate(AliMUONVDigitStore*)",fDigitCalibrator->ClassName()))
190   fDigitCalibrator->Calibrate(digitStore);  
191 }
192
193 //_____________________________________________________________________________
194 void
195 AliMUONReconstructor::ConvertDigits(AliRawReader* rawReader, 
196                                     AliMUONVDigitStore* digitStore,
197                                     AliMUONVTriggerStore* triggerStore) const
198 {
199   /// Convert raw data into digit and trigger stores
200   CreateDigitMaker();
201   
202   AliCodeTimerStart(Form("%s::Raw2Digits(AliRawReader*,AliMUONVDigitStore*,AliMUONVTriggerStore*)",
203                     fDigitMaker->ClassName()))
204   fDigitMaker->Raw2Digits(rawReader,digitStore,triggerStore);
205   AliCodeTimerStop(Form("%s::Raw2Digits(AliRawReader*,AliMUONVDigitStore*,AliMUONVTriggerStore*)",
206                          fDigitMaker->ClassName()))
207   Calibrate(*digitStore);
208 }
209
210 //_____________________________________________________________________________
211 void 
212 AliMUONReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const
213 {
214    /// convert raw data into a digit tree
215   AliCodeTimerAuto("")
216
217   Bool_t alone = ( TriggerStore() == 0 );
218   
219   Bool_t ok = DigitStore()->Connect(*digitsTree,alone);
220   if ( TriggerStore() ) 
221   {
222     ok = ok && TriggerStore()->Connect(*digitsTree,kFALSE);
223   }
224   
225   if (!ok)
226   {
227     AliError("Could not make branches on TreeD");
228   }
229   else
230   {
231     ConvertDigits(rawReader,DigitStore(),TriggerStore());
232     AliCodeTimerStart("Fill digits")
233     digitsTree->Fill();
234     AliCodeTimerStop("Fill digits")
235     DigitStore()->Clear();
236   }
237 }
238
239 //_____________________________________________________________________________
240 void
241 AliMUONReconstructor::CreateDigitMaker() const
242 {
243   /// Create (and create if necessary) the digit maker
244   if (fDigitMaker) return;
245
246   AliCodeTimerAuto("")
247
248   TString option = GetOption();
249   Bool_t enableErrorLogging = kTRUE;
250   Bool_t useFastTrackerDecoder = kTRUE;
251   Bool_t useFastTriggerDecoder = kTRUE;
252   if (option.Contains("NOFASTTRKDECODER"))
253   {
254     useFastTrackerDecoder = kFALSE;
255   }
256   if (option.Contains("NOFASTTRGDECODER"))
257   {
258     useFastTriggerDecoder = kFALSE;
259   }
260   if (option.Contains("NOFASTDECODERS"))
261   {
262     useFastTrackerDecoder = kFALSE;
263     useFastTriggerDecoder = kFALSE;
264   }
265   fDigitMaker = new AliMUONDigitMaker(
266       enableErrorLogging, useFastTrackerDecoder, useFastTriggerDecoder
267     );
268   option.ToUpper();
269   if ( option.Contains("SAVEDIGITS" ))
270     {
271       fDigitMaker->SetMakeTriggerDigits(kTRUE);
272     }
273 }
274
275 //_____________________________________________________________________________
276 void 
277 AliMUONReconstructor::CreateTriggerCircuit() const
278 {
279   /// Return (and create if necessary) the trigger circuit object
280   if (fTriggerCircuit) return;
281
282   AliCodeTimerAuto("")
283
284   fTriggerCircuit = new AliMUONTriggerCircuit(fTransformer);
285
286 }
287
288 //_____________________________________________________________________________
289 AliTracker* 
290 AliMUONReconstructor::CreateTracker() const
291 {
292   /// Create the MUONTracker object
293   
294   CreateTriggerCircuit();
295   CreateDigitMaker();
296   CreateClusterServer();
297
298   AliMUONTracker* tracker(0x0);
299   
300   if ( ! GetRecoParam()->CombineClusterTrackReco() )
301   {
302     tracker = new AliMUONTracker(GetRecoParam(),
303                                  0x0,
304                                  *DigitStore(),
305                                  fDigitMaker,
306                                  fTransformer,
307                                  fTriggerCircuit);
308   }
309   else
310   {
311     tracker = new AliMUONTracker(GetRecoParam(),
312                                  fClusterServer,
313                                  *DigitStore(),
314                                  fDigitMaker,
315                                  fTransformer,
316                                  fTriggerCircuit);
317   }
318   
319   
320   return tracker;
321 }
322
323 //_____________________________________________________________________________
324 AliMUONVClusterFinder*
325 AliMUONReconstructor::CreateClusterFinder(const char* clusterFinderType)
326 {
327   /// Create a given cluster finder instance
328   
329   AliCodeTimerAutoGeneral("")
330
331   AliMUONVClusterFinder* clusterFinder(0x0);
332   
333   TString opt(clusterFinderType);
334   opt.ToUpper();
335   
336   if ( strstr(opt,"PRECLUSTERV2") )
337   {
338     clusterFinder = new AliMUONPreClusterFinderV2;
339   }    
340   else if ( strstr(opt,"PRECLUSTERV3") )
341   {
342     clusterFinder = new AliMUONPreClusterFinderV3;
343   }  
344   else if ( strstr(opt,"PRECLUSTER") )
345   {
346     clusterFinder = new AliMUONPreClusterFinder;
347   }  
348   else if ( strstr(opt,"PEAKCOG") )
349   {
350     clusterFinder = new AliMUONClusterFinderPeakCOG(kFALSE,new AliMUONPreClusterFinder);
351   }
352   else if ( strstr(opt,"PEAKFIT") )
353   {
354     clusterFinder = new AliMUONClusterFinderPeakFit(kFALSE,new AliMUONPreClusterFinder);
355   }
356   else if ( strstr(opt,"COG") )
357   {
358     clusterFinder = new AliMUONClusterFinderCOG(new AliMUONPreClusterFinder);
359   }  
360   else if ( strstr(opt,"SIMPLEFITV3") )
361   {
362     clusterFinder = new AliMUONClusterFinderSimpleFit(new AliMUONClusterFinderCOG(new AliMUONPreClusterFinderV3));
363   }
364   else if ( strstr(opt,"SIMPLEFIT") )
365   {
366     clusterFinder = new AliMUONClusterFinderSimpleFit(new AliMUONClusterFinderCOG(new AliMUONPreClusterFinder));
367   }
368   else if ( strstr(opt,"MLEM:DRAW") )
369   {
370     clusterFinder = new AliMUONClusterFinderMLEM(kTRUE,new AliMUONPreClusterFinder);
371   }
372   else if ( strstr(opt,"MLEMV3") )
373   {
374     clusterFinder = new AliMUONClusterFinderMLEM(kFALSE,new AliMUONPreClusterFinderV3);
375   } 
376   else if ( strstr(opt,"MLEMV2") )
377   {
378     clusterFinder = new AliMUONClusterFinderMLEM(kFALSE,new AliMUONPreClusterFinderV2);
379   } 
380   else if ( strstr(opt,"MLEM") )
381   {
382     clusterFinder = new AliMUONClusterFinderMLEM(kFALSE,new AliMUONPreClusterFinder);
383   } 
384   else
385   {
386     AliErrorClass(Form("clustering mode \"%s\" does not exist",opt.Data()));
387     return 0x0;
388   }
389   
390   return clusterFinder;
391 }
392
393 //_____________________________________________________________________________
394 void
395 AliMUONReconstructor::CreateClusterServer() const
396 {
397   /// Create cluster server
398   
399   if ( fClusterServer ) return;
400   
401   AliCodeTimerAuto("");
402     
403   AliMUONVClusterFinder* clusterFinder = CreateClusterFinder(GetRecoParam()->GetClusteringMode());
404   
405   if ( !clusterFinder ) return;
406   
407   AliInfo(Form("Will use %s for clusterizing",clusterFinder->ClassName()));
408   
409   fClusterServer = new AliMUONSimpleClusterServer(clusterFinder,*fTransformer);
410 }
411
412 //_____________________________________________________________________________
413 void
414 AliMUONReconstructor::CreateCalibrator() const
415 {
416   /// Create the calibrator
417   
418   AliCodeTimerAuto("")
419   
420   Int_t runNumber = AliCDBManager::Instance()->GetRun();
421
422   AliInfo("Calibration will occur.");
423   
424   fCalibrationData = new AliMUONCalibrationData(runNumber);
425   if ( !fCalibrationData->IsValid() )
426   {
427     AliError("Could not retrieve calibrations !");
428     delete fCalibrationData;
429     fCalibrationData = 0x0;
430     return;
431   }    
432   
433   // Check that we get all the calibrations we'll need
434   if ( !fCalibrationData->Pedestals() ||
435        !fCalibrationData->Gains() ||
436        !fCalibrationData->HV() )
437   {
438     AliFatal("Could not access all required calibration data");
439   }
440   
441   TString opt(GetOption());
442   opt.ToUpper();
443   
444   if ( strstr(opt,"NOSTATUSMAP") )
445   {
446     AliWarning("NOSTATUSMAP is obsolete");
447   }
448
449   TString calibMode = GetRecoParam()->GetCalibrationMode();
450
451   fDigitCalibrator = new AliMUONDigitCalibrator(*fCalibrationData,GetRecoParam(),calibMode.Data());
452 }
453
454 //_____________________________________________________________________________
455 AliMUONVDigitStore*
456 AliMUONReconstructor::DigitStore() const
457 {
458   /// Return (and create if necessary) the digit container
459   if (!fDigitStore) 
460   {
461     TString sopt(GetOption());
462     sopt.ToUpper();
463     
464     AliInfo(Form("Options=%s",sopt.Data()));
465     
466     if ( sopt.Contains("DIGITSTOREV1") )
467     {
468       fDigitStore = AliMUONVDigitStore::Create("AliMUONDigitStoreV1");
469     }
470     else if ( sopt.Contains("DIGITSTOREV2R") ) 
471     {
472       fDigitStore = AliMUONVDigitStore::Create("AliMUONDigitStoreV2R");
473     }
474     else if ( sopt.Contains("DIGITSTOREV2S") ) 
475     {
476       fDigitStore = AliMUONVDigitStore::Create("AliMUONDigitStoreV2S");
477     }
478     
479     if (!fDigitStore) fDigitStore = AliMUONVDigitStore::Create("AliMUONDigitStoreV2R");
480     
481     AliInfo(Form("Will use %s to store digits during reconstruction",fDigitStore->ClassName()));
482   }
483   return fDigitStore;
484 }
485
486 //_____________________________________________________________________________
487 void
488 AliMUONReconstructor::FillTreeR(AliMUONVTriggerStore* triggerStore,
489                                 TTree& clustersTree) const
490 {
491   /// Write the trigger and cluster information into TreeR
492   
493   AliCodeTimerAuto("")
494
495   AliDebug(1,"");
496   
497   Bool_t ok(kFALSE);
498   Bool_t alone(kTRUE); // is trigger the only info in TreeR ?
499   
500   if ( ! GetRecoParam()->CombineClusterTrackReco() )
501   {
502     alone = kFALSE; // we'll get both tracker and trigger information in TreeR
503   }
504   
505   if ( triggerStore ) 
506   {
507     ok = triggerStore->Connect(clustersTree,alone);
508     if (!ok)
509     {
510       AliError("Could not create triggerStore branches in TreeR");
511     }
512   }
513
514   if ( !alone )
515   {
516     if (!fClusterStore)
517     {
518       fClusterStore = new AliMUONClusterStoreV2;
519     }
520     
521     CreateClusterServer();
522     
523     TIter next(DigitStore()->CreateIterator());
524     fClusterServer->UseDigits(next);
525
526     AliMpArea area;
527     
528     AliDebug(1,Form("Doing full clusterization in local reconstruction using %s ",fClusterServer->ClassName()));
529     
530     for ( Int_t i = 0; i < AliMpConstants::NofTrackingChambers(); ++i ) 
531     {
532       if (GetRecoParam()->UseChamber(i))
533       {
534         if ( ( i == 6 || i == 7 )  && GetRecoParam()->BypassSt4() ) continue;
535         if ( ( i == 8 || i == 9 )  && GetRecoParam()->BypassSt5() ) continue;
536         
537         fClusterServer->Clusterize(i,*fClusterStore,area,GetRecoParam());
538       }
539     }
540     
541     Bool_t cok = fClusterStore->Connect(clustersTree,alone);
542     
543     if (!cok) AliError("Could not connect clusterStore to clusterTree");
544     
545     AliDebug(1,Form("Number of clusters found = %d",fClusterStore->GetSize()));
546     
547     StdoutToAliDebug(1,fClusterStore->Print());
548   }
549          
550   if (ok) // at least one type of branches created successfully
551   {
552     clustersTree.Fill();
553   }
554   
555   if (fClusterStore) fClusterStore->Clear();
556 }
557
558 //_____________________________________________________________________________
559 Bool_t 
560 AliMUONReconstructor::HasDigitConversion() const
561 {
562   /// We *do* have digit conversion, but we might advertise it only 
563   /// if we want to save the digits.
564   
565   TString opt(GetOption());
566   opt.ToUpper();
567   if ( opt.Contains("SAVEDIGITS" ) && !opt.Contains("NOLOCALRECONSTRUCTION") )
568   {
569     return kTRUE;
570   }
571   else
572   {
573     return kFALSE;
574   }
575 }
576
577 //_____________________________________________________________________________
578 void 
579 AliMUONReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const
580 {
581   /// This method is called by AliReconstruction if HasLocalReconstruction()==kTRUE AND
582   /// HasDigitConversion()==kFALSE
583   
584   if ( !clustersTree ) 
585   {
586     AliError("clustersTree is 0x0 !");
587     return;
588   }
589   
590   ConvertDigits(rawReader,DigitStore(),TriggerStore());
591
592   FillTreeR(TriggerStore(),*clustersTree);
593 }
594
595 //_____________________________________________________________________________
596 void 
597 AliMUONReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const
598 {
599   /// This method is called by AliReconstruction if HasLocalReconstruction()==kTRUE
600   /// AND HasDigitConversion()==kTRUE
601   
602   AliCodeTimerAuto("")
603   
604   AliDebug(1,"");
605   
606   if (!digitsTree || !clustersTree) 
607   {
608     AliError(Form("Tree is null : digitsTree=%p clustersTree=%p",
609                   digitsTree,clustersTree));
610     return;
611   }
612
613   if (!fDigitStore)
614   {
615     fDigitStore = AliMUONVDigitStore::Create(*digitsTree);
616     if (!fDigitStore)
617     {
618       AliError(Form("Could not get DigitStore from %s",digitsTree->GetName()));
619     }
620     else
621     {
622       AliInfo(Form("Created %s from %s",fDigitStore->ClassName(),digitsTree->GetName()));
623     }
624   }
625   if (!fTriggerStore)
626   {
627     fTriggerStore = AliMUONVTriggerStore::Create(*digitsTree);
628     if (!fTriggerStore)
629     {
630       AliError(Form("Could not get TriggerStore from %s",digitsTree->GetName()));
631     }
632     else
633     {
634       AliInfo(Form("Created %s from %s",fTriggerStore->ClassName(),digitsTree->GetName()));
635     }
636   }
637   
638   if (!fTriggerStore && !fDigitStore)
639   {
640     AliError("No store at all. Nothing to do.");
641     return;
642   }
643   
644   // insure we start with empty stores
645   if ( fDigitStore ) 
646   {
647     fDigitStore->Clear(); 
648     Bool_t alone = ( fTriggerStore ? kFALSE : kTRUE );
649     Bool_t ok = fDigitStore->Connect(*digitsTree,alone);
650     if (!ok)
651     {
652       AliError("Could not connect digitStore to digitsTree");
653       return;
654     }
655   }
656   if ( fTriggerStore ) 
657   {
658     fTriggerStore->Clear();
659     Bool_t alone = ( fDigitStore ? kFALSE : kTRUE );
660     Bool_t ok = fTriggerStore->Connect(*digitsTree,alone);
661     if (!ok)
662     {
663       AliError("Could not connect triggerStore to digitsTree");
664       return;
665     }
666   }
667   
668   digitsTree->GetEvent(0);
669   
670   if ( fDigitStore ) 
671   {
672     // Insure we got calibrated digits (if we reconstruct from pure simulated,
673     // i.e. w/o going through raw data, this will be the case)
674     TIter next(fDigitStore->CreateIterator());
675     AliMUONVDigit* digit = static_cast<AliMUONVDigit*>(next());
676     if (digit && !digit->IsCalibrated())
677     {
678       Calibrate(*fDigitStore);
679     }
680   }
681     
682   FillTreeR(fTriggerStore,*clustersTree);
683 }
684
685 //_____________________________________________________________________________
686 AliMUONVTriggerStore*
687 AliMUONReconstructor::TriggerStore() const
688 {
689   /// Return (and create if necessary and allowed) the trigger container
690   TString sopt(GetOption());
691   sopt.ToUpper();
692   
693   if (sopt.Contains("TRIGGERDISABLE"))
694   {
695     delete fTriggerStore;
696     fTriggerStore = 0x0;
697   }
698   else
699   {
700     if (!fTriggerStore)
701     {
702       fTriggerStore = new AliMUONTriggerStoreV1;
703     }
704   }
705   return fTriggerStore;
706 }