PlexStripEndId Class Reference

#include <PlexStripEndId.h>

Inheritance diagram for PlexStripEndId:
PlexPlaneId

List of all members.

Public Member Functions

 PlexStripEndId ()
 PlexStripEndId (PlexPlaneId plnid, UInt_t strip, StripEnd::StripEnd_t end=StripEnd::kUnknown, StripEnd::StripEnd_t subpart=StripEnd::kWhole)
 PlexStripEndId (Detector::Detector_t detector, UInt_t plane, UInt_t strip, StripEnd::StripEnd_t end=StripEnd::kUnknown, StripEnd::StripEnd_t subpart=StripEnd::kWhole, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown)
virtual ~PlexStripEndId ()
 PlexStripEndId (const UInt_t encoded)
UInt_t GetEncoded () const
const char * AsString (Option_t *option="") const
StripEnd::StripEnd_t GetEnd () const
UShort_t GetStrip () const
StripEnd::StripEnd_t GetSubPart () const
PlexStripEndId GetOppositeSEId () const
PlexScintMdlId GetScintMdlId () const
UShort_t GetStripInMdl () const
UShort_t GetMapperStripInMdl () const
StripEnd::StripEnd_t GetManifoldF1 () const
Int_t Build18BitPlnStripKey () const
Int_t BuildPlnStripEndKey () const
UInt_t GetUniqueStripEncodedValue () const
Bool_t IsSameStrip (const PlexStripEndId &other) const
Bool_t IsSameStripEnd (const PlexStripEndId &other) const
Bool_t IsOppositeStripEnd (const PlexStripEndId &other) const
virtual Bool_t IsValid () const
void Print (Option_t *option="") const
void SetEnd (StripEnd::StripEnd_t end)
void SetStrip (UInt_t strip)
void SetSubPart (StripEnd::StripEnd_t subpart)

Static Public Member Functions

static PlexStripEndId Unbuild18BitPlnStripKey (Detector::Detector_t det, Int_t key)
static PlexStripEndId UnbuildPlnStripEndKey (Detector::Detector_t det, Int_t key)

Private Member Functions

void SetIsSteel (Bool_t)

Friends

Bool_t operator< (const PlexStripEndId &lhs, const PlexStripEndId &rhs)
Bool_t operator<= (const PlexStripEndId &lhs, const PlexStripEndId &rhs)
Bool_t operator== (const PlexStripEndId &lhs, const PlexStripEndId &rhs)
Bool_t operator!= (const PlexStripEndId &lhs, const PlexStripEndId &rhs)
Bool_t operator> (const PlexStripEndId &lhs, const PlexStripEndId &rhs)
Bool_t operator>= (const PlexStripEndId &lhs, const PlexStripEndId &rhs)

Detailed Description

Definition at line 24 of file PlexStripEndId.h.


Constructor & Destructor Documentation

PlexStripEndId::PlexStripEndId (  )  [inline]
PlexStripEndId::PlexStripEndId ( PlexPlaneId  plnid,
UInt_t  strip,
StripEnd::StripEnd_t  end = StripEnd::kUnknown,
StripEnd::StripEnd_t  subpart = StripEnd::kWhole 
)

Definition at line 37 of file PlexStripEndId.cxx.

References PlexPlaneId::IsVetoShield(), SetEnd(), SetIsSteel(), SetStrip(), and SetSubPart().

00041    : PlexPlaneId(plnid)
00042 {
00043    // Normal ctor from PlaneId + extras
00044 
00045    // ensure that it isn't tagged as "steel" even if plnid was
00046    // but don't do this for veto shield as we use steel bit
00047    // in that case for additional PlaneCoverage enums
00048    if (!IsVetoShield()) SetIsSteel(kFALSE);
00049 
00050    SetStrip(strip);
00051    SetEnd(end);
00052    SetSubPart(subpart);
00053 
00054 }

PlexStripEndId::PlexStripEndId ( Detector::Detector_t  detector,
UInt_t  plane,
UInt_t  strip,
StripEnd::StripEnd_t  end = StripEnd::kUnknown,
StripEnd::StripEnd_t  subpart = StripEnd::kWhole,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
)

Definition at line 57 of file PlexStripEndId.cxx.

References SetEnd(), SetStrip(), and SetSubPart().

00064    : PlexPlaneId(detector,plane,kFALSE,view,coverage)
00065 {
00066    // Normal ctor from all components
00067 
00068    SetStrip(strip);
00069    SetEnd(end);
00070    SetSubPart(subpart);
00071 }

virtual PlexStripEndId::~PlexStripEndId (  )  [inline, virtual]

Definition at line 40 of file PlexStripEndId.h.

00040 { ; } // no owned data members

PlexStripEndId::PlexStripEndId ( const UInt_t  encoded  )  [inline, explicit]

Definition at line 133 of file PlexStripEndId.h.

References PlexPlaneId::fEncoded.

00134 { fEncoded = encoded; }


Member Function Documentation

const char * PlexStripEndId::AsString ( Option_t *  option = ""  )  const

Reimplemented from PlexPlaneId.

Definition at line 74 of file PlexStripEndId.cxx.

References StripEnd::AsString(), PlaneView::AsString(), PlaneCoverage::AsString(), Detector::AsString(), det, PlexPlaneId::GetDetector(), GetEnd(), PlexPlaneId::GetPlane(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), GetStrip(), and GetSubPart().

Referenced by RerootFlsDigitToDigiPE::AddPE(), DigitText::AddStripIdText(), RerootToRawDataModule::AddToCrate(), PulserSigLinCalScheme::ApplyCalib(), PulserSigLinCalScheme::ApplyCalibFar(), DigiScintHit::AsString(), GeoScintMdlVolume::Build4Corners(), PlexValidate::BuildAndTestSEId(), Plexus::BuildLedMaps(), GeoScintMdlVolume::BuildNearIXtru(), GeoScintMdlVolume::BuildNeariXtru(), Plexus::BuildPixelMaps(), GeoGeometry::BuildStrips(), PulserTimeCalScheme::CalibrateByMuon(), PulserTimeCalScheme::CalibrateShield(), UgliStripNode::ClearFiber(), GeoStripNode::ClearFiber(), PhotonCalibratedPeComputer::ComputePhotons(), StripAttenCalScheme::DecalAttenCorrected(), PulserDriftCalScheme::DecalDrift(), QuadLinearityCalScheme::DecalLinearity(), MIPCalScheme::DecalMIP(), StripToStripCalScheme::DecalStripToStrip(), GfxDigitList::ExecuteEvent(), GfxStripList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), GfxStripList::ExecuteEventStrip(), PlexPixelSpotToStripEnd::Fill(), FitNdNonlinQuad(), CandStrip::FormatToOStream(), RerootFlsDigitToDigiPE::Get(), RerootToRawDataModule::Get(), LightInjector::Get(), StripAttenCalScheme::GetAttenCorrected(), TimeCalScheme::GetCalibratedTime(), RerootExodus::GetCellPos(), GfxDigit::GetDiscreteCoords(), PmtDriftCalScheme::GetDrift(), PulserDriftCalScheme::GetDriftCorrected(), SimPmt::GetGainAndWidth(), GeoStripNode::GetHalfLength(), GeoStripNode::GetHalfThickness(), GeoStripNode::GetHalfWidth(), QuadLinearityCalScheme::GetLinearized(), GeoStripNode::GetLPosRelMdl(), MIPCalScheme::GetMIP(), PlexusReroot::GetRawChannelId(), PEGainAggCalScheme::GetRow(), PEGainCalScheme::GetRow(), GeoStripNode::GetScintPlnNode(), UgliDbiStripStruct::GetShapeName(), GeoGeometry::GetStripNode(), GeoScintMdlNode::GetStripNode(), UgliScintPlnNode::GetStripNode(), GeoScintPlnNode::GetStripNode(), StripToStripCalScheme::GetStripToStripCorrected(), GeoStripNode::GetTPos(), GeoStripNode::GetTPosRelMdl(), GeoStripNode::GetZRotRelMdlRad(), StupidStripHandle::GlobalPos(), GeoStripNode::GlobalPos(), UgliDbiStrip::HashToIndex(), GeoStripNode::IsMirrored(), PhotonStatSummarizer::LoadDataFromDB(), LIPlexMaps::MakeCalStripAtten(), UgliGeometryReroot::MakeTempDbiPosInfo(), operator<<(), GeoStripNode::PartialLength(), CheezyDisplay::PlaneStripToXY(), TridModelStrip::Print(), PTSimHit::Print(), TridModelIntersect::Print(), Print(), PlexSEIdAltLItem::Print(), TridModelRecoStrip::Print(), RerootExodus::SEIdLocalToGlobal(), PhotonTransport::SimulateScintHit(), GeoValidate::TestGeom_GetStripHandle(), GeoValidate::TestScintPln_GetStripHandle(), GeoValidate::TestScintPln_GetStripHandleVector(), GeoValidate::TestStrip(), PlexValidate::TestStripEndId(), UgliStripNode::UgliStripNode(), UnbuildPlnStripEndKey(), GeoStripNode::WlsBypass(), UgliStripNode::WlsPigtail(), and GeoStripNode::WlsPigtail().

00075 {
00076    // Return unpacked StripEndId as a string
00077    // User should copy result because it points to a 
00078    // statically allocated string.
00079    // Internally uses a circular list of buffers to avoid problems
00080    // using AsString multiple times in a cout-like situation.
00081 
00082    const int nbuffers = 8;   // use a circular list of strings
00083    static char newstring[nbuffers][27]; // = "|123456789|1234 VX|123|SE|";
00084       //                                      12345678901234567890123456
00085    static int  ibuffer = nbuffers;
00086    ibuffer = (ibuffer+1)%nbuffers;  // each time move to next buffer
00087 
00088    Detector::Detector_t           det   = GetDetector();
00089    PlaneView::PlaneView_t         view  = GetPlaneView();
00090    PlaneCoverage::PlaneCoverage_t cover = GetPlaneCoverage();
00091 
00092    switch (option[0]) {
00093    case 's':
00094       // only the part the defines the "shape"
00095       sprintf(newstring[ibuffer],"%c%c%c%3.3d",
00096               Detector::AsString(det)[0],
00097               PlaneView::AsString(view)[0],
00098               PlaneCoverage::AsString(cover)[0],
00099               GetStrip());
00100       break;
00101    case 'c':
00102       // compact rendering identifying whole strip info (but not end info)
00103       sprintf(newstring[ibuffer],"%c%4.4d%c%c%3.3d",
00104               Detector::AsString(det)[0],
00105               GetPlane(),
00106               PlaneView::AsString(view)[0],
00107               PlaneCoverage::AsString(cover)[0],
00108               GetStrip());
00109       break;
00110    case 'C':
00111       // compact rendering identifying whole strip info & end info
00112      sprintf(newstring[ibuffer],"%c%4.4d%c%c%3.3d%c",
00113              Detector::AsString(det)[0],
00114              GetPlane(),
00115              PlaneView::AsString(view)[0],
00116              PlaneCoverage::AsString(cover)[0],
00117              GetStrip(),
00118              StripEnd::AsString(GetEnd(),det,view)[0]);
00119      break;
00120    case 'p':
00121    case 'b':
00122       // compact rendering identifying only the plane info
00123       // p is for plane including one char {P,A} := {passive, active}
00124       // b is for "box" containing steel+scint (or steel alone if no active)
00125       return PlexPlaneId::AsString(option);
00126       break;
00127    default:
00128       // full and complete info
00129       sprintf(newstring[ibuffer],"[%6.6s|%4d %c%c|%3d|%c%c]",
00130               Detector::AsString(det),
00131               GetPlane(),
00132               PlaneView::AsString(view)[0],
00133               PlaneCoverage::AsString(cover)[0],
00134               GetStrip(),
00135               StripEnd::AsString(GetSubPart())[0],
00136               StripEnd::AsString(GetEnd(),det,view)[0]);
00137       break;
00138    }
00139    
00140    return newstring[ibuffer];
00141 }

Int_t PlexStripEndId::Build18BitPlnStripKey (  )  const
Int_t PlexStripEndId::BuildPlnStripEndKey (  )  const

Definition at line 233 of file PlexStripEndId.cxx.

References det, PlexPlaneId::GetDetector(), GetEnd(), PlexPlaneId::GetPlane(), GetStrip(), Detector::kCalDet, StripEnd::kEast, Detector::kFar, Detector::kNear, Msg::kWarning, StripEnd::kWest, and MAXMSG.

Referenced by PulserSummaryList::Add(), PulserFromRawSummaryList::Add(), PEGainSummary::AddFarEnd(), PEGainSummary::AddNearEnd(), PulserGain::AddPoint(), PEGainStripHisto::AddToFarEnd(), PEGainStripHisto::AddToNearEnd(), PulserSigLinCalScheme::ApplyBendyCalib(), Plotter::BasicPlot(), PulserTimeCalScheme::CalibrateByMuon(), PulserTimeCalScheme::CalibrateShield(), StripAttenCalScheme::DecalAttenCorrected(), QuadLinearityCalScheme::DecalLinearity(), PulserLinearityCalScheme::DecalLinFar(), PulserLinearityCalScheme::DecalLinNear(), MIPCalScheme::DecalMIP(), StripToStripCalScheme::DecalStripToStrip(), TimeCalScheme::DecalTime(), DetailedTimeCal(), PEGainModule::DoMeanSigmaFromRawSums(), PEGainModule::DoMeanSigmaFromSums(), LIPlexMaps::DriftWithTime(), FitNdNonlinQuad(), StripAttenCalScheme::GetAttenCorrected(), TimeCalScheme::GetCalibratedTime(), PulserDriftCalScheme::GetDriftFar(), PulserSigLinCalScheme::GetDriftFar(), PulserDriftCalScheme::GetDriftPoint(), PulserSigLinCalScheme::GetDriftPoint(), QuadLinearityCalScheme::GetLinearized(), PulserLinearityCalScheme::GetLinFar(), PulserLinearityCalScheme::GetLinNear(), MIPCalScheme::GetMIP(), LIPlexMaps::GetRawPinMap(), LIPlexMaps::GetRefAdcPinRatio(), PEGainAggCalScheme::GetRow(), PEGainCalScheme::GetRow(), StripToStripCalScheme::GetStripToStripCorrected(), PEGainCalScheme::GuessGainAndWidth(), PEGainAggCalScheme::GuessGainAndWidth(), load_better_mipcal(), load_mc_mipcal(), PEGainModule::MakeHistosFromData(), MakeTimeCal(), Plotter::Plot(), and PulserDrift::PulserDrift().

00234 {
00235    // compactified plane,strip,end (assuming only east/west ends)
00236    // packed tightly, not simple bit shifts
00237 
00238    // this isn't quite as tight as it could possibly be for the
00239    // near detector as it doesn't worry about partial vs. full planes
00240    // and has gaps for empty spectrometer planes 
00241 
00242    Int_t plane = GetPlane();
00243    Int_t strip = GetStrip();
00244    Detector::Detector_t det = GetDetector();
00245    StripEnd::StripEnd_t end = GetEnd();
00246 
00247    Int_t nStrips = 192;  // need some default
00248    switch (det) {
00249    case Detector::kNear:   nStrips =  96; break;
00250    case Detector::kFar:    nStrips = 192; break;
00251    case Detector::kCalDet: nStrips =  24; break;
00252    default:
00253       MAXMSG("Plex",Msg::kWarning,10)
00254          << "PlexStripEndId " << *this << " is not Near/Far/CalDet" << endl;
00255    }
00256 
00257    if (strip>=nStrips) {
00258      MAXMSG("Plex",Msg::kWarning,10)
00259        << "PlexStripEndId " << *this 
00260        << " exceeds expected nStrips " << nStrips << endl;
00261    }
00262 
00263    Int_t hvalue = plane*nStrips + strip;
00264 
00265    if (det == Detector::kNear) {
00266       // near detector only has west readout
00267      if (end != StripEnd::kWest) {
00268        MAXMSG("Plex",Msg::kWarning,10)
00269          << "PlexStripEndId " << *this << " has non-West readout" << endl;
00270      // but do nothing
00271      }
00272    }
00273    else {
00274       // make room for end bit
00275       hvalue <<= 1;
00276       switch (GetEnd()) {
00277       case StripEnd::kEast: hvalue += 0; break;
00278       case StripEnd::kWest: hvalue += 1; break;
00279       default:
00280          MAXMSG("Plex",Msg::kWarning,10)
00281             << "PlexStripEndId " << *this << " is not East/West" << endl;
00282       }
00283    }
00284 
00285    return hvalue;
00286 }

UInt_t PlexStripEndId::GetEncoded (  )  const [inline]
StripEnd::StripEnd_t PlexStripEndId::GetEnd (  )  const [inline]

Definition at line 136 of file PlexStripEndId.h.

References PlexPlaneId::fEncoded, maskPlexIdEnd, and shftPlexIdEnd.

Referenced by PulserSummary::Add(), TridModelStrip::AddStrip(), DigitText::AddStripIdText(), PEGainStripHisto::AddToFarEnd(), PEGainStripHisto::AddToNearEnd(), CompareToReroot::Ana(), UberDST::Ana(), AsString(), PlexValidate::BuildAndTestSEId(), BuildPlnStripEndKey(), PhotonCalibratedPeComputer::ComputePhotons(), SimpleCalScheme::DecalAttenCorrected(), StripAttenCalScheme::DecalAttenCorrected(), PEGainModule::DoMeanSigmaFromData(), PEGainModule::DoMeanSigmaFromRawSums(), PEGainModule::DoMeanSigmaFromSums(), LIPlexMaps::DumpCalStripAtten(), PEGainModule::EndJob(), NtpSRModule::FillNtpShieldStrip(), FitNdNonlinQuad(), Plexus::GetAllStripEnds(), SimpleCalScheme::GetAttenCorrected(), StripAttenCalScheme::GetAttenCorrected(), CalHelpers::GetBestEnd(), PEGainModule::getMyIndex(), GetOppositeSEId(), PlexusReroot::GetRawChannelId(), Plexus::GetRawChannelId(), IsOppositeStripEnd(), IsSameStripEnd(), load_better_mipcal(), CalHelpers::MCDigitMap::MakeMCDigitMap(), CalHelpers::MCDigit::MCDigit(), GfxStrip::ModifyCoords(), GfxDigit::ModifyCoords(), LIPlexMaps::PlotPlexStripMap(), TridModelStrip::Print(), PlexSEIdAltL::Print(), LIPlexMaps::ReadDbCalStripToStrip(), OltEnds::Reco(), UberModule::Reco(), UberModuleLite::Reco(), LISummarySorter::ReconstructStripEnd(), PlexVetoShieldHack::RenumberMdlToMux(), PlexVetoShieldHack::RenumberMuxToMdl(), AlgFarDetStrip::RunAlg(), PhotonInjector::SimulateEvent(), PlexStripEndToLed::Store(), PlexPixelSpotToStripEnd::Store(), and PlexSEIdAltL::TestConsistency().

00137 {
00138    Int_t bitField = ( fEncoded & maskPlexIdEnd ) >> shftPlexIdEnd;
00139    return (StripEnd::StripEnd_t) bitField;
00140 }

StripEnd::StripEnd_t PlexStripEndId::GetManifoldF1 (  )  const

Definition at line 188 of file PlexStripEndId.cxx.

References PlexPlaneId::GetDetector(), PlexPlaneId::GetPlaneView(), GetStrip(), Detector::kCalDet, StripEnd::kDown, StripEnd::kEast, Detector::kFar, PlaneView::kU, Msg::kWarning, StripEnd::kWest, and MAXMSG.

00189 {
00190    // Return the side with the "F1" manifold (construction notation)
00191 
00192    switch (GetDetector()) {
00193    case Detector::kFar:
00194      // lower half has F1 on West side, upper on the East
00195      return ((GetStrip()<96) ? StripEnd::kWest : StripEnd::kEast );
00196      break;
00197    case Detector::kCalDet:
00198      {
00199        // ???? this might not be right!!!
00200        MAXMSG("Plex",Msg::kWarning,10)
00201          << "GetManifoldF1 not verified for CalDet!!" << endl;
00202        return ((GetPlaneView()==PlaneView::kU) ? 
00203                StripEnd::kDown : StripEnd::kWest );
00204      }
00205      break;
00206    default:
00207      // near detector only has west side
00208      return StripEnd::kWest;
00209    }
00210 }

UShort_t PlexStripEndId::GetMapperStripInMdl (  )  const

Definition at line 178 of file PlexStripEndId.cxx.

References GetStrip().

00179 {
00180    // Return an strip # within a module using construction based notation
00181    // starts w/ 1 .. flip flops w/ increasing 'tpos' depending on
00182    // installation orientation
00183 
00184    return PlexScintMdlId::GetMapperStripInMdl(*this,this->GetStrip());
00185 }

PlexStripEndId PlexStripEndId::GetOppositeSEId (  )  const

Definition at line 144 of file PlexStripEndId.cxx.

References PlexPlaneId::fEncoded, GetEnd(), StripEnd::kNegative, StripEnd::kPositive, and SetEnd().

Referenced by PulserSummaryList::Add(), PulserFromRawSummaryList::Add(), TridModelStrip::AddDigit(), LIRawNt::Ana(), PEGainModule::MakeHistosFromData(), Plotter::Plot(), LISummarySorter::ReconstructStripEnd(), ShieldGeom::SetupShieldGeom(), and PlexValidate::TestStripEndId().

00145 {
00146    // Return an Id for the opposite end
00147 
00148    PlexStripEndId other(fEncoded);
00149    StripEnd::StripEnd_t end = GetEnd();
00150    switch (end) {
00151    case StripEnd::kNegative: end = StripEnd::kPositive; break;
00152    case StripEnd::kPositive: end = StripEnd::kNegative; break;
00153    default: break;
00154    }
00155    other.SetEnd(end);
00156    return other;
00157    
00158 }

PlexScintMdlId PlexStripEndId::GetScintMdlId (  )  const

Definition at line 161 of file PlexStripEndId.cxx.

References GetStrip(), and PlexScintMdlId::StripToScintMdl().

Referenced by AlignmentHistograms::Fill(), AlignmentAlgorithm::Fill(), StatisticalFluctuations::Fill(), AlignmentHistograms::FillHits(), and UgliDbiTables::GetDbiStripById().

00162 {
00163    // Return an Id for the scint module this strip is in
00164 
00165    return PlexScintMdlId::StripToScintMdl(*this,this->GetStrip());
00166 }

UShort_t PlexStripEndId::GetStrip (  )  const [inline]

Definition at line 142 of file PlexStripEndId.h.

References PlexPlaneId::fEncoded, maskPlexIdStrip, and shftPlexIdStrip.

Referenced by PulserSummary::Add(), TrackClusterSR::AddStrip(), DigitText::AddStripIdText(), PEGainStripHisto::AddToFarEnd(), PEGainStripHisto::AddToNearEnd(), CompareToReroot::Ana(), DmxDeMuxModule::Ana(), UberDST::Ana(), DmxDeMuxCosmicsModule::Ana(), AltDeMuxDisplay::Ana(), AlignmentAlgorithm::AnalyzeStripData(), AsString(), Build18BitPlnStripKey(), PlexValidate::BuildAndTestSEId(), BuildPlnStripEndKey(), CheckGC::checklin(), AlgAltDeMuxBase::CleanIsolatedHits(), AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), AlgAltDeMuxBase::DistanceToNearestInPlane(), DmxHypothesis::DmxHypothesis(), DmxMuonPlane::DmxMuonPlane(), PEGainModule::DoMeanSigmaFromData(), PEGainModule::DoMeanSigmaFromRawSums(), PEGainModule::DoMeanSigmaFromSums(), LIPlexMaps::DumpCalStripAtten(), PEGainModule::EndJob(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), AlignmentHistograms::Fill(), AlignmentAlgorithm::FillCandStrip(), NtpSRModule::FillNtpShieldStrip(), DmxDeMuxCosmicsModule::FindDigitsChiSq(), FitNdNonlinQuad(), AlignmentAlgorithm::FitStripAttenuationHistograms(), flshit_massage_local(), UgliDbiStrip::FormatToOStream(), CalHelpers::GetBestStrip(), RerootExodus::GetCellPos(), UgliDbiTables::GetDbiStripById(), GfxStrip::GetDiscreteCoords(), GfxDigit::GetDiscreteCoords(), StupidStripHandle::GetHalfLength(), DmxShowerPlane::GetHypothesisLowerBound(), DmxMuonPlane::GetHypothesisLowerBound(), GetManifoldF1(), GetMapperStripInMdl(), PEGainModule::getMyIndex(), PlexusReroot::GetRawChannelId(), GetScintMdlId(), UgliDbiStrip::GetStrip(), CandStripHandle::GetStrip(), GetStripInMdl(), DmxHypothesis::GetTimingOffset(), DmxMuonPlane::GetTimingOffset(), StupidStripHandle::GlobalPos(), UgliDbiStrip::HashToIndex(), IsSameStrip(), IsValid(), CalHelpers::MCDigit::MCDigit(), Plotter::myGetLedId(), CheezyDisplay::PlaneStripToXY(), LIPlexMaps::PlotPlexStripMap(), TridModelStrip::Print(), TridModelIntersect::Print(), PlexSEIdAltL::Print(), DmxMuonPlane::PrintRecon(), TrackDirectionModule::ProcessRecord(), LIPlexMaps::ReadDbCalStripAtten(), LIPlexMaps::ReadDbCalStripToStrip(), MakeAlignmentModule::ReadRecord(), OltEnds::Reco(), UberModule::Reco(), UberModuleLite::Reco(), LISummarySorter::ReconstructStripEnd(), PlexVetoShieldHack::RenumberMdlToMux(), PlexVetoShieldHack::RenumberMuxToMdl(), Anp::FillStrip::Run(), AlgFarDetShieldPlank::RunAlg(), AlgFarDetStrip::RunAlg(), PulserGainFit::RunNearFarFits(), AltDeMuxCalc::SetEastToStrip(), AltDeMuxCalc::SetFibreLengthE(), AltDeMuxCalc::SetFibreLengthW(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), DmxShowerPlane::SetStrips(), ShieldGeom::SetupShieldGeom(), AltDeMuxCalc::SetWestToStrip(), AlgTrackSRList::SpectrometerTracking(), UgliDbiStrip::Store(), PlexStripEndToLed::Store(), PlexPixelSpotToStripEnd::Store(), DigiScintHit::Strip(), EVD::UpdateChargeHists(), AlgAltDeMuxBase::XTalkCharge(), and AlignmentHistograms::~AlignmentHistograms().

00143 {
00144    return ( fEncoded & maskPlexIdStrip ) >> shftPlexIdStrip;
00145 }

UShort_t PlexStripEndId::GetStripInMdl (  )  const

Definition at line 169 of file PlexStripEndId.cxx.

References GetStrip().

Referenced by UgliDbiTables::GetDbiStripById().

00170 {
00171    // Return an strip # within a module 
00172    // using offline convention of [0,nstripInMdl)
00173 
00174    return PlexScintMdlId::GetStripInMdl(*this,this->GetStrip());
00175 }

StripEnd::StripEnd_t PlexStripEndId::GetSubPart (  )  const [inline]
UInt_t PlexStripEndId::GetUniqueStripEncodedValue (  )  const [inline]

Definition at line 153 of file PlexStripEndId.h.

References PlexPlaneId::fEncoded, StripEnd::kWhole, maskPlexIdEnd, maskPlexIdSubPart, shftPlexIdEnd, and shftPlexIdSubPart.

00154 {
00155    // uncompactified, but unencumbered w/ end and subpart
00156    // and still usable for creating a PlexStripEndId (sets kWhole for both)
00157   
00158   return
00159     ( fEncoded & ~(maskPlexIdEnd|maskPlexIdSubPart) )                 |
00160     ( ( StripEnd::kWhole << shftPlexIdSubPart ) & maskPlexIdSubPart ) |
00161     ( ( StripEnd::kWhole << shftPlexIdEnd      ) & maskPlexIdEnd    ) ;
00162                  
00163 }

Bool_t PlexStripEndId::IsOppositeStripEnd ( const PlexStripEndId other  )  const

Definition at line 339 of file PlexStripEndId.cxx.

References GetEnd(), and IsSameStrip().

Referenced by PlexSEIdAltL::SetToOppositeEnds(), and PlexValidate::TestStripEndId().

00340 {
00341    // Determine if "this" and "other" are the same strip
00342    // but opposite ends.
00343    // !!!! Assumes one can test this by != on ends
00344 
00345    return (GetEnd() != other.GetEnd() && IsSameStrip(other) );
00346    
00347 }

Bool_t PlexStripEndId::IsSameStrip ( const PlexStripEndId other  )  const

Definition at line 319 of file PlexStripEndId.cxx.

References PlexPlaneId::GetDetector(), PlexPlaneId::GetPlane(), and GetStrip().

Referenced by IsOppositeStripEnd(), VaDigit::IsSameStrip(), IsSameStripEnd(), AlgStripSRList::RunAlgFar(), AlgStripSRList::RunAlgMixed(), AlgStripSRList::RunAlgNear(), TridModelStrip::ShouldContain(), and PlexValidate::TestStripEndId().

00320 {
00321    // Determine if "this" and "other" are the same strip
00322 
00323    return (GetDetector() == other.GetDetector() &&
00324            GetPlane()    == other.GetPlane()    &&
00325            GetStrip()    == other.GetStrip()       );
00326    
00327 }

Bool_t PlexStripEndId::IsSameStripEnd ( const PlexStripEndId other  )  const

Definition at line 330 of file PlexStripEndId.cxx.

References GetEnd(), and IsSameStrip().

Referenced by LIPatternFinderFancy::FindLedIdFromStripEndId(), and PlexValidate::TestStripEndId().

00331 {
00332    // Determine if "this" and "other" are the same strip and end
00333 
00334    return (GetEnd() == other.GetEnd() && IsSameStrip(other) );
00335    
00336 }

Bool_t PlexStripEndId::IsValid (  )  const [virtual]
void PlexStripEndId::Print ( Option_t *  option = ""  )  const

Reimplemented from PlexPlaneId.

Definition at line 361 of file PlexStripEndId.cxx.

References AsString().

Referenced by MeuReco::CalcLPos(), MeuReco::CalcStripDists(), and PlexValidate::TestStripEndId().

00362 {
00363    // Print the (decoded) value
00364 
00365    printf("%s\n",AsString(option));
00366 }

void PlexStripEndId::SetEnd ( StripEnd::StripEnd_t  end  )  [inline]
void PlexStripEndId::SetIsSteel ( Bool_t   )  [inline, private]

Reimplemented from PlexPlaneId.

Definition at line 104 of file PlexStripEndId.h.

Referenced by PlexStripEndId().

00104 {;}

void PlexStripEndId::SetStrip ( UInt_t  strip  )  [inline]
void PlexStripEndId::SetSubPart ( StripEnd::StripEnd_t  subpart  )  [inline]
PlexStripEndId PlexStripEndId::Unbuild18BitPlnStripKey ( Detector::Detector_t  det,
Int_t  key 
) [static]

Definition at line 220 of file PlexStripEndId.cxx.

References bitsPlexIdStrip, maskPlexIdStrip, PlexStripEndId(), and shftPlexIdStrip.

00221 {
00222    // recover true id object from hashed down version
00223    // needs detector info that was lost in compactification
00224    // obviously can't recover end info that was lost
00225 
00226    const UInt_t maskLower = ( maskPlexIdStrip >> shftPlexIdStrip );
00227    UInt_t strip = key & maskLower;
00228    UInt_t plane = key >> bitsPlexIdStrip;
00229    return PlexStripEndId(det,plane,strip);
00230 }

PlexStripEndId PlexStripEndId::UnbuildPlnStripEndKey ( Detector::Detector_t  det,
Int_t  key 
) [static]

Definition at line 289 of file PlexStripEndId.cxx.

References AsString(), Detector::kCalDet, StripEnd::kEast, Detector::kFar, Detector::kNear, Msg::kWarning, StripEnd::kWest, MAXMSG, and PlexStripEndId().

Referenced by CheckGC::checklin(), PhotonStatSummarizer::LoadDataFromDB(), PulserGainFit::RunNearFarFits(), and PulserGainFit::RunPinFits().

00290 {
00291    // recover true id object from hashed down version
00292    // needs detector info that was lost in compactification
00293    Int_t nStrips = 192;  // need some default
00294    switch (det) {
00295    case Detector::kNear:   nStrips =  96; break;
00296    case Detector::kFar:    nStrips = 192; break;
00297    case Detector::kCalDet: nStrips =  24; break;
00298    default:
00299       MAXMSG("Plex",Msg::kWarning,10)
00300          << "PlexStripEndId " << Detector::AsString(det) 
00301          << "(" << (int)det << ")"
00302          << " is not Near/Far/CalDet" << endl;
00303    }
00304    
00305    StripEnd::StripEnd_t end = StripEnd::kWest;
00306    if ( Detector::kNear != det ) {
00307      // NearDet has only west readout so it isn't part of the hash
00308      if ( key & 1 ) end = StripEnd::kWest;
00309      else           end = StripEnd::kEast;
00310      key >>= 1;  // for non-NearDet we can now remove bit
00311    }
00312    Int_t plane = key / nStrips;
00313    Int_t strip = key - (plane*nStrips);
00314 
00315    return PlexStripEndId(det,plane,strip,end);
00316 }


Friends And Related Function Documentation

Bool_t operator!= ( const PlexStripEndId lhs,
const PlexStripEndId rhs 
) [friend]

Reimplemented from PlexPlaneId.

Bool_t operator< ( const PlexStripEndId lhs,
const PlexStripEndId rhs 
) [friend]

Reimplemented from PlexPlaneId.

Bool_t operator<= ( const PlexStripEndId lhs,
const PlexStripEndId rhs 
) [friend]

Reimplemented from PlexPlaneId.

Bool_t operator== ( const PlexStripEndId lhs,
const PlexStripEndId rhs 
) [friend]

Reimplemented from PlexPlaneId.

Bool_t operator> ( const PlexStripEndId lhs,
const PlexStripEndId rhs 
) [friend]

Reimplemented from PlexPlaneId.

Bool_t operator>= ( const PlexStripEndId lhs,
const PlexStripEndId rhs 
) [friend]

Reimplemented from PlexPlaneId.


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1