#include "FE65p2.h" namespace eutelescope { namespace geo { FE65p2::FE65p2(): EUTelGenericPixGeoDescr( 3.20, 3.20, 0.025, //size X, Y, Z 1, 64, 1, 64, //min max X,Y 9.3660734 ) //rad length { //Create the material for the sensor matSi = new TGeoMaterial( "Si", 28.0855 , 14.0, 2.33, -_radLength, 45.753206 ); Si = new TGeoMedium("FE65Silicon",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_fe65", Si, 1.6, 1.6, 0.0125 ); //Create volumes for the centre and edge regions TGeoVolume* centreregion = _tGeoManager->MakeBox("fe65centreregion",Si, 1.6, 1.6, 0.0125); // TGeoVolume* edgeregion = _tGeoManager->MakeBox("fe65edgeregion" ,Si, 0.05 , 0.8, 0.0125); //Divide the regions to create pixels //edgeregion->Divide("fe65edgepixel", 2, 64, 0, 1, 0, "N"); TGeoVolume* centrerow = centreregion->Divide("fe65centrerow", 2, 64, 0, 1, 0, "N"); centrerow ->Divide("fe65centrepixel", 1, 64, 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) ); } FE65p2::~FE65p2() { //delete matSi; //delete Si; } void FE65p2::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 FE65p2::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) //if (x == 0 ) //{ // snprintf( buffer, 100, "/sensarea_fe65_1/fe65edgeregion_1/fe65edgepixel_%d", 64-y); //} //else if ( x == 63 ) //{ // snprintf( buffer, 100, "/sensarea_fe65_1/fe65edgeregion_2/fe65edgepixel_%d", 64-y); //} //if(x > 0 && x < 63 ) //{ // // snprintf( buffer, 100, "/sensarea_fe65_1/fe65centreregion_1/fe65centrerow_%d/fe65centrepixel_%d", 64-y, x); //} //if (x == 1 ) //{ // snprintf( buffer, 100, "/sensarea_fe65_1/fe65edgeregion_1/fe65edgepixel_%d", 65-y); //} //else if ( x == 64 ) //{ // snprintf( buffer, 100, "/sensarea_fe65_1/fe65edgeregion_2/fe65edgepixel_%d", 65-y); //} //if(x > 1 && x < 64 ) //{ // // snprintf( buffer, 100, "/sensarea_fe65_1/fe65centreregion_1/fe65centrerow_%d/fe65centrepixel_%d", 65-y, x); //} // if (x == 0 ) // { // snprintf( buffer, 100, "/sensarea_fe65_1/fe65edgeregion_1/fe65edgepixel_%d", 63-y); // } // else if ( x == 63 ) // { // snprintf( buffer, 100, "/sensarea_fe65_1/fe65edgeregion_2/fe65edgepixel_%d", 63-y); // } if(x >= 1 && x <= 64 ) { snprintf( buffer, 100, "/sensarea_fe65_1/fe65centreregion_1/fe65centrerow_%d/fe65centrepixel_%d", y, x); } //Return the full path return std::string( buffer ); } //TODO: parse the path to a pixel number! std::pair FE65p2::getPixIndex(char const*){return std::make_pair(0,0); } EUTelGenericPixGeoDescr* maker() { FE65p2* mPixGeoDescr = new FE65p2(); return dynamic_cast(mPixGeoDescr); } } //namespace geo } //namespace eutelescope