Make macro work with new STEER.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2001 23:44:55 +0000 (23:44 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2001 23:44:55 +0000 (23:44 +0000)
MUON/MUONdigit.C
MUON/MUONrawclusters.C

index 7346d39..67ac2da 100644 (file)
@@ -1,6 +1,4 @@
-#include "iostream.h"
-
-void MUONdigit (Int_t evNumber1=0, Int_t evNumber2=9, Int_t ibg=1, Int_t bgr=10) 
+void MUONdigit (Int_t evNumber1=0, Int_t evNumber2=0, Int_t ibg=1, Int_t bgr=10) 
 {
 // Dynamically link some shared libs
 
@@ -27,7 +25,7 @@ void MUONdigit (Int_t evNumber1=0, Int_t evNumber2=9, Int_t ibg=1, Int_t bgr=10)
 // creation
        AliMUONMerger* merger = new AliMUONMerger();
 // configuration
-       merger->SetMode(1);
+       merger->SetMode(0);
        merger->SetSignalEventNumber(0);
        merger->SetBackgroundEventNumber(0);
        merger->SetBackgroundFileName("bg.root");
@@ -36,7 +34,24 @@ void MUONdigit (Int_t evNumber1=0, Int_t evNumber2=9, Int_t ibg=1, Int_t bgr=10)
        pMUON->SetMerger(merger);
    }
 // Action !
-       gAlice->SDigits2Digits();
+//
+//   Loop over events              
+//
+    for (int nev=evNumber1; nev<= evNumber2; nev++) {
+       Int_t nparticles = gAlice->GetEvent(nev);
+       cout << "nev         " << nev <<endl;
+       cout << "nparticles  " << nparticles <<endl;
+       if (nev < evNumber1) continue;
+       if (nparticles <= 0) return;
+       gAlice->SDigits2Digits();
+
+       char hname[30];
+       sprintf(hname,"TreeD%d",nev);
+       gAlice->TreeD()->Write(hname);
+       // reset tree
+       gAlice->TreeD()->Reset();
+
+    }   // event loop 
 }
 
 
index 54b8da0..dda5bdc 100644 (file)
@@ -63,15 +63,15 @@ void MUONrawclusters (Int_t evNumber1=0,Int_t evNumber2=0)
        cout << "nparticles  " << nparticles <<endl;
        if (nev < evNumber1) continue;
        if (nparticles <= 0) return;
-       Int_t nbytes = 0;
-       TClonesArray *Particles = gAlice->Particles();
-       TTree *TD = gAlice->TreeD();
-       Int_t nent=TD->GetEntries();
-       if (MUON) {
-           MUON->FindClusters(nev,nent-2);
-       }   // end if MUON
+       gAlice->SetEvent(nev);
+       gAlice->RunReco("MUON");
+       gAlice->TreeR()->Fill();
+       char hname[30];
+       sprintf(hname,"TreeR%d", nev);
+       gAlice->TreeR()->Write(hname);
+       gAlice->TreeR()->Reset();
+       MUON->ResetRawClusters();        
+       printf("\n End of cluster finding for event %d", 0);
     }   // event loop 
-
-    file->Close();
 }