From: cblume Date: Fri, 18 May 2007 13:51:47 +0000 (+0000) Subject: Add Raw2SDigits by Andreas X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=68119ad15b6466fca09fccbab371f9df06ea718e;p=u%2Fmrichter%2FAliRoot.git Add Raw2SDigits by Andreas --- diff --git a/TRD/AliTRD.cxx b/TRD/AliTRD.cxx index 80f9d5a9195..23b27b7d4fb 100644 --- a/TRD/AliTRD.cxx +++ b/TRD/AliTRD.cxx @@ -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; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +} diff --git a/TRD/AliTRD.h b/TRD/AliTRD.h index ca509e2ab3b..fa67b237deb 100644 --- a/TRD/AliTRD.h +++ b/TRD/AliTRD.h @@ -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);