#ifndef HGEOTOF_H #define HGEOTOF_H #include "hgeoset.h" typedef HFloatVec FVec; // // class for Tof wall derived from base class HGeoSet (linked list); // The tof wall consists of 2 keepin-volumes in each sector: // TKI1...6 containing the TOF modules tof 15-22, respectively 1-22 // TFN1...6 containing the TOFINO modules 23-26. 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...26 in readDet(...) detName="T01F"; // unique substring of the name of all daughtervolumes // 2nd and 3rd character is changed from 1...26 in readDet(...) eleName="T01"; // unique substring of the keepin volume of the TOF modules // tof-keepinvolumes tofKeepinName="TKI"; // unique substring of the keepin volume of the TOFINO modules tfKeepinName="TFN"; // pointer to the class HGeoShapes pShapes=&shapes; // maximum of 26 tofs in one sector numModules=26; noOfKeepIn= new int [27]; // readHits set to 1 after successful read hitsRead=0; } ~HGeoTof(){delete [] noOfKeepIn;} // reads the keepin-volumes of the shower detector, the keepin-volumes // for the TOFINO modules and all 26 tofs from file using // helperfunctions from the baseclass int readDet(HGeoInfo & geoInfo); // reads all tofs from database using helperfunctions from the // baseclass int readDet(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 for which one wants to store hits; // The necessary parameters are read from file. int createHits(HString & volName); // helperfuntion to changed the 2nd and 3rd character in the names // detName and eleName from 1...26 void changeName(HString & name, int firstPos, int no); 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]=0 if tof i is not defined, else >=1 ) int *noOfKeepIn; // unique substring of the name of the TOF keepin-volume HString tofKeepinName; // unique substring of the name of the TOFINO keepin-volume HString tfKeepinName; }; #endif