3 # Prepare the environment
5 mkdir $HOME/EMCALTestSuite ; cd $HOME/EMCALTestSuite
6 cp $ALICE_ROOT/EMCAL/grunTestSuite.C .
7 cp $ALICE_ROOT/EMCAL/ConfigTestSuite.C .
20 set MINTRACKSEGMENTS=1
21 set MAXTRACKSEGMENTS=2
26 echo EMCAL Test Suite run on `date` > TestSuite.log
27 echo "=======================================================================" >> TestSuite.log
28 echo AliROOT version `which aliroot` >> TestSuite.log
29 echo Root version `which root` >> TestSuite.log
30 echo "=======================================================================" >> TestSuite.log
34 echo " **** SIMULATION **** " >> TestSuite.log
35 aliroot -b -q grunTestSuite.C\(100\) >>& TestSuite.log
37 echo " Int_t minhits = $MINHITS ;" >> tempo.C
38 echo " Int_t maxhits = $MAXHITS ;" >> tempo.C
39 echo ' AliEMCALGetter * gime = AliEMCALGetter::Instance("galice.root") ;' >> tempo.C
40 echo ' TH1F * hitmul = new TH1F("hitmul", "EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
41 echo ' Int_t max = gime->MaxEvent() ; ' >> tempo.C
42 echo ' Int_t evt = 0 ; ' >> tempo.C
43 echo ' for ( evt = 0 ; evt < max ; evt++ ) { ' >> tempo.C
44 echo ' gime->Event(evt,"H") ; ' >> tempo.C
45 echo ' hitmul->Fill(gime->Hits()->GetEntries()) ; ' >> tempo.C
47 echo ' TF1 * gaus = new TF1("gaus", "gaus", 0., 200.) ; ' >> tempo.C
48 echo ' hitmul->Fit(gaus,"", "", 40, 100) ; ' >> tempo.C
49 echo ' if( gaus->GetParameter(1) > maxhits || gaus->GetParameter(1) < minhits ) ' >> tempo.C
50 echo ' printf("ERRORSIM 1") ; ' >> tempo.C
51 echo ' else ' >> tempo.C
52 echo ' printf("ERRORSIM 0") ; ' >> tempo.C
54 aliroot -b -q tempo.C >>& TestSuite.log
55 set ERRORSIM = `cat TestSuite.log | grep ERRORSIM | awk '{print $2}'`
58 uuencode TestSuite.log TestSuite.log | mail -s 'EMCAL INSTALLATION ERROR' yves.schutz@cern.ch
65 echo " **** RECONSTRUCTION **** " >> TestSuite.log
66 aliroot -b >>& TestSuite.log <<EOF
67 AliEMCALSDigitizer sd("galice.root") ;
68 sd.ExecuteTask("deb all") ;
69 AliEMCALDigitizer d("galice.root") ;
70 d.ExecuteTask("deb all") ;
71 AliEMCALClusterizerv1 cl("galice.root") ;
72 cl.ExecuteTask("deb all") ;
73 AliEMCALTrackSegmentMakerv1 ts("galice.root") ;
74 ts.ExecuteTask("deb all") ;
75 AliEMCALPIDv1 pd("galice.root") ;
76 pd.ExecuteTask("deb all") ;
80 echo " Int_t minsdig = $MINSDIGITS ;" >> tempo.C
81 echo " Int_t maxsdig = $MAXSDIGITS ;" >> tempo.C
82 echo " Int_t mindig = $MINDIGITS ;" >> tempo.C
83 echo " Int_t maxdig = $MAXDIGITS ;" >> tempo.C
84 echo " Int_t minemcrp = $MINEMCRECPOINTS ;" >> tempo.C
85 echo " Int_t maxemcrp = $MAXEMCRECPOINTS ;" >> tempo.C
86 echo " Int_t mincpvrp = $MINCPVRECPOINTS ;" >> tempo.C
87 echo " Int_t maxcpvrp = $MAXCPVRECPOINTS ;" >> tempo.C
88 echo " Int_t mints = $MINTRACKSEGMENTS ;" >> tempo.C
89 echo " Int_t maxts = $MAXTRACKSEGMENTS ;" >> tempo.C
90 echo " Int_t minpa = $MINRECPARTICLES ;" >> tempo.C
91 echo " Int_t maxpa = $MAXRECPARTICLES ;" >> tempo.C
92 echo ' AliEMCALGetter * gime = AliEMCALGetter::Instance("galice.root") ;' >> tempo.C
93 echo ' TH1F * sdigmul = new TH1F("sdigmul", " SDigits EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
94 echo ' TH1F * digmul = new TH1F("digmul", " Digits EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
95 echo ' TH1F * emcrpmul= new TH1F("emcrpmul", " EMCRecPoints EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
96 echo ' TH1F * cpvrpmul= new TH1F("cpvrpmul", " CPVRecPoints EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
97 echo ' TH1F * tsmul = new TH1F("tsmul", " TrackSegments EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
98 echo ' TH1F * pamul = new TH1F("pamul", " RecParticles EMCAL Test Suite", 100, 0., 200.) ; ' >> tempo.C
99 echo ' Int_t max = gime->MaxEvent() ; ' >> tempo.C
100 echo ' Int_t evt = 0 ; ' >> tempo.C
101 echo ' for ( evt = 0 ; evt < max ; evt++ ) { ' >> tempo.C
102 echo ' gime->Event(evt,"SDRTP") ; ' >> tempo.C
103 echo ' sdigmul->Fill(gime->SDigits()->GetEntries()) ; ' >> tempo.C
104 echo ' digmul->Fill(gime->Digits()->GetEntries()) ; ' >> tempo.C
105 echo ' emcrpmul->Fill(gime->EmcRecPoints()->GetEntries()) ; ' >> tempo.C
106 echo ' cpvrpmul->Fill(gime->CpvRecPoints()->GetEntries()) ; ' >> tempo.C
107 echo ' tsmul->Fill(gime->TrackSegments()->GetEntries()) ; ' >> tempo.C
108 echo ' pamul->Fill(gime->RecParticles()->GetEntries()) ; ' >> tempo.C
109 echo ' } ' >> tempo.C
110 echo ' TF1 * gaus = new TF1("gaus", "gaus", 0., 200.) ; ' >> tempo.C
111 echo ' sdigmul->Fit(gaus, "", "", 40., 100.) ; ' >> tempo.C
112 echo ' sdigmul->Draw() ; ' >> tempo.C
113 echo ' if( gaus->GetParameter(1) > maxsdig || gaus->GetParameter(1) < minsdig ) ' >> tempo.C
114 echo ' printf("ERRORREC 1 sdigits\n") ; ' >> tempo.C
115 echo ' digmul->Fit(gaus, "", "", 20., 80.) ; ' >> tempo.C
116 echo ' if( gaus->GetParameter(1) > maxdig || gaus->GetParameter(1) < mindig ) ' >> tempo.C
117 echo ' printf("ERRORREC 1 digits\n") ; ' >> tempo.C
118 echo ' emcrpmul->Fit(gaus, "", "", 0., 4.) ; ' >> tempo.C
119 echo ' if( gaus->GetParameter(1) > maxemcrp || gaus->GetParameter(1) < minemcrp ) ' >> tempo.C
120 echo ' printf("ERRORREC 1 emc recpoints\n") ; ' >> tempo.C
121 echo ' cpvrpmul->Fit(gaus, "", "", 0., 4.) ; ' >> tempo.C
122 echo ' if( gaus->GetParameter(1) > maxcpvrp || gaus->GetParameter(1) < mincpvrp ) ' >> tempo.C
123 echo ' printf("ERRORREC 1 cpv recpoints\n") ; ' >> tempo.C
124 echo ' tsmul->Fit(gaus, "", "", 0., 4.) ; ' >> tempo.C
125 echo ' if( gaus->GetParameter(1) > maxts || gaus->GetParameter(1) < mints ) ' >> tempo.C
126 echo ' printf("ERRORREC 1 track segments\n") ; ' >> tempo.C
127 echo ' pamul->Fit(gaus, "", "", 0., 4. ) ; ' >> tempo.C
128 echo ' if( gaus->GetParameter(1) > maxpa || gaus->GetParameter(1) < minpa ) ' >> tempo.C
129 echo ' printf("ERRORREC 1 recparticles\n") ; ' >> tempo.C
131 aliroot -b -q tempo.C >>& TestSuite.log
132 set ERRORREC = `cat TestSuite.log | grep ERRORREC | awk '{print $2}'`
135 uuencode TestSuite.log TestSuite.log | mail -s 'EMCAL INSTALLATION ERROR' yves.schutz@cern.ch
140 #rm -fr $HOME/EMCALTestSuite