#ifndef HGEOTOF_H #define HGEOTOF_H #include "hgeoset.h" typedef HVector FVec; // // class for Tof wall derived from base class HGeoDet (linked list); // The tof wall consists of 3 keepin-volumes in each sector: // TCM1...6 containing the modules tof 1-14, // TCM1...6 containing the modules tof 15-18 and // TCM1...6 containing the modules tof 19-22. // class HGeoTof : public HGeoSet { public: HGeoTof(HGeoShapes & shapes) : HGeoSet() { // unique substring of the name of the module tof // 2nd and 3rd character is changed from 1...22 in readDet(...) detName="T01F"; // unique substring of the name of all daughtervolumes // 2nd and 3rd character is changed from 1...22 in readDet(...) eleName="T01"; // unique substring of the name of the module shower // The shower-detector is needed for the calculation of the // tof-keepinvolumes keepinName="SHK"; // pointer to the class HGeoShapes pShapes=&shapes; // maximum of 22 tofs in one sector numModules=22; noOfKeepIn= new int [22]; } ~HGeoTof(){delete [] noOfKeepIn;} // reads all 22 tofs from file using helperfunctions from the baseclass int readDet(HGeoInfo & geoInfo); // reads all 22 tofs from database using helperfunctions from the baseclass int readDet(HGeoInfo & geoInfo, HGeoMedia & geomedia); // creates the keepinvolumes TCM1...6 for tof 1-14, // TMM1...6 for tof 15-18 and TOM1...6 for tof 19-22 if at least one // inout-flag is defined as 1 in the group of modules int createKeepIn(HGeoInfo & geoInfo, HGeoMedia & geoMedia); // creates all tofs which inout-flag is defined as 1 int createDet(HGeoInfo & geoInfo, HGeoMedia & geoMedia); // invokes the Geantroutines GSDETV and GSDETH to classify the sensitive // detector META for which one wants to store hits; // The necessary variables parameters are hardwired in this function. int createHits(HString & copyName); // helperfuntion to changed the 2nd and 3rd character in the names // detName and eleName from 1...22 void changeName(HString & name, int firstPos, int no); // helperfunction to transform a Catia-point to lab void transCatiaToLab(HGeoParam & ele, int pno, FVec & p); protected: // maximum number of tofs in one sector int numModules; // array to store for each tof the number of sectors where a tof is // defined // ( noOfKeepIn[i-1]=0 if tof i is not defined, else >=1 ) int *noOfKeepIn; }; #endif