]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add Raw2SDigits by Andreas
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 May 2007 13:51:47 +0000 (13:51 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 May 2007 13:51:47 +0000 (13:51 +0000)
TRD/AliTRD.cxx
TRD/AliTRD.h

index 80f9d5a9195599df2b6efa948e13373d260858e8..23b27b7d4fb4b2a3eb29aa89b4bafea3a286314d 100644 (file)
@@ -46,6 +46,7 @@
 #include "AliMagF.h"
 #include "AliRun.h"
 #include "AliTrackReference.h"
+#include "AliRawReader.h"
 
 #include "AliTRD.h"
 #include "AliTRDdigit.h"
@@ -633,6 +634,10 @@ void AliTRD::CreateMaterials()
   fFoilDensity = dmy;
   fGasDensity  = dgm;
 
+  gMC->Gstpar((* fIdtmed)[9],"LOSS", 13); // specific energy loss
+  gMC->Gstpar((* fIdtmed)[9],"PRIMIO_E", 23.53); // 1st ionisation potential
+  gMC->Gstpar((* fIdtmed)[9],"PRIMIO_N", 19.344431); // Number of
+
 }
 
 //_____________________________________________________________________________
@@ -906,6 +911,40 @@ void AliTRD::SetTreeAddress()
 
 }
 
+//_____________________________________________________________________________
+Bool_t AliTRD::Raw2SDigits(AliRawReader *rawReader)
+{
+  //
+  // Converts RAW data to SDigits
+  //
+
+  AliLoader *loader = fRunLoader->GetLoader("TRDLoader");
+  if (!loader) {
+    AliError("Can not get TRD loader from Run Loader");
+    return kFALSE;
+  }
+    
+  TTree *tree = 0;
+  tree = loader->TreeS();
+  if (!tree) {
+    loader->MakeTree("S");
+    tree = loader->TreeS();
+  }
+
+  AliTRDrawData       *rawdata        = new AliTRDrawData();
+  AliTRDdigitsManager *sdigitsManager = rawdata->Raw2Digits(rawReader);
+  if (sdigitsManager) {
+    sdigitsManager->SetSDigits(kTRUE);
+    sdigitsManager->MakeBranch(tree);
+    sdigitsManager->WriteDigits();
+    return kTRUE;
+  } 
+  else {
+    return kFALSE;
+  }
+
+}
+
 //_____________________________________________________________________________
 AliTRD &AliTRD::operator=(const AliTRD &trd)
 {
@@ -919,339 +958,4 @@ AliTRD &AliTRD::operator=(const AliTRD &trd)
 
   return *this;
 
-} 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+}
index ca509e2ab3b2313392c0b62aa586655f5960367c..fa67b237debeda65497201bcc3e29042e24f01a9 100644 (file)
@@ -23,6 +23,7 @@ class TLorentzVector;
 
 class AliRun;
 class AliDigit;
+class AliRawReader;
 
 class AliTRDhit;
 class AliTRDsim;
@@ -51,6 +52,7 @@ class AliTRD : public AliDetector {
   virtual void     Hits2SDigits();
   virtual void     SDigits2Digits();
   virtual void     Digits2Raw();
+  virtual Bool_t   Raw2SDigits(AliRawReader* rawReader);
   virtual void     MakeBranch(Option_t *option);
 
   virtual void     AddHit(Int_t, Int_t*, Float_t*)       { }; 
@@ -88,6 +90,7 @@ class AliTRD : public AliDetector {
           Int_t    fDisplayType;        //  Display type (0: normal, 1: detailed) 
 
  private:
+
   AliTRD(const AliTRD &trd);
   AliTRD  &operator=(const AliTRD &trd);