SetupHisto(messages, *hdata, rv);
}
else if(irawHisto==23){
- Double_t refTDCs = -329.5;
+ Double_t refTDCs[6] = {-325.,-321.6,-323.4,-321.6,-322.2,-321.7};
Float_t resTDC=0.;
- for(int ibin=5; ibin<=6; ibin++){
- if(TMath::Abs((hdata->GetBinContent(ibin))-refTDCs)<2.){
+ for(int ibin=1; ibin<=hdata->GetNbinsX(); ibin++){
+ if(TMath::Abs((hdata->GetBinContent(ibin))-refTDCs[ibin-1])<12.){
res=1.;
}
- else if((TMath::Abs((hdata->GetBinContent(ibin))-refTDCs)>=2.) &&
- (TMath::Abs((hdata->GetBinContent(ibin))-refTDCs)<=3.)){
- res=0.9;
- }
else{
res=0.5;
}
count++;
}
Float_t rv=1.;
- if(hdata->GetNbinsX() != 0) rv = resTDC/2;
+ if(hdata->GetNbinsX() != 0) rv = resTDC/hdata->GetNbinsX();
if(rv == 1.) messages.Add(new TObjString("TDCs are OK!"));
- else if(rv<1 && rv>=0.9) messages.Add(new TObjString("Minor problem with TDCs"));
+ else if(rv<1 && rv>0.8) messages.Add(new TObjString("Minor problem with TDCs"));
else{
messages.Add(new TObjString("Serious problem in ZDC timing"));
messages.Add(new TObjString("IF THIS IS NOT A TECHNICAL RUN"));
- messages.Add(new TObjString("OR A STANDALONE_PEDESTAL RUN"));
}
SetupHisto(messages, *hdata, rv);
}
}
// --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
if(irecHisto==11){
- if(TMath::Abs(meanZNC)>1.e-10){
+ if((TMath::Abs(meanZNC)>1.e-10) && (pmCZNC>1.e-10)){
if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
res=1.;
else
test[specie] += res;
count++;
}
- if(TMath::Abs(meanZNA)>1.e-10){
+ if((TMath::Abs(meanZNA)>1.e-10) && (pmCZNA>1.e-10)){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
res=1.;
else
test[specie] += res;
count++;
}
- if(TMath::Abs(meanZPC)>1.e-10){
+ if((TMath::Abs(meanZPC)>1.e-10) && (pmCZPC>1.e-10)){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
res=1.;
else
test[specie] += res;
count++;
}
- if(TMath::Abs(meanZPA)>1.e-10){
+ if((TMath::Abs(meanZPA)>1.e-10) && (pmCZPA>1.e-10)){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
res=1.;
else