#include #include #include #include #include "TVector2.h" #include "TMath.h" #include "tpc/PndTpcAbsPadShape.h" #include "tpc/PndTpcPadShapePool.h" #include "tpc/PndTpcPad.h" #include "tpc/PndTpcPadPlane.h" #include "tpc/PndTpcGem.h" void createHexPadPlane(){ double ar=0.15; // hexagone radius double a=ar*1.5; double b=ar*sqrt(3.); // y-grid distance double outerR=42; double innerR=15; bool targetpipe=true; double phislice=5.0*TMath::Pi()/180; int nrows=2*floor(outerR/b)+2; int ncols=2*floor(outerR/a)+2; double startx=-outerR; double starty=startx; int nrings=5; int nslices=16; double dring=(outerR-innerR)/(double)nrings; try{ PndTpcGem* _gem=new PndTpcGem(5000, // Gain 0.02); // Spread PndTpcPadShapePool* _padShapes = new PndTpcPadShapePool("tpc/Hexagons0.15.dat", *_gem, 0.4, // lookup range 0.02, // Lookup Step 0.01); // LookupIntegrationStep PndTpcAbsPadShape* shape=_padShapes->GetPadShape(0); PndTpcPadPlane plane(42,42,2,2,-42,-42); int count=0; for(int i=0; iouterR)continue; if(r neighblist; plane.GetPadList(pad->x(),pad->y(),ar*1.01,neighblist); unsigned int nneigh=neighblist.size(); unsigned int c=0; for(int ineigh=0;ineighsectorId()==pad->sectorId() && neighblist[ineigh]->padId()!=pad->padId()){ pad->addNeighbour(neighblist[ineigh]->id()); ++c; } } //std::cout<<"found "<