#include "AliCDBEntry.h"
#include "AliCDBManager.h"
//#include "AliCDBRunRange.h"
-//#include "AliITSsegmentationSPD.h"
+#include "AliITSsegmentationSPD.h"
#include "AliITSCalibrationSPD.h"
ClassImp(AliITSPlaneEffSPD)
}
return;
}
+/* commented out by M.Masera 8/3/08
//______________________________________________________________________
AliITSPlaneEff& AliITSPlaneEffSPD::operator=(const
AliITSPlaneEff &s){
AliError("operator=: Not allowed to make a =, use default creater instead");
return *this;
}
+*/
//_______________________________________________________________________
Int_t AliITSPlaneEffSPD::GetMissingTracksForGivenEff(Double_t eff, Double_t RelErr,
UInt_t im, UInt_t ic) const {
}
//_____________________________________________________________________________
UInt_t AliITSPlaneEffSPD::GetColFromLocZ(Float_t zloc) const {
-UInt_t col=0;
-/* note: as it is now, the AliITSsegmentationSPD::Init() does not properly initialize (6 chips !!!)
-AliITSsegmentationSPD spd;
-spd.Init();
-Int_t ix,iz;
-if(spd.LocalToDet(0,zloc,ix,iz)) col+=iz;
-else {
- AliError("GetColFromLocZ: cannot compute column number from local z");
- col=99999;}
-return col;
-*/
+// method to retrieve column number from the local z coordinate
+ UInt_t col=0;
+ AliITSsegmentationSPD spd;
+ Int_t ix,iz;
+ if(spd.LocalToDet(0,zloc,ix,iz)) col+=iz;
+ else {
+ AliDebug(1,Form("cannot compute column number from local z=%f",zloc));
+ col=99999;}
+ return col;
+/*
const Float_t kconv = 1.0E-04; // converts microns to cm.
Float_t bz[160];
for(Int_t i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
col+=j;
//
return col;
+*/
}
//________________________________________________________
Bool_t AliITSPlaneEffSPD::GetBlockBoundaries(const UInt_t key, Float_t& xmn,Float_t& xmx,
zmx=GetLocZFromCol((chip+1)*kNCol);
xmn=GetLocXFromRow(0);
xmx=GetLocXFromRow(kNRow);
+//
Float_t tmp=zmn;
if(zmx<zmn) {zmn=zmx; zmx=tmp;}
tmp=xmn;
//
if(row>kNRow) // not >= ! allow also computation of upper limit of the last row.
{AliError("LocYFromRow: you asked for a non existing row"); return 9999999.;}
-const Float_t kconv = 1.0E-04; // converts microns to cm.
-Float_t bx[256];
-for(Int_t i=000;i<256;i++) bx[i] = 50.0; // in x all are 50 microns.
-//
-Float_t dx=0;
-for(Int_t i=000;i<256;i++) dx+=bx[i];
-dx = -0.5*kconv*dx;
-for(UInt_t j=0;j<row;j++){
- dx += kconv*bx[j];
-} // end for j
-return dx;
+// Use only AliITSsegmentationSPD
+AliITSsegmentationSPD spd;
+Double_t dummy,x;
+if(row==kNRow) spd.CellBoundries((Int_t)row-1,0,dummy,x,dummy,dummy);
+else spd.CellBoundries((Int_t)row,0,x,dummy,dummy,dummy);
+return (Float_t)x;
+
}
//________________________________________________________
Float_t AliITSPlaneEffSPD::GetLocZFromCol(const UInt_t col) const {
//
if(col>kNChip*kNCol) // not >= ! allow also computation of upper limit of the last column
{AliError("LocZFromCol: you asked for a non existing column"); return 9999999.;}
-const Float_t kconv = 1.0E-04; // converts microns to cm.
-Float_t bz[160];
-for(Int_t i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
-bz[ 31] = bz[ 32] = 625.0; // first chip boundry
-bz[ 63] = bz[ 64] = 625.0; // first chip boundry
-bz[ 95] = bz[ 96] = 625.0; // first chip boundry
-bz[127] = bz[128] = 625.0; // first chip boundry
-//
-Float_t dz=0;
-for(Int_t i=000;i<160;i++) dz+=bz[i];
-dz = -0.5*kconv*dz;
-for(UInt_t j=0;j<col;j++){
- dz += kconv*bz[j];
-} // end for j
-return dz;
+// Use only AliITSsegmentationSPD
+AliITSsegmentationSPD spd;
+Double_t dummy,y;
+if(col==kNChip*kNCol) spd.CellBoundries(0,(Int_t)col-1,dummy,dummy,dummy,y);
+else spd.CellBoundries(0,(Int_t)col,dummy,dummy,y,dummy);
+return (Float_t)y;
+
}
//__________________________________________________________
void AliITSPlaneEffSPD::InitHistos() {
TString histnameClusErrX="HistClusErrX_mod_";
TString histnameClusErrZ="HistClusErrZ_mod_";
//
+
+ TH1::AddDirectory(kFALSE);
+
fHisResX=new TH1F*[kNHisto];
fHisResZ=new TH1F*[kNHisto];
fHisResXZ=new TH2F*[kNHisto];
fHisClusErrZ[nhist]->SetTitle(aux.Data());
}
+
+ TH1::AddDirectory(kTRUE);
+
return;
}
//__________________________________________________________