From: cblume Date: Sun, 14 Dec 2008 12:51:31 +0000 (+0000) Subject: Remove AliPoint from TRD code X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=c761492b4c2cb57efbe79d589c3fc8d07e0459a1;p=u%2Fmrichter%2FAliRoot.git Remove AliPoint from TRD code --- diff --git a/TRD/AliTRD.cxx b/TRD/AliTRD.cxx index 4c1ee0e1674..e329f2534cc 100644 --- a/TRD/AliTRD.cxx +++ b/TRD/AliTRD.cxx @@ -54,7 +54,6 @@ #include "AliTRDdigitsManager.h" #include "AliTRDgeometry.h" #include "AliTRDhit.h" -#include "AliTRDpoints.h" #include "AliTRDrawData.h" #include "AliTRDSimParam.h" #include "AliTRDCommonParam.h" @@ -719,145 +718,6 @@ void AliTRD::Init() } -//_____________________________________________________________________________ -void AliTRD::LoadPoints(Int_t ) -{ - // - // Store x, y, z of all hits in memory. - // Hit originating from TR photons are given a different color - // - - if (fHits == 0) { - return; - } - - Int_t nhits = fHits->GetEntriesFast(); - if (nhits == 0) { - return; - } - - Int_t tracks = gAlice->GetMCApp()->GetNtrack(); - if (fPoints == 0) { - fPoints = new TObjArray(tracks); - } - - AliTRDhit *ahit; - - Int_t *ntrkE = new Int_t[tracks]; - Int_t *ntrkT = new Int_t[tracks]; - Int_t *limiE = new Int_t[tracks]; - Int_t *limiT = new Int_t[tracks]; - Float_t **coorE = new Float_t*[tracks]; - Float_t **coorT = new Float_t*[tracks]; - for(Int_t i = 0; i < tracks; i++) { - ntrkE[i] = 0; - ntrkT[i] = 0; - coorE[i] = 0; - coorT[i] = 0; - limiE[i] = 0; - limiT[i] = 0; - } - - AliTRDpoints *points = 0; - Float_t *fp = 0; - Int_t trk; - Int_t chunk = nhits / 4 + 1; - - // Loop over all the hits and store their position - ahit = (AliTRDhit *) FirstHit(-1); - while (ahit) { - - // dEdx hits - if (ahit->GetCharge() >= 0) { - - trk = ahit->GetTrack(); - if (ntrkE[trk] == limiE[trk]) { - // Initialise a new track - fp = new Float_t[3*(limiE[trk]+chunk)]; - if (coorE[trk]) { - memcpy(fp,coorE[trk],sizeof(Float_t)*3*limiE[trk]); - delete [] coorE[trk]; - } - limiE[trk] += chunk; - coorE[trk] = fp; - } - else { - fp = coorE[trk]; - } - fp[3*ntrkE[trk] ] = ahit->X(); - fp[3*ntrkE[trk]+1] = ahit->Y(); - fp[3*ntrkE[trk]+2] = ahit->Z(); - ntrkE[trk]++; - - } - // TR photon hits - else if ((ahit->GetCharge() < 0) && - (fDrawTR)) { - - trk = ahit->GetTrack(); - if (ntrkT[trk] == limiT[trk]) { - // Initialise a new track - fp = new Float_t[3*(limiT[trk]+chunk)]; - if (coorT[trk]) { - memcpy(fp,coorT[trk],sizeof(Float_t)*3*limiT[trk]); - delete [] coorT[trk]; - } - limiT[trk] += chunk; - coorT[trk] = fp; - } - else { - fp = coorT[trk]; - } - fp[3*ntrkT[trk] ] = ahit->X(); - fp[3*ntrkT[trk]+1] = ahit->Y(); - fp[3*ntrkT[trk]+2] = ahit->Z(); - ntrkT[trk]++; - - } - - ahit = (AliTRDhit *) NextHit(); - - } - - for (trk = 0; trk < tracks; ++trk) { - - if (ntrkE[trk] || ntrkT[trk]) { - - points = new AliTRDpoints(); - points->SetDetector(this); - points->SetParticle(trk); - - // Set the dEdx points - if (ntrkE[trk]) { - points->SetMarkerColor(kWhite); //PH This is the default color in TRD - points->SetMarkerSize(1); //PH Default size=1 - points->SetPolyMarker(ntrkE[trk],coorE[trk],1); //PH Default style=1 - delete [] coorE[trk]; - coorE[trk] = 0; - } - - // Set the TR photon points - if (ntrkT[trk]) { - points->SetTRpoints(ntrkT[trk],coorT[trk]); - delete [] coorT[trk]; - coorT[trk] = 0; - } - - fPoints->AddAt(points,trk); - - } - - } - - delete [] coorE; - delete [] coorT; - delete [] ntrkE; - delete [] ntrkT; - delete [] limiE; - delete [] limiT; - -} - //_____________________________________________________________________________ void AliTRD::ResetDigits() { diff --git a/TRD/AliTRD.h b/TRD/AliTRD.h index 87c18967205..822f33070f4 100644 --- a/TRD/AliTRD.h +++ b/TRD/AliTRD.h @@ -45,7 +45,6 @@ class AliTRD : public AliDetector { virtual void CreateGeometry(); virtual void CreateMaterials(); virtual void DrawModule() const; - virtual void LoadPoints(Int_t track); virtual void Hits2Digits(); virtual void Hits2SDigits(); diff --git a/TRD/CMake_libTRDsim.txt b/TRD/CMake_libTRDsim.txt index a39f443dca1..e91ce262830 100644 --- a/TRD/CMake_libTRDsim.txt +++ b/TRD/CMake_libTRDsim.txt @@ -1,7 +1,6 @@ # -*- mode: cmake -*- set(SRCS -AliTRDpoints.cxx AliTRDsimTR.cxx AliTRD.cxx AliTRDv1.cxx diff --git a/TRD/TRDsimLinkDef.h b/TRD/TRDsimLinkDef.h index 6b5a3efe4e2..40ce518f5b1 100644 --- a/TRD/TRDsimLinkDef.h +++ b/TRD/TRDsimLinkDef.h @@ -8,7 +8,6 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class AliTRDpoints+; #pragma link C++ class AliTRDsimTR+; #pragma link C++ class AliTRD+; #pragma link C++ class AliTRDv1+; diff --git a/TRD/libTRDsim.pkg b/TRD/libTRDsim.pkg index a7ac216c15f..8c59eda0bba 100644 --- a/TRD/libTRDsim.pkg +++ b/TRD/libTRDsim.pkg @@ -1,7 +1,6 @@ #-*- Mode: Makefile -*- -SRCS= AliTRDpoints.cxx \ - AliTRDsimTR.cxx \ +SRCS= AliTRDsimTR.cxx \ AliTRD.cxx \ AliTRDv1.cxx \ AliTRDdigitizer.cxx \