]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
test suite update
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Sep 2001 16:01:18 +0000 (16:01 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Sep 2001 16:01:18 +0000 (16:01 +0000)
PHOS/Makefile
PHOS/testconfig.C
PHOS/testreconDigits.C
PHOS/testreconRecParticles.C
PHOS/testreconRecPoints.C
PHOS/testreconSDigits.C
PHOS/testreconTrackSegments.C
PHOS/testsimexam.C
PHOS/testsimglobal.C [new file with mode: 0644]

index 52816396e650f7e67818f6545880578b2f39da05..817fa9648dcfa73fc82582b17aa7377080fcd087 100644 (file)
@@ -76,6 +76,15 @@ include $(ALICE_ROOT)/conf/GeneralMacros
 
 -include tgt_$(ALICE_TARGET)/Make-depend 
 
+test:  
+               @echo " ____________________________________________________________ "
+               @echo " "
+               @echo " Starting the test of the simulation/reconstruction software. Please don't take the warning messages into account. "
+               @echo " ____________________________________________________________ "
+               @aliroot -b -q testsim.C > out
+               @aliroot -b -q testsimglobal.C > out
+               @rm out
+               @rm testPHOS.root
 
 
 
index d812367fe54b49d0fcc58c4bb5e63ac8ce8a5917..68cfe7440b8c1ff3a3cd1aecf4cc42544870f7b1 100644 (file)
@@ -13,7 +13,7 @@ void Config()
   
   new     AliGeant3("C++ Interface to Geant3");
   
-  TFile  *rootfile = new TFile("galice.root", "recreate");
+  TFile  *rootfile = new TFile("testPHOS.root", "recreate");
   rootfile->SetCompressionLevel(2);
   
   
@@ -85,7 +85,7 @@ void Config()
   //
   //gener->SetVertexSmear(perTrack); 
   
-  gAlice->SetField(-999, 2);  //Specify maximum magnetic field in Tesla (neg. ==> default field)
+  gAlice->SetField(0,2);  //Specify maximum magnetic field in Tesla (neg. ==> default field)
   
   //=================== Alice BODY parameters =============================
   AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
index e92dd0fb60f13bfec206c3a11475e89d72145bef..7e05a95de6894fdfabfce0171ab639d49883cfec 100644 (file)
@@ -1,36 +1,27 @@
 #include "AliPHOSDigitizer.h"
 #include "AliPHOSGetter.h"
-#include "TFile.h"
-#include "TTree.h"
-#include "TBranch.h"
-#include "TClonesArray.h"
-#include "TCanvas.h"
 #include "TSystem.h"
-#include "AliPHOSHit.h"
-#include "TFolder.h"
-#include "TStopwatch.h"
-#include "TObjArray.h"
-#include "AliPHOSGeometry.h"
 #include "AliPHOSDigit.h"
-#include "AliPHOSSDigitizer.h"
+
 
 void testreconDigits(Int_t nevent = 1, const char *config="testconfig.C")
-{ const Float_t maxDigits = 3483.41 ;
+{ const Float_t maxDigits = 3489.41 ;
   const Float_t widDigits = TMath::Sqrt(maxDigits) ;
-  AliPHOSDigitizer *d = new AliPHOSDigitizer("galice.root","test suite");
+  AliPHOSDigitizer *d = new AliPHOSDigitizer("testPHOS.root","test suite");
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
   d->ExecuteTask("deb"); 
   Float_t nDigits = (Float_t)(gime->Digitizer()->GetDigitsInRun()) / gime->MaxEvent();
-   cerr<<"__________________________________________________________________"<<endl;
-  cerr<<" "<<endl;
-  cerr<<"la valeur de nDigits est "<<nDigits<<endl;
-  cerr<<"__________________________________________________________________"<<endl;
+  
   if ( nDigits < maxDigits-widDigits || nDigits > maxDigits+widDigits ) {
     cerr<<"__________________________________________________________________"<<endl;
     cerr<<" "<<endl;
-    cerr<<"       MESS ==> Error detected in the Digits process. Sending error file to PHOS director."<<endl;
+    cerr<<"             MESS ==> Error detected in the Digits process. Sending error file to PHOS director."<<endl;
     cerr<<"__________________________________________________________________"<<endl;
-   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s "PHOS INSTALLATION ERROR" schutz@in2p3.fr");
+   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
   }
-
+ cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> Digits process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
 }
+
index fd1cb074fe1236be68c512bf3efa56151405ecbe..29c475943a3372ce54cb139be3b881a62f5677aa 100644 (file)
@@ -12,28 +12,27 @@ void testreconRecParticles(Int_t nevent = 1, const char *config="testconfig.C")
   TString name = "test suite" ;
 
 
-  AliPHOSPID * pid = new AliPHOSPIDv1("galice.root",name.Data());
+  AliPHOSPID * pid = new AliPHOSPIDv1("testPHOS.root",name.Data());
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
-  pid->ExecuteTask("deb");
-  TString fullName = name + pid->Version() ;  
-   
-  Float_t nRecParticles =  (Float_t) (gime->PID(fullName.Data())->GetRecParticlesInRun())/gime->MaxEvent();
-  cerr<<"_____________________________________________________________________"<<endl;
-  cerr<<" "<<endl;
-  cerr<<"nRecParticles vaut "<<nRecParticles<<endl;
-  cerr<<"_____________________________________________________________________"<<endl;
-  cerr<<"_____________________________________________________________________"<<endl;
-  cerr<<" "<<endl;
-  cerr<<"      MESS ==> reconstruction ended successfully."<<endl;
-  cerr<<"_____________________________________________________________________"<<endl;
- if ( nRecParticles < maxRecParticles-0.15 || nRecParticles > maxRecParticles+0.15 ) {
+  pid->ExecuteTask("deb");   
+  Float_t nRecParticles =  (Float_t) (gime->PID(name.Data())->GetRecParticlesInRun())/gime->MaxEvent();
+ if ( nRecParticles < maxRecParticles-0.25 || nRecParticles > maxRecParticles+0.25 ) {
     cerr<<"__________________________________________________________________"<<endl;
     cerr<<" "<<endl;
-    cerr<<"       MESS ==> Error detected in the RecParticles process. Sending error file to PHOS director."<<endl;
+    cerr<<"             MESS ==> Error detected in the RecParticles process. Sending error file to PHOS director."<<endl;
     cerr<<"__________________________________________________________________"<<endl;
-   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s "PHOS INSTALLATION ERROR" schutz@in2p3.fr");
-  }
-
+   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
+ }
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> RecParticles process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
 
+ cerr<<"_____________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> reconstruction ended successfully."<<endl;
+  cerr<<"_____________________________________________________________________"<<endl;
 
 }
index d2db8721e4d120701e51223b8c4bdcaf3bd36b22..1a5bc01c16cc4dc3f613d3eb4a352cc31bf32d8c 100644 (file)
@@ -1,40 +1,30 @@
 #include "AliPHOSClusterizer.h"
 #include "AliPHOSGetter.h"
-#include "TFile.h"
-#include "TTree.h"
-#include "TBranch.h"
-#include "TClonesArray.h"
-#include "TCanvas.h"
+#include "AliPHOSClusterizerv1.h"
 #include "TSystem.h"
-#include "AliPHOSHit.h"
-#include "TFolder.h"
-#include "TStopwatch.h"
-#include "TObjArray.h"
-#include "AliPHOSGeometry.h"
-#include "AliPHOSDigit.h"
-#include "AliPHOSSDigitizer.h"
+
 
 void testreconRecPoints(Int_t nevent = 1, const char *config="testconfig.C")
 {
-  const Float_t maxRecPoints = 223.26 ;
+  const Float_t maxRecPoints = 222.83 ;
   const Float_t widRecPoints = TMath::Sqrt(maxRecPoints) ;
   TString name = "test suite" ;
-  AliPHOSClusterizer * cluster = new  AliPHOSClusterizerv1("galice.root", name.Data());
-  AliPHOSGetter * gime = AliPHOSGetter::GetInstance(); 
+  AliPHOSClusterizer * cluster = new  AliPHOSClusterizerv1("testPHOS.root", name.Data());
+  AliPHOSGetter * gime = AliPHOSGetter::GetInstance();
   cluster->ExecuteTask("deb");
-  TString fullName = name + cluster->Version() ;  
-  Float_t nRecPoints =  (Float_t) (gime->Clusterizer(fullName.Data())->GetRecPointsInRun()) / gime->MaxEvent();
-  cerr<<"__________________________________________________________________"<<endl;
-  cerr<<" "<<endl;
-  cerr<<"nRecPoints vaut "<<nRecPoints<<endl;
-  cerr<<"__________________________________________________________________"<<endl; 
+  Float_t nRecPoints =  (Float_t) (gime->Clusterizer(name.Data())->GetRecPointsInRun()) / gime->MaxEvent();
    if ( nRecPoints < maxRecPoints-widRecPoints || nRecPoints > maxRecPoints+widRecPoints ) {
     cerr<<"__________________________________________________________________"<<endl;
     cerr<<" "<<endl;
-    cerr<<"       MESS ==> Error detected in the Clusterizing process. Sending error file to PHOS director."<<endl;
+    cerr<<"             MESS ==> Error detected in the Clusterizing process. Sending error file to PHOS director."<<endl;
     cerr<<"__________________________________________________________________"<<endl;
-   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s "PHOS INSTALLATION ERROR" schutz@in2p3.fr");
-  }
+   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
+ }
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> Cluster process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
 
  
 }
index 69697ab280dbc4d08f5526c2c79d5b72d931fc49..b4453ae9e68e3db9db295ddf3c859863469f6a67 100644 (file)
@@ -1,15 +1,5 @@
 #include "AliPHOSGetter.h"
-#include "TFile.h"
-#include "TTree.h"
-#include "TBranch.h"
-#include "TClonesArray.h"
-#include "TCanvas.h"
 #include "TSystem.h"
-#include "AliPHOSHit.h"
-#include "TFolder.h"
-#include "TStopwatch.h"
-#include "TObjArray.h"
-#include "AliPHOSGeometry.h"
 #include "AliPHOSDigit.h"
 #include "AliPHOSSDigitizer.h"
 
@@ -19,25 +9,23 @@ void testreconSDigits(Int_t nevent = 1, const char *config="testconfig.C")
   cerr<<" "<<endl;
   cerr<<"           MESS ==> Beginning of the PHOS reconstruction. "<<endl;
   cerr<<" ___________________________________________________________________ "<<endl;
-  const Float_t maxSDigits = 62.37 ;
-  cerr<<"La valeur de maxSDigits est "<<maxSDigits<<endl;
+  const Float_t maxSDigits = 62.89 ;
   const Float_t widSDigits = TMath::Sqrt(maxSDigits) ;
-  cerr<<"La valeur de widSDigits est "<<widSDigits<<endl;
-  AliPHOSSDigitizer *sd = new AliPHOSSDigitizer("galice.root","test suite");
+  AliPHOSSDigitizer *sd = new AliPHOSSDigitizer("testPHOS.root","test suite");
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
   sd->ExecuteTask("deb"); 
-  cerr << "# of SDigits " << gime->SDigits()->GetEntries() / gime->MaxEvent() << endl;
   Float_t nSDigits =  (Float_t) (gime->SDigitizer()->GetSDigitsInRun()) / gime->MaxEvent();
-  cerr<<"__________________________________________________________________"<<endl;
-  cerr<<" "<<endl;
-  cerr<<"La valeur de nSDigits est "<<nSDigits<<endl;
-  cerr<<"__________________________________________________________________"<<endl;
+  
  
    if ( nSDigits < maxSDigits-widSDigits || nSDigits > maxSDigits+widSDigits ) {
     cerr<<"__________________________________________________________________"<<endl;
     cerr<<" "<<endl;
-    cerr<<"       MESS ==> Error detected in the SDigits process. Sending error file to PHOS director."<<endl;
+    cerr<<"             MESS ==> Error detected in the SDigits process. Sending error file to PHOS director."<<endl;
     cerr<<"__________________________________________________________________"<<endl;
-   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s "PHOS INSTALLATION ERROR" schutz@in2p3.fr");
+   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
  }
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> SDigits process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
 }
index 6724e7534cf987122593928d04085e54d6ddd356..b9240fcf11dfa9b86ddbc7e592a07be9cb16db17 100644 (file)
@@ -1,4 +1,5 @@
 #include " AliPHOSTrackSegmentMaker.h"
+#include " AliPHOSTrackSegmentMakerv1.h"
 #include "AliPHOSGetter.h"
 #include "TSystem.h"
 
@@ -9,22 +10,21 @@ void testreconTrackSegments(Int_t nevent = 1, const char *config="testconfig.C")
   const Float_t widTrackSegments = TMath::Sqrt(maxTrackSegments) ;
   TString name = "test suite" ;
  
-  AliPHOSTrackSegmentMaker * tracks = new AliPHOSTrackSegmentMakerv1("galice.root",name.Data());
+  AliPHOSTrackSegmentMaker * tracks = new AliPHOSTrackSegmentMakerv1("testPHOS.root",name.Data());
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
   tracks->ExecuteTask("deb");
-  TString fullName = name + tracks->Version() ;
-  Float_t nTrackSegments =  (Float_t) (gime->TrackSegmentMaker(fullName.Data())->GetTrackSegmentsInRun()) / gime->MaxEvent();
-  cerr<<"__________________________________________________________________"<<endl;
-  cerr<<" "<<endl;
-  cerr<<"nTrackSegments vaut "<<nTrackSegments<<endl;
-  cerr<<"__________________________________________________________________"<<endl; 
-   if ( nTrackSegments < maxTrackSegments-0.15 || nTrackSegments > maxTrackSegments+0.15 ) {
+  Float_t nTrackSegments =  (Float_t) (gime->TrackSegmentMaker(name.Data())->GetTrackSegmentsInRun()) / gime->MaxEvent();
+   if ( nTrackSegments < maxTrackSegments-0.25 || nTrackSegments > maxTrackSegments+0.25 ) {
     cerr<<"__________________________________________________________________"<<endl;
     cerr<<" "<<endl;
-    cerr<<"       MESS ==> Error detected in the TrackSegments process. Sending error file to PHOS director."<<endl;
+    cerr<<"             MESS ==> Error detected in the TrackSegments process. Sending error file to PHOS director."<<endl;
     cerr<<"__________________________________________________________________"<<endl;
-   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s "PHOS INSTALLATION ERROR" schutz@in2p3.fr");
-  }
-
+   // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
+ }
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> TrackSegments process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
 }
+
index 5664301e946da120f79020ff97cdbc441dc1ea6f..d72e84a1ea8123d1a6db28cec2c86ee61a0f4bbe 100644 (file)
@@ -46,7 +46,8 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
 
    // Get the number of events generated in the simulation
 
-  AliPHOSGetter * gime = AliPHOSGetter::GetInstance("galice.root") ; 
+  AliPHOSGetter * gime = AliPHOSGetter::GetInstance("testPHOS.root") ; 
+  gime->Event(0,"Q");
   Int_t maxevent = gime->MaxEvent() ; 
  
   // Examine the alarms
@@ -76,14 +77,14 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
           boolala = 1; 
           cerr<<" _____________________________________________________________ "<<endl;
           cerr<< " " <<endl;
-          cerr << "       MESS ==> Examination detected an error in "<<namemul << endl ;    
+          cerr << "             MESS ==> Examination detected an error in "<<namemul << endl ;    
           cerr<<" _____________________________________________________________ "<<endl;
        }
         if (ratioenb[i]>maxAlaTotEnB) {
           boolala = 1;
           cerr<<" _____________________________________________________________ "<<endl;
           cerr<< " " <<endl;
-          cerr << "       MESS ==> Examination detected an error in "<<namen << endl ;
+          cerr << "             MESS ==> Examination detected an error in "<<namen << endl ;
           cerr<<" _____________________________________________________________ "<<endl;
        }
            
@@ -98,7 +99,7 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
      boolala = 1;
      cerr<<" _____________________________________________________________ "<<endl;
      cerr<< " " <<endl;
-     cerr << "          MESS ==> Examination detected an error in HitsM." << endl ;
+     cerr << "             MESS ==> Examination detected an error in HitsM." << endl ;
      cerr<<" _____________________________________________________________ "<<endl;
   }
 
@@ -106,7 +107,7 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
      boolala = 1;
      cerr<<" _____________________________________________________________ "<<endl;
      cerr<< " " <<endl;
-     cerr << "         MESS ==> Examination detected an error in TotEn." << endl ;
+     cerr << "             MESS ==> Examination detected an error in TotEn." << endl ;
      cerr<<" _____________________________________________________________ "<<endl;
   }
 
@@ -116,7 +117,7 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
     if ( boolala == 1 ) {
   cerr<<" _____________________________________________________________ "<<endl;
   cerr<< " " <<endl;
-  cerr << "          MESS ==> Examination sets up the file that will be sent to the responsible for PHOS in ALIROOT development (30s). " << endl ;
+  cerr << "             MESS ==> Examination sets up the file that will be sent to PHOS director (30s). " << endl ;
   cerr<<" _____________________________________________________________ "<<endl;    
       Int_t index = 0 ; 
       Int_t nhits = 0 ; 
@@ -154,7 +155,7 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
         //get the number of the event
          gime->Event(index) ; 
          // get the number of cells reached during this event and fill the total multiplicity histogram
-         Int_t n = gime->NHits() ;
+         Int_t n = gime->Hits()->GetEntries() ;
          nhits += n ; 
          his->Fill(n) ;  
          // Get the data per block      
@@ -192,7 +193,7 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
         
       nhits /= maxevent ; 
       cerr << "av = " << nhits << endl ;
-      TFile * file = gROOT -> GetFile("galice.root");
+      TFile * file = gROOT -> GetFile("testPHOS.root");
       file -> Write();
       his->Draw() ;
       hisnrg->Draw() ;
@@ -215,11 +216,11 @@ void testsimexam (Int_t nevent=1, const char *config="testconfig.C")
       hisba.Delete() ;
       hisbanrg.Delete() ; 
       file->Close();
-      // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s 'PHOS INSTALLATION ERROR  ' schutz@in2p3.fr"); 
+      //  gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR  ' schutz@in2p3.fr"); 
    
     }
   cerr<<" _____________________________________________________________ "<<endl;
   cerr<< " " <<endl;
-  cerr << "           MESS ==> Examination ended successfully. " << endl ;
+  cerr << "             MESS ==> Examination ended successfully. " << endl ;
   cerr<<" _____________________________________________________________ "<<endl;   
 }
diff --git a/PHOS/testsimglobal.C b/PHOS/testsimglobal.C
new file mode 100644 (file)
index 0000000..b3c0e4f
--- /dev/null
@@ -0,0 +1,378 @@
+#include "AliPHOSGetter.h"
+#include "TH2.h"
+#include "TH1.h"
+#include "TFile.h"
+#include "TTree.h"
+#include "TBranch.h"
+#include "TClonesArray.h"
+#include "TCanvas.h"
+#include "TSystem.h"
+#include "AliPHOSHit.h"
+#include "TF1.h"
+#include "TFormula.h"
+#include "TFolder.h"
+#include "TStopwatch.h"
+#include "TObjArray.h"
+#include "AliPHOSGeometry.h"
+#include "AliPHOSDigit.h"
+#include "AliPHOSSDigitizer.h"
+#include "AliPHOSDigitizer.h"
+#include "AliPHOSClusterizer.h"
+#include "AliPHOSClusterizerv1.h"
+#include "AliPHOSTrackSegmentMaker.h"
+#include "AliPHOSTrackSegmentMakerv1.h"
+#include "AliPHOSPID.h"
+#include "AliPHOSPIDv1.h"
+
+
+void testsimglobal(Int_t nevent = 1, const char *config="testconfig.C")
+{
+  //
+  // Simple macro to run aliroot in a batch mode
+  //
+  cerr<<" __________________________________________________________________ "<<endl;
+  cerr<< " " <<endl;
+  cerr<<"             MESS ==> Beginning of the simulation examination."<<endl;
+  cerr<<" __________________________________________________________________ "<<endl;
+  // Definition of the alarm bounds
+     const Float_t maxAlaHitsM = 12.79  ;  // total multiplicity
+     const Float_t maxAlaTotEn = 19.34  ;  // total energy
+     const Float_t maxAlaTotEnB = 18.35 ;  // per block multiplicity
+     const Float_t maxAlaHitsMB = 11.1  ;  // per block energy
+   
+       // boolean which will test if there is an alarm
+   Int_t boolerror = 0;
+   
+   // define the array in which the events that have not reach th EMCA will be put.
+  
+   
+
+   TStopwatch timer;
+   timer.Start();
+
+   // Get the number of events generated in the simulation
+
+  AliPHOSGetter * gime = AliPHOSGetter::GetInstance("testPHOS.root") ; 
+  Int_t maxevent = gime->MaxEvent() ; 
+  gime->Event(0,"Q");
+  // Examine the alarms
+
+   TObjArray * alahm = (TObjArray*)(gime->Alarms()->FindObject("HitsM"));
+   Float_t ratiohm = 100.0*(Float_t)alahm->GetEntries()/(Float_t)maxevent ;  
+  
+   TObjArray * alaet = (TObjArray*)(gime->Alarms()->FindObject("TotEn"));
+   Float_t ratioet = 100.0*(Float_t)alaet->GetEntries()/(Float_t)maxevent ; 
+  
+
+   // Define the alarms per block and examine them
+   char namemul[80], namen[80];
+   TObjArray* alahmb[5];
+   TObjArray* alaenb[5];
+   Float_t ratiohmb[5], ratioenb[5];
+   for (Int_t i = 0 ; i < 5 ; i++)
+     {
+        sprintf(namemul,"HitsMB%d",i+1);
+        sprintf(namen,"TotEnB%d",i+1);
+        alahmb[i] = (TObjArray*) (gime->Alarms()->FindObject(namemul));
+       ratiohmb[i] = 100.0*(Float_t)alahmb[i]->GetEntries()/(Float_t)maxevent;        
+        alaenb[i] = (TObjArray*)(gime->Alarms()->FindObject(namen));
+        ratioenb[i] = 100.0*(Float_t)alaenb[i]->GetEntries()/(Float_t)maxevent;      
+        if (ratiohmb[i]>maxAlaHitsMB){
+          boolerror = 1; 
+          cerr<<" _____________________________________________________________ "<<endl;
+          cerr<< " " <<endl;
+          cerr << "             MESS ==> Examination detected an error in "<<namemul << endl ;    
+          cerr<<" _____________________________________________________________ "<<endl;
+       }
+        if (ratioenb[i]>maxAlaTotEnB) {
+          boolerror = 1;
+          cerr<<" _____________________________________________________________ "<<endl;
+          cerr<< " " <<endl;
+          cerr << "             MESS ==> Examination detected an error in "<<namen << endl ;
+          cerr<<" _____________________________________________________________ "<<endl;
+       }
+           
+     }
+
+  timer.Stop();
+  timer.Print();
+
+      
+  if (ratiohm>maxAlaHitsM){
+     boolerror = 1;
+     cerr<<" _____________________________________________________________ "<<endl;
+     cerr<< " " <<endl;
+     cerr << "             MESS ==> Examination detected an error in HitsM." << endl ;
+     cerr<<" _____________________________________________________________ "<<endl;
+  }
+
+  if (ratioet>maxAlaTotEn){
+     boolerror = 1;
+     cerr<<" _____________________________________________________________ "<<endl;
+     cerr<< " " <<endl;
+     cerr << "             MESS ==> Examination detected an error in TotEn." << endl ;
+     cerr<<" _____________________________________________________________ "<<endl;
+  }
+
+  // Condition that will launch the general loop that builds the histograms in order to allow a further analysis.
+  
+    if ( boolerror == 1 ) {
+  cerr<<" _____________________________________________________________ "<<endl;
+  cerr<< " " <<endl;
+  cerr << "             MESS ==> Examination sets up the file that will be sent to PHOS director (30s). " << endl ;
+  cerr<<" _____________________________________________________________ "<<endl;    
+      Int_t index = 0 ; 
+      Int_t nhits = 0 ; 
+    
+      TH1F * his = new TH1F("Total Multiplicity", "Total Multiplicity in PHOS", 200, 0., 200.) ;
+      TH1F * hisnrg = new TH1F("Total Energy", "Total energy in PHOS", 200, 0., 12.) ;
+    
+     // name and define the different histograms per block involved in the analysis
+      TClonesArray hisba("TH1F") ;
+      TClonesArray hisbanrg("TH1F") ;  
+      for (Int_t i = 0 ; i < 6 ; i++)
+       {
+         char name[80], title[80] ; 
+         sprintf(name,"multiplicity for block %d",i) ; 
+         sprintf(title,"multiplicity per blocks, block %d",i) ;
+         new(hisba[i]) TH1F(name, title, 100, 0., 100.) ; 
+      
+
+         char namenrg[80], titlenrg[80] ; 
+         sprintf(namenrg,"total energy for block %d",i) ; 
+         sprintf(titlenrg,"total energy per block, block %d",i) ;          
+         new(hisbanrg[i]) TH1F(namenrg, titlenrg, 200, 0., 12.) ; 
+       }
+      // define the global histograms, the hit pointer and give the means to get the actual block reached by the photon
+      AliPHOSHit * hit;
+      TH1F * hist ; 
+      TH1F * histnrg;
+      TH2F * hbiz = new TH2F ("hbiz","hbiz",200.,0.,200.,200.,0.,12.);
+      AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; 
+
+
+      // the very general loop
+      for (index = 0 ; index < maxevent ; index++)
+       {
+        //get the number of the event
+         gime->Event(index) ; 
+         // get the number of cells reached during this event and fill the total multiplicity histogram
+         Int_t n = gime->Hits()->GetEntries() ;
+         nhits += n ; 
+         his->Fill(n) ;  
+         // Get the data per block      
+         TClonesArray * hita = (TClonesArray *) gime -> Hits();
+         TIter next(hita);
+         Float_t Et = 0.;
+         Int_t id = 0, block = 0;
+         Int_t nhit[6], rid[4];
+         Float_t etblock[6]; 
+         for ( Int_t i = 0; i < 6 ; i++) { 
+          nhit[i] = 0 ; 
+          etblock[i] = 0 ;
+        }
+     
+        while ( (hit = (AliPHOSHit *) next()) ) {
+                id = hit->GetId();
+                if  (geom->IsInEMC(id) ) { 
+                  Et += ( hit -> GetEnergy());
+                  geom->AbsToRelNumbering(id,rid) ;
+                  block = rid[0];
+                  nhit[block]++  ;
+                  etblock[block] +=  ( hit -> GetEnergy());
+                }
+                }
+
+
+        //Fill all the histograms but total multiplicity, already done
+        hist = static_cast<TH1F*>(hisba.At(block)) ; 
+        hist->Fill(nhit[block]) ; 
+        histnrg = static_cast<TH1F*>(hisbanrg.At(block)) ;
+        histnrg->Fill(etblock[block]);
+        hisnrg -> Fill(Et);
+         hbiz->Fill(n,Et);              
+       }   
+        
+      nhits /= maxevent ; 
+      cerr << "av = " << nhits << endl ;
+      TFile * file = gROOT -> GetFile("testPHOS.root");
+      file -> Write();
+      his->Draw() ;
+      hisnrg->Draw() ;
+      hbiz->Draw();
+
+      //Put the histograms in the root file
+      for (Int_t i = 0 ; i < 6 ; i++)  { 
+         hist = static_cast<TH1F*>(hisba.At(i)) ;
+         histnrg = static_cast<TH1F*>(hisbanrg.At(i));
+     
+        
+        // cout << hist << endl << i << endl ; 
+        hist->Draw();
+        histnrg->Draw(); 
+        
+   
+       }
+      
+      file->Write() ;
+      hisba.Delete() ;
+      hisbanrg.Delete() ; 
+      file->Close();
+        gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR  ' almajor@caramail.com"); 
+   
+    }
+  cerr<<" _____________________________________________________________ "<<endl;
+  cerr<< " " <<endl;
+  cerr << "             MESS ==> Examination ended successfully. " << endl ;
+  cerr<<" _____________________________________________________________ "<<endl;   
+
+
+
+  const Float_t maxSDigits = 62.89 ;
+  const Float_t widSDigits = TMath::Sqrt(maxSDigits) ;
+  const Float_t maxDigits = 3489.41 ;
+  const Float_t widDigits = TMath::Sqrt(maxDigits) ;
+  const Float_t maxRecPoints = 222.83 ;
+  const Float_t widRecPoints = TMath::Sqrt(maxRecPoints) ;
+  const Float_t maxTrackSegments = 1 ;
+  const Float_t maxRecParticles = 1 ;
+  TString reconame = "test suite" ;
+  if (boolerror == 1){
+  cerr<<" ___________________________________________________________________ "<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> Please find the error and try the whole simulation again. "<<endl;
+  cerr<<" ___________________________________________________________________ "<<endl;
+  }
+
+  else {
+
+  cerr<<" ___________________________________________________________________ "<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> Beginning of the PHOS reconstruction. "<<endl;
+  cerr<<" ___________________________________________________________________ "<<endl;
+
+  //SDigits process
+   AliPHOSSDigitizer *sd = new AliPHOSSDigitizer("testPHOS.root",reconame.Data());
+   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+   sd->ExecuteTask("deb"); 
+   Float_t nSDigits =  (Float_t) (gime->SDigitizer()->GetSDigitsInRun()) / gime->MaxEvent(); 
+   if ( nSDigits < maxSDigits-widSDigits || nSDigits > maxSDigits+widSDigits ) {
+    boolerror = 1 ;  
+    cerr<<"__________________________________________________________________"<<endl;
+    cerr<<" "<<endl;
+    cerr<<"             MESS ==> Error detected in the SDigits process. Sending error file to PHOS director."<<endl;
+    cerr<<"__________________________________________________________________"<<endl;
+    gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' almajor@caramail.com");
+    }
+
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> SDigits process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
+
+  //Digits process
+     if (boolerror == 0){
+        AliPHOSDigitizer *d = new AliPHOSDigitizer("testPHOS.root",reconame.Data());
+        d->ExecuteTask("deb"); 
+         Float_t nDigits = (Float_t)(gime->Digitizer()->GetDigitsInRun()) / gime->MaxEvent();
+  
+              if ( nDigits < maxDigits-widDigits || nDigits > maxDigits+widDigits ) {
+                  boolerror =1 ;
+                  cerr<<"__________________________________________________________________"<<endl;
+                  cerr<<" "<<endl;
+                  cerr<<"             MESS ==> Error detected in the Digits process. Sending error file to PHOS director."<<endl;
+                  cerr<<"__________________________________________________________________"<<endl;
+   
+    gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' almajor@caramail.com");
+             }
+  
+    cerr<<"__________________________________________________________________"<<endl;
+    cerr<<" "<<endl;
+    cerr<<"             MESS ==> Digits process ended successfully."<<endl;
+    cerr<<"__________________________________________________________________"<<endl;
+  }
+  
+//RecPoints process
+ if (boolerror == 0){
+ AliPHOSClusterizer * cluster = new  AliPHOSClusterizerv1("testPHOS.root", reconame.Data());
+  cluster->ExecuteTask("deb");
+  Float_t nRecPoints =  (Float_t) (gime->Clusterizer(reconame.Data())->GetRecPointsInRun()) / gime->MaxEvent();
+   if ( nRecPoints < maxRecPoints-widRecPoints || nRecPoints > maxRecPoints+widRecPoints ) {
+    boolerror = 1;
+    cerr<<"__________________________________________________________________"<<endl;
+    cerr<<" "<<endl;
+    cerr<<"             MESS ==> Error detected in the Clusterizing process. Sending error file to PHOS director."<<endl;
+    cerr<<"__________________________________________________________________"<<endl;
+  
+      gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' almajor@caramail.com");
+    }
+   
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> Cluster process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
+ }
+
+//TrackSegments process
+ if(boolerror == 0){ 
+  AliPHOSTrackSegmentMaker * tracks = new AliPHOSTrackSegmentMakerv1("testPHOS.root",reconame.Data());
+  tracks->ExecuteTask("deb");
+  Float_t nTrackSegments =  (Float_t) (gime->TrackSegmentMaker(reconame.Data())->GetTrackSegmentsInRun()) / gime->MaxEvent();
+   if ( nTrackSegments < maxTrackSegments-0.25 || nTrackSegments > maxTrackSegments+0.25 ) {
+    boolerror = 1;
+    cerr<<"__________________________________________________________________"<<endl;
+    cerr<<" "<<endl;
+    cerr<<"             MESS ==> Error detected in the TrackSegments process. Sending error file to PHOS director."<<endl;
+    cerr<<"__________________________________________________________________"<<endl;
+    
+      gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' almajor@caramail.com");
+    }
+   
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> TrackSegments process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
+ }
+//RecParticles process
+ if(boolerror == 0){
+  AliPHOSPID * pid = new AliPHOSPIDv1("testPHOS.root",reconame.Data()); pid->ExecuteTask("deb");
+  Float_t nRecParticles =  (Float_t) (gime->PID(reconame.Data())->GetRecParticlesInRun())/gime->MaxEvent();
+   if ( nRecParticles < maxRecParticles-0.25 || nRecParticles > maxRecParticles+0.25 ) {
+    boolerror = 1;
+    cerr<<"__________________________________________________________________"<<endl;
+    cerr<<" "<<endl;
+    cerr<<"             MESS ==> Error detected in the RecParticles process. Sending error file to PHOS director.Stop reconstruction."<<endl;
+    cerr<<"__________________________________________________________________"<<endl;
+    
+    gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' almajor@caramail.com");
+    }
+  cerr<<"__________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> RecParticles process ended successfully."<<endl;
+  cerr<<"__________________________________________________________________"<<endl;
+ }
+ if(boolerror == 0){
+  cerr<<"_____________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> reconstruction ended successfully."<<endl;
+  cerr<<"_____________________________________________________________________"<<endl;
+ }
+ else {
+ cerr<<"_____________________________________________________________________"<<endl;
+  cerr<<" "<<endl;
+  cerr<<"             MESS ==> Due to an error, reconstruction has not been completed.Please try again when the error has been found."<<endl;
+  cerr<<"_____________________________________________________________________"<<endl;
+  }
+ }
+}