* provided "as is" without express or implied warranty. *
**************************************************************************/
+#include <TGeoManager.h>
+#include <TGeoVolume.h>
+#include <TGeoBBox.h>
#include "AliITSsegmentationSPD.h"
//#include "AliITSgeom.h"
//////////////////////////////////////////////////////
ClassImp(AliITSsegmentationSPD)
//_____________________________________________________________________________
- AliITSsegmentationSPD::AliITSsegmentationSPD(): AliITSsegmentation(),
+ AliITSsegmentationSPD::AliITSsegmentationSPD(Option_t *opt): AliITSsegmentation(),
fNpx(0),
fNpz(0){
// Default constructor
fCellSizeX[k] = 0.;
fCellSizeZ[k] = 0.;
}
+
+ if(strstr(opt,"TGeo")){
+ if(!gGeoManager){
+ AliError("Geometry is not initialized\n");
+ return;
+ }
+ TGeoVolume *v=NULL;
+ v = gGeoManager->GetVolume("ITSSPDlay1-sensor");
+ if(!v){
+ AliWarning("TGeo volume ITSSPDlay1-sensor not found (hint: use v11Hybrid geometry)\n Using hardwired default values");
+ SetDetSize(12800,69600,200);
+ }
+ else {
+ TGeoBBox *s=(TGeoBBox*)v->GetShape();
+ SetDetSize(s->GetDX()*20000.,s->GetDZ()*20000.,s->GetDY()*20000.);
+ }
+ Float_t bx[256],bz[280];
+ Int_t i;
+ SetNPads(256,160); // Number of Bins in x and z
+ for(i=000;i<256;i++) bx[i] = 50.0; // in x all are 50 microns.
+ for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
+ for(i=160;i<280;i++) bz[i] = 0.0; // Outside of detector.
+ 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
+ bz[160] = 425.0; // Set so that there is no zero pixel size for fNz.
+ SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
+ }
}
//_____________________________________________________________________________