merging and digitization added
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Jan 2004 04:20:00 +0000 (04:20 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Jan 2004 04:20:00 +0000 (04:20 +0000)
PMD/AliPMD.cxx
PMD/AliPMD.h

index bbdff3e..3764d69 100644 (file)
@@ -339,3 +339,34 @@ void AliPMD::Hits2SDigits()
   fLoader->UnloadSDigits();
   delete pmdDigitizer;
 }
+//____________________________________________________________________________
+void AliPMD::SDigits2Digits()  
+{ 
+  // creates sdigits to digits
+}
+//____________________________________________________________________________
+void AliPMD::Hits2Digits()  
+{ 
+// create digits
+
+  AliRunLoader* runLoader = fLoader->GetRunLoader(); 
+  AliPMDDigitizer* pmdDigitizer = new AliPMDDigitizer;
+  pmdDigitizer->OpengAliceFile(fLoader->GetRunLoader()->GetFileName().Data(),
+                              "HD");
+  pmdDigitizer->SetZPosition(361.5);
+
+  for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
+    pmdDigitizer->Hits2Digits(iEvent);
+  }
+  fLoader->UnloadHits();
+  fLoader->UnloadDigits();
+  delete pmdDigitizer;
+
+}
+//____________________________________________________________________________
+
+AliDigitizer* AliPMD::CreateDigitizer(AliRunDigitizer* manager)
+{ 
+  return new AliPMDDigitizer(manager);
+}
+
index 3b00efe..af3f4c4 100644 (file)
@@ -44,7 +44,10 @@ public:
   virtual void  ResetHits();
   
   virtual void  Hits2SDigits();
+  virtual void  SDigits2Digits();
+  virtual void  Hits2Digits();
 
+  virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager);
   
  protected:
   Float_t fPar[4];           // pmdin, pmdout, thgas, thcell
@@ -58,6 +61,6 @@ public:
   TClonesArray* fRecPoints;   //! List of reconstructed hits
   Int_t         fNRecPoints;  // Number of reconstructed hits
   
-  ClassDef(AliPMD,3)  // Base Class for Photon Multiplicity Detector
+  ClassDef(AliPMD,4)  // Base Class for Photon Multiplicity Detector
 };
 #endif