// MAUS WARNING: THIS IS LEGACY CODE. //---------------------------------------------------------------------------- // // File : SpecialHit.cc // Purpose : MICE Virtual detector for the MICE proposal. Describe // a single hit. Many of these variables listed would not be // known in the real experiment. This hit bank is designed // to be functionallly similar to the SciFiHit bank by E. // McKigney for the simulation // Created : Steve Kahn - Sept 16, 2002 // //---------------------------------------------------------------------------- #include "Interface/SpecialHit.hh" using namespace std; SpecialHit::SpecialHit() { _stationNumber = 0; _cellNumber = 0; _volName = ""; _bfield = Hep3Vector(0,0,0); _efield = Hep3Vector(0,0,0); _iax = 0; _irad = 0; _iaz = 0; _parentrackID = 0; _ancestrackID = 0; _vtxpos = Hep3Vector(0., 0., 0.); _vtxtime = 0.; _vtxmom = Hep3Vector(0., 0., 0.); _stepType = 0; _stepLength = 0; _pathLength = 0; } SpecialHit::SpecialHit(const SpecialHit& th) { if(&th != this) *this = th; } const SpecialHit& SpecialHit::operator=(const SpecialHit& th) { _iax = th.GetZnumber(); _irad = th.GetRnumber(); _iaz = th.GetPhiNumber(); _stepType = th.GetStepType(); _stepLength = th.GetStepLength(); _stationNumber = th.GetStationNo(); _cellNumber = th.GetCellNo(); _volName = th.GetVolumeName(); _bfield = th.GetBField(); _efield = th.GetEField(); _parentrackID = th.GetParenTrackID(); _ancestrackID = th.GetAncesTrackID(); _pathLength = th._pathLength; _vtxpos = th.GetVtxPosition(); _vtxtime = th.GetVtxTime(); _vtxmom = th.GetVtxMomentum(); return *this; } int SpecialHit::stationIDfromName( std::string vname ) const //ME - copied from DetModel, not at all ideal solution!!!! { const int nStationTypes = 12; const int maxNumberOfVols = 1000; std::string stationNames[nStationTypes] = { "FOCUS", "MATCH", "COUPLING", "SOLENOID", "ENDCOIL", "ABSORBER", "WINDOWABS", "WINDOWVAC", "TRACKREF", "CAVITYREF", "WINDOWF", "TOFREF" }; int stationNameInt = 0; int endValue = 0; //loop over the stationNames for( int i=0; i