PMD Reconstruction class
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Apr 2004 09:20:47 +0000 (09:20 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Apr 2004 09:20:47 +0000 (09:20 +0000)
PMD/AliPMDReconstructor.cxx [new file with mode: 0644]
PMD/AliPMDReconstructor.h [new file with mode: 0644]

diff --git a/PMD/AliPMDReconstructor.cxx b/PMD/AliPMDReconstructor.cxx
new file mode 100644 (file)
index 0000000..1851814
--- /dev/null
@@ -0,0 +1,67 @@
+/**************************************************************************
+ * 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.                  *
+ **************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for PMD reconstruction                                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "Riostream.h"
+#include "AliPMDReconstructor.h"
+#include "AliRunLoader.h"
+#include "AliRun.h"
+#include "AliPMDClusterFinder.h"
+#include "AliPMDtracker.h"
+#include "AliESDPmdTrack.h"
+#include "AliESD.h"
+
+
+ClassImp(AliPMDReconstructor)
+
+
+//_____________________________________________________________________________
+void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
+{
+// reconstruct clusters
+
+  AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader);
+  pmdClus->Load();
+  for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++)
+    {
+      pmdClus->Digits2RecPoints(iEvent);
+    }
+  pmdClus->UnLoad();
+  delete pmdClus;
+
+}
+
+// ------------------------------------------------------------------------ //
+
+void AliPMDReconstructor::FillESD(AliRunLoader* runLoader,AliESD* esd) const
+{
+  AliLoader* loader = runLoader->GetLoader("PMDLoader");
+  if (!loader) {
+    Error("Reconstruct", "PMD loader not found");
+    return;
+  }
+  loader->LoadRecPoints("READ");
+
+  TTree *treeR = loader->TreeR();
+  AliPMDtracker pmdtracker;
+  pmdtracker.LoadClusters(treeR);
+  pmdtracker.Clusters2Tracks(esd);
+  loader->UnloadRecPoints();
+}
diff --git a/PMD/AliPMDReconstructor.h b/PMD/AliPMDReconstructor.h
new file mode 100644 (file)
index 0000000..5e462c5
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef ALIPMDRECONSTRUCTOR_H
+#define ALIPMDRECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+#include "AliReconstructor.h"
+
+class AliPMDReconstructor: public AliReconstructor {
+public:
+  virtual void         Reconstruct(AliRunLoader* runLoader) const;
+  virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+
+private:
+
+  ClassDef(AliPMDReconstructor, 1)   // class for the PMD reconstruction
+};
+
+#endif