PlexPlaneId Class Reference

#include <PlexPlaneId.h>

Inheritance diagram for PlexPlaneId:
PlexScintMdlId PlexStripEndId

List of all members.

Public Types

enum  EPlaneType { kScintOrSteel, kScint, kSteel }

Public Member Functions

 PlexPlaneId ()
 PlexPlaneId (Detector::Detector_t detector, UInt_t plane, Bool_t isSteel=kFALSE, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown)
virtual ~PlexPlaneId ()
 PlexPlaneId (const UInt_t encoded)
UInt_t GetEncoded () const
const char * AsString (Option_t *option="") const
Detector::Detector_t GetDetector () const
UShort_t GetPlane () const
PlaneCoverage::PlaneCoverage_t GetPlaneCoverage () const
PlaneView::PlaneView_t GetPlaneView () const
Bool_t IsSteel () const
Bool_t IsVetoShield () const
Int_t GetVetoSection () const
Int_t GetSuperModule () const
Bool_t IsNearSpect () const
virtual Bool_t IsValid () const
Bool_t IsNull () const
UShort_t NumberOfStrips () const
PlexPlaneId GetNext (EPlaneType ptype=PlexPlaneId::kScintOrSteel, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown) const
PlexPlaneId GetPrevious (EPlaneType ptype=PlexPlaneId::kScintOrSteel, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown) const
PlexPlaneId GetAdjoin (Int_t dir, EPlaneType ptype=PlexPlaneId::kScintOrSteel, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown) const
PlexPlaneId GetAdjoinScint (Int_t dir, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown) const
PlexPlaneId GetAdjoinSteel (Int_t dir, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown) const
UShort_t GetNumStrips () const
UShort_t GetNumScintMdls () const
void Print (Option_t *option="") const
void SetDetector (Detector::Detector_t detector)
void SetPlane (UInt_t plane, PlaneView::PlaneView_t view=PlaneView::kUnknown, PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown)
void SetPlaneCoverage (PlaneCoverage::PlaneCoverage_t coverage)
void SetPlaneView (PlaneView::PlaneView_t view)
void SetIsSteel (Bool_t isSteel)

Static Public Member Functions

static UInt_t LastPlaneFarSM0 ()
static UInt_t LastPlaneFarSM1 ()
static UInt_t LastPlaneNearCalor ()
static UInt_t LastPlaneNearSpect ()

Static Public Attributes

static Bool_t fgCalDetCosmicsAView = false

Protected Attributes

UInt_t fEncoded

Private Member Functions

PlaneView::PlaneView_t DefaultPlaneView (Detector::Detector_t detector, UInt_t plane)
PlaneCoverage::PlaneCoverage_t DefaultPlaneCoverage (Detector::Detector_t detector, UInt_t plane)

Friends

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

Detailed Description

Definition at line 24 of file PlexPlaneId.h.


Member Enumeration Documentation

Enumerator:
kScintOrSteel 
kScint 
kSteel 

Definition at line 59 of file PlexPlaneId.h.

00059                    {
00060       kScintOrSteel,
00061       kScint,
00062       kSteel
00063    };


Constructor & Destructor Documentation

PlexPlaneId::PlexPlaneId (  )  [inline]

Definition at line 230 of file PlexPlaneId.h.

PlexPlaneId::PlexPlaneId ( Detector::Detector_t  detector,
UInt_t  plane,
Bool_t  isSteel = kFALSE,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
)

Definition at line 44 of file PlexPlaneId.cxx.

References SetDetector(), SetIsSteel(), and SetPlane().

00049    : fEncoded(defaultPlexPlaneId)
00050 {
00051    // Normal ctor
00052 
00053    SetDetector(detector);
00054    SetIsSteel(isSteel);
00055    SetPlane(plane,view,coverage);
00056 }

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

Definition at line 34 of file PlexPlaneId.h.

00034 { ; } // no owned data members

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

Definition at line 231 of file PlexPlaneId.h.

00231 : fEncoded(encoded) { ; }


Member Function Documentation

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.

Definition at line 59 of file PlexPlaneId.cxx.

References det, GetDetector(), GetPlane(), GetPlaneCoverage(), GetPlaneView(), IsSteel(), IsVetoShield(), and Detector::kFar.

Referenced by GeoGeometry::BuildDetector(), UgliGeometry::BuildNodes(), GeoGeometry::BuildPlanePairVolumes(), UgliScintPlnNode::BuildStrips(), DefaultPlaneCoverage(), DefaultPlaneView(), BfldDbiPlaneMap::FormatToOStream(), FabPlnInstall::FormatToOStream(), RerootExodus::GetPlanePos(), GeoGeometry::GetScintPlnNode(), UgliGeometry::GetScintPlnNode(), UgliGeometry::GetSteelPlnNode(), GeoGeometry::GetSteelPlnNode(), GeoScintPlnNode::GetStripNode(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), UgliGeometryReroot::MakeTempDbiScintStruct(), NumberOfStrips(), UgliScintPlnNode::NumberOfStrips(), operator<<(), RerootExodus::PECAB2SEId(), Print(), SetPlane(), SwimGeo::SwimGeo(), GeoValidate::TestGeom_GetPlnHandleVector(), GeoValidate::TestGeom_GetScintPlnHandle(), GeoValidate::TestGeom_GetScintPlnHandleVector(), GeoValidate::TestGeom_GetSteelPlnHandle(), GeoValidate::TestGeom_GetSteelPlnHandleVector(), PlexValidate::TestPlaneId(), GeoValidate::TestScintMdl(), GeoValidate::TestScintPln(), GeoValidate::TestSteelPln(), GeoValidate::TestStrip(), UgliScintPlnNode::UgliScintPlnNode(), and UgliSteelPlnNode::UgliSteelPlnNode().

00060 {
00061    // Return unpacked StripEndId as a string
00062    // User should copy result because it points to a 
00063    // statically allocated string.
00064    // Internally uses a circular list of buffers to avoid problems
00065    // using AsString multiple times in a cout-like situation.
00066 
00067    const int nbuffers = 8;   // use a circular list of strings
00068    static char newstring[nbuffers][27]; // = "|123456789|1234 VX|123|SE|";
00069       //                                      12345678901234567890123456
00070    static int  ibuffer = nbuffers;
00071    ibuffer = (ibuffer+1)%nbuffers;  // each time move to next buffer
00072 
00073    Detector::Detector_t det = GetDetector();
00074    char detc                = Detector::AsString(det)[0];
00075    int  ipln                = GetPlane();
00076    char type                = (IsSteel() ? 'P' : 'A'); 
00077    char viewc               = PlaneView::AsString(GetPlaneView())[0];
00078    const char* cover        = PlaneCoverage::AsString(GetPlaneCoverage());
00079 
00080    switch (option[0]) {
00081    case 'b':
00082       // override P/A type with B 
00083       // b is for "box" containing steel+scint (or steel alone if no active)
00084       type = 'B';
00085    default:
00086       // compact rendering identifying only the plane info
00087       if ( Detector::kFar == det && IsVetoShield() ) {
00088         sprintf(newstring[ibuffer],"%c%3.3d%c%c%2.2s",
00089                 detc, ipln, type, viewc, cover);
00090       }
00091       else {
00092         sprintf(newstring[ibuffer],"%c%3.3d%c%c%c",
00093                 detc, ipln, type, viewc, cover[0]);
00094       }
00095       break;
00096    }
00097    
00098    return newstring[ibuffer];
00099 }

PlaneCoverage::PlaneCoverage_t PlexPlaneId::DefaultPlaneCoverage ( Detector::Detector_t  detector,
UInt_t  plane 
) [private]

Definition at line 435 of file PlexPlaneId.cxx.

References AsString(), PlexVetoShieldHack::GetDefaultContext(), PlexVetoShieldHack::GetMdlPlaneCoverage(), PlexVetoShieldHack::IsMdlPlnVetoShield(), PlexVetoShieldHack::IsMuxPlnVetoShield(), Detector::kCalDet, Detector::kFar, Detector::kNear, PlaneCoverage::kNearFull, PlaneCoverage::kNearPartial, PlaneCoverage::kTotal, PlaneCoverage::kUninstrumented, PlaneCoverage::kUnknown, Msg::kWarning, LastPlaneFarSM0(), LastPlaneFarSM1(), LastPlaneNearCalor(), LastPlaneNearSpect(), and MSG.

Referenced by SetPlane().

00437 {
00438    // Determine plane coverage given just (detector,plane#)
00439 
00440    static Int_t warn_mask = 0;
00441 
00442    switch (detector) {
00443    case Detector::kNear:
00444       // planes 1,6,11... are full coverage
00445       // otherwise if plane<121 partial
00446       // otherwise uninstrumented
00447 
00448       if ( plane<1 || plane>LastPlaneNearSpect() ) {
00449          return PlaneCoverage::kUninstrumented;
00450       }
00451       else if (plane%5 == 1) {
00452          return PlaneCoverage::kNearFull;
00453       }
00454       else if ( plane<=LastPlaneNearCalor() ) {
00455          return PlaneCoverage::kNearPartial;
00456       }
00457       else {
00458          return PlaneCoverage::kUninstrumented;
00459       }
00460       break;
00461    case Detector::kFar:
00462    {
00463       // veto shield stuff first
00464       if ( PlexVetoShieldHack::IsMuxPlnVetoShield(plane) ) {
00465         // ambiguous .. "mux" planes cover various views
00466         return PlaneCoverage::kUnknown;
00467       }
00468       if ( PlexVetoShieldHack::IsMdlPlnVetoShield(plane) ) {
00469         // little to go on... use semi-bogus context
00470         const VldContext& vldc = PlexVetoShieldHack::GetDefaultContext();
00471         return PlexVetoShieldHack::GetMdlPlaneCoverage(vldc,plane);
00472       }
00473 
00474       // first plane of each SM is blank
00475       UInt_t far_blank[3];
00476       far_blank[0] = 0;
00477       far_blank[1] = LastPlaneFarSM0() + 1;
00478       far_blank[2] = LastPlaneFarSM1() + 1; // beyond the end
00479 
00480       if ( plane <= far_blank[0] ) return PlaneCoverage::kUninstrumented;
00481       if ( plane == far_blank[1] ) return PlaneCoverage::kUninstrumented;
00482       if ( plane >= far_blank[2] ) return PlaneCoverage::kUninstrumented;
00483       return PlaneCoverage::kTotal;
00484 
00485       break;
00486    }
00487    case Detector::kCalDet:
00488       if ( plane > 5*12+4 ) return PlaneCoverage::kUninstrumented;
00489       if ( plane == 60    ) return PlaneCoverage::kUninstrumented;
00490       return PlaneCoverage::kTotal;
00491       break;
00492    default:
00493       if (! (warn_mask&detector) ) {
00494       MSG("Plex",Msg::kWarning) 
00495          << "PlexPlaneId::DefaultPlaneCoverage "
00496          << " not unique for detector type "
00497          << Detector::AsString(detector) << endl
00498          << "    ... first and only warning " << endl;
00499          
00500       warn_mask |= detector;
00501       }
00502 //      assert(0);
00503       break;
00504    }
00505 
00506    return PlaneCoverage::kUnknown;
00507 
00508 }

PlaneView::PlaneView_t PlexPlaneId::DefaultPlaneView ( Detector::Detector_t  detector,
UInt_t  plane 
) [private]

Definition at line 339 of file PlexPlaneId.cxx.

References AsString(), fgCalDetCosmicsAView, PlexVetoShieldHack::GetDefaultContext(), PlexVetoShieldHack::GetMdlPlaneView(), PlexVetoShieldHack::IsMdlPlnVetoShield(), PlexVetoShieldHack::IsMuxPlnVetoShield(), PlaneView::kA, PlaneView::kB, Detector::kCalDet, Detector::kFar, Detector::kNear, PlaneView::kU, PlaneView::kUnknown, PlaneView::kV, PlaneView::kVSUnknown, Msg::kWarning, LastPlaneFarSM0(), LastPlaneFarSM1(), LastPlaneNearCalor(), LastPlaneNearSpect(), and MSG.

Referenced by SetPlane().

00341 {
00342    // Determine plane view given just (detector,plane#)
00343 
00344    static Int_t warn_mask = 0;
00345 
00346    switch (detector) {
00347    case Detector::kNear:
00348       // 0=blank, 1=u, 2=v, 3=u, 4=v ...
00349       // planes 1,6,11... are full coverage
00350       // otherwise if plane<121 partial
00351       // otherwise uninstrumented
00352       if ( plane<1 ||  plane>LastPlaneNearSpect() ||
00353           ( plane>LastPlaneNearCalor() && (plane%5 !=1)) ) {
00354          return PlaneView::kUnknown;
00355       } 
00356       else if (plane%2 == 1) {
00357          return PlaneView::kU;
00358       } 
00359       else {
00360          return PlaneView::kV;
00361       }
00362       break;
00363    case Detector::kFar:
00364    {
00365       // veto shield stuff first
00366       if ( PlexVetoShieldHack::IsMuxPlnVetoShield(plane) ) {
00367         // ambiguous .. "mux" planes cover various views
00368         return PlaneView::kVSUnknown;
00369       }
00370       if ( PlexVetoShieldHack::IsMdlPlnVetoShield(plane) ) {
00371         // little to go on... use semi-bogus context
00372         const VldContext& vldc = PlexVetoShieldHack::GetDefaultContext();
00373         return PlexVetoShieldHack::GetMdlPlaneView(vldc,plane);
00374       }
00375 
00376       // first plane of each of the two SM is blank
00377       UInt_t far_blank[3];
00378       far_blank[0] = 0;
00379       far_blank[1] = LastPlaneFarSM0() + 1;
00380       far_blank[2] = LastPlaneFarSM1() + 1;  // beyond the end
00381 
00382       if ( plane <= far_blank[0] ) return PlaneView::kUnknown;
00383       if ( plane == far_blank[1] ) return PlaneView::kUnknown;
00384       if ( plane >= far_blank[2] ) return PlaneView::kUnknown;
00385 
00386       UInt_t insuper = plane;
00387       if ( plane < far_blank[1] ) {
00388          // nada
00389       }
00390       else {
00391          insuper = plane - far_blank[1];
00392       }
00393 
00394       if (insuper%2 == 1) return PlaneView::kV;
00395       else                return PlaneView::kU;
00396 
00397       break;
00398    }
00399    case Detector::kCalDet:
00400       // 5 supermodules of 12 planes + 4 on floor
00401       // plane 0 is legal, (plane 60 for was for older REROOT)
00402       if ( plane > 5*12+4 || plane == 60 ) {
00403          return PlaneView::kUnknown;
00404       } 
00405       else if ( plane > 5*12 ) {
00406          // floor or "cosmic" planes are 61,62,63,64
00407          return ((fgCalDetCosmicsAView) ? PlaneView::kA : PlaneView::kB ) ;
00408       }
00409       // plane 0 has strips running horizontal (kV)
00410       else if ( plane%2 == 0 ) {
00411          return PlaneView::kV;
00412       } 
00413       else {
00414          return PlaneView::kU;
00415       }
00416       break;
00417    default:
00418       if (! (warn_mask&detector) ) {
00419          MSG("Plex",Msg::kWarning) 
00420          << "PlexPlaneId::DefaultPlaneView "
00421          << "not unique for detector type "
00422          << Detector::AsString(detector) << endl
00423          << "    ... first and only warning " << endl;
00424          warn_mask |= detector;
00425       }
00426 //      assert(0);
00427       break;
00428    }
00429 
00430    return PlaneView::kUnknown;
00431 
00432 }

PlexPlaneId PlexPlaneId::GetAdjoin ( Int_t  dir,
EPlaneType  ptype = PlexPlaneId::kScintOrSteel,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
) const [inline]

Definition at line 344 of file PlexPlaneId.h.

References GetNext(), and GetPrevious().

Referenced by GetAdjoinScint(), GetAdjoinSteel(), and AlgTrack::SetdS().

00347 {
00348   return (dir<0) ? GetPrevious(ptype,view,cover) : GetNext(ptype,view,cover); 
00349 }

PlexPlaneId PlexPlaneId::GetAdjoinScint ( Int_t  dir,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
) const [inline]
PlexPlaneId PlexPlaneId::GetAdjoinSteel ( Int_t  dir,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
) const [inline]

Definition at line 358 of file PlexPlaneId.h.

References GetAdjoin(), and kSteel.

Referenced by GeometryHelper::GetZVtx(), and AlgFitTrackCam::SetRangeAnddS().

00361 { return GetAdjoin(dir,PlexPlaneId::kSteel,view,cover); }

Detector::Detector_t PlexPlaneId::GetDetector (  )  const [inline]

Definition at line 236 of file PlexPlaneId.h.

References fEncoded, maskPlexIdDetector, and shftPlexIdDetector.

Referenced by UgliGeometryReroot::ABtoEastWest(), AsString(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), PlexValidate::BuildAndTestSEId(), GeoScintMdlVolume::BuildModuleShape(), PlexScintMdlId::BuildPlnMdlKey(), PlexStripEndId::BuildPlnStripEndKey(), PulserLinearityCalScheme::DecalLinearity(), BfldDbiPlaneMap::GetAggregateNo(), RerootExodus::GetCellPos(), UgliDbiStrip::GetDetector(), UgliDbiScintMdl::GetDetector(), FabPlnInstallLookup::GetFabPlnInstall(), FabPlnInstallLookup::GetFabSteelPlates(), StupidStripHandle::GetHalfLength(), PulserLinearityCalScheme::GetLinearized(), PlexStripEndId::GetManifoldF1(), getModulesInPlnInfo(), GetPlaneCoverage(), GetPlaneView(), PlexusReroot::GetRawChannelId(), Plexus::GetRawChannelId(), UgliGeometry::GetScintPlnNode(), PlexusReroot::GetSEIdAltL(), UgliGeometry::GetStripNode(), UgliScintPlnNode::GetStripNode(), GeoStripNode::GetTPos(), StupidStripHandle::GetTPos(), UgliStripNode::GetTPos(), GetVetoSection(), StupidStripHandle::GlobalPos(), UgliSteelPlnHandle::GlobalToLocal(), UgliScintMdlHandle::GlobalToLocal(), UgliStripHandle::GlobalToLocal(), UgliScintPlnHandle::GlobalToLocal(), UgliSteelPlnHandle::GlobalToLocalVect(), PlexStripEndId::IsSameStrip(), IsVetoShield(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), MinosOutline::MinosOutline(), NumberOfStrips(), UgliScintPlnNode::NumberOfStrips(), RerootExodus::PECAB2SEId(), CheezyDisplay::PlaneStripToXY(), PlexSEIdAltL::Print(), RerootExodus::SEIdToLPos(), RerootExodus::SEIdToTPos(), SetPlane(), UgliGeometryReroot::StandardMdlName(), UgliDbiStrip::Store(), UgliDbiScintMdl::Store(), PlexSEIdAltL::TestConsistency(), GeoValidate::TestStrip_DistanceAlong(), GeoValidate::TestStrip_Intersection(), UgliSteelPlnNode::UgliSteelPlnNode(), and UgliStripNode::UgliStripNode().

00237 { 
00238    Int_t bitField = ( fEncoded & maskPlexIdDetector ) >> shftPlexIdDetector;
00239    return (Detector::Detector_t) bitField;   
00240 }

UInt_t PlexPlaneId::GetEncoded (  )  const [inline]

Reimplemented in PlexScintMdlId, and PlexStripEndId.

Definition at line 233 of file PlexPlaneId.h.

References fEncoded, and zeroPlexIdStripInfo.

00234 { return fEncoded & zeroPlexIdStripInfo; }

PlexPlaneId PlexPlaneId::GetNext ( PlexPlaneId::EPlaneType  ptype = PlexPlaneId::kScintOrSteel,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
) const

Definition at line 157 of file PlexPlaneId.cxx.

References GetPlane(), GetPlaneCoverage(), GetPlaneView(), IsSteel(), IsValid(), PlaneCoverage::kNoActive, kScint, kScintOrSteel, kSteel, PlaneCoverage::kUnknown, PlaneView::kUnknown, SetIsSteel(), and SetPlane().

Referenced by GetAdjoin(), and AlgFitTrackMS::SetupAlg().

00160 {
00161    // Find the next plane id (of type scint, steel or either).
00162    // If beyond end return an invalid id
00163    // Skip planes that don't exist (ie. scint on bookend plane, or
00164    // those in the near spectrometer.
00165    // If view or cover is other than kUnknown then look for that 
00166    // particular type.
00167 
00168    PlexPlaneId next(*this);
00169    while (true) {
00170    moveit:
00171       if (next.IsSteel()) {
00172          // steel means next should be scint of *NEXT* plane
00173          next.SetPlane(next.GetPlane()+1);
00174          next.SetIsSteel(false);
00175          // move along if there is no actual scintillator
00176          if (next.GetPlaneCoverage() == PlaneCoverage::kNoActive) goto moveit;
00177       }
00178       else {
00179          // scint means next should be steel of same plane
00180          next.SetIsSteel(true);
00181       }
00182       bool okview  = ( PlaneView::kUnknown == view ) || 
00183                      ( next.GetPlaneView() == view );
00184       bool okcover = ( PlaneCoverage::kUnknown == cover ) || 
00185                      ( next.GetPlaneCoverage() == cover );
00186       if ( okview && okcover ) {
00187         switch (ptype) {
00188         case PlexPlaneId::kScintOrSteel: 
00189           return next;
00190           break;
00191         case PlexPlaneId::kScint:        
00192           if (!next.IsSteel()) return next; 
00193           break;
00194         case PlexPlaneId::kSteel:
00195           if ( next.IsSteel()) return next;
00196           break;
00197         }
00198       }
00199       if (!next.IsValid()) return next; // beyond the end
00200    }
00201 }

UShort_t PlexPlaneId::GetNumScintMdls (  )  const
UShort_t PlexPlaneId::GetNumStrips (  )  const
UShort_t PlexPlaneId::GetPlane (  )  const [inline]

Definition at line 242 of file PlexPlaneId.h.

References fEncoded, maskPlexIdPlane, and shftPlexIdPlane.

Referenced by PulserSummary::Add(), DigitText::AddStripIdText(), RerootToRawDataModule::AddToCrate(), PEGainStripHisto::AddToFarEnd(), PEGainStripHisto::AddToNearEnd(), AlignmentAlgorithm::AlignmentAlgorithm(), CompareToReroot::Ana(), FCPCFilterModule::Ana(), UberDST::Ana(), PreFilter::Ana(), RateSummary::Ana(), AlignmentAlgorithm::AnalyzeModuleResiduals(), AlignmentAlgorithm::AnalyzeStripData(), StraightTrackAlignment::ApplyTrack(), SimDaqMultTrigger::ApplyTriggerAt(), SimDaqPlaneTrigger::ApplyTriggerAt(), SimDaqEnergyTrigger::ApplyTriggerAt(), AsString(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), PlexStripEndId::Build18BitPlnStripKey(), PlexValidate::BuildAndTestSEId(), GeoGeometry::BuildDetector(), Plexus::BuildLedMaps(), Chop::BuildMaps(), UgliGeometry::BuildNodes(), Plexus::BuildPixelMaps(), GeoGeometry::BuildPlanePairVolumes(), PlexScintMdlId::BuildPlnMdlKey(), PlexStripEndId::BuildPlnStripEndKey(), NuReco::CalcExtraTruthVariables(), CheckGC::checklin(), DemoNPlaneCut::CountPlanes(), PTSimHit::CreateDigiScintHit(), TridUVPage::CreateSketches(), PEGainModule::DoMeanSigmaFromData(), PEGainModule::DoMeanSigmaFromRawSums(), PEGainModule::DoMeanSigmaFromSums(), LIPlexMaps::DumpCalStripAtten(), PEGainModule::EndJob(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), PlexPixelSpotToStripEnd::Fill(), AlignmentHistograms::Fill(), DataFT::Fill(), AlignmentAlgorithm::Fill(), AlignmentAlgorithm::FillCandStrip(), FitContext::FillNtpPlaneInfo(), NtpSRModule::FillNtpShieldStrip(), AlgTrackSRList::FindNumSkippedPlanes(), FitNdNonlinQuad(), AlignmentAlgorithm::FitPlaneRotRes(), AlignmentAlgorithm::FitStripAttenuationHistograms(), UgliDbiStrip::FormatToOStream(), UgliDbiScintPln::GetAggregateNo(), UgliDbiScintMdl::GetAggregateNo(), UgliDbiStrip::GetAggregateNo(), UgliDbiSteelPln::GetAggregateNo(), FabPlnInstall::GetAggregateNo(), BfldDbiPlaneMap::GetAggregateNo(), TrackContext::GetBegPlane(), RerootExodus::GetCellPos(), ChopHelper::GetChopHelp(), UgliDbiTables::GetDbiScintMdlById(), GfxStrip::GetDiscreteCoords(), GfxDigit::GetDiscreteCoords(), TrackContext::GetEndPlane(), FabPlnInstallLookup::GetFabPlnInstall(), FabPlnInstallLookup::GetFabSteelPlates(), StupidStripHandle::GetHalfLength(), BfldDbiPlaneMap::GetIndex(), FabPlnInstall::GetIndex(), UgliDbiScintPln::GetIndex(), UgliDbiSteelPln::GetIndex(), getModulesInPlnInfo(), PEGainModule::getMyIndex(), GetNext(), UgliDbiSteelPln::GetPlane(), DataFT::GetPlane(), UgliDbiScintMdl::GetPlane(), UgliDbiScintPln::GetPlane(), UgliDbiStrip::GetPlane(), CandStripHandle::GetPlane(), UgliPlnHandle::GetPlaneNumber(), RerootExodus::GetPlanePos(), GetPrevious(), PlexusReroot::GetRawChannelId(), GetSuperModule(), GetVetoSection(), StupidStripHandle::GlobalPos(), UgliDbiStrip::HashToIndex(), UgliDbiScintMdl::HashToIndex(), AlgFitTrackMS::InitArrays(), IsNearSpect(), PlexStripEndId::IsSameStrip(), StupidStripHandle::IsValid(), IsVetoShield(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), CalHelpers::MCDigit::MCDigit(), Plotter::myGetLedId(), DigiScintHit::Plane(), CheezyDisplay::PlaneStripToXY(), LIPlexMaps::PlotPlexStripMap(), TridModelStrip::Print(), TridModelIntersect::Print(), PlexSEIdAltL::Print(), TrackDirectionModule::ProcessRecord(), LIPlexMaps::ReadDbCalStripAtten(), LIPlexMaps::ReadDbCalStripToStrip(), MakeAlignmentModule::ReadRecord(), OltEnds::Reco(), UberModule::Reco(), UberModuleLite::Reco(), PlexVetoShieldHack::RenumberMdlToMux(), PlexVetoShieldHack::RenumberMuxToMdl(), RerootExodus::RerootPlaneXYZ0(), Anp::FillStrip::Run(), AlgFarDetShieldPlank::RunAlg(), AlgChopListSharp2::RunAlg(), AlgFarDetSliceList::RunAlg(), AlgFarDetStrip::RunAlg(), AlgFarDetSlice::RunAlg(), AlgFitTrackSR::RunAlg(), PulserGainFit::RunNearFarFits(), AlgTrack::SetdS(), BfldCache::SetPlaneMapCache(), ShieldGeom::SetupShieldGeom(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), UgliDbiScintPln::Store(), UgliDbiStrip::Store(), PlexStripEndToLed::Store(), UgliDbiSteelPln::Store(), FabPlnInstall::Store(), BfldDbiPlaneMap::Store(), PlexPixelSpotToStripEnd::Store(), UgliDbiScintMdl::Store(), PlexSEIdAltL::TestConsistency(), GeoValidate::TestScintMdl(), GeoValidate::TestScintPln(), GeoValidate::TestSteelPln(), GeoValidate::TestStrip(), GeoValidate::TestStrip_DistanceAlong(), GeoValidate::TestStrip_Intersection(), TridModelIntersect::TridModelIntersect(), TridModelStrip::TridModelStrip(), UgliScintPlnNode::UgliScintPlnNode(), UgliSteelPlnNode::UgliSteelPlnNode(), EVD::UpdateChargeHists(), and AlignmentHistograms::~AlignmentHistograms().

00243 {
00244    return ( fEncoded & maskPlexIdPlane ) >> shftPlexIdPlane;
00245 }

PlaneCoverage::PlaneCoverage_t PlexPlaneId::GetPlaneCoverage (  )  const [inline]

Definition at line 299 of file PlexPlaneId.h.

References fEncoded, GetDetector(), IsVetoShield(), Detector::kFar, maskPlexIdCoverage, maskPlexIdVSCoverage2, setPlexIdVSCoverage, setPlexIdVSCoverage2, and shftPlexIdCoverage.

Referenced by RerootToRawDataModule::ApplyTrigger(), AsString(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), PlexValidate::BuildAndTestSEId(), MinosOutline::BuildCalDet(), MinosOutline::BuildFar(), MinosOutline::BuildNear(), UgliGeometry::BuildNodes(), GeoGeometry::BuildPlanePairVolumes(), Anp::PlotPmt::Collect(), NtpSRModule::FillNtpFiducialDistance(), AlgFitTrackSR::FindNumSkippedPlanes(), AlgTrackSRList::FindNumSkippedPlanes(), UgliDbiStrip::FormatToOStream(), UgliDbiSteelPln::FormatToOStream(), UgliDbiScintMdl::GetCoverage(), UgliDbiStrip::GetCoverage(), UgliDbiTables::GetDbiSteelPlnByIndex(), StupidStripHandle::GetHalfLength(), PlexVetoShieldHack::GetMdlPlaneCoverage(), getModulesInPlnInfo(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), GetNext(), GetNumScintMdls(), GetNumStrips(), UgliPlnHandle::GetPlaneCoverage(), GetPrevious(), UgliGeometry::GetScintPlnNode(), UgliGeometry::GetZExtent(), StupidStripHandle::GlobalPos(), TrackFilterBFCalibND::IsInCoverage(), AlgFitTrackCam::IsInDetector(), IsValid(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), AlgFitTrackCam::NDPlaneIsActive(), NumberOfStrips(), UgliScintPlnNode::NumberOfStrips(), RerootExodus::PECAB2SEId(), AlgTrackSRList::PlaneIsActive(), CheezyDisplay::PlaneStripToXY(), TridModelStrip::Print(), PlexSEIdAltL::Print(), AlgFitTrackCam::SpectrometerSwim(), UgliGeometryReroot::StandardMdlName(), UgliDbiStrip::Store(), UgliDbiSteelPln::Store(), UgliDbiScintMdl::Store(), and SRMom::TrackEndDistOuterTransEdge().

00300 {
00301    Int_t bitField = ( fEncoded & maskPlexIdCoverage ) >> shftPlexIdCoverage;
00302    if (GetDetector()==Detector::kFar && IsVetoShield()) {
00303      if ( fEncoded & maskPlexIdVSCoverage2 ) bitField |= setPlexIdVSCoverage2;
00304      else                                    bitField |= setPlexIdVSCoverage;
00305    }
00306    return (PlaneCoverage::PlaneCoverage_t) bitField;
00307 }

PlaneView::PlaneView_t PlexPlaneId::GetPlaneView ( void   )  const [inline]

Definition at line 309 of file PlexPlaneId.h.

References fEncoded, GetDetector(), IsVetoShield(), Detector::kFar, maskPlexIdView, setPlexIdVSView, and shftPlexIdView.

Referenced by UgliGeometryReroot::ABtoEastWest(), DigitText::AddStripIdText(), StraightTrackAlignment::AddTrack(), GeoShield::AddVolume(), AlignmentAlgorithm::AlignmentAlgorithm(), FCPCFilterModule::Ana(), ChopModule::Ana(), AsString(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), CandTrackHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), PlexValidate::BuildAndTestSEId(), MinosOutline::BuildNear(), UgliStripNode::ClearFiber(), Anp::PlotPmt::Collect(), MakeAlignmentModule::ConvertToLocal(), TrackDirectionModule::ConvertToLocal(), TridPageDetector::CreateSketches(), TridUVPage::CreateSketches(), Calibrator::DecalAttenCorrectedTpos(), ChopEvaluation::Evaluate(), AlignmentHistograms::Fill(), NtpMaker::FillMCInfo(), NtpSRModule::FillNtpFiducialDistance(), NtpMCModule::FillNtpMCDigiScintHit(), NtpMCModule::FillNtpMCStdHep(), NtpMCModule::FillNtpMCTruth(), AlgTrackSRList::FindNumSkippedPlanes(), UgliDbiStrip::FormatToOStream(), UgliDbiSteelPln::FormatToOStream(), Calibrator::GetAttenCorrectedTpos(), UgliDbiTables::GetDbiScintPlnByIndex(), StupidStripHandle::GetHalfLength(), PlexStripEndId::GetManifoldF1(), PlexVetoShieldHack::GetMdlPlaneView(), getModulesInPlnInfo(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), GetNext(), UgliGeometry::GetPlaneIdFromZ(), CandStripHandle::GetPlaneView(), UgliPlnHandle::GetPlaneView(), GetPrevious(), GeoStripNode::GetTPos(), StupidStripHandle::GetTPos(), UgliStripNode::GetTPos(), UgliDbiScintMdl::GetView(), UgliDbiStrip::GetView(), UgliGeometry::GetZExtent(), StupidStripHandle::GlobalPos(), TrackFilterBFCalibND::IsInCoverage(), AlgFitTrackCam::IsInDetector(), CandTrackHandle::IsUnphysical(), CandStripHandle::KeyFromView(), UgliGeometryReroot::MakeTempDbiPosInfo(), AlgFitTrackCam::NDPlaneIsActive(), RerootExodus::PECAB2SEId(), AlgTrackSRList::PlaneIsActive(), CheezyDisplay::PlaneStripToXY(), LIPlexMaps::PlotPlexStripMap(), TridModelStrip::Print(), PlexSEIdAltL::Print(), RerootExodus::SEIdToLPos(), RerootExodus::SEIdToTPos(), AlgFitTrackCam::SetRangeAnddS(), UgliGeometryReroot::StandardMdlName(), UgliDbiStrip::Store(), UgliDbiSteelPln::Store(), UgliDbiScintMdl::Store(), SwimGeo::SwimGeo(), PlexSEIdAltL::TestConsistency(), GeoValidate::TestStrip_DistanceAlong(), GeoValidate::TestStrip_Intersection(), SRMom::TrackEndDistOuterTransEdge(), TridModelRecoStrip::TridModelRecoStrip(), and UgliStripNode::WlsPigtail().

00310 {
00311    Int_t bitField = ( fEncoded & maskPlexIdView ) >> shftPlexIdView;
00312    if (GetDetector()==Detector::kFar && IsVetoShield()) 
00313      bitField |= setPlexIdVSView;
00314    return (PlaneView::PlaneView_t) bitField;
00315 }

PlexPlaneId PlexPlaneId::GetPrevious ( PlexPlaneId::EPlaneType  ptype = PlexPlaneId::kScintOrSteel,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
) const

Definition at line 203 of file PlexPlaneId.cxx.

References GetPlane(), GetPlaneCoverage(), GetPlaneView(), IsSteel(), IsValid(), PlaneCoverage::kNoActive, kScint, kScintOrSteel, kSteel, PlaneCoverage::kUnknown, PlaneView::kUnknown, SetIsSteel(), and SetPlane().

Referenced by GetAdjoin().

00206 {
00207    // Find the previous plane id (of type scint, steel or either).
00208    // If beyond end return an invalid id
00209    // Skip planes that don't exist (ie. scint on bookend plane, or
00210    // those in the near spectrometer.
00211    // If view or cover is other than kUnknown then look for that 
00212    // particular type.
00213 
00214    PlexPlaneId next(*this);
00215    while (true) {
00216    moveit:
00217       if (next.IsSteel()) {
00218          // steel means previous should be scint of same plane
00219          next.SetIsSteel(false);
00220          // move along if there is no actual scintillator
00221          if (next.GetPlaneCoverage() == PlaneCoverage::kNoActive) goto moveit;
00222       }
00223       else {
00224          // scint means next should be steel of *PREVIOUS* plane
00225          next.SetPlane(next.GetPlane()-1);
00226          next.SetIsSteel(true);
00227       }
00228       bool okview  = ( PlaneView::kUnknown == view ) || 
00229                      ( next.GetPlaneView() == view );
00230       bool okcover = ( PlaneCoverage::kUnknown == cover ) || 
00231                      ( next.GetPlaneCoverage() == cover );
00232       if ( okview && okcover ) {
00233         switch (ptype) {
00234         case PlexPlaneId::kScintOrSteel: 
00235           return next;
00236           break;
00237         case PlexPlaneId::kScint:
00238           if (!next.IsSteel()) return next;
00239           break;
00240         case PlexPlaneId::kSteel:
00241           if ( next.IsSteel()) return next;
00242           break;
00243         }
00244       }
00245       if (!next.IsValid()) return next; // beyond the end
00246    }
00247 }

Int_t PlexPlaneId::GetSuperModule (  )  const [inline]

Definition at line 281 of file PlexPlaneId.h.

References fEncoded, GetPlane(), LastPlaneFarSM0(), LastPlaneFarSM1(), and maskPlexIdIsFar.

00282 {
00283    // return supermodule # (0,1 if Far, else 0)
00284    if ( ! ( fEncoded & maskPlexIdIsFar ) ) return  0;
00285    UShort_t plane = GetPlane();
00286    if      ( plane <= LastPlaneFarSM0() )  return  0;
00287    else if ( plane <= LastPlaneFarSM1() )  return  1;
00288    else                                    return -1;
00289 }

Int_t PlexPlaneId::GetVetoSection (  )  const [inline]

Definition at line 272 of file PlexPlaneId.h.

References GetDetector(), GetPlane(), IsVetoShield(), Detector::kCalDet, and shftPlexIdVetoSection.

Referenced by UgliGeometry::BuildNodes(), and ShieldGeom::SetupShieldGeom().

00273 {
00274    // return section # (1,2,3,4) or 0 if not part of VetoShield
00275    if ( ! IsVetoShield() ) return 0;
00276    if ( Detector::kCalDet == GetDetector() ) return 1;
00277    UShort_t plane = GetPlane();
00278    return ( ( ( plane >> shftPlexIdVetoSection ) & 0x03 ) + 1  );
00279 }

Bool_t PlexPlaneId::IsNearSpect (  )  const [inline]

Definition at line 291 of file PlexPlaneId.h.

References fEncoded, GetPlane(), LastPlaneNearCalor(), and maskPlexIdIsNear.

Referenced by StripToStripCalScheme::DecalStripToStrip(), and StripToStripCalScheme::GetStripToStripCorrected().

00292 {
00293    // return true if part of NearDet spectrometer region
00294    if ( ! ( fEncoded & maskPlexIdIsNear ) ) return false;
00295    UShort_t plane = GetPlane();
00296    return ( plane > LastPlaneNearCalor() );
00297 }

Bool_t PlexPlaneId::IsNull (  )  const [inline]

Definition at line 253 of file PlexPlaneId.h.

References fEncoded, and maskPlexIdPlane.

Referenced by IsValid(), and IsVetoShield().

00254 { 
00255   // test if plane # = all bits on as signal of invalid value
00256   return ( fEncoded & maskPlexIdPlane ) == maskPlexIdPlane;
00257 }

Bool_t PlexPlaneId::IsSteel (  )  const [inline]
Bool_t PlexPlaneId::IsValid (  )  const [virtual]
Bool_t PlexPlaneId::IsVetoShield (  )  const [inline]

Definition at line 259 of file PlexPlaneId.h.

References fEncoded, GetDetector(), GetPlane(), IsNull(), Detector::kCalDet, Detector::kFar, and maskPlexIdIsVetoShield.

Referenced by GeoScintMdlVolume::AddAirNode(), GeoShield::AddVolume(), AsString(), GeoGeometry::BuildDetector(), MinosOutline::BuildFar(), UgliGeometry::BuildNodes(), GeoGeometry::BuildPlanePairVolumes(), TridPageDetector::CreateSketches(), StripAttenCalScheme::DecalAttenCorrected(), PulserLinearityCalScheme::DecalLinFar(), StripToStripCalScheme::DecalStripToStrip(), PulserTimeCalScheme::DecalTime(), XTalkFilter::DoTrueFilter(), FabPlnInstallLookup::FabPlnInstallLookup(), MCMonitorCosmicHistograms::FillHistsTrueDigiHit(), GeoScintMdlVolume::GeoScintMdlVolume(), StripAttenCalScheme::GetAttenCorrected(), PulserTimeCalScheme::GetCalibratedTime(), PulserLinearityCalScheme::GetLinFar(), GetPlaneCoverage(), GetPlaneView(), UgliGeometry::GetScintPlnNode(), UgliGeometry::GetSteelPlnNodePtrVector(), UgliScintPlnNode::GetStripNode(), UgliGeometry::GetStripNode(), StripToStripCalScheme::GetStripToStripCorrected(), GetVetoSection(), FabPlnInstallLookup::LookForOddEntries(), MinosOutline::MinosOutline(), FabPlnInstallLookup::NextInstall(), PlexStripEndId::PlexStripEndId(), TridModelStrip::Print(), PlexVetoShieldHack::RenumberMdlToMux(), PlexVetoShieldHack::RenumberMuxToMdl(), PlexSEIdAltL::TestConsistency(), GeoValidate::TestGeom_GetPlnHandleVector(), GeoValidate::TestScintPln_GetClosestStrip(), GeoValidate::TestStrip_DistanceAlong(), GeoValidate::TestStrip_GetTPos(), GeoValidate::TestStrip_Intersection(), UgliSteelPlnNode::UgliSteelPlnNode(), and Plexus::ValidateConsistency().

00260 {
00261    if ( IsNull() ) return false;
00262    switch (GetDetector()) {
00263    case Detector::kFar:
00264        return ( fEncoded & maskPlexIdIsVetoShield );
00265    case Detector::kCalDet:
00266        return ( GetPlane() > 60 );
00267    default:
00268        return false;
00269    }
00270 }

static UInt_t PlexPlaneId::LastPlaneFarSM0 (  )  [inline, static]

Definition at line 122 of file PlexPlaneId.h.

Referenced by DefaultPlaneCoverage(), DefaultPlaneView(), BfldCache::FillSMZLimits(), UgliDbiTables::GetDbiSteelPlnByIndex(), and GetSuperModule().

00122 { return 248; } //   0 + [  1-248]

static UInt_t PlexPlaneId::LastPlaneFarSM1 (  )  [inline, static]

Definition at line 123 of file PlexPlaneId.h.

Referenced by DefaultPlaneCoverage(), DefaultPlaneView(), BfldCache::FillSMZLimits(), UgliDbiTables::GetNumSteelRows(), GetSuperModule(), and SetPlane().

00123 { return 485; } // 249 + [250-485]

static UInt_t PlexPlaneId::LastPlaneNearCalor (  )  [inline, static]
static UInt_t PlexPlaneId::LastPlaneNearSpect (  )  [inline, static]

Definition at line 125 of file PlexPlaneId.h.

Referenced by DefaultPlaneCoverage(), DefaultPlaneView(), BfldCache::FillSMZLimits(), UgliDbiTables::GetNumSteelRows(), and SetPlane().

00125 { return 281; } //       [121-281] by 5

UShort_t PlexPlaneId::NumberOfStrips (  )  const

Definition at line 114 of file PlexPlaneId.cxx.

References AsString(), GetDetector(), GetPlaneCoverage(), IsSteel(), Detector::kCalDet, Detector::kFar, PlaneCoverage::kNearFull, PlaneCoverage::kNearPartial, PlaneCoverage::kNoActive, PlaneCoverage::kTotal, PlaneCoverage::kVScN, PlaneCoverage::kVSCN, PlaneCoverage::kVSCS, PlaneCoverage::kVScS, PlaneCoverage::kVSeN, PlaneCoverage::kVSEN, PlaneCoverage::kVSeS, PlaneCoverage::kVSES, Msg::kWarning, and MSG.

Referenced by PulserDriftCalScheme::GetDriftCorrected(), and PlexStripEndId::IsValid().

00115 {
00116   // Expected number of strips for this plane 
00117   // Hard coded values depending on PlaneCoverage and Detector
00118 
00119   if ( IsSteel() ) return 0;  // steel planes have no strips
00120 
00121   switch (GetPlaneCoverage()) {
00122   case (PlaneCoverage::kNoActive):    return   0; // strip on pln w/ no active?
00123   case (PlaneCoverage::kNearPartial): return  68; // 28 + 20 + 20
00124   case (PlaneCoverage::kNearFull):    return  96; // 28 + 20 + 16 + 16 + 16
00125   case (PlaneCoverage::kTotal): {
00126     switch (GetDetector()) {
00127     case (Detector::kFar):        return 192; // 28+28+20+20+20+20+28+28
00128     case (Detector::kCalDet):     return  24;
00129     default:
00130       MSG("Plex",Msg::kWarning) 
00131         << "NumberOfStrips for PlaneCoverage::kTotal "
00132         << "on Detector::k" << Detector::AsString(GetDetector())
00133         << " is not defined" << endl;
00134       return 0;
00135     }
00136     break;
00137   }
00138   case (PlaneCoverage::kVScN):
00139   case (PlaneCoverage::kVSCN):
00140   case (PlaneCoverage::kVSeS):
00141   case (PlaneCoverage::kVSES):
00142   case (PlaneCoverage::kVScS):
00143   case (PlaneCoverage::kVSCS):
00144   case (PlaneCoverage::kVSeN):
00145   case (PlaneCoverage::kVSEN):
00146     return 20;  // all veto shield modules have 20 strips
00147   default:
00148       MSG("Plex",Msg::kWarning) 
00149         << "NumberOfStrips for PlaneCoverage::k" 
00150         << PlaneCoverage::AsString(GetPlaneCoverage())
00151         << " is not defined." << endl;
00152       return 0;
00153   }
00154 }

void PlexPlaneId::Print ( Option_t *  option = ""  )  const

Reimplemented in PlexScintMdlId, and PlexStripEndId.

Definition at line 262 of file PlexPlaneId.cxx.

References AsString().

Referenced by PlexValidate::TestPlaneId().

00263 {
00264    // Print the (decoded) value
00265 
00266    printf("%s\n",AsString(option));
00267 }

void PlexPlaneId::SetDetector ( Detector::Detector_t  detector  )  [inline]

Definition at line 317 of file PlexPlaneId.h.

References fEncoded, maskPlexIdDetector, and shftPlexIdDetector.

Referenced by PTSimHit::Clear(), and PlexPlaneId().

00318 {
00319    fEncoded = ( fEncoded & ~maskPlexIdDetector ) | 
00320       ( ( detector << shftPlexIdDetector ) & maskPlexIdDetector );
00321 }

void PlexPlaneId::SetIsSteel ( Bool_t  isSteel  )  [inline]
void PlexPlaneId::SetPlane ( UInt_t  plane,
PlaneView::PlaneView_t  view = PlaneView::kUnknown,
PlaneCoverage::PlaneCoverage_t  cover = PlaneCoverage::kUnknown 
)

Definition at line 271 of file PlexPlaneId.cxx.

References AsString(), DefaultPlaneCoverage(), DefaultPlaneView(), defaultPlexPlaneId, fEncoded, GetDetector(), Detector::kCalDet, Msg::kDebug, Detector::kFar, Detector::kNear, PlaneCoverage::kUnknown, PlaneView::kUnknown, LastPlaneFarSM1(), LastPlaneNearSpect(), maskPlexIdPlane, MAXMSG, SetPlaneCoverage(), SetPlaneView(), and shftPlexIdPlane.

Referenced by MeuPlots::CalAttenSyst(), PTSimHit::Clear(), RerootExodus::GetCellPos(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), GetNext(), GetPrevious(), UgliGeometryReroot::MakeTempDbiPosInfo(), and PlexPlaneId().

00274 {
00275    // Set the Plane # (and view, coverage)
00276    // if the view or coverage are unknown (default) then
00277    // use Default values based on detector+plane#
00278    // This is to protect the casual user who diddles with just
00279    // the plane#
00280 
00281    // set everything to invalid if one goes beyond the ends
00282    Detector::Detector_t detector = GetDetector();
00283    Bool_t out_of_range = false;
00284    Bool_t accept_out_of_range = false;
00285    switch (detector) {
00286    case Detector::kNear: 
00287       out_of_range = ( plane > LastPlaneNearSpect() );
00288       break;
00289    case Detector::kFar: {
00290 
00291       // for now simple allow "anything goes" for veto shield stuff
00292       // allow special 511 for UgliDbi*Struct hack
00293       if (plane>=511) { out_of_range = false; break; }
00294 
00295       out_of_range = ( plane > LastPlaneFarSM1() ); 
00296       // some sites might have older DB's that attempt to build
00297       // these non-existent planes ... leading to numerous
00298       // error messages from UgliGeometry.  For now accept them
00299       // but this will change eventually.
00300       // accept_out_of_range = ( plane >= 486 && plane <= 497 );
00301 
00302       break;
00303    }
00304    case Detector::kCalDet: 
00305       out_of_range = (plane > 5*12+4);
00306       break;
00307    default:
00308       out_of_range = false;
00309       break;
00310    }
00311    if (out_of_range) { 
00312      MAXMSG("Plex",Msg::kDebug,20)
00313        << "SetPlane() " << Detector::AsString(detector)
00314        << " plane " << plane << " is out-of-range."
00315        << endl;
00316      if ( ! accept_out_of_range ) {
00317        fEncoded = defaultPlexPlaneId;
00318        return; 
00319      }
00320    }
00321 
00322    // push the plane # into the field
00323    fEncoded = ( fEncoded & ~maskPlexIdPlane ) | 
00324      ( ( plane << shftPlexIdPlane ) & maskPlexIdPlane );   
00325 
00326    // set the view and coverage if they weren't supplied
00327 
00328    if (view == PlaneView::kUnknown) 
00329       view = DefaultPlaneView(detector,plane);
00330    SetPlaneView(view);
00331 
00332    if (coverage == PlaneCoverage::kUnknown) 
00333       coverage = DefaultPlaneCoverage(detector,plane);
00334    SetPlaneCoverage(coverage);
00335 
00336 }

void PlexPlaneId::SetPlaneCoverage ( PlaneCoverage::PlaneCoverage_t  coverage  )  [inline]

Definition at line 329 of file PlexPlaneId.h.

References fEncoded, PlaneCoverage::kVScS, maskPlexIdCoverage, maskPlexIdVSCoverage2, and shftPlexIdCoverage.

Referenced by UgliDbiStripStruct::GetShapeName(), and SetPlane().

00330 {
00331    fEncoded = ( fEncoded & ~(maskPlexIdCoverage|maskPlexIdVSCoverage2) ) | 
00332       ( ( coverage << shftPlexIdCoverage ) & maskPlexIdCoverage );
00333    // set extra bit for higher VetoShield enum values
00334    if ( coverage >= PlaneCoverage::kVScS ) fEncoded |= maskPlexIdVSCoverage2;
00335 }

void PlexPlaneId::SetPlaneView ( PlaneView::PlaneView_t  view  )  [inline]

Definition at line 337 of file PlexPlaneId.h.

References fEncoded, maskPlexIdView, and shftPlexIdView.

Referenced by UgliDbiStripStruct::GetShapeName(), and SetPlane().

00338 {
00339    fEncoded = ( fEncoded & ~maskPlexIdView ) | 
00340       ( ( view << shftPlexIdView ) & maskPlexIdView );
00341 }


Friends And Related Function Documentation

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.

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

Reimplemented in PlexScintMdlId, and PlexStripEndId.


Member Data Documentation

UInt_t PlexPlaneId::fEncoded [protected]
Bool_t PlexPlaneId::fgCalDetCosmicsAView = false [static]

Definition at line 129 of file PlexPlaneId.h.

Referenced by RerootExodus::CreateSteelMap(), and DefaultPlaneView().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1