/************************************************************************** * 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. * **************************************************************************/ /////////////////////////////////////////////////////////////////////////////// // // // Geometry class for a single ROC // // // // // /////////////////////////////////////////////////////////////////////////////// #include "AliTPCROC.h" #include "TMath.h" ClassImp(AliTPCROC) AliTPCROC* AliTPCROC::fgInstance = 0; //_ singleton implementation __________________________________________________ AliTPCROC* AliTPCROC::Instance() { // // Singleton implementation // Returns an instance of this class, it is created if neccessary // if (fgInstance == 0){ fgInstance = new AliTPCROC(); fgInstance->Init(); } return fgInstance; } void AliTPCROC::Init(){ // // initialize static variables // if (AliTPCROC::fNSectorsAll>0) return; fNSectorsAll =72; fNSectors[0] =36; fNSectors[1] =36; // fNRows[0]= 63; fNRows[1]= 96; // // number of pads in padrow fNPads[0] = new UInt_t[fNRows[0]]; fNPads[1] = new UInt_t[fNRows[1]]; // // padrow index in array // fRowPosIndex[0] = new UInt_t[fNRows[0]]; fRowPosIndex[1] = new UInt_t[fNRows[1]]; // // inner sectors // UInt_t index =0; for (UInt_t irow=0; irow=18){ pos[2] *= -1.; pos[1] *= -1.; } } void AliTPCROC::GetPositionGlobal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos){ // // get position of center of pad - ideal frame used // GetPositionLocal(sector,row,pad,pos); Double_t alpha = TMath::DegToRad()*(10.+20.*(sector%18)); Float_t gx = pos[0]*TMath::Cos(alpha)-pos[1]*TMath::Sin(alpha); Float_t gy = pos[1]*TMath::Cos(alpha)+pos[0]*TMath::Sin(alpha); pos[0] = gx; pos[1] = gy; }