]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/Reconstruction.C
Updated for new classes and cleand (a bit).
[u/mrichter/AliRoot.git] / PHOS / Reconstruction.C
CommitLineData
12391a12 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// Macros performing the full reconstruction chain starting from Digits
18// Use Case :
19// root> .L Reconstruction.C++
20// root> rec("RE", "PHOS EMCAL") --> does the reconstruction for
21// PHOS and EMCAL and stores the
22// reconstructed particles in
23// AliESDs.root
24// author : Yves Schutz (CERN/SUBATECH)
25// February 2004
26//_________________________________________________________________________
27
baf5b427 28#include "AliReconstruction.h"
29#include "TString.h"
30#include "Riostream.h"
31#include "AliPHOSGetter.h"
32#include "AliEMCALGetter.h"
33
12391a12 34void reco(TString opt="TRE", TString name="all")
baf5b427 35{
36 AliReconstruction rec ;
37 if ( !opt.Contains("T") )
38 rec.SetRunTracking(kFALSE) ;
39 if ( opt.Contains("R") )
40 rec.SetRunReconstruction(name.Data()) ;
4f36a998 41 else
42 rec.SetRunReconstruction("") ;
baf5b427 43 if ( !opt.Contains("E") )
44 rec.SetFillESD("") ;
45 else
46 rec.SetFillESD(name.Data()) ;
47 rec.Run() ;
48
49 if ( name.Contains("PHOS") ) {
50 cout << ">>>>>>>>>>>> PHOS " << endl ;
51 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
52 Int_t event ;
53 for (event = 0; event < gime->MaxEvent(); event++) {
54 cout << "event # " << event << endl ;
12391a12 55 gime->Event(event, "RPT") ;
baf5b427 56 cout << " EMC RecPoints # " << gime->EmcRecPoints()->GetEntries() << endl ;
57 cout << " CPV RecPoints # " << gime->CpvRecPoints()->GetEntries() << endl ;
58 cout << " Track Segments # " << gime->TrackSegments()->GetEntries() << endl ;
59 cout << " Rec Particles # " << gime->RecParticles()->GetEntries() << endl ;
60 }
61 }
62 if ( name.Contains("EMCAL") ) {
63 cout << ">>>>>>>>>>>> EMCAL " << endl ;
64 AliEMCALGetter * gime = AliEMCALGetter::Instance("galice.root") ;
65 Int_t event ;
66 for (event = 0; event < gime->MaxEvent(); event++) {
67 cout << "event # " << event << endl ;
68 gime->Event(event, "RP") ;
69 cout << " RecPoints # " << gime->ECARecPoints()->GetEntries() << endl ;
70 cout << " Rec Particles # " << gime->RecParticles()->GetEntries() << endl ;
71 }
72 }
73}