Implementation of reconstructors (T.Kuhr)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Apr 2004 13:00:03 +0000 (13:00 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Apr 2004 13:00:03 +0000 (13:00 +0000)
38 files changed:
FMD/AliFMD.h
FMD/AliFMDReconstruction.h [deleted file]
FMD/AliFMDReconstructor.cxx [moved from FMD/AliFMDReconstruction.cxx with 79% similarity]
FMD/AliFMDReconstructor.h [new file with mode: 0644]
FMD/FMDLinkDef.h
FMD/libFMD.pkg
ITS/AliITS.cxx
ITS/AliITS.h
ITS/AliITSReconstructor.cxx [new file with mode: 0644]
ITS/AliITSReconstructor.h [new file with mode: 0644]
ITS/ITSLinkDef.h
ITS/libITS.pkg
RICH/AliRICH.cxx
RICH/AliRICH.h
RICH/AliRICHReconstructor.cxx [new file with mode: 0644]
RICH/AliRICHReconstructor.h [new file with mode: 0644]
RICH/RICHLinkDef.h
RICH/libRICH.pkg
START/AliSTART.cxx
START/AliSTART.h
START/AliSTARTReconstructor.cxx [moved from START/AliSTARTvertex.cxx with 90% similarity]
START/AliSTARTReconstructor.h [new file with mode: 0644]
START/AliSTARTvertex.h [deleted file]
START/STARTLinkDef.h
START/libSTART.pkg
TOF/AliTOF.cxx
TOF/AliTOF.h
TOF/AliTOFReconstructor.cxx [new file with mode: 0644]
TOF/AliTOFReconstructor.h [new file with mode: 0644]
TOF/TOFLinkDef.h
TOF/libTOF.pkg
TPC/AliTPCReconstructor.h
TRD/AliTRD.cxx
TRD/AliTRD.h
TRD/AliTRDReconstructor.cxx [new file with mode: 0644]
TRD/AliTRDReconstructor.h [new file with mode: 0644]
TRD/TRDLinkDef.h
TRD/libTRD.pkg

index 8abd5bc..7b95b5d 100644 (file)
@@ -11,8 +11,6 @@
 #include <TBranch.h>
 #include <AliLoader.h>
 
-#include "AliFMDReconstruction.h"
-
 class TClonesArray;
  class AliFMD : public AliDetector {
  
@@ -38,7 +36,6 @@ public:
    
   void SetEventNumber(Int_t i)     {fEvNrSig = i;}
   void  Eta2Radius(Float_t, Float_t, Float_t*);
-  virtual void Reconstruct() const{ AliFMDReconstruction reco(GetLoader()->GetRunLoader()); reco.Exec();}
 
  
    // Digitisation
diff --git a/FMD/AliFMDReconstruction.h b/FMD/AliFMDReconstruction.h
deleted file mode 100644 (file)
index 823a403..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//   Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
-//  See cxx source for full Copyright notice                               
-//  AliFMDReconstruction.h 
-//  Task Class for making TreeR in FMD                        
-//-- Authors: Evgeny Karpechev (INR) and Alla Maevskaia (INR)
-/*
-    Reconstruct nember of particles 
-    in given group of pads for given FMDvolume
-    determine by numberOfVolume , 
-    numberOfMinSector,numberOfMaxSector,
-    numberOfMinRing, numberOfMaxRing
-    Reconstruction method choose dependence on number of empty pads  
-  */
-
-
-#ifndef AliFMDReconstruction_h
-#define AliFMDReconstruction_h
-
-#include "TTask.h"
-class TString;
-class AliFMD;
-
-class AliRunLoader;
-
-class AliFMDReconstruction: public TTask 
-{
- public:
-  AliFMDReconstruction() ; 
-  AliFMDReconstruction(AliRunLoader* rl) ; 
-  virtual ~AliFMDReconstruction();
-  virtual void  Exec(); 
-  void SetNEvents(Int_t Nevents){fNevents = Nevents;}
-  Stat_t GetNEvents()  {return fNevents;}
-  TClonesArray *Digits() {return fDigits;}
-  
- private:
-  TClonesArray *fDigits;               // ! array with digits
-  Int_t   fNevents ;                         // Number of events
-  
-  AliRunLoader* fRunLoader;  //!Run Loader of that event
-  
-  ClassDef(AliFMDReconstruction,2) 
-
-
-}; 
-#endif
-
-
-
-
-
-
-
-
-
similarity index 79%
rename from FMD/AliFMDReconstruction.cxx
rename to FMD/AliFMDReconstructor.cxx
index 5062d61..085c91a 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 //_________________________________________________________________________
-// This is a TTask that constructs ReconstParticles (reconstructed particles) 
+// This is a class that constructs ReconstParticles (reconstructed particles) 
 // out of Digits
 // 
 //-- Authors: Evgeny Karpechev(INR) and Alla Maevsksia
 #include "AliFMDReconstParticles.h"
 #include "AliFMD.h"
 #include "AliFMDv1.h"
-#include "AliFMDReconstruction.h"
+#include "AliFMDReconstructor.h"
 #include "AliRun.h"
 #include "AliConfig.h"
 #include "AliHeader.h"
 #include "AliGenEventHeader.h"
 
-ClassImp(AliFMDReconstruction)
+ClassImp(AliFMDReconstructor)
 
         
-//____________________________________________________________________________ 
-
-AliFMDReconstruction::AliFMDReconstruction():TTask("AliFMDReconstruction","") 
-{
-  fNevents = 0 ;  // Number of events to rreconnstraction, 0 means all events in current file
-  fRunLoader = 0x0;
-  
-}
-//____________________________________________________________________________ 
-
-AliFMDReconstruction::AliFMDReconstruction(AliRunLoader* rl):TTask("AliFMDReconstruction","")
-{
-
-  if (rl == 0x0)
-   {
-     Fatal("AliFMDReconstruction","Argument AliRunLoader* is null!");
-     return;
-   }
-   
-  fNevents = 0 ;    // Number of events to rreconnstraction, 0 means all events in current file
-
-  fRunLoader = rl;
-  AliLoader* plFMD = fRunLoader->GetLoader("FMDLoader");
-  if (plFMD == 0x0)
-   {
-     Fatal("AliFMDReconstruction","Can not find FMD (loader) in specified event");
-     return;//never reached
-   }
-  //add Task to //root/Tasks folder
-//  gime->PostReconstructioner(this);
-}
-
-//____________________________________________________________________________ 
-
-AliFMDReconstruction::~AliFMDReconstruction()
-{
-  AliLoader* plFMD = fRunLoader->GetLoader("FMDLoader");
-  plFMD->CleanReconstructioner();
-}
-
 //____________________________________________________________________________
 
-void AliFMDReconstruction::Exec() 
+void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
 { 
  //Collects all digits in the same active volume into number of particles
   /*
@@ -103,7 +63,7 @@ void AliFMDReconstruction::Exec()
     determine by numberOfVolume , 
     numberOfMinSector,numberOfMaxSector,
     numberOfMinRing, numberOgMaxRing
-    Reconstruction method choose dependence on number of empty pads  
+    Reconstructor method choose dependence on number of empty pads  
   */
 
 
@@ -124,21 +84,21 @@ void AliFMDReconstruction::Exec()
   // number of ring for boundary 0.1 eta
 
   
-  if (fRunLoader == 0x0)
+  if (runLoader == 0x0)
    {
     Error("Exec","Run Loader loader is NULL - Session not opened");
     return;
    }
 
-  AliLoader* plFMD = fRunLoader->GetLoader("FMDLoader");
+  AliLoader* plFMD = runLoader->GetLoader("FMDLoader");
   if (plFMD == 0x0)
    {
-     Fatal("AliFMDReconstruction","Can not find FMD (loader) in specified event");
+     Fatal("AliFMDReconstructor","Can not find FMD (loader) in specified event");
      return;//never reached
    }
    
-  if (!fRunLoader->GetAliRun()) fRunLoader->LoadgAlice();
-  if (!fRunLoader->TreeE()) fRunLoader->LoadHeader();
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  if (!runLoader->TreeE()) runLoader->LoadHeader();
 
   TDirectory* cwd = gDirectory;
   gDirectory = 0x0;
@@ -153,19 +113,20 @@ void AliFMDReconstruction::Exec()
   }   
   gDirectory = cwd;
  
+  plFMD->LoadRecPoints("RECREATE");
   Int_t retval=0;     
-  if(fNevents == 0) fNevents=Int_t (fRunLoader->TreeE()->GetEntries()); 
+  Int_t nevents=Int_t (runLoader->TreeE()->GetEntries()); 
 #ifdef DEBUG
-  cout<<" fNevents "<<fNevents<<endl;
+  cout<<" nevents "<<nevents<<endl;
 #endif
-   for(Int_t ievent=0;ievent<fNevents;ievent++)
+   for(Int_t ievent=0;ievent<nevents;ievent++)
     { 
 #ifdef DEBUG
       cout<<" *** event "<<ievent<<endl; 
 #endif
-      fRunLoader->GetEvent(ievent) ;
+      runLoader->GetEvent(ievent) ;
       //event z-vertex for correction eta-rad dependence      
-      AliHeader *header = fRunLoader->GetHeader();
+      AliHeader *header = runLoader->GetHeader();
       AliGenEventHeader* genHeader = header->GenEventHeader();
       TArrayF *o = new TArrayF(3); 
       genHeader->PrimaryVertex(*o);
@@ -298,6 +259,7 @@ void AliFMDReconstruction::Exec()
        plFMD->WriteRecPoints("OVERWRITE");
        plFMD->UnloadDigits();
     } //event loop
+  plFMD->UnloadRecPoints();
 #ifdef DEBUG
   Info(" Exec"," finished");
 #endif
@@ -305,3 +267,12 @@ void AliFMDReconstruction::Exec()
 
 }
 
+
+//_____________________________________________________________________________
+void AliFMDReconstructor::FillESD(AliRunLoader* /*runLoader*/, 
+                                 AliESD* /*esd*/) const
+{
+// nothing to be done
+
+}
+
diff --git a/FMD/AliFMDReconstructor.h b/FMD/AliFMDReconstructor.h
new file mode 100644 (file)
index 0000000..5d638c5
--- /dev/null
@@ -0,0 +1,45 @@
+//   Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
+//  See cxx source for full Copyright notice                               
+//  AliFMDReconstructor.h 
+//  Task Class for making TreeR in FMD                        
+//-- Authors: Evgeny Karpechev (INR) and Alla Maevskaia (INR)
+/*
+    Reconstruct nember of particles 
+    in given group of pads for given FMDvolume
+    determine by numberOfVolume , 
+    numberOfMinSector,numberOfMaxSector,
+    numberOfMinRing, numberOfMaxRing
+    Reconstruction method choose dependence on number of empty pads  
+  */
+/* $Id$ */
+
+
+#ifndef ALIFMDRECONSTRUCTOR_H
+#define ALIFMDRECONSTRUCTOR_H
+
+#include "AliReconstructor.h"
+
+
+class AliFMDReconstructor: public AliReconstructor 
+{
+ public:
+  AliFMDReconstructor(): AliReconstructor() {}; 
+  virtual ~AliFMDReconstructor() {};
+
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+  
+  ClassDef(AliFMDReconstructor, 0)  // class for the FMD reconstruction
+
+
+}; 
+#endif
+
+
+
+
+
+
+
+
+
index 038661e..b19329d 100644 (file)
@@ -13,7 +13,7 @@
 #pragma link C++ class  AliFMDv1+;
 #pragma link C++ class  AliFMDhit+;
 #pragma link C++ class  AliFMDdigit+;
-#pragma link C++ class  AliFMDReconstruction+;
+#pragma link C++ class  AliFMDReconstructor+;
 #pragma link C++ class  AliFMDReconstParticles+;
 #pragma link C++ class  AliFMDDigitizer+;
 
index c4e6f6f..8e43729 100644 (file)
@@ -1,4 +1,4 @@
-SRCS= AliFMD.cxx AliFMDv0.cxx AliFMDv1.cxx AliFMDhit.cxx AliFMDdigit.cxx  AliFMDReconstruction.cxx AliFMDReconstParticles.cxx AliFMDDigitizer.cxx
+SRCS= AliFMD.cxx AliFMDv0.cxx AliFMDv1.cxx AliFMDhit.cxx AliFMDdigit.cxx  AliFMDReconstructor.cxx AliFMDReconstParticles.cxx AliFMDDigitizer.cxx
 
 
 HDRS= $(SRCS:.cxx=.h)
index c63ac64..a009385 100644 (file)
@@ -111,17 +111,6 @@ the AliITS class.
 #include "AliMC.h"
 #include "AliITSDigitizer.h"
 #include "AliITSDDLRawData.h"
-#include "AliITSclustererV2.h"
-#include "AliITStrackerV2.h"
-#include "AliITStrackerSA.h"
-#include "AliITSpidESD.h"
-#include "AliV0vertexer.h"
-#include "AliITSVertexerPPZ.h"
-#include "AliITSVertexerFast.h"
-#include "AliITSVertexerZ.h"
-#include "AliITSVertexerIons.h"
-#include "AliCascadeVertexer.h"
-#include "AliESD.h"
 #include "AliRun.h"
 
 ClassImp(AliITS)
@@ -1834,111 +1823,3 @@ AliLoader* AliITS::MakeLoader(const char* topfoldername)
   return fLoader;
 }
 
-
-//_____________________________________________________________________________
-void AliITS::Reconstruct() const
-{
-// reconstruct clusters
-
-  AliLoader* loader = GetLoader();
-  loader->LoadRecPoints("recreate");
-  loader->LoadDigits("read");
-
-  AliITSclustererV2 clusterer(GetITSgeom());
-  AliRunLoader* runLoader = loader->GetRunLoader();
-  Int_t nEvents = runLoader->GetNumberOfEvents();
-  runLoader->LoadKinematics();
-
-  for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
-    runLoader->GetEvent(iEvent);
-
-    TTree* treeClusters = loader->TreeR();
-    if (!treeClusters) {
-      loader->MakeTree("R");
-      treeClusters = loader->TreeR();
-    }
-    TTree* treeDigits = loader->TreeD();
-    if (!treeDigits) {
-      Error("Reconstruct", "Can't get digits tree !");
-      return;
-    }
-
-    clusterer.Digits2Clusters(treeDigits, treeClusters);
-         
-    loader->WriteRecPoints("OVERWRITE");
-  }
-
-  loader->UnloadRecPoints();
-  loader->UnloadDigits();
-}
-
-//_____________________________________________________________________________
-AliTracker* AliITS::CreateTracker() const
-{
-// create an ITS tracker
-
-  return new AliITStrackerSA(GetITSgeom());
-}
-//_____________________________________________________________________________
-AliVertexer* AliITS::CreateVertexer() const
-{
-  // create a ITS vertexer
-
-  if(fSelectedVertexer.Contains("ions") || fSelectedVertexer.Contains("IONS")){
-    Info("CreateVertexer","a AliITSVertexerIons object has been selected\n");
-    return new AliITSVertexerIons("null");
-  }
-  if(fSelectedVertexer.Contains("smear") || fSelectedVertexer.Contains("SMEAR")){
-    Double_t smear[3]={0.005,0.005,0.01};
-    Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); 
-    return new AliITSVertexerFast(smear);
-  }
-  if(fSelectedVertexer.Contains("ppz") || fSelectedVertexer.Contains("PPZ")){
-    Info("CreateVertexer","a AliITSVertexerPPZ object has been selected\n");
-    return new AliITSVertexerPPZ("null");
-  }
-  // by default an AliITSVertexerZ object is instatiated
-  Info("CreateVertexer","a AliITSVertexerZ object has been selected\n");
-  return new AliITSVertexerZ("null");
-}
-
-//_____________________________________________________________________________
-void AliITS::FillESD(AliESD* esd) const
-{
-// make PID, find V0s and cascades
-
-  Double_t parITS[] = {34., 0.15, 10.};
-  AliITSpidESD itsPID(parITS);
-  itsPID.MakePID(esd);
-
-  // V0 finding
-  Double_t cuts[]={33,  // max. allowed chi2
-                  0.16,// min. allowed negative daughter's impact parameter 
-                  0.05,// min. allowed positive daughter's impact parameter 
-                  0.08,// max. allowed DCA between the daughter tracks
-                  0.99,// max. allowed cosine of V0's pointing angle
-                  0.9,  // min. radius of the fiducial volume
-                  2.9   // max. radius of the fiducial volume
-  };
-  AliV0vertexer vtxer(cuts);
-  Double_t vtx[3], cvtx[6];
-  esd->GetVertex()->GetXYZ(vtx);
-  esd->GetVertex()->GetSigmaXYZ(cvtx);
-  vtxer.SetVertex(vtx);
-  vtxer.Tracks2V0vertices(esd);
-
-  // cascade finding
-  Double_t cts[]={33.,    // max. allowed chi2
-                 0.05,   // min. allowed V0 impact parameter 
-                 0.008,  // window around the Lambda mass 
-                 0.035,  // min. allowed bachelor's impact parameter 
-                 0.10,   // max. allowed DCA between a V0 and a track
-                 0.9985, //max. allowed cosine of the cascade pointing angle
-                 0.9,    // min. radius of the fiducial volume
-                 2.9     // max. radius of the fiducial volume
-  };
-  AliCascadeVertexer cvtxer=AliCascadeVertexer(cts);
-  cvtxer.SetVertex(vtx);
-  cvtxer.V0sTracks2CascadeVertices(esd);
-}
-
index b801836..acf9f37 100644 (file)
@@ -181,11 +181,6 @@ class AliITS : public AliDetector {
     // Return pointer to rec points 
     TClonesArray  *RecPoints()   {return fRecPoints;}
 
-    virtual void Reconstruct() const;
-    virtual AliTracker* CreateTracker() const;
-    virtual AliVertexer* CreateVertexer() const;
-    virtual void FillESD(AliESD* esd) const;
-     
  protected:
     //================== Data Members ==================================
     AliITSgeom   *fITSgeom;    // Pointer to ITS geometry
diff --git a/ITS/AliITSReconstructor.cxx b/ITS/AliITSReconstructor.cxx
new file mode 100644 (file)
index 0000000..affa4fb
--- /dev/null
@@ -0,0 +1,183 @@
+/**************************************************************************
+ * 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$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for ITS reconstruction                                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "AliITSReconstructor.h"
+#include "AliRunLoader.h"
+#include "AliITSclustererV2.h"
+#include "AliITStrackerSA.h"
+#include "AliITSVertexerIons.h"
+#include "AliITSVertexerFast.h"
+#include "AliITSVertexerPPZ.h"
+#include "AliITSVertexerZ.h"
+#include "AliESD.h"
+#include "AliITSpidESD.h"
+#include "AliV0vertexer.h"
+#include "AliCascadeVertexer.h"
+#include "AliRun.h"
+#include "AliITS.h"
+
+
+ClassImp(AliITSReconstructor)
+
+
+//_____________________________________________________________________________
+void AliITSReconstructor::Reconstruct(AliRunLoader* runLoader) const
+{
+// reconstruct clusters
+
+  AliLoader* loader = runLoader->GetLoader("ITSLoader");
+  if (!loader) {
+    Error("Reconstruct", "ITS loader not found");
+    return;
+  }
+  loader->LoadRecPoints("recreate");
+  loader->LoadDigits("read");
+  runLoader->LoadKinematics();
+
+  AliITSgeom* geom = GetITSgeom(runLoader);
+  if (!geom) return;
+  AliITSclustererV2 clusterer(geom);
+  Int_t nEvents = runLoader->GetNumberOfEvents();
+
+  for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
+    runLoader->GetEvent(iEvent);
+
+    TTree* treeClusters = loader->TreeR();
+    if (!treeClusters) {
+      loader->MakeTree("R");
+      treeClusters = loader->TreeR();
+    }
+    TTree* treeDigits = loader->TreeD();
+    if (!treeDigits) {
+      Error("Reconstruct", "Can't get digits tree !");
+      return;
+    }
+
+    clusterer.Digits2Clusters(treeDigits, treeClusters);
+         
+    loader->WriteRecPoints("OVERWRITE");
+  }
+
+  loader->UnloadRecPoints();
+  loader->UnloadDigits();
+  runLoader->UnloadKinematics();
+}
+
+//_____________________________________________________________________________
+AliTracker* AliITSReconstructor::CreateTracker(AliRunLoader* runLoader) const
+{
+// create a ITS tracker
+
+  AliITSgeom* geom = GetITSgeom(runLoader);
+  if (!geom) return NULL;
+  return new AliITStrackerSA(geom);
+}
+
+//_____________________________________________________________________________
+AliVertexer* AliITSReconstructor::CreateVertexer(AliRunLoader* /*runLoader*/) const
+{
+// create a ITS vertexer
+
+  TString selectedVertexer(" ");
+  if(selectedVertexer.Contains("ions") || selectedVertexer.Contains("IONS")){
+    Info("CreateVertexer","a AliITSVertexerIons object has been selected\n");
+    return new AliITSVertexerIons("null");
+  }
+  if(selectedVertexer.Contains("smear") || selectedVertexer.Contains("SMEAR")){
+    Double_t smear[3]={0.005,0.005,0.01};
+    Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); 
+    return new AliITSVertexerFast(smear);
+  }
+  if(selectedVertexer.Contains("ppz") || selectedVertexer.Contains("PPZ")){
+    Info("CreateVertexer","a AliITSVertexerPPZ object has been selected\n");
+    return new AliITSVertexerPPZ("null");
+  }
+  // by default an AliITSVertexerZ object is instatiated
+  Info("CreateVertexer","a AliITSVertexerZ object has been selected\n");
+  return new AliITSVertexerZ("null");
+}
+
+//_____________________________________________________________________________
+void AliITSReconstructor::FillESD(AliRunLoader* /*runLoader*/, 
+                                 AliESD* esd) const
+{
+// make PID, find V0s and cascades
+
+  Double_t parITS[] = {34., 0.15, 10.};
+  AliITSpidESD itsPID(parITS);
+  itsPID.MakePID(esd);
+
+  // V0 finding
+  Double_t cuts[]={33,  // max. allowed chi2
+                  0.16,// min. allowed negative daughter's impact parameter 
+                  0.05,// min. allowed positive daughter's impact parameter 
+                  0.08,// max. allowed DCA between the daughter tracks
+                  0.99,// max. allowed cosine of V0's pointing angle
+                  0.9,  // min. radius of the fiducial volume
+                  2.9   // max. radius of the fiducial volume
+  };
+  AliV0vertexer vtxer(cuts);
+  Double_t vtx[3], cvtx[6];
+  esd->GetVertex()->GetXYZ(vtx);
+  esd->GetVertex()->GetSigmaXYZ(cvtx);
+  vtxer.SetVertex(vtx);
+  vtxer.Tracks2V0vertices(esd);
+
+  // cascade finding
+  Double_t cts[]={33.,    // max. allowed chi2
+                 0.05,   // min. allowed V0 impact parameter 
+                 0.008,  // window around the Lambda mass 
+                 0.035,  // min. allowed bachelor's impact parameter 
+                 0.10,   // max. allowed DCA between a V0 and a track
+                 0.9985, //max. allowed cosine of the cascade pointing angle
+                 0.9,    // min. radius of the fiducial volume
+                 2.9     // max. radius of the fiducial volume
+  };
+  AliCascadeVertexer cvtxer=AliCascadeVertexer(cts);
+  cvtxer.SetVertex(vtx);
+  cvtxer.V0sTracks2CascadeVertices(esd);
+}
+
+
+//_____________________________________________________________________________
+AliITSgeom* AliITSReconstructor::GetITSgeom(AliRunLoader* runLoader) const
+{
+// get the ITS geometry
+
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  if (!runLoader->GetAliRun()) {
+    Error("GetITSgeom", "couldn't get AliRun object");
+    return NULL;
+  }
+  AliITS* its = (AliITS*) runLoader->GetAliRun()->GetDetector("ITS");
+  if (!its) {
+    Error("GetITSgeom", "couldn't get ITS detector");
+    return NULL;
+  }
+  if (!its->GetITSgeom()) {
+    Error("GetITSgeom", "no ITS geometry available");
+    return NULL;
+  }
+  return its->GetITSgeom();
+}
diff --git a/ITS/AliITSReconstructor.h b/ITS/AliITSReconstructor.h
new file mode 100644 (file)
index 0000000..5bdadd0
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef ALIITSRECONSTRUCTOR_H
+#define ALIITSRECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include "AliReconstructor.h"
+
+class AliITSgeom;
+
+
+class AliITSReconstructor: public AliReconstructor {
+public:
+  AliITSReconstructor(): AliReconstructor() {};
+  virtual ~AliITSReconstructor() {};
+
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual AliTracker*  CreateTracker(AliRunLoader* runLoader) const;
+  virtual AliVertexer* CreateVertexer(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+
+private:
+  AliITSgeom*          GetITSgeom(AliRunLoader* runLoader) const;
+
+  ClassDef(AliITSReconstructor, 0)   // class for the ITS reconstruction
+};
+
+#endif
index 53861d3..14c6a28 100644 (file)
 #pragma link C++ class AliITStrackSA+;
 #pragma link C++ class AliITSVertexerFast+;
 
+#pragma link C++ class AliITSReconstructor+;
+
 //
 //#pragma link C++ class AliACORDEFunction+;
 //#pragma link C++ class AliACORDEMaterial+;
index 13cdf89..2b07bae 100644 (file)
@@ -101,6 +101,7 @@ SRCS =      AliITS.cxx \
                AliITSBaseGeometry.cxx \
           AliITSv11Geometry.cxx \
           AliITSv11GeometrySupport.cxx \
+               AliITSReconstructor.cxx \
 
 #              AliITSAlignmentTrack.cxx AliITSAlignmentModule.cxx \
 #              AliACORDEFunctions.cxx \
index 3092532..2a8acba 100644 (file)
@@ -16,7 +16,6 @@
 #include "AliRICH.h"
 #include "AliRICHParam.h"
 #include "AliRICHChamber.h"
-#include "AliRICHClusterFinder.h"
 #include <TArrayF.h>
 #include <TGeometry.h>
 #include <TBRIK.h>
@@ -735,13 +734,4 @@ void AliRICH::GenerateFeedbacks(Int_t iChamber,Float_t eloss)
                      1.0);    
   }//feedbacks loop
 }//GenerateFeedbacks()
-//__________________________________________________________________________________________________
-
-void AliRICH::Reconstruct() const
-{
-// reconstruct clusters
-
-  AliRICHClusterFinder clusterer(const_cast<AliRICH*>(this));
-  clusterer.Exec();
-}
 
index c6aa8db..88a51e8 100644 (file)
@@ -221,8 +221,6 @@ public:
   void AddReco(Int_t tid,Double_t thetaCherenkov,Int_t nPhotons) 
        {TClonesArray &tmp=*(TClonesArray*)fRecos;new(tmp[fNrecos++])AliRICHreco(tid,thetaCherenkov,nPhotons);}  
           
-  virtual void Reconstruct() const;
-
 protected:  
   enum                  {kCSI=6,kGAP=9};
   AliRICHParam         *fpParam;             //main RICH parametrization     
diff --git a/RICH/AliRICHReconstructor.cxx b/RICH/AliRICHReconstructor.cxx
new file mode 100644 (file)
index 0000000..581478b
--- /dev/null
@@ -0,0 +1,70 @@
+/**************************************************************************
+ * 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$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for RICH reconstruction                                             //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "AliRICHReconstructor.h"
+#include "AliRunLoader.h"
+#include "AliRun.h"
+#include "AliRICHClusterFinder.h"
+
+
+ClassImp(AliRICHReconstructor)
+
+
+//_____________________________________________________________________________
+void AliRICHReconstructor::Reconstruct(AliRunLoader* runLoader) const
+{
+// reconstruct clusters
+
+  AliRICH* rich = GetRICH(runLoader);
+  if (!rich) return;
+  AliRICHClusterFinder clusterer(rich);
+  clusterer.Exec();
+}
+
+//_____________________________________________________________________________
+void AliRICHReconstructor::FillESD(AliRunLoader* /*runLoader*/, 
+                                  AliESD* /*esd*/) const
+{
+// nothing to be done
+
+}
+
+
+//_____________________________________________________________________________
+AliRICH* AliRICHReconstructor::GetRICH(AliRunLoader* runLoader) const
+{
+// get the RICH detector
+
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  if (!runLoader->GetAliRun()) {
+    Error("GetRICH", "couldn't get AliRun object");
+    return NULL;
+  }
+  AliRICH* rich = (AliRICH*) runLoader->GetAliRun()->GetDetector("RICH");
+  if (!rich) {
+    Error("GetRICH", "couldn't get RICH detector");
+    return NULL;
+  }
+  return rich;
+}
diff --git a/RICH/AliRICHReconstructor.h b/RICH/AliRICHReconstructor.h
new file mode 100644 (file)
index 0000000..a17c42d
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef ALIRICHRECONSTRUCTOR_H
+#define ALIRICHRECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include "AliReconstructor.h"
+
+class AliRICH;
+
+
+class AliRICHReconstructor: public AliReconstructor {
+public:
+  AliRICHReconstructor(): AliReconstructor() {};
+  virtual ~AliRICHReconstructor() {};
+
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+
+private:
+  AliRICH*             GetRICH(AliRunLoader* runLoader) const;
+
+  ClassDef(AliRICHReconstructor, 0)   // class for the RICH reconstruction
+};
+
+#endif
index 7773e52..12ee6f0 100644 (file)
@@ -18,4 +18,5 @@
 #pragma link C++ class  AliRICHRecon+;
 #pragma link C++ class  AliRICHDigitizer+;
 #pragma link C++ class  AliRICHDisplFast+;
+#pragma link C++ class  AliRICHReconstructor+;
 #endif
index f12495f..305f020 100644 (file)
@@ -3,7 +3,7 @@ SRCS   =  AliRICH.cxx AliRICHv0.cxx AliRICHv1.cxx\
         AliRICHClusterFinder.cxx AliRICHMap.cxx\
         AliRICHChamber.cxx AliRICHRecon.cxx\
          AliRICHDisplFast.cxx\
-        AliRICHDigitizer.cxx
+        AliRICHDigitizer.cxx AliRICHReconstructor.cxx
 
 HDRS =  $(SRCS:.cxx=.h)
 DHDR= RICHLinkDef.h
index e6146b3..bbad099 100755 (executable)
@@ -270,11 +270,3 @@ AliDigitizer* AliSTART::CreateDigitizer(AliRunDigitizer* manager) const
 {
   return new AliSTARTDigitizer(manager);
 }
-
-//_____________________________________________________________________________
-void AliSTART::FillESD(AliESD* pESD)  const
-{
-  AliSTARTvertex reco;
-  reco.Reconstruct(fLoader->GetRunLoader(), pESD);
-}
-
index e38fc4e..d5310b9 100755 (executable)
@@ -9,7 +9,6 @@
  
 #include <AliDetector.h>
 #include <TTree.h>
-#include "AliSTARTvertex.h"
 
 class TDirectory;
 class TFile;
@@ -47,8 +46,6 @@ public:
   TClonesArray   *Photons() {return fPhotons;}
 
    virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
-   //  virtual void   Reconstruct()    const{ AliSTARTvertex reco; reco.Reconstruct();}
-   virtual void          FillESD(AliESD* pESD)  const;
 
 protected:
    Int_t fIdSens;    // Sensetive Cherenkov radiator
similarity index 90%
rename from START/AliSTARTvertex.cxx
rename to START/AliSTARTReconstructor.cxx
index 7c12c1d..b40ec4f 100644 (file)
 /* $Id$ */
 
 #include <Riostream.h>
-#include <stdlib.h>
 
 #include <TDirectory.h>
-#include <TVirtualMC.h>
 
-#include <AliRun.h>
 #include <AliRunLoader.h>
-#include "AliSTART.h"
 #include "AliSTARTLoader.h"
 #include "AliSTARTdigit.h"
-#include "AliSTARThit.h"
-#include "AliSTARTvertex.h"
+#include "AliSTARTReconstructor.h"
 #include <AliESD.h>
 
-ClassImp(AliSTARTvertex)
+ClassImp(AliSTARTReconstructor)
 
-void AliSTARTvertex::Reconstruct(AliRunLoader* rl, AliESD *pESD) 
+void AliSTARTReconstructor::Reconstruct(AliRunLoader* /*rl*/) const
+{
+// nothing to be done
+
+}
+
+void AliSTARTReconstructor::FillESD(AliRunLoader* rl, AliESD *pESD) const
 {
   /***************************************************
   Resonstruct digits to vertex position
@@ -72,7 +73,6 @@ void AliSTARTvertex::Reconstruct(AliRunLoader* rl, AliESD *pESD)
           <<" Zposit "<<Zposit<<endl;
     }
     
-    fZposition = Zposit;
     pESD->SetT0zVertex(Zposit);
     
     if (rl->GetDebug()>1) {
diff --git a/START/AliSTARTReconstructor.h b/START/AliSTARTReconstructor.h
new file mode 100644 (file)
index 0000000..dd6e800
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef ALISTARTRECONSTRUCTOR_H
+#define ALISTARTRECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include "AliReconstructor.h"
+
+
+class AliSTARTReconstructor: public AliReconstructor {
+public:
+  AliSTARTReconstructor(): AliReconstructor() {};
+  virtual ~AliSTARTReconstructor() {};
+
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+
+  ClassDef(AliSTARTReconstructor, 0)   // class for the START reconstruction
+};
+
+#endif
diff --git a/START/AliSTARTvertex.h b/START/AliSTARTvertex.h
deleted file mode 100644 (file)
index 16b0ff9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef STARTVERTEX_H
-#define STARTVERTEX_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-
-
-#include <AliESD.h>
-
-//___________________________________________
-class AliSTARTvertex   : public TObject {
-
-
-////////////////////////////////////////////////////////////////////////
- public:
-  AliSTARTvertex():TObject(),fZposition(0) {}
-  virtual ~AliSTARTvertex() {}
-
-  void Reconstruct(AliRunLoader* runLoader, AliESD *pESD);
-
-  Float_t GetVertex() const {return fZposition;}
-  void SetVertex(Float_t zPosition) {fZposition=zPosition;}
-
- private:
-    Float_t fZposition;        // Z position of vertex (mm)
-
-    ClassDef(AliSTARTvertex,1)  //Reconstructive vertex (Header) object 
-};
-#endif
index dd63c3e..3151500 100755 (executable)
@@ -14,7 +14,7 @@
 #pragma link C++ class  AliSTARThit+;
 #pragma link C++ class  AliSTARThitPhoton+;
 #pragma link C++ class  AliSTARTdigit+;
-#pragma link C++ class  AliSTARTvertex+;
+#pragma link C++ class  AliSTARTReconstructor+;
 #pragma link C++ class  AliSTARTDigitizer+;
 #pragma link C++ class  AliSTARTLoader+;
 
index e428355..d8346ee 100644 (file)
@@ -1,4 +1,4 @@
-SRCS= AliSTART.cxx AliSTARTv0.cxx AliSTARTv1.cxx AliSTARThit.cxx AliSTARTdigit.cxx AliSTARTvertex.cxx AliSTARTDigitizer.cxx AliSTARThitPhoton.cxx AliSTARTLoader.cxx 
+SRCS= AliSTART.cxx AliSTARTv0.cxx AliSTARTv1.cxx AliSTARThit.cxx AliSTARTdigit.cxx AliSTARTReconstructor.cxx AliSTARTDigitizer.cxx AliSTARThitPhoton.cxx AliSTARTLoader.cxx 
 
 HDRS= $(SRCS:.cxx=.h)
 
index 92a5f67..7ef0943 100644 (file)
@@ -71,7 +71,6 @@
 #include "AliTOFhitT0.h"
 #include "AliMC.h"
 #include "AliTOFDigitizer.h"
-#include "AliTOFtracker.h"
  
 ClassImp(AliTOF)
  
@@ -985,12 +984,3 @@ void AliTOF::CreateSDigitsArray() {
   fSDigits       = new TClonesArray("AliTOFSDigit",  1000);
 }
 
-////////////////////////////////////////////////////////////////////////
-AliTracker* AliTOF::CreateTracker() const
-{
-// create a TOF tracker
-
-  Double_t parPID[] = {130., 5.};
-  return new AliTOFtracker(GetGeometry(), parPID);
-}
-
index 17ff7ec..d271a9f 100644 (file)
@@ -91,8 +91,6 @@ public:
   void CreateSDigitsArray();
   AliTOFGeometry *GetGeometry() const { return fTOFGeometry; }; 
 
-  virtual AliTracker* CreateTracker() const;
-
   Int_t   fNevents ;        // Number of events to digitize
 
 protected:
diff --git a/TOF/AliTOFReconstructor.cxx b/TOF/AliTOFReconstructor.cxx
new file mode 100644 (file)
index 0000000..6ff0e34
--- /dev/null
@@ -0,0 +1,82 @@
+/**************************************************************************
+ * 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$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for TOF reconstruction                                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "AliTOFReconstructor.h"
+#include "AliRunLoader.h"
+#include "AliRun.h"
+#include "AliTOF.h"
+#include "AliTOFtracker.h"
+
+
+ClassImp(AliTOFReconstructor)
+
+
+//_____________________________________________________________________________
+void AliTOFReconstructor::Reconstruct(AliRunLoader* /*runLoader*/) const
+{
+// nothing to be done
+
+}
+
+//_____________________________________________________________________________
+AliTracker* AliTOFReconstructor::CreateTracker(AliRunLoader* runLoader) const
+{
+// create a TOF tracker
+
+  AliTOFGeometry* geom = GetTOFGeometry(runLoader);
+  if (!geom) return NULL;
+  Double_t parPID[] = {130., 5.};
+  return new AliTOFtracker(geom, parPID);
+}
+
+//_____________________________________________________________________________
+void AliTOFReconstructor::FillESD(AliRunLoader* /*runLoader*/, 
+                                 AliESD* /*esd*/) const
+{
+// nothing to be done
+
+}
+
+
+//_____________________________________________________________________________
+AliTOFGeometry* AliTOFReconstructor::GetTOFGeometry(AliRunLoader* runLoader) const
+{
+// get the TOF parameters
+
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  if (!runLoader->GetAliRun()) {
+    Error("GetTOFGeometry", "couldn't get AliRun object");
+    return NULL;
+  }
+  AliTOF* tof = (AliTOF*) runLoader->GetAliRun()->GetDetector("TOF");
+  if (!tof) {
+    Error("GetTOFGeometry", "couldn't get TOF detector");
+    return NULL;
+  }
+  if (!tof->GetGeometry()) {
+    Error("GetTOFGeometry", "no TOF geometry available");
+    return NULL;
+  }
+  return tof->GetGeometry();
+}
diff --git a/TOF/AliTOFReconstructor.h b/TOF/AliTOFReconstructor.h
new file mode 100644 (file)
index 0000000..9db0024
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef ALITOFRECONSTRUCTOR_H
+#define ALITOFRECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include "AliReconstructor.h"
+
+class AliTOFGeometry;
+
+
+class AliTOFReconstructor: public AliReconstructor {
+public:
+  AliTOFReconstructor(): AliReconstructor() {};
+  virtual ~AliTOFReconstructor() {};
+
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual AliTracker*  CreateTracker(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+
+private:
+  AliTOFGeometry*      GetTOFGeometry(AliRunLoader* runLoader) const;
+
+  ClassDef(AliTOFReconstructor, 0)   // class for the TOF reconstruction
+};
+
+#endif
index e2897d9..539205f 100644 (file)
@@ -34,5 +34,6 @@
 
 #pragma link C++ class  AliTOFpidESD+;
 #pragma link C++ class  AliTOFtracker+;
+#pragma link C++ class  AliTOFReconstructor+;
 
 #endif
index 71f2d40..29e61a2 100644 (file)
@@ -2,7 +2,8 @@ SRCS  = AliTOF.cxx  AliTOFGeometry.cxx AliTOFv4T0.cxx  AliTOFhit.cxx  AliTOFhitT
         AliTOFPID.cxx  AliTOFT0.cxx  AliTOFdigit.cxx  AliTOFRawSector.cxx  AliTOFRoc.cxx  \
         AliTOFRawDigit.cxx  AliTOFDigitizer.cxx  AliTOFSDigitizer.cxx  AliTOFMerger.cxx  \
         AliTOFSDigit.cxx  AliTOFHitMap.cxx  AliTOFPad.cxx  AliTOFRecHit.cxx  AliTOFtrack.cxx  \
-        AliTOFProb.cxx  AliTOFDigitMap.cxx  AliTOFpidESD.cxx  AliTOFtracker.cxx
+        AliTOFProb.cxx  AliTOFDigitMap.cxx  AliTOFpidESD.cxx  AliTOFtracker.cxx \
+        AliTOFReconstructor.cxx
 
 
 HDRS:= $(SRCS:.cxx=.h)
index 1831d75..32695b3 100644 (file)
@@ -12,6 +12,9 @@ class AliTPCParam;
 
 class AliTPCReconstructor: public AliReconstructor {
 public:
+  AliTPCReconstructor(): AliReconstructor() {};
+  virtual ~AliTPCReconstructor() {};
+
   virtual void         Reconstruct(AliRunLoader* runLoader) const;
   virtual AliTracker*  CreateTracker(AliRunLoader* runLoader) const;
   virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
index f1afa7b..6b5d36e 100644 (file)
@@ -44,7 +44,6 @@
 #include "AliRun.h"
 #include "AliTRD.h"
 #include "AliTRDcluster.h"
-#include "AliTRDclusterizer.h"
 #include "AliTRDdigit.h"
 #include "AliTRDdigitizer.h"
 #include "AliTRDdigitsManager.h"
@@ -56,9 +55,6 @@
 #include "AliTRDtrackHits.h"  
 #include "AliTrackReference.h"
 #include "AliMC.h"
-#include "AliTRDclusterizerV1.h"
-#include "AliTRDparameter.h"
-#include "AliTRDtracker.h"
 
 ClassImp(AliTRD)
  
@@ -1300,41 +1296,6 @@ void AliTRD::AddHit2(Int_t track, Int_t det, Float_t *hits, Int_t q
 }
 
 
-//_____________________________________________________________________________
-void AliTRD::Reconstruct() const
-{
-// reconstruct clusters
-
-  AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
-  AliRunLoader* runLoader = GetLoader()->GetRunLoader();
-  runLoader->CdGAFile();
-  AliTRDparameter* trdParam = (AliTRDparameter*) gFile->Get("TRDparameter"); 
-  if (!trdParam) {
-    Error("Reconstruct", "no TRD parameters found");
-    return;
-  }
-  trdParam->ReInit();
-  clusterer.SetParameter(trdParam);
-  Int_t nEvents = runLoader->GetNumberOfEvents();
-
-  for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
-    clusterer.Open(runLoader->GetFileName(), iEvent);
-    clusterer.ReadDigits();
-    clusterer.MakeClusters();
-    clusterer.WriteClusters(-1);
-  }
-}
-
-//_____________________________________________________________________________
-AliTracker* AliTRD::CreateTracker() const
-{
-// create a TRD tracker
-
-  GetLoader()->GetRunLoader()->CdGAFile();
-  return new AliTRDtracker(gFile);
-}
-
-
 
 
 
index c3e57de..8e460ff 100644 (file)
@@ -99,9 +99,6 @@ class AliTRD : public AliDetector {
   virtual void       FinishPrimary();
   virtual void       RemapTrackHitIDs(Int_t *map);
 
-  virtual void       Reconstruct() const;
-  virtual AliTracker* CreateTracker() const;
-
  protected:
 
   Int_t                fGasMix;             //  Gas mixture. 0: Xe/Isobutane 1: Xe/CO2
diff --git a/TRD/AliTRDReconstructor.cxx b/TRD/AliTRDReconstructor.cxx
new file mode 100644 (file)
index 0000000..09c712d
--- /dev/null
@@ -0,0 +1,91 @@
+/**************************************************************************
+ * 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$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for TRD reconstruction                                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "AliTRDReconstructor.h"
+#include "AliRunLoader.h"
+#include "AliTRDparameter.h"
+#include "AliTRD.h"
+#include "AliTRDclusterizerV1.h"
+#include "AliTRDtracker.h"
+#include <TFile.h>
+
+
+ClassImp(AliTRDReconstructor)
+
+
+//_____________________________________________________________________________
+void AliTRDReconstructor::Reconstruct(AliRunLoader* runLoader) const
+{
+// reconstruct clusters
+
+  AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
+  runLoader->CdGAFile();
+  AliTRDparameter* trdParam = GetTRDparameter(runLoader); 
+  if (!trdParam) {
+    Error("Reconstruct", "no TRD parameters found");
+    return;
+  }
+  trdParam->ReInit();
+  clusterer.SetParameter(trdParam);
+  Int_t nEvents = runLoader->GetNumberOfEvents();
+
+  for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
+    clusterer.Open(runLoader->GetFileName(), iEvent);
+    clusterer.ReadDigits();
+    clusterer.MakeClusters();
+    clusterer.WriteClusters(-1);
+  }
+}
+
+//_____________________________________________________________________________
+AliTracker* AliTRDReconstructor::CreateTracker(AliRunLoader* runLoader) const
+{
+// create a TRD tracker
+
+  runLoader->CdGAFile();
+  return new AliTRDtracker(gFile);
+}
+
+//_____________________________________________________________________________
+void AliTRDReconstructor::FillESD(AliRunLoader* /*runLoader*/, 
+                                 AliESD* /*esd*/) const
+{
+}
+
+
+//_____________________________________________________________________________
+AliTRDparameter* AliTRDReconstructor::GetTRDparameter(AliRunLoader* runLoader) const
+{
+// get the TRD parameters
+
+  runLoader->CdGAFile();
+  AliTRDparameter* trdParam = (AliTRDparameter*) gFile->Get("TRDparameter"); 
+  if (!trdParam) {
+    Error("GetTRDparameter", "no TRD parameters available");
+    return NULL;
+  }
+  return trdParam;
+}
+
+
diff --git a/TRD/AliTRDReconstructor.h b/TRD/AliTRDReconstructor.h
new file mode 100644 (file)
index 0000000..5ee0c51
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef ALITRDRECONSTRUCTOR_H
+#define ALITRDRECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for TRD reconstruction                                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+/* $Id$ */
+
+#include "AliReconstructor.h"
+
+class AliTRDparameter;
+
+
+class AliTRDReconstructor: public AliReconstructor {
+public:
+  AliTRDReconstructor(): AliReconstructor() {};
+  virtual ~AliTRDReconstructor() {};
+
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual AliTracker*  CreateTracker(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+
+private:
+  AliTRDparameter*     GetTRDparameter(AliRunLoader* runLoader) const;
+
+  ClassDef(AliTRDReconstructor, 0)   // class for the TRD reconstruction
+};
+
+#endif
index 82a7e41..10a6427 100644 (file)
@@ -54,4 +54,6 @@
 #pragma link C++ class  AliTRDparameter+;
 #pragma link C++ class  AliTRDPartID+;
 
+#pragma link C++ class  AliTRDReconstructor+;
+
 #endif
index 30d1d79..932ad13 100644 (file)
@@ -40,7 +40,8 @@ SRCS= AliTRD.cxx \
       AliTRDPartID.cxx    \
       AliTRDclusterMI.cxx      \
       AliTRDclusterizerMI.cxx  \
-      AliTRDclusterCorrection.cxx      
+      AliTRDclusterCorrection.cxx \
+      AliTRDReconstructor.cxx
 
 HDRS= $(SRCS:.cxx=.h)