]>
Commit | Line | Data |
---|---|---|
1 | #! /bin/tcsh -f | |
2 | # | |
3 | # Prepare the environment | |
4 | # | |
5 | mkdir $HOME/PHOSTestSuite ; cd $HOME/PHOSTestSuite | |
6 | cp $ALICE_ROOT/PHOS/grunTestSuite.C . | |
7 | cp $ALICE_ROOT/PHOS/ConfigTestSuite.C . | |
8 | # | |
9 | #begin data | |
10 | set MINHITS=68 | |
11 | set MAXHITS=72 | |
12 | set MINSDIGITS=68 | |
13 | set MAXSDIGITS=72 | |
14 | set MINDIGITS=40 | |
15 | set MAXDIGITS=48 | |
16 | set MINEMCRECPOINTS=1 | |
17 | set MAXEMCRECPOINTS=2 | |
18 | set MINCPVRECPOINTS=0 | |
19 | set MAXCPVRECPOINTS=2 | |
20 | set MINTRACKSEGMENTS=1 | |
21 | set MAXTRACKSEGMENTS=2 | |
22 | set MINRECPARTICLES=1 | |
23 | set MAXRECPARTICLES=2 | |
24 | #end data | |
25 | # | |
26 | echo PHOS 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 | |
31 | # | |
32 | # SIMULATION | |
33 | # | |
34 | echo " **** SIMULATION **** " >> TestSuite.log | |
35 | aliroot -b -q grunTestSuite.C\(100\) >>& TestSuite.log | |
36 | echo '{ ' > tempo.C | |
37 | echo " Int_t minhits = $MINHITS ;" >> tempo.C | |
38 | echo " Int_t maxhits = $MAXHITS ;" >> tempo.C | |
39 | echo ' AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;' >> tempo.C | |
40 | echo ' TH1F * hitmul = new TH1F("hitmul", "PHOS 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 | |
46 | echo ' } ' >> 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 | |
53 | echo '} ' >> tempo.C | |
54 | aliroot -b -q tempo.C >>& TestSuite.log | |
55 | set ERRORSIM = `cat TestSuite.log | grep ERRORSIM | awk '{print $2}'` | |
56 | if($ERRORSIM) then | |
57 | echo ERROR | |
58 | uuencode TestSuite.log TestSuite.log | mail -s 'PHOS INSTALLATION ERROR' yves.schutz@cern.ch | |
59 | exit(0) | |
60 | endif | |
61 | rm tempo.C | |
62 | # | |
63 | # RECONSTRUCTION | |
64 | # | |
65 | echo " **** RECONSTRUCTION **** " >> TestSuite.log | |
66 | aliroot -b >>& TestSuite.log <<EOF | |
67 | AliPHOSSDigitizer sd("galice.root") ; | |
68 | sd.ExecuteTask("deb all") ; | |
69 | AliPHOSDigitizer d("galice.root") ; | |
70 | d.ExecuteTask("deb all") ; | |
71 | AliPHOSClusterizerv1 cl("galice.root") ; | |
72 | cl.ExecuteTask("deb all") ; | |
73 | AliPHOSTrackSegmentMakerv1 ts("galice.root") ; | |
74 | ts.ExecuteTask("deb all") ; | |
75 | AliPHOSPIDv1 pd("galice.root") ; | |
76 | pd.ExecuteTask("deb all") ; | |
77 | .q | |
78 | EOF | |
79 | echo '{ ' > tempo.C | |
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 ' AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;' >> tempo.C | |
93 | echo ' TH1F * sdigmul = new TH1F("sdigmul", " SDigits PHOS Test Suite", 100, 0., 200.) ; ' >> tempo.C | |
94 | echo ' TH1F * digmul = new TH1F("digmul", " Digits PHOS Test Suite", 100, 0., 200.) ; ' >> tempo.C | |
95 | echo ' TH1F * emcrpmul= new TH1F("emcrpmul", " EMCRecPoints PHOS Test Suite", 100, 0., 200.) ; ' >> tempo.C | |
96 | echo ' TH1F * cpvrpmul= new TH1F("cpvrpmul", " CPVRecPoints PHOS Test Suite", 100, 0., 200.) ; ' >> tempo.C | |
97 | echo ' TH1F * tsmul = new TH1F("tsmul", " TrackSegments PHOS Test Suite", 100, 0., 200.) ; ' >> tempo.C | |
98 | echo ' TH1F * pamul = new TH1F("pamul", " RecParticles PHOS 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 | |
130 | echo '} ' >> tempo.C | |
131 | aliroot -b -q tempo.C >>& TestSuite.log | |
132 | set ERRORREC = `cat TestSuite.log | grep ERRORREC | awk '{print $2}'` | |
133 | if($ERRORREC) then | |
134 | echo ERROR | |
135 | uuencode TestSuite.log TestSuite.log | mail -s 'PHOS INSTALLATION ERROR' yves.schutz@cern.ch | |
136 | exit(0) | |
137 | endif | |
138 | #rm tempo.C | |
139 | #/cd $HOME | |
140 | #rm -fr $HOME/PHOSTestSuite |