#include "RD53A.h" namespace eutelescope { namespace geo { RD53A::RD53A(): EUTelGenericPixGeoDescr( 20.0, 9.60, 0.150, //size X, Y, Z 1, 400, 1, 192, //min max X,Y 93.660734 ) //rad length { //Create the material for the sensor matSi = new TGeoMaterial( "Si", 28.0855 , 14.0, 2.33, -_radLength, 45.753206 ); Si = new TGeoMedium("RD53ASilicon",1, matSi); /* Make a box for the sensitive area Size is: x=2*400+78*250=20300 microns and y=336*50=16800 microns MakeBox takes the half of those values in mm as arguments */ plane = _tGeoManager->MakeBox( "sensarea_rd53a", Si, 10.0, 4.8, 0.075 ); //Create volumes for the centre and edge regions //TGeoVolume* centreregion = _tGeoManager->MakeBox("rd53acentreregion",Si, 10.0, 4.8, 0.0125); // TGeoVolume* edgeregion = _tGeoManager->MakeBox("rd53aedgeregion" ,Si, 0.05 , 0.8, 0.0125); //Divide the regions to create pixels //edgeregion->Divide("rd53aedgepixel", 2, 64, 0, 1, 0, "N"); //TGeoVolume* centrerow = centreregion->Divide("rd53acentrerow", 2, 192, 0, 1, 0, "N"); auto row = plane->Divide("row", 2, 192, 0, 1, 0, "N"); row->Divide("col", 1, 400, 0, 1, 0, "N"); // centrerow ->Divide("rd53acentrepixel", 1, 400, 0, 1, 0, "N"); //And place them to make a singlechip // plane->AddNode(centreregion, 1, new TGeoTranslation( 0.00 , 0 , 0) ); // plane->AddNode(edgeregion, 1, new TGeoTranslation(-1.575 , 0 , 0) ); // plane->AddNode(edgeregion, 2, new TGeoTranslation( 1.575 , 0 , 0) ); } RD53A::~RD53A() { //delete matSi; //delete Si; } void RD53A::createRootDescr(char const * planeVolume) { //Get the plane as provided by the EUTelGeometryTelescopeGeoDescription TGeoVolume* topplane =_tGeoManager->GetVolume(planeVolume); //Finaly add the sensitive area to the plane topplane->AddNode(plane, 1); } std::string RD53A::getPixName(int x , int y) { char buffer [100]; //since pixel 0|0 is located on the upper left corner we have to correct y by 335-y+1 //(one for the offset in TGeo which starts counting at 1) //snprintf( buffer, 100, "/sensarea_rd53a_1/rd53acentreregion_1/rd53acentrerow_%d/rd53acentrepixel_%d", y, x); snprintf( buffer, 100, "/sensarea_rd53a_1/row_%d/col_%d", y, x); //Return the full path return std::string( buffer ); } //TODO: parse the path to a pixel number! std::pair RD53A::getPixIndex(char const*){return std::make_pair(0,0); } EUTelGenericPixGeoDescr* maker() { RD53A* mPixGeoDescr = new RD53A(); return dynamic_cast(mPixGeoDescr); } } //namespace geo } //namespace eutelescope