ROOT logo
#ifndef ALIPHOSRECONSTRUCTOR_H
#define ALIPHOSRECONSTRUCTOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

/* History of cvs commits:
 *
 * $Log$
 * Revision 1.15  2007/10/01 20:24:08  kharlov
 * Memory leaks fixed
 *
 * Revision 1.14  2007/09/26 14:22:18  cvetan
 * Important changes to the reconstructor classes. Complete elimination of the run-loaders, which are now steered only from AliReconstruction. Removal of the corresponding Reconstruct() and FillESD() methods.
 *
 * Revision 1.13  2007/08/30 10:40:27  cvetan
 * Minor
 *
 * Revision 1.12  2007/08/28 12:55:08  policheh
 * Loaders removed from the reconstruction code (C.Cheshkov)
 *
 * Revision 1.11  2007/07/24 17:20:35  policheh
 * Usage of RecoParam objects instead of hardcoded parameters in reconstruction.
 * (See $ALICE_ROOT/PHOS/macros/BeamTest2006/RawReconstruction.C).
 *
 * Revision 1.10  2007/07/11 13:43:30  hristov
 * New class AliESDEvent, backward compatibility with the old AliESD (Christian)
 *
 * Revision 1.9  2006/11/15 16:05:03  kharlov
 * New FillESD() for raw data is added
 *
 * Revision 1.8  2005/05/28 14:19:04  schutz
 * Compilation warnings fixed by T.P.
 *
 */

//_________________________________________________________________________
//  Wrapping class for reconstruction
//--
//-- Author: Yves Schutz (SUBATECH) 
// Reconstruction class. Redesigned from the old AliReconstructionner class and 
// derived from STEER/AliReconstructor. 
//_________________________________________________________________________

// --- ROOT system ---

#include <Riostream.h>
#include "AliReconstructor.h" 
#include "AliPHOSRecoParam.h"
class AliPHOSDigitizer ;
class AliPHOSClusterizer ;
class AliPHOSClusterizerv1 ;
class AliPHOSTrackSegmentMaker ;
class AliPHOSPID ;
class AliPHOSSDigitizer ;
class AliESDEvent ;
class AliRawReader; 
class AliPHOSRecoParam;
class AliPHOSGeometry;
class AliPHOSCalibData ;
class AliPHOSTriggerParameters;

// --- Standard library ---

// --- AliRoot header files ---

class AliPHOSReconstructor : public AliReconstructor {

public:

  AliPHOSReconstructor() ; //ctor            
  virtual ~AliPHOSReconstructor() ; //dtor            

  static void                SetDebug()   { fgDebug = kTRUE ; }
  static void                ResetDebug() { fgDebug = kFALSE ; }
  static Bool_t              Debug() { return fgDebug ; }
  AliTracker *CreateTracker() const;
  using AliReconstructor::FillESD;
  virtual void               FillESD(TTree* digitsTree, TTree* clustersTree, 
				     AliESDEvent* esd) const;
  using AliReconstructor::Reconstruct;
  virtual void               Reconstruct(TTree* digitsTree, TTree* clustersTree) const;

  virtual Bool_t             HasDigitConversion() const {return kTRUE;};
  virtual void               ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const;
  virtual Float_t            Calibrate(Float_t amp, Int_t absId) const ;
  virtual Float_t            CalibrateT(Float_t time, Int_t absId, Bool_t isLG) const ;

  void FillMisalMatrixes(AliESDEvent* esd)const ;
  
  static const AliPHOSRecoParam* GetRecoParam() {
    return dynamic_cast<const AliPHOSRecoParam*>(AliReconstructor::GetRecoParam(4)); }
  static Float_t CorrectNonlinearity(Float_t oldEnergy) ;
  
  void readTRUParameters(AliPHOSTriggerParameters* parameters) const;
  
private:
  AliPHOSReconstructor(const AliPHOSReconstructor & rec); // Not implemented
  AliPHOSReconstructor & operator = (const AliPHOSReconstructor &); // Not implemented
  
  static Bool_t fgDebug ; //! verbosity controller
  AliPHOSGeometry          *fGeom;           // pointer to the PHOS geometry
  AliPHOSClusterizerv1     *fClusterizer;    //! PHOS clusterizer
  AliPHOSTrackSegmentMaker *fTSM;            //! PHOS TrackSegmentMaker
  AliPHOSPID               *fPID;            //! PHOS PID maker
  TClonesArray             *fTmpDigLG;       //! Temporary array of LG digits
  static TClonesArray      *fgDigitsArray;   //! Array of PHOS digits
  static TObjArray         *fgEMCRecPoints;  //! Array of EMC rec.points
  static AliPHOSCalibData * fgCalibData ;    //! Calibration database if aval.
  static TClonesArray      *fgTriggerDigits; //! Array of PHOS trigger digits

  ClassDef(AliPHOSReconstructor,10)  // PHOS Reconstruction class

}; 

#endif // ALIPHOSRECONSTRUCTOR_H
 AliPHOSReconstructor.h:1
 AliPHOSReconstructor.h:2
 AliPHOSReconstructor.h:3
 AliPHOSReconstructor.h:4
 AliPHOSReconstructor.h:5
 AliPHOSReconstructor.h:6
 AliPHOSReconstructor.h:7
 AliPHOSReconstructor.h:8
 AliPHOSReconstructor.h:9
 AliPHOSReconstructor.h:10
 AliPHOSReconstructor.h:11
 AliPHOSReconstructor.h:12
 AliPHOSReconstructor.h:13
 AliPHOSReconstructor.h:14
 AliPHOSReconstructor.h:15
 AliPHOSReconstructor.h:16
 AliPHOSReconstructor.h:17
 AliPHOSReconstructor.h:18
 AliPHOSReconstructor.h:19
 AliPHOSReconstructor.h:20
 AliPHOSReconstructor.h:21
 AliPHOSReconstructor.h:22
 AliPHOSReconstructor.h:23
 AliPHOSReconstructor.h:24
 AliPHOSReconstructor.h:25
 AliPHOSReconstructor.h:26
 AliPHOSReconstructor.h:27
 AliPHOSReconstructor.h:28
 AliPHOSReconstructor.h:29
 AliPHOSReconstructor.h:30
 AliPHOSReconstructor.h:31
 AliPHOSReconstructor.h:32
 AliPHOSReconstructor.h:33
 AliPHOSReconstructor.h:34
 AliPHOSReconstructor.h:35
 AliPHOSReconstructor.h:36
 AliPHOSReconstructor.h:37
 AliPHOSReconstructor.h:38
 AliPHOSReconstructor.h:39
 AliPHOSReconstructor.h:40
 AliPHOSReconstructor.h:41
 AliPHOSReconstructor.h:42
 AliPHOSReconstructor.h:43
 AliPHOSReconstructor.h:44
 AliPHOSReconstructor.h:45
 AliPHOSReconstructor.h:46
 AliPHOSReconstructor.h:47
 AliPHOSReconstructor.h:48
 AliPHOSReconstructor.h:49
 AliPHOSReconstructor.h:50
 AliPHOSReconstructor.h:51
 AliPHOSReconstructor.h:52
 AliPHOSReconstructor.h:53
 AliPHOSReconstructor.h:54
 AliPHOSReconstructor.h:55
 AliPHOSReconstructor.h:56
 AliPHOSReconstructor.h:57
 AliPHOSReconstructor.h:58
 AliPHOSReconstructor.h:59
 AliPHOSReconstructor.h:60
 AliPHOSReconstructor.h:61
 AliPHOSReconstructor.h:62
 AliPHOSReconstructor.h:63
 AliPHOSReconstructor.h:64
 AliPHOSReconstructor.h:65
 AliPHOSReconstructor.h:66
 AliPHOSReconstructor.h:67
 AliPHOSReconstructor.h:68
 AliPHOSReconstructor.h:69
 AliPHOSReconstructor.h:70
 AliPHOSReconstructor.h:71
 AliPHOSReconstructor.h:72
 AliPHOSReconstructor.h:73
 AliPHOSReconstructor.h:74
 AliPHOSReconstructor.h:75
 AliPHOSReconstructor.h:76
 AliPHOSReconstructor.h:77
 AliPHOSReconstructor.h:78
 AliPHOSReconstructor.h:79
 AliPHOSReconstructor.h:80
 AliPHOSReconstructor.h:81
 AliPHOSReconstructor.h:82
 AliPHOSReconstructor.h:83
 AliPHOSReconstructor.h:84
 AliPHOSReconstructor.h:85
 AliPHOSReconstructor.h:86
 AliPHOSReconstructor.h:87
 AliPHOSReconstructor.h:88
 AliPHOSReconstructor.h:89
 AliPHOSReconstructor.h:90
 AliPHOSReconstructor.h:91
 AliPHOSReconstructor.h:92
 AliPHOSReconstructor.h:93
 AliPHOSReconstructor.h:94
 AliPHOSReconstructor.h:95
 AliPHOSReconstructor.h:96
 AliPHOSReconstructor.h:97
 AliPHOSReconstructor.h:98
 AliPHOSReconstructor.h:99
 AliPHOSReconstructor.h:100
 AliPHOSReconstructor.h:101
 AliPHOSReconstructor.h:102
 AliPHOSReconstructor.h:103
 AliPHOSReconstructor.h:104
 AliPHOSReconstructor.h:105
 AliPHOSReconstructor.h:106
 AliPHOSReconstructor.h:107
 AliPHOSReconstructor.h:108
 AliPHOSReconstructor.h:109
 AliPHOSReconstructor.h:110
 AliPHOSReconstructor.h:111
 AliPHOSReconstructor.h:112
 AliPHOSReconstructor.h:113
 AliPHOSReconstructor.h:114
 AliPHOSReconstructor.h:115
 AliPHOSReconstructor.h:116
 AliPHOSReconstructor.h:117