From: nilsen Date: Fri, 9 Jun 2000 17:07:56 +0000 (+0000) Subject: New SPD geometry class for 425 micron pixels X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=d53869b0ee7fb49005dff1c1eb33f2b48a62093f New SPD geometry class for 425 micron pixels --- diff --git a/ITS/AliITSgeomSPD425.cxx b/ITS/AliITSgeomSPD425.cxx new file mode 100644 index 00000000000..eea7ab5f3ee --- /dev/null +++ b/ITS/AliITSgeomSPD425.cxx @@ -0,0 +1,217 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* +$Log$ + +*/ + +#include + +#include "AliITSgeomSPD425.h" + +ClassImp(AliITSgeomSPD425) + +AliITSgeomSPD425::AliITSgeomSPD425(){ +//////////////////////////////////////////////////////////////////////// +// default constructor, for ITS post TDR geometry. +//////////////////////////////////////////////////////////////////////// + +const Float_t kdx=0.6400,kdy=0.0075,kdz=4.23625;// cm; Standard pixel detector + // size is 2dx wide, 2dz long, + // and 2dy thick. Geant 3.12 + // units. +const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction. +const Int_t knbinx = 256; // number of pixels along x direction. +const Float_t kbinz0 = 0.0425; // cm; Standard pixel size in z direction. +const Float_t kbinz1 = 0.0625; // cm; Special pixel size in z direction. +const Int_t knbinz = 197; // number of pixels along z direction. + + fdx = kdx; // default value. + fdy = kdy; // default value. + fdz = kdz; // default value. + fNbinx = knbinx; // default number of bins in x. + fNbinz = knbinz; // default number of bins in z. + + fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x. + for(Int_t i=0;ifShapeSPD = source.fShapeSPD; + this->fdx = source.fdx; + this->fdy = source.fdy; + this->fdz = source.fdz; + if(this->fBinSizeX) delete[] this->fBinSizeX; + if(this->fBinSizeX) delete[] this->fBinSizeZ; + this->fNbinx = source.fNbinx; + this->fBinSizeX = new Float_t[this->fNbinx]; + this->fNbinz = source.fNbinz; + this->fBinSizeZ = new Float_t[this->fNbinz]; + for(Int_t i=0;ifBinSizeX[i] = source.fBinSizeX[i]; + for(Int_t i=0;ifBinSizeZ[i] = source.fBinSizeZ[i]; +} +//______________________________________________________________________ +AliITSgeomSPD425& AliITSgeomSPD425::operator=(AliITSgeomSPD425 &source){ + // = operator + if(&source == this) return *this; + this->fShapeSPD = source.fShapeSPD; + this->fdx = source.fdx; + this->fdy = source.fdy; + this->fdz = source.fdz; + if(this->fBinSizeX) delete[] this->fBinSizeX; + if(this->fBinSizeX) delete[] this->fBinSizeZ; + this->fNbinx = source.fNbinx; + this->fBinSizeX = new Float_t[this->fNbinx]; + this->fNbinz = source.fNbinz; + this->fBinSizeZ = new Float_t[this->fNbinz]; + for(Int_t i=0;ifBinSizeX[i] = source.fBinSizeX[i]; + for(Int_t i=0;ifBinSizeZ[i] = source.fBinSizeZ[i]; + return *this; +} +//______________________________________________________________________ +AliITSgeomSPD425::~AliITSgeomSPD425(){ + // destructor + delete[] fBinSizeX; + delete[] fBinSizeZ; + delete fShapeSPD; +} +//______________________________________________________________________ +void AliITSgeomSPD425::ReSetBins(Float_t dy,Int_t nx,Float_t *bx, + Int_t nz,Float_t *bz){ +//////////////////////////////////////////////////////////////////////// +// default constructor, for a User modified TDR based geometry. +//////////////////////////////////////////////////////////////////////// + fdx = 0.0; + fdy = dy; + fdz = 0.0; + fNbinx = nx; // new number of bins in x. + fNbinz = nz; // new number of bins in z. + + if(fBinSizeX!=0) delete[] fBinSizeX; + fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x. + for(Int_t i=0;iStreamer(R__b); + R__b >> fdx; + R__b >> fdy; + R__b >> fdz; + }else if (R__v==2){ + AliITSgeomSPD::Streamer(R__b); + fShapeSPD->Streamer(R__b); + R__b >> fdx; + R__b >> fdy; + R__b >> fdz; + R__b >> fNbinx; + if(fBinSizeX!=0) delete[] fBinSizeX; + fBinSizeX = new Float_t[fNbinx]; + for(Int_t i=0;i> fBinSizeX[i]; + R__b >> fNbinz; + if(fBinSizeZ!=0) delete[] fBinSizeZ; + fBinSizeZ = new Float_t[fNbinz]; + for(Int_t i=0;i> fBinSizeZ[i]; + R__b.CheckByteCount(R__s, R__c, AliITSgeomSPD425::IsA()); + } // end if R__v==1 + } else { // IsWriting. + R__c = R__b.WriteVersion(AliITSgeomSPD425::IsA(), kTRUE); + AliITSgeomSPD::Streamer(R__b); + fShapeSPD->Streamer(R__b); + R__b << fdx; + R__b << fdy; + R__b << fdz; + R__b << fNbinx; + for(Int_t i=0;i 1/2 thickness of wafer's active volume (cm) + // fdy => 1/2 r*phi size of active volume (cm) + // fdz => 1/2 size of active volume (cm) + TBRIK *fShapeSPD; // Shape of sensitive volume. + Float_t fdx; // Brick half width cm + Float_t fdy; // Brick half thickness cm + Float_t fdz; // Brick half length cm + Float_t *fBinSizeX; // Pixel size in X, cm + Int_t fNbinx; // Number of pixels in x + Float_t *fBinSizeZ; // Pixel size in Z, cm + Int_t fNbinz; // Number of pixels in z + + ClassDef(AliITSgeomSPD425,2) // ITS SPD detector geometry class for 425X50 micron pixel size. + +}; +#endif