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