#include <TH1F.h>
#include <TStyle.h>
+//#include "AliMathBase.h"
+
#include "AliTRDCalPad.h"
#include "AliTRDCalROC.h"
#include "AliTRDCalDet.h"
#include "AliTRDpadPlane.h"
-#include "AliMathBase.h"
#include "AliTRDgeometry.h"
ClassImp(AliTRDCalPad)
return result;
}
+//_____________________________________________________________________________
+void AliTRDCalPad::SetCalROC(Int_t det, AliTRDCalROC* calroc)
+{
+ //
+ // Set the AliTRDCalROC to this one
+ //
+
+ if (!calroc) return;
+ if (fROC[det]) {
+ for(Int_t icol = 0; icol < calroc->GetNcols(); icol++){
+ for(Int_t irow = 0; irow < calroc->GetNrows(); irow++){
+ fROC[det]->SetValue(icol,irow,calroc->GetValue(icol,irow));
+ }
+ }
+ }
+
+}
//_____________________________________________________________________________
Double_t AliTRDCalPad::GetMeanRMS(Double_t &rms, const AliTRDCalDet *calDet, Int_t type)
{
}
//_____________________________________________________________________________
-Double_t AliTRDCalPad::GetMean(const AliTRDCalDet *calDet, Int_t type, AliTRDCalPad* outlierPad)
+Double_t AliTRDCalPad::GetMean(const AliTRDCalDet *calDet, Int_t type
+ , AliTRDCalPad* const outlierPad)
{
//
// return mean of the mean of all ROCs
}
//_____________________________________________________________________________
-Double_t AliTRDCalPad::GetRMS(const AliTRDCalDet *calDet, Int_t type, AliTRDCalPad* outlierPad)
+Double_t AliTRDCalPad::GetRMS(const AliTRDCalDet *calDet, Int_t type
+ , AliTRDCalPad* const outlierPad)
{
//
// return mean of the RMS of all ROCs
//_____________________________________________________________________________
Double_t AliTRDCalPad::GetMedian(const AliTRDCalDet *calDet, Int_t type
- , AliTRDCalPad* outlierPad)
+ , AliTRDCalPad* const outlierPad)
{
//
// return mean of the median of all ROCs
//_____________________________________________________________________________
Double_t AliTRDCalPad::GetLTM(Double_t *sigma, Double_t fraction
, const AliTRDCalDet *calDet, Int_t type
- , AliTRDCalPad* outlierPad)
+ , AliTRDCalPad* const outlierPad)
{
//
// return mean of the LTM and sigma of all ROCs
}
}
char name[1000];
- sprintf(name,"%s Pad 1D",GetTitle());
+ snprintf(name,1000,"%s Pad 1D",GetTitle());
TH1F * his = new TH1F(name,name,100, min,max);
for (Int_t idet = 0; idet < kNdet; idet++) {
if(calDet) factor = calDet->GetValue(idet);
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
if (TMath::Abs(calRoc->GetValue(icol,irow))>kEpsilon){
Int_t binz = 0;
Int_t kb = kNcham-1-k;
- if(kb > 2) binz = 16*(kb-1)+12+irow+1;
- else binz = 16*kb+irow+1;
- Int_t biny = icol+1;
+ Int_t krow = calRoc->GetNrows()-1-irow;
+ Int_t kcol = calRoc->GetNcols()-1-icol;
+ if(kb > 2) binz = 16*(kb-1)+12+krow+1;
+ else binz = 16*kb+krow+1;
+ Int_t biny = kcol+1;
Float_t value = calRoc->GetValue(icol,irow);
if(typedet == 0) his->SetBinContent(binz,biny,value*factor);
else his->SetBinContent(binz,biny,value+factor);
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);
}