#include "RD53A_50x50_Single.h" namespace eutelescope { namespace geo { RD53A_50x50_Single::RD53A_50x50_Single() : EUTelGenericPixGeoDescr(20.00, 9.6, 0.100, // size X, Y, Z 0, 399, 0, 191, // 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("RD53Silicon", 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("sns_rd53", Si, 10.0, 4.8, 0.100); auto row = plane->Divide("row", 2, 192, 0, 1, 0, "N"); row->Divide("col", 1, 400, 0, 1, 0, "N"); } RD53A_50x50_Single::~RD53A_50x50_Single() { // delete matSi; // delete Si; } void RD53A_50x50_Single::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_50x50_Single::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) // M. Bomben - Wed Jul 18 14:18:12 CEST 2018 // for rd53a we assume only the shift by 1 unit is needed snprintf(buffer, 100, "/sns_rd53_1/row_%d/col_%d", y + 1, x + 1); // M. Bomben - Wed Jul 18 18:31:47 CEST 2018 // for rd53a we assume the same as fei4b about y coordinate // snprintf(buffer, 100, "/sns_rd53_1/row_%d/col_%d", 192 - y, x + 1); // Return the full path return std::string(buffer); } // TODO: parse the path to a pixel number! std::pair RD53A_50x50_Single::getPixIndex(char const *) { return std::make_pair(0, 0); } EUTelGenericPixGeoDescr *maker() { RD53A_50x50_Single *mPixGeoDescr = new RD53A_50x50_Single(); return dynamic_cast(mPixGeoDescr); } } // namespace geo } // namespace eutelescope