Project

General

Profile

Dump the wire geometry to a text file

Insert these lines of code into any module . . . ( HitDumper_module.cc works fine)

    double xyz[3];                                                                                                                                   
    double abc[3];                                                                 
    int chan;
     int cryo = geom->Ncryostats();                                                             
    for (int c=0; c<cryo;++c){                   
      int tpc =geom->NTPC(c);                                               
      for (int t=0; t<tpc; ++t){                                            
        int Nplanes=geom->Nplanes(t,c);                                      
        for (int p=0;p<Nplanes;++p) {                                        
          int Nwires = geom->Nwires(p,t,c);                                  
          for (int w=0;w<Nwires;++w){
             geom->WireEndPoints(c,t,p,w,xyz,abc);
             chan=geom->PlaneWireToChannel(p,w,t,c);  
            std::cout << "FLAG " << chan << " " << c << " " << t << " " << p << " " << w << " " << xyz[0] << " " << xyz[1] << " " << xyz[2] <<  " " << abc[0] << " " << abc[1] << " " << abc[2] << std::endl;                                         
          }      }}  }

and then grep the output for "FLAG" (files WireDumpV02.txt and WireDumpV03.txt attached for versions 2 and 3 of the geometry!)