Public Member Functions | Public Attributes | List of all members
geo::sortWire35 Struct Reference

Public Member Functions

 sortWire35 (std::string detv)
 
bool operator() (WireGeo const &w1, WireGeo const &w2)
 

Public Attributes

std::string detVersion
 

Detailed Description

Definition at line 163 of file GeoObjectSorter35.cxx.

Constructor & Destructor Documentation

geo::sortWire35::sortWire35 ( std::string  detv)
inline

Definition at line 167 of file GeoObjectSorter35.cxx.

168  : detVersion(detv)
169  {}

Member Function Documentation

bool geo::sortWire35::operator() ( WireGeo const &  w1,
WireGeo const &  w2 
)
inline

Definition at line 171 of file GeoObjectSorter35.cxx.

171  {
172  double xyz1[3] = {0.};
173  double xyz2[3] = {0.};
174 
175  w1.GetCenter(xyz1); w2.GetCenter(xyz2);
176 
177 
178  //mf::LogVerbatim("sortWire35") << "Sorting wires: ("
179  // << xyz1[0] <<","<< xyz1[1] <<","<< xyz1[2] << ") and ("
180  // << xyz2[0] <<","<< xyz2[1] <<","<< xyz2[2] << ")";
181 
182 
183  // immedieately take care of vertical wires regardless of which TPC
184  // vertical wires should always have same y, and always increase in z direction
185  if( xyz1[1]==xyz2[1] && xyz1[2]<xyz2[2] ) return true;
186 
187  ///////////////////////////////////////////////////////////
188  // Hard code a number to tell sorting when to look
189  // for top/bottom APAs and when to look for only one
190  bool InVertSplitRegion = false;
191  if(detVersion=="dune35t") InVertSplitRegion = xyz1[2] > 76.35; // the old
192  else if(detVersion=="dune35t4apa") InVertSplitRegion = ((51 < xyz1[2]) // the new...
193  && (xyz1[2] < 102)); //
194  else if(detVersion=="dune35t4apa_v2") InVertSplitRegion = ((52.74 < xyz1[2]) // ...and improved
195  && (xyz1[2] < 106.23));
196  else if( detVersion=="dune35t4apa_v3"
197  || detVersion=="dune35t4apa_v4"
198  || detVersion=="dune35t4apa_v5"
199  || detVersion=="dune35t4apa_v6"
200  ) InVertSplitRegion = ((51.41045 < xyz1[2])
201  && (xyz1[2] < 103.33445));
202  ///////////////////////////////////////////////////////////
203 
204  // we want the wires to be sorted such that the smallest corner wire
205  // on the readout end of a plane is wire zero, with wire number
206  // increasing away from that wire.
207 
208  if( InVertSplitRegion ){
209 
210  // if a bottom TPC, count from bottom up
211  if( xyz1[1]<0 && xyz1[1] < xyz2[1] ) return true;
212 
213  // if a top TPC, count from top down
214  if( xyz1[1]>0 && xyz1[1] > xyz2[1] ) return true;
215 
216  }
217  else {
218 
219  if( xyz1[1] > xyz2[1] ) return true;
220 
221  }
222 
223  return false;
224  }

Member Data Documentation

std::string geo::sortWire35::detVersion

Definition at line 165 of file GeoObjectSorter35.cxx.


The documentation for this struct was generated from the following file: