]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
One event option in MUONCheck functions. Script example for reconstruction in README
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jan 2004 12:39:05 +0000 (12:39 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jan 2004 12:39:05 +0000 (12:39 +0000)
MUON/MUONCheck.C
MUON/README

index 382d37bf4ca1ede9159ab296f4219667b7959c3e..388f4b01c7376960a8cf8dc071eac8b139fac552 100644 (file)
@@ -21,7 +21,6 @@
 //
 
 // ROOT includes
-#if !defined(__CINT__) || defined(__MAKECINT__)
 #include "TBranch.h"
 #include "TClonesArray.h"
 #include "TFile.h"
 #include "AliMUONGlobalTrigger.h"
 #include "AliMUONLocalTrigger.h"
 #include "AliMUONTrack.h"
-#endif
 
-void MUONkine(char * filename="galice.root")
+
+
+void MUONkine(char * filename="galice.root",Int_t event2Check=0)
 {
   TClonesArray * ListOfParticles = new TClonesArray("TParticle",1000);
   TParticle * particle = new TParticle();
@@ -63,6 +63,7 @@ void MUONkine(char * filename="galice.root")
   nevents = RunLoader->GetNumberOfEvents();
 
   for(ievent=0; ievent<nevents; ievent++) {  // Event loop
+    if (event2Check!=0) ievent=event2Check;
     Int_t iparticle, nparticles;
     // Getting event ievent
     RunLoader->GetEvent(ievent); 
@@ -71,14 +72,15 @@ void MUONkine(char * filename="galice.root")
     printf(">>> Event %d, Number of particles is %d \n",ievent, nparticles);
     for(iparticle=0; iparticle<nparticles; iparticle++) {
       RunLoader->TreeK()->GetEvent(iparticle);
-      particle->Print("");
+      particle->Print("");  
     }
+    if (event2Check!=0) ievent=nevents;
   }
   RunLoader->UnloadKinematics();
 }
 
 
-void MUONhits(char * filename="galice.root")
+void MUONhits(char * filename="galice.root", Int_t event2Check=0)
 {
   // Creating Run Loader and openning file containing Hits
   AliRunLoader * RunLoader = AliRunLoader::Open(filename,"MUONFolder","READ");
@@ -94,6 +96,7 @@ void MUONhits(char * filename="galice.root")
   nevents = RunLoader->GetNumberOfEvents();
 
   for(ievent=0; ievent<nevents; ievent++) {  // Event loop
+    if (event2Check!=0) ievent=event2Check;
     printf(">>> Event %d \n",ievent);
     // Getting event ievent
     RunLoader->GetEvent(ievent); 
@@ -126,12 +129,13 @@ void MUONhits(char * filename="galice.root")
       }
       muondata.ResetHits();
     } // end track loop
+    if (event2Check!=0) ievent=nevents;
   }  // end event loop
   MUONLoader->UnloadHits();
 }
 
 
-void MUONdigits(char * filename="galice.root")
+void MUONdigits(char * filename="galice.root", Int_t event2Check=0)
 {
   // Creating Run Loader and openning file containing Hits
   AliRunLoader * RunLoader = AliRunLoader::Open(filename,"MUONFolder","READ");
@@ -150,6 +154,7 @@ void MUONdigits(char * filename="galice.root")
   AliMUONDigit * mDigit;
   
   for(ievent=0; ievent<nevents; ievent++) {
+    if (event2Check!=0) ievent=event2Check;
     printf(">>> Event %d \n",ievent);
     RunLoader->GetEvent(ievent);
   
@@ -194,11 +199,12 @@ void MUONdigits(char * filename="galice.root")
       } // end chamber loop
       muondata.ResetDigits();
     } // end cathode loop
+    if (event2Check!=0) ievent=nevents;
   }  // end event loop
   MUONLoader->UnloadDigits();
 }
 
-void MUONrecpoints(char * filename="galice.root") {
+void MUONrecpoints(char * filename="galice.root", Int_t event2Check=0) {
 
   // Creating Run Loader and openning file containing Hits
   AliRunLoader * RunLoader = AliRunLoader::Open(filename,"MUONFolder","READ");
@@ -217,6 +223,7 @@ void MUONrecpoints(char * filename="galice.root") {
   AliMUONRawCluster * mRecPoint;
   
   for(ievent=0; ievent<nevents; ievent++) {
+    if (event2Check!=0) ievent=event2Check;
     printf(">>> Event %d \n",ievent);
     RunLoader->GetEvent(ievent);
     // Addressing
@@ -275,11 +282,12 @@ irecpoint, x0, x1, y0, y1, z0, z1, Q0, Q1, Track0, Track1, Track2, chi2_0, chi2_
       } // end recpoint loop
     } // end chamber loop
     muondata.ResetRawClusters();
+    if (event2Check!=0) ievent=nevents;
   }  // end event loop
   MUONLoader->UnloadRecPoints();
 }
 
-void MUONTestTrigger (char * filename="galice.root"){
+void MUONTestTrigger (char * filename="galice.root", Int_t event2Check=0){
 // reads and dumps trigger objects from MUON.RecPoints.root
   TClonesArray * globalTrigger;
   TClonesArray * localTrigger;
@@ -304,6 +312,7 @@ void MUONTestTrigger (char * filename="galice.root"){
   AliMUONLocalTrigger *locTrg;
   
   for (ievent=0; ievent<nevents; ievent++) {
+    if (event2Check!=0) ievent=event2Check;
     RunLoader->GetEvent(ievent);
     
     muondata.SetTreeAddress("GLT"); 
@@ -365,13 +374,14 @@ void MUONTestTrigger (char * filename="galice.root"){
       
     } // end of loop on Local Trigger
     muondata.ResetTrigger();
+    if (event2Check!=0) ievent=nevents;
   } // end loop on event  
   MUONLoader->UnloadRecPoints();
 }
 
 
 
-void MUONRecTracks (char * filename="galice.root"){
+void MUONRecTracks (char * filename="galice.root", Int_t event2Check=0 ){
 // reads and dumps trigger objects from MUON.RecPoints.root
   TClonesArray * RecTracks;
   
@@ -393,6 +403,7 @@ void MUONRecTracks (char * filename="galice.root"){
   AliMUONTrack * rectrack;
   
   for (ievent=0; ievent<nevents; ievent++) {
+    if (event2Check!=0) ievent=event2Check;
     RunLoader->GetEvent(ievent);
     
     muondata.SetTreeAddress("RT");
@@ -405,6 +416,7 @@ void MUONRecTracks (char * filename="galice.root"){
     printf(">>> Event %d Number of Recconstructed tracks %d \n",ievent, nrectracks);
    
     muondata.ResetRecTracks();
+    if (event2Check!=0) ievent=nevents;
   } // end loop on event  
   MUONLoader->UnloadTracks();
 }
index b9e3062ffde4b4b1abda99070092aa53b2d4832a..0d988f51eefe8ac391abb767b501af6b18b98d63 100644 (file)
@@ -66,6 +66,7 @@ gSystem->Load("$ALICE_ROOT/MUON/MUONrawclusters_C.so")
 MUONtrigger("galice.root",0,9999); 
 To Load
 gSystem->Load("$ALICE_ROOT/MUON/MUONtrigger_C.so")
+
 ============================================================
  How to run MUON Tracking reconstruction (old output)
 ===========================================================
@@ -120,19 +121,21 @@ To Load
 gSystem->Load("$ALICE_ROOT/MUON/MUONCheck_C.so")
 
 To print Kine : (default file is galice.root )
-MUONkine()
+MUONkine() or MUONkine("galice.root",##) for the event number ##
 
 To print hits : (default file is galice.root if not MUONhits("toto.root""); )
-MUONhits()  
+MUONhits()  or MUONhits("galice.root",##) for the event number ##
 
 To print digits : (default file is galice.root)
-MUONdigits()  
+MUONdigits()  or MUONdigits("galice.root",##) for the event number ##
 
 To print rawcluster : (default file is galice.root)
-MUONrecpoints()
+MUONrecpoints() or MUONrecpoints("galice.root",##) for the event number ##
 
 To print trigger : (default file is galice.root)
-MUONTestTrigger()
+MUONTestTrigger() or MUONTestTrigger("galice.root",##) for the event number ##
+
+....
 
 
 ============================================================
@@ -179,6 +182,7 @@ config file when the magnetic field is defined:
 TRACKING must be 1 for RKUTA and 2 for HELIX (the default value for aliroot is 2 (HELIX))
 FACTOR allows you to set the magnetic field to 0, just putting FACTOR=0. Default value is 1.
 MAXB is the maximum magnetic field which is 10.T
+
 ===========================================================
  MUON cocktail for physics ..............
 ===========================================================
@@ -215,6 +219,54 @@ gener->SetOrigin(0,0,0);        // Vertex position
 gener->SetSigma(0,0,0.0);       // Sigma in (X,Y,Z) (cm) on IP position
 gener->Init();
  
+===========================================================
+ csh Script for the full reconstruction
+===========================================================
+aliroot -b << EOF  
+gAlice->Run(NumberOfEvents,"YourConfig.C");
+.q
+EOF
+
+aliroot -b << EOF 
+AliRunDigitizer   * manager = new AliRunDigitizer(1,1);
+manager->SetInputStream(0,"galice.root");
+AliMUONDigitizerv1* dMUON   = new AliMUONDigitizerv1(manager);
+manager->AddDigitizer(dMUON);
+manager->Exec("deb");
+.q
+EOF
+
+aliroot -b << EOF 
+.includepath $ALICE_ROOT/STEER
+.includepath $ALICE_ROOT/MUON
+.L $ALICE_ROOT/MUON/MUONrawclusters.C++
+MUONrawclusters("galice.root",0,99999); 
+.q
+EOF
+
+aliroot -b << EOF 
+.includepath $ALICE_ROOT/STEER
+.includepath $ALICE_ROOT/MUON
+.L $ALICE_ROOT/MUON/MUONtrigger.C++
+MUONtrigger("galice.root",0,99999);
+ .q
+EOF
+
+aliroot -b << EOF 
+.includepath $ALICE_ROOT/STEER
+.includepath $ALICE_ROOT/MUON
+.L $ALICE_ROOT/MUON/MUONTracker.C++
+MUONTracker("galice.root",0,99999) 
+ .q
+EOF
+
+aliroot -b << EOF  
+.includepath $ALICE_ROOT/STEER
+.includepath $ALICE_ROOT/MUON
+.L $ALICE_ROOT/MUON/MUONmassPlot_NewIO.C++
+MUONmassPlot("galice.root",0,99999);
+.q
+EOF
 
 ===========================================================
  Still working ..............