]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/Reconstruction.C
Introduction of decalibration in the simulations with anchor runs and raw:// OCDB.
[u/mrichter/AliRoot.git] / PHOS / Reconstruction.C
index 21212ff86655168654e110fe9858cc8618b9d934..f7b7e54adf097dfb54d14cd090291b2d59177afb 100644 (file)
 #include "AliReconstruction.h"
 #include "TString.h"
 #include "Riostream.h"
-#include "AliPHOSGetter.h"
-#include "AliEMCALGetter.h"
+#include "TStopwatch.h"
+#include "AliTPCReconstructor.h"
 
-void reco(TString opt="TRE", TString name="all") 
+void reco(TString opt="TVRE", TString name="all", TString cdb="") 
 {
   AliReconstruction rec ; 
-  if ( !opt.Contains("T") )
-    rec.SetRunTracking(kFALSE) ;
+  rec.SetUniformFieldTracking(kFALSE);
+  rec.SetWriteESDfriend();
+  rec.SetWriteAlignmentData();
+  if ( name.Contains("TPC") ) {
+   AliTPCReconstructor::SetCtgRange(2.); // for pp events
+   AliTPCReconstructor::SetStreamLevel(1);
+  }
+  if ( !cdb.IsNull() ) 
+    rec.SetDefaultStorage(cdb.Data() ) ; 
+
+  if ( opt.Contains("W") )
+    rec.SetInput("raw.root");
+
+  if ( !opt.Contains("T") ) 
+    rec.SetRunTracking("") ;
+  else
+    rec.SetRunTracking(name.Data()) ;
+
+  if ( !opt.Contains("V") ) 
+    rec.SetRunVertexFinder(kFALSE) ; 
+
   if ( opt.Contains("R") ) 
-    rec.SetRunReconstruction(name.Data()) ; 
+    rec.SetRunLocalReconstruction(name.Data()) ; 
+  else 
+    rec.SetRunLocalReconstruction("") ;
+
   if ( !opt.Contains("E") )
     rec.SetFillESD("") ; 
   else 
     rec.SetFillESD(name.Data()) ; 
-  rec.Run() ;
 
-  if ( name.Contains("PHOS") ) {
-    cout << ">>>>>>>>>>>> PHOS " << endl ; 
-    AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ; 
-    Int_t event ; 
-    for (event = 0; event < gime->MaxEvent(); event++) {
-      cout << "event # " << event << endl ; 
-      gime->Event(event, "RPT") ; 
-      cout << "   EMC RecPoints  # " << gime->EmcRecPoints()->GetEntries() << endl ; 
-      cout << "   CPV RecPoints  # " << gime->CpvRecPoints()->GetEntries() << endl ; 
-      cout << "   Track Segments # " << gime->TrackSegments()->GetEntries() << endl ; 
-      cout << "   Rec Particles  # " << gime->RecParticles()->GetEntries() << endl ; 
-    }
-  } 
- if ( name.Contains("EMCAL") ) {
-    cout << ">>>>>>>>>>>> EMCAL " << endl ; 
-    AliEMCALGetter * gime = AliEMCALGetter::Instance("galice.root") ; 
-    Int_t event ; 
-    for (event = 0; event < gime->MaxEvent(); event++) {
-      cout << "event # " << event << endl ; 
-      gime->Event(event, "RP") ; 
-      cout << "       RecPoints  # " << gime->ECARecPoints()->GetEntries() << endl ; 
-      cout << "   Rec Particles  # " << gime->RecParticles()->GetEntries() << endl ; 
-    }
- } 
+  TStopwatch timer;
+  timer.Start();
+  rec.Run() ;
+  timer.Stop();
+  timer.Print();
 }