Double_t col0 = padPlane0->GetCol0();
char name[1000];
- sprintf(name,"%s Pad 2D sm %d pl %d",GetTitle(),sm,pl);
+ snprintf(name,1000,"%s Pad 2D sm %d pl %d",GetTitle(),sm,pl);
TH2F * his = new TH2F( name, name, 76,-TMath::Abs(row0),TMath::Abs(row0),144,-TMath::Abs(col0),TMath::Abs(col0));
// Where we begin
Double_t posglobal[3] = {0.0,0.0,0.0};
char name[1000];
- sprintf(name,"%s Pad 2D ch %d",GetTitle(),ch);
+ snprintf(name,1000,"%s Pad 2D ch %d",GetTitle(),ch);
TH2F * his = new TH2F( name, name, 400,-400.0,400.0,400,-400.0,400.0);
// Where we begin
nb++;
}
}
- value = value/nb;
+ if (nb > 0) {
+ value = value/nb;
+ }
if(typedet == 0) his->SetBinContent(binx,biny,value*factor);
else his->SetBinContent(binx,biny,value+factor);
}