X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FReconstruction.C;h=f7b7e54adf097dfb54d14cd090291b2d59177afb;hb=1bda006f65eac40ae376c2374c4661ff170c8103;hp=ddec37d6a2a698f53ab2253c35ec397f6fc623c3;hpb=baf5b4276209446738033d1f6588c4dcc6bbc981;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/Reconstruction.C b/PHOS/Reconstruction.C index ddec37d6a2a..f7b7e54adf0 100644 --- a/PHOS/Reconstruction.C +++ b/PHOS/Reconstruction.C @@ -1,44 +1,73 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ +/* $Id$ */ +//_________________________________________________________________________ +// Macros performing the full reconstruction chain starting from Digits +// Use Case : +// root> .L Reconstruction.C++ +// root> rec("RE", "PHOS EMCAL") --> does the reconstruction for +// PHOS and EMCAL and stores the +// reconstructed particles in +// AliESDs.root +// author : Yves Schutz (CERN/SUBATECH) +// February 2004 +//_________________________________________________________________________ + #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, TString name) +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, "RP") ; - 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(); }