]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/RICHdetect.C
Including RVersion.h
[u/mrichter/AliRoot.git] / RICH / RICHdetect.C
index 6ade2ccfe7f3bfab47e138e0922571e3130f1d4d..11587047d99c65feae5c69597bce9dbd985e0e11 100644 (file)
@@ -1,4 +1,4 @@
-RICHdetect (Int_t evNumber1=0,Int_t evNumber2=0) {
+RICHdetect (Int_t evNumber1=0,Int_t evNumber2=0, Int_t type, Int_t version) {
 // Dynamically link some shared libs
  
     if (gClassTable->GetID("AliRun") < 0) {
@@ -34,20 +34,27 @@ RICHdetect (Int_t evNumber1=0,Int_t evNumber2=0) {
     //printf ("I'm after gAlice \n");
     
     AliRICH *RICH  = (AliRICH*) gAlice->GetDetector("RICH"); 
-    
+
     // Create Recontruction algorithm object
-    AliRICHDetect *detect = new AliRICHDetect("RICH reconstruction algorithm","Reconstruction");
     
+    //V0
+    if(version == 0)
+      AliRICHDetect *detect = new AliRICHDetect("RICH reconstruction algorithm","Reconstruction");
+
+    if(version == 1)
+      AliRICHDetect *detect = new AliRICHDetectV1("RICH reconstruction algorithm","Reconstruction");
+    
+
 // Reconstruct
     // Event Loop
     //
     for (int nev=0; nev<= evNumber2; nev++) {
       Int_t nparticles = gAlice->GetEvent(nev);
-      cout <<endl<< "Processing event:" <<nev<<endl;
-      cout << "Particles       :" <<nparticles<<endl;
+      printf("\nProcessing event: %d\n",nev);
+      printf("\nParticles       : %d\n",nparticles);
       if (nev < evNumber1) continue;
       if (nparticles <= 0) return;
-      if (RICH) detect->Detect();
+      if (RICH) detect->Detect(nev, type);
       char hname[30];
       sprintf(hname,"TreeR%d",nev);
       gAlice->TreeR()->Write(hname);