/************************************************************************** * 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. * **************************************************************************/ #include #include #include #include "AliITSsegmentationSSD.h" #include "AliITSgeom.h" ClassImp(AliITSsegmentationSSD) AliITSsegmentationSSD::AliITSsegmentationSSD(){ // default constructor fGeom=0; fCorr=0; SetDetSize(); SetPadSize(); SetNPads(); SetAngles(); fLayer =5; } //------------------------------ AliITSsegmentationSSD::AliITSsegmentationSSD(AliITSgeom *geom){ // constuctor fGeom=geom; fCorr=0; SetDetSize(); cout<<"Dx="<fNstrips = source.fNstrips; this->fStereoP = source.fStereoP; this->fStereoN = source.fStereoN; this->fStereoPl5 = source.fStereoPl5; this->fStereoNl5 = source.fStereoNl5; this->fStereoPl6 = source.fStereoPl6; this->fStereoNl6 = source.fStereoNl6; this->fLayer = source.fLayer; this->fPitch = source.fPitch; this->fDz = source.fDz; this->fDx = source.fDx; this->fDy = source.fDy; this->fLayer = source.fLayer; this->fGeom = source.fGeom; // copy only the pointer this->fCorr = new TF1(*(source.fCorr)); // make a proper copy return *this; } //____________________________________________________________________________ AliITSsegmentationSSD::AliITSsegmentationSSD(AliITSsegmentationSSD &source){ // copy constructor *this = source; } //------------------------------ void AliITSsegmentationSSD::Init(){ // standard initalizer //AliITSgeomSSD *gssd = (AliITSgeomSSD *) (fGeom->GetShape(5,1,1)); //const Float_t kconv=10000.; /* fDx = 2.*kconv*gssd->GetDx(); fDz = 2.*kconv*gssd->GetDz(); fDy = 2.*kconv*gssd->GetDy(); */ SetPadSize(); SetNPads(); SetAngles(); } //------------------------------------------------------- void AliITSsegmentationSSD::Angles(Float_t &aP,Float_t &aN) { if (fLayer == 5) { aP = fStereoPl5; aN = fStereoNl5; } if (fLayer == 6) { aP = fStereoPl6; aN = fStereoNl6; } } void AliITSsegmentationSSD::SetLayer(Int_t l) { if (l==5) fLayer =5; if (l==6) fLayer =6; } //------------------------------------------------------- void AliITSsegmentationSSD::GetPadIxz(Float_t x,Float_t z,Int_t &iP,Int_t &iN) { // returns P and N sided strip numbers for a given location. // expects x, z in microns Float_t tanP=TMath::Tan(fStereoP); Float_t tanN=TMath::Tan(fStereoN); //cout<<"1 segment::GetPad: xL,zL,fDx,fDz ="<fNstrips)? -1: iP; //cout<<"3 segment::GetPad: x1,tanP,ix1 ="<fNstrips)? -1: iN; //cout<<"4 segment::GetPad: x2,tanN,ix2 ="< (fDz/2+dx) ) ) {x=z=flag; return ;} if ( ( x < -(fDx/2+dx) ) || ( x > (fDx/2+dx) ) ) {x=z=flag; return ;} return; }