//*-- AUTHOR : Ilse Koenig //*-- Created : 06/06/2003 ///////////////////////////////////////////////////////////// // HGeoTof // // Class for TOF geometry // ///////////////////////////////////////////////////////////// #include "hgeotof.h" #include "FairGeoNode.h" #include "hgeotofhit.h" ClassImp(HGeoTof) HGeoTof::HGeoTof() { fName="tof"; maxSectors=6; maxKeepinVolumes=1; maxModules=12; HGeoTofHit *pHit=new HGeoTofHit(this); hadesGeo=1; } const char* HGeoTof::getKeepinName(Int_t s,Int_t) { sprintf(keepinName,"TFN%i",s+1); return keepinName; } const char* HGeoTof::getModuleName(Int_t m) { Int_t n=(m<8) ? (22-m) : (m+15); sprintf(modName,"T%iF",n); return modName; } const char* HGeoTof::getEleName(Int_t m) { Int_t n=(m<8) ? (22-m) : (m+15); sprintf(eleName,"T%i",n); return eleName; } Bool_t HGeoTof::replaceTofKeepin() { if (!masterNodes) { Error("replaceTofKeepin","Master nodes not found!\n"); return kFALSE; } char mod[6]; char sec[5]; for(Int_t s=1;s<=6;s++) { sprintf(sec,"SEC%i",s); FairGeoNode* mo=getMasterNode(sec); for(Int_t m=15;m<=22;m++) { sprintf(mod,"T%iF%i",m,s); FairGeoNode* v=getVolume(mod); if (v&&v->getMotherNode()==0) { if (!mo) { Error("replaceTofKeepin","Mother volume %s not found!\n",sec); return kFALSE; } v->setMother(mo); cout<<"New mother of "<