]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/testreconSDigits.C
Rename of version v4
[u/mrichter/AliRoot.git] / PHOS / testreconSDigits.C
1 #include "AliPHOSGetter.h"
2 #include "TFile.h"
3 #include "TTree.h"
4 #include "TBranch.h"
5 #include "TClonesArray.h"
6 #include "TCanvas.h"
7 #include "TSystem.h"
8 #include "AliPHOSHit.h"
9 #include "TFolder.h"
10 #include "TStopwatch.h"
11 #include "TObjArray.h"
12 #include "AliPHOSGeometry.h"
13 #include "AliPHOSDigit.h"
14 #include "AliPHOSSDigitizer.h"
15
16 void testreconSDigits(Int_t nevent = 1, const char *config="testconfig.C")
17 {
18   cerr<<" ___________________________________________________________________ "<<endl;
19   cerr<<" "<<endl;
20   cerr<<"           MESS ==> Beginning of the PHOS reconstruction. "<<endl;
21   cerr<<" ___________________________________________________________________ "<<endl;
22   const Float_t maxSDigits = 62.37 ;
23   cerr<<"La valeur de maxSDigits est "<<maxSDigits<<endl;
24   const Float_t widSDigits = TMath::Sqrt(maxSDigits) ;
25   cerr<<"La valeur de widSDigits est "<<widSDigits<<endl;
26   AliPHOSSDigitizer *sd = new AliPHOSSDigitizer("galice.root","test suite");
27   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
28   sd->ExecuteTask("deb"); 
29   cerr << "# of SDigits " << gime->SDigits()->GetEntries() / gime->MaxEvent() << endl;
30   Float_t nSDigits =  (Float_t) (gime->SDigitizer()->GetSDigitsInRun()) / gime->MaxEvent();
31   cerr<<"__________________________________________________________________"<<endl;
32   cerr<<" "<<endl;
33   cerr<<"La valeur de nSDigits est "<<nSDigits<<endl;
34   cerr<<"__________________________________________________________________"<<endl;
35  
36    if ( nSDigits < maxSDigits-widSDigits || nSDigits > maxSDigits+widSDigits ) {
37     cerr<<"__________________________________________________________________"<<endl;
38     cerr<<" "<<endl;
39     cerr<<"       MESS ==> Error detected in the SDigits process. Sending error file to PHOS director."<<endl;
40     cerr<<"__________________________________________________________________"<<endl;
41    // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/galice.root galice.root | mail -s "PHOS INSTALLATION ERROR" schutz@in2p3.fr");
42  }
43 }