]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRecoDisplay.cxx
Corrected path to mapping libraries.
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoDisplay.cxx
index 9cd230c51cdf5db1338a65caed1e93be598e13a8..610372888b46c6622f674867c46d0b0c74f49750 100644 (file)
 
 /*
 $Log$
+Revision 1.7  2001/05/16 14:57:17  alibrary
+New files for folders and Stack
+
+Revision 1.6  2001/01/26 21:50:43  morsch
+Use access functions to AliMUONHit member data.
+
+Revision 1.5  2001/01/26 20:00:53  hristov
+Major upgrade of AliRoot code
+
+Revision 1.4  2000/12/21 22:14:38  morsch
+Clean-up of coding rule violations.
+
+Revision 1.3  2000/12/21 17:51:54  morsch
+RN3 violations corrected
+
 Revision 1.2  2000/11/23 10:09:39  gosset
 Bug correction in AliMUONRecoDisplay.
-Copyright, $Log$, $Id$, comments at the right place for automatic documentation,
+Copyright, $Log$
+Copyright, Revision 1.7  2001/05/16 14:57:17  alibrary
+Copyright, New files for folders and Stack
+Copyright,
+Copyright, Revision 1.6  2001/01/26 21:50:43  morsch
+Copyright, Use access functions to AliMUONHit member data.
+Copyright,
+Copyright, Revision 1.5  2001/01/26 20:00:53  hristov
+Copyright, Major upgrade of AliRoot code
+Copyright,
+Copyright, Revision 1.4  2000/12/21 22:14:38  morsch
+Copyright, Clean-up of coding rule violations.
+Copyright,
+Copyright, Revision 1.3  2000/12/21 17:51:54  morsch
+Copyright, RN3 violations corrected
+Copyright,, $Id$, comments at the right place for automatic documentation,
 in AliMUONRecoEvent and AliMUONRecoDisplay
 
 */
@@ -51,11 +81,12 @@ in AliMUONRecoEvent and AliMUONRecoDisplay
 //                                                                  //
 //////////////////////////////////////////////////////////////////////
 
-#include <iostream.h>
+#include <Riostream.h>
 #include <AliRun.h>
 #include <TClonesArray.h>
 #include "AliMUONRecoEvent.h"
 #include "AliMUONRecoDisplay.h"
+#include "AliHeader.h"
 #include <TROOT.h>
 #include <AliPoints.h>
 #include <TSlider.h>
@@ -125,6 +156,7 @@ AliMUONRecoDisplay::~AliMUONRecoDisplay()
 //-------------------------------------------------------------------
 Bool_t AliMUONRecoDisplay::Event(Int_t nevent)
 {
+// Go to event nevent
    fEvent = nevent;
    for (Int_t entry=0; entry<fTree->GetEntries(); entry++) {
       fTree->GetEntry(entry);
@@ -165,10 +197,9 @@ void AliMUONRecoDisplay::MapEvent(Int_t nevent)
    if (fEvGen) fEvGen->Clear();
    fEvGen->SetNoEvent(nevent);
    // get list of particles
-   TClonesArray *Particles = gAlice->Particles();
    // connect MUON module
-   AliDetector *MUON = gAlice->GetDetector("MUON");
-   if (!MUON) {
+   AliDetector *pMUON = gAlice->GetDetector("MUON");
+   if (!pMUON) {
       cout << "MUON module not present.\n";
       gApplication->Terminate(0);
    }
@@ -181,19 +212,19 @@ void AliMUONRecoDisplay::MapEvent(Int_t nevent)
    Int_t ch;
    // loop all tracks
    for (Int_t track=0; track<ntracks; track++) {
-      hit = (AliMUONHit *) MUON->FirstHit(track);
+      hit = (AliMUONHit *) pMUON->FirstHit(track);
       if (!hit) continue;
-      particle = (TParticle *) Particles->UncheckedAt(hit->Track());
+      particle = gAlice->Particle(hit->Track());
       if (IsReconstructible(track) && TMath::Abs(particle->GetPdgCode())==13) {
          gtrack = fEvGen->AddEmptyTrack();
         gtrack->SetSign(TMath::Sign((Int_t)1, -particle->GetPdgCode()));
         // reset hits
         for (ch=0; ch<10; ch++) gtrack->SetHitPosition(ch,0,0,0);
         // loop all hits
-        for (AliMUONHit *muonHit=(AliMUONHit*)MUON->FirstHit(track);
+        for (AliMUONHit *muonHit=(AliMUONHit*)pMUON->FirstHit(track);
              muonHit;
-             muonHit=(AliMUONHit*)MUON->NextHit()) {
-           ch = muonHit->fChamber - 1;
+             muonHit=(AliMUONHit*)pMUON->NextHit()) {
+           ch = muonHit->Chamber() - 1;
            if (ch<0 || ch>9) continue;
            gtrack->SetHitPosition(ch, muonHit->X(),  muonHit->Y(),  muonHit->Z());
            gtrack->SetMomReconstr(particle->Px(), particle->Py(), particle->Pz());
@@ -425,15 +456,15 @@ Bool_t AliMUONRecoDisplay::IsReconstructible(Int_t track)
 // true if at least three hits in first 2 stations, 3 in last 2 stations
 // and one in station 3
    if (fEmpty) return kFALSE;
-   AliDetector *MUON = gAlice->GetDetector("MUON");
+   AliDetector *pMUON = gAlice->GetDetector("MUON");
    Bool_t chHit[10];
    Int_t ch;
    for (ch=0; ch<10; ch++) chHit[ch] = kFALSE;
    //loop hits
-   for (AliMUONHit *muonHit=(AliMUONHit*)MUON->FirstHit(track);
+   for (AliMUONHit *muonHit=(AliMUONHit*)pMUON->FirstHit(track);
         muonHit;
-       muonHit=(AliMUONHit*)MUON->NextHit()) {
-      ch = muonHit->fChamber - 1;
+       muonHit=(AliMUONHit*)pMUON->NextHit()) {
+      ch = muonHit->Chamber() - 1;
       if (ch<0 || ch>9) continue;
       chHit[ch] = kTRUE;
    }