From: morsch Date: Thu, 12 Apr 2001 12:23:55 +0000 (+0000) Subject: Use access methods for hit data. X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=4988e518f01f65dc7c18d9415e1f4b50c7bce9db Use access methods for hit data. --- diff --git a/MUON/MUONhitrectest.C b/MUON/MUONhitrectest.C index defe38d4bf1..a46152b7b19 100644 --- a/MUON/MUONhitrectest.C +++ b/MUON/MUONhitrectest.C @@ -1,5 +1,3 @@ -#include "iostream.h" - void MUONhitrectest (Int_t evNumber1=0,Int_t evNumber2=0) { ///////////////////////////////////////////////////////////////////////// @@ -66,11 +64,11 @@ void MUONhitrectest (Int_t evNumber1=0,Int_t evNumber2=0) TClonesArray *Particles = gAlice->Particles(); TTree *TR = gAlice->TreeR(); Int_t nent=TR->GetEntries(); - printf("Found %d entries in the tree (must be one per cathode per event! + 1empty)\n",nent); + if (MUON) { Float_t xc[2000], yc[2000], itrc[2000]; TClonesArray *MUONrawclust = MUON->RawClustAddress(0); - nbytes += TR->GetEvent(1); + nbytes += TR->GetEvent(0); Int_t nrawcl = MUONrawclust->GetEntries(); AliMUONRawCluster *mRaw; for (Int_t iraw=0; iraw < nrawcl; iraw++) { @@ -89,10 +87,10 @@ void MUONhitrectest (Int_t evNumber1=0,Int_t evNumber2=0) mHit; mHit=(AliMUONHit*)MUON->NextHit()) { - Int_t nch = mHit->fChamber; // chamber number - Float_t x = mHit->fX; // x-pos of hit - Float_t y = mHit->fY; // y-pos - Int_t ip = mHit->fParticle; + Int_t nch = mHit->Chamber(); // chamber number + Float_t x = mHit->X(); // x-pos of hit + Float_t y = mHit->Y(); // y-pos + Int_t ip = mHit->Particle(); if (ip != kMuonPlus && ip != kMuonMinus) continue; if (nch != 1) continue; Float_t dmin=1.e8; @@ -104,19 +102,21 @@ void MUONhitrectest (Int_t evNumber1=0,Int_t evNumber2=0) for (Int_t i=0; iUncheckedAt(imin); - Int_t track=mRaw->fTracks[1]; - Float_t xrec=mRaw->fX[1]; - Float_t yrec=mRaw->fY[0]; - Float_t x_res=xrec-x; - Float_t y_res=yrec-y; + Int_t track = mRaw->fTracks[1]; + Float_t xrec = mRaw->fX[1]; + Float_t yrec = mRaw->fY[0]; + Float_t x_res = xrec-x; + Float_t y_res = yrec-y; + if (y_res > 0.05 ) printf("\n track %d %f\n", itrack, y_res); + hresx->Fill(x_res,1.); hresy->Fill(y_res,1.); hpos->Fill(Float_t(npos), 1.); @@ -126,9 +126,6 @@ void MUONhitrectest (Int_t evNumber1=0,Int_t evNumber2=0) itrack, x, y, nhit); h21->Fill(x,y,1.); } - - - } // hits } // tracks } // end if MUON