Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

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 (DetectorType::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
DetectorType::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 (DetectorType::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

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

Static Public Attributes

Bool_t fgCalDetCosmicsAView = false

Protected Attributes

UInt_t fEncoded

Private Member Functions

PlaneView::PlaneView_t DefaultPlaneView (DetectorType::Detector_t detector, UInt_t plane)
PlaneCoverage::PlaneCoverage_t DefaultPlaneCoverage (DetectorType::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)

Member Enumeration Documentation

enum PlexPlaneId::EPlaneType
 

Enumeration values:
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.

References defaultPlexPlaneId.

00230 : fEncoded(defaultPlexPlaneId) { ; }

PlexPlaneId::PlexPlaneId DetectorType::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 defaultPlexPlaneId, 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 GetDetector(), GetPlane(), GetPlaneCoverage(), GetPlaneView(), IsSteel(), IsVetoShield(), and option.

Referenced by PlexStripEndId::AsString(), GeoGeometry::BuildDetector(), UgliGeometry::BuildNodes(), UgliScintPlnNode::BuildStrips(), FabPlnInstall::FormatToOStream(), BfldDbiPlaneMap::FormatToOStream(), RerootExodus::GetPlanePos(), UgliGeometry::GetScintPlnNode(), GeoGeometry::GetScintPlnNode(), UgliGeometry::GetSteelPlnNode(), GeoGeometry::GetSteelPlnNode(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), UgliGeometryReroot::MakeTempDbiScintStruct(), UgliScintPlnNode::NumberOfStrips(), RerootExodus::PECAB2SEId(), Print(), AlgFitTrack3::SwimAndFillMaps(), SwimGeo::SwimGeo(), PlexValidate::TestPlaneId(), 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    char type = (IsSteel() ? 'P' : 'A'); 
00074    switch (option[0]) {
00075    case 'b':
00076       // override P/A type with B 
00077       // b is for "box" containing steel+scint (or steel alone if no active)
00078       type = 'B';
00079    default:
00080       // compact rendering identifying only the plane info
00081       if ( ! IsVetoShield() ) {
00082         sprintf(newstring[ibuffer],"%c%3.3d%c%c%c",
00083                 DetectorType::AsString(GetDetector())[0],
00084                 GetPlane(), type,
00085                 PlaneView::AsString(GetPlaneView())[0],
00086                 PlaneCoverage::AsString(GetPlaneCoverage())[0]);
00087       }
00088       else {
00089         sprintf(newstring[ibuffer],"%c%3.3d%c%c%2.2s",
00090                 DetectorType::AsString(GetDetector())[0],
00091                 GetPlane(), type,
00092                 PlaneView::AsString(GetPlaneView())[0],
00093                 PlaneCoverage::AsString(GetPlaneCoverage()));
00094       }
00095       break;
00096    }
00097    
00098    return newstring[ibuffer];
00099 }

PlaneCoverage::PlaneCoverage_t PlexPlaneId::DefaultPlaneCoverage DetectorType::Detector_t  detector,
UInt_t  plane
[private]
 

Definition at line 435 of file PlexPlaneId.cxx.

References DetectorType::AsString(), PlexVetoShieldHack::GetDefaultContext(), PlexVetoShieldHack::GetMdlPlaneCoverage(), PlexVetoShieldHack::IsMdlPlnVetoShield(), PlexVetoShieldHack::IsMuxPlnVetoShield(), 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 DetectorType::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 DetectorType::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 DetectorType::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          << DetectorType::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 DetectorType::Detector_t  detector,
UInt_t  plane
[private]
 

Definition at line 339 of file PlexPlaneId.cxx.

References DetectorType::AsString(), PlexVetoShieldHack::GetDefaultContext(), PlexVetoShieldHack::GetMdlPlaneView(), PlexVetoShieldHack::IsMdlPlnVetoShield(), PlexVetoShieldHack::IsMuxPlnVetoShield(), 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 DetectorType::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 DetectorType::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 DetectorType::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
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          << DetectorType::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 336 of file PlexPlaneId.h.

References GetNext(), and GetPrevious().

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

00339 {
00340   return (dir<0) ? GetPrevious(ptype,view,cover) : GetNext(ptype,view,cover); 
00341 }

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

Definition at line 344 of file PlexPlaneId.h.

References GetAdjoin(), and kScint.

Referenced by AlgTrackSRList::FindNumSkippedPlanes(), AlgFitTrackSR::FindNumSkippedPlanes(), AlgShowerSR::SetUV(), and AlgTrack::SetUVZ().

00347 { return GetAdjoin(dir,PlexPlaneId::kScint,view,cover); }

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

Definition at line 350 of file PlexPlaneId.h.

References GetAdjoin(), and kSteel.

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

DetectorType::Detector_t PlexPlaneId::GetDetector  )  const [inline]
 

Definition at line 236 of file PlexPlaneId.h.

References fEncoded.

Referenced by UgliGeometryReroot::ABtoEastWest(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), AsString(), PlexValidate::BuildAndTestSEId(), GeoScintMdlVolume::BuildModuleShape(), PlexScintMdlId::BuildPlnMdlKey(), PlexStripEndId::BuildPlnStripEndKey(), FabPlnInstall::GetAggregateNo(), BfldDbiPlaneMap::GetAggregateNo(), RerootExodus::GetCellPos(), UgliDbiStrip::GetDetector(), UgliDbiScintMdl::GetDetector(), PlexSEIdAltL::GetDetector(), FabPlnInstallLookup::GetFabPlnInstall(), PlexStripEndId::GetManifoldF1(), getModulesInPlnInfo(), PlexusReroot::GetRawChannelId(), Plexus::GetRawChannelId(), PlexusReroot::GetSEIdAltL(), UgliStripNode::GetTPos(), StupidStripHandle::GetTPos(), StupidStripHandle::GlobalPos(), PlexStripEndId::IsSameStrip(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), MinosOutline::MinosOutline(), UgliScintPlnNode::NumberOfStrips(), NumberOfStrips(), RerootExodus::PECAB2SEId(), CheezyDisplay::PlaneStripToXY(), PlexSEIdAltL::Print(), RerootExodus::SEIdToLPos(), RerootExodus::SEIdToTPos(), SetPlane(), UgliGeometryReroot::StandardMdlName(), UgliDbiStrip::Store(), UgliDbiScintMdl::Store(), PlexSEIdAltL::TestConsistency(), UgliSteelPlnNode::UgliSteelPlnNode(), and UgliStripNode::UgliStripNode().

00237 { 
00238    Int_t bitField = ( fEncoded & maskPlexIdDetector ) >> shftPlexIdDetector;
00239    return (DetectorType::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.

00234 { return fEncoded & zeroPlexIdStripInfo; }

PlexPlaneId PlexPlaneId::GetNext 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(), kScint, kScintOrSteel, kSteel, 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
 

Definition at line 256 of file PlexPlaneId.cxx.

References PlexScintMdlId::GetNumScintMdlsInPln(), GetPlaneCoverage(), and IsSteel().

Referenced by UgliDbiStructHash::HashAsScintMdl().

00257 {
00258   if (IsSteel() || GetPlaneCoverage()==PlaneCoverage::kNoActive) return 0;
00259   return PlexScintMdlId::GetNumScintMdlsInPln(*this);
00260 }

UShort_t PlexPlaneId::GetNumStrips  )  const
 

Definition at line 250 of file PlexPlaneId.cxx.

References PlexScintMdlId::GetNumStripsInPln(), GetPlaneCoverage(), and IsSteel().

Referenced by AlignmentHistograms::AnalyzeStripResidualHistograms(), AlignmentHistograms::AnalyzeStripSampleResiduals(), AlignmentHistograms::FillAlternativeTrackHits(), AlignmentHistograms::FillModuleResidual(), AlignmentHistograms::FillPlanePlex(), flshit_massage_local(), and UgliDbiStructHash::HashAsStrip().

00251 {
00252   if (IsSteel() || GetPlaneCoverage()==PlaneCoverage::kNoActive) return 0;
00253   return PlexScintMdlId::GetNumStripsInPln(*this);
00254 }

UShort_t PlexPlaneId::GetPlane  )  const [inline]
 

Definition at line 242 of file PlexPlaneId.h.

References fEncoded.

Referenced by PulserSummary::Add(), ClusterBox::Add(), DigitText::AddStripIdText(), RerootToRawDataModule::AddToCrate(), PEGainStripHisto::AddToFarEnd(), PEGainStripHisto::AddToNearEnd(), AlignmentHistograms::AlignmentHistograms(), UberDST::Ana(), RecoTreeModule::Ana(), RateSummary::Ana(), PreFilter::Ana(), FCPCFilterModule::Ana(), FarPlaneCheckout::Ana(), CompareToReroot::Ana(), AtNuTreeModule::Ana(), AlignmentHistograms::AnalyzeModuleResiduals(), AlignmentHistograms::AnalyzeStripResidualHistograms(), AlignmentHistograms::AnalyzeStripSampleResiduals(), StraightTrackAlignment::ApplyTrack(), SimDaqPlaneTrigger::ApplyTriggerAt(), SimDaqMultTrigger::ApplyTriggerAt(), SimDaqEnergyTrigger::ApplyTriggerAt(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), AsString(), PlexStripEndId::Build18BitPlnStripKey(), PlexValidate::BuildAndTestSEId(), GeoGeometry::BuildDetector(), GfxTrack::BuildDiscreteImp(), GfxShower::BuildDiscreteImp(), Plexus::BuildLedMaps(), Chop::BuildMaps(), UgliGeometry::BuildNodes(), Plexus::BuildPixelMaps(), PlexScintMdlId::BuildPlnMdlKey(), PlexStripEndId::BuildPlnStripEndKey(), AlignmentHistograms::CalculateStripCharge(), ClusterBox::ClusterBox(), LIPlexMaps::CompareStripToStrip(), DemoNPlaneCut::CountPlanes(), TridUVPage::CreateSketches(), PEGainModule::DoMeanSigmaFromData(), PEGainModule::DoMeanSigmaFromRawSums(), PEGainModule::DoMeanSigmaFromSums(), PEGainModule::EndJob(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), AlignmentHistograms::FillAlternativeTrackHits(), AlignmentHistograms::FillCandStrip(), AlignmentHistograms::FillHistograms(), AlignmentHistograms::FillHitStrip(), AlignmentHistograms::FillModuleResidual(), NtpSRModule::FillNtpShieldStrip(), AlignmentHistograms::FillNumberOfHits(), AlignmentHistograms::FillPlanePlex(), MakeAlignmentModule::FillPlanePlexHistogram(), AlignmentHistograms::FillRoundingErrors(), AlgTrackSRList::FindNumSkippedPlanes(), CDBeamMuTracker::FindStripTrack(), AlignmentHistograms::FitRotationalResiduals(), AlignmentHistograms::FitStripAttenuationHistograms(), AlignmentHistograms::FitStripResidualHistograms(), UgliDbiStrip::FormatToOStream(), UgliDbiStrip::GetAggregateNo(), UgliDbiSteelPln::GetAggregateNo(), UgliDbiScintPln::GetAggregateNo(), UgliDbiScintMdl::GetAggregateNo(), FabPlnInstall::GetAggregateNo(), BfldDbiPlaneMap::GetAggregateNo(), RerootExodus::GetCellPos(), UgliDbiTables::GetDbiScintMdlById(), GfxStrip::GetDiscreteCoords(), GfxDigit::GetDiscreteCoords(), FabPlnInstallLookup::GetFabPlnInstall(), UgliDbiSteelPln::GetIndex(), UgliDbiScintPln::GetIndex(), FabPlnInstall::GetIndex(), BfldDbiPlaneMap::GetIndex(), getModulesInPlnInfo(), PEGainModule::getMyIndex(), GetNext(), UgliDbiStrip::GetPlane(), UgliDbiSteelPln::GetPlane(), UgliDbiScintPln::GetPlane(), UgliDbiScintMdl::GetPlane(), PlexSEIdAltL::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(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), CalHelpers::MCDigit::MCDigit(), Plotter::myGetLedId(), DigiScintHit::Plane(), CheezyDisplay::PlaneStripToXY(), LIPlexMaps::PlotPlexStripMap(), PlexSEIdAltL::Print(), TridModelStripEnd::PrintToDigitText(), TridModelStrip::PrintToDigitText(), TridModelIntersect::PrintToDigitText(), LIPlexMaps::ReadDbCalStripToStrip(), UberModuleLite::Reco(), UberModule::Reco(), OltEnds::Reco(), PlexVetoShieldHack::RenumberMdlToMux(), PlexVetoShieldHack::RenumberMuxToMdl(), RerootExodus::RerootPlaneXYZ0(), AlgFitTrackSR::RunAlg(), AlgFarDetStrip::RunAlg(), AlgFarDetSliceList::RunAlg(), AlgFarDetSlice::RunAlg(), AlgChopListSharp2::RunAlg(), AlgTrack::SetdS(), BfldCache::SetPlaneMapCache(), ShieldGeom::SetupShieldGeom(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), UgliDbiStrip::Store(), UgliDbiSteelPln::Store(), UgliDbiScintPln::Store(), UgliDbiScintMdl::Store(), PlexStripEndToLed::Store(), PlexPixelSpotToStripEnd::Store(), FabPlnInstall::Store(), BfldDbiPlaneMap::Store(), AlgFitTrack3::SwimAndFillMaps(), PlexSEIdAltL::TestConsistency(), TridModelIntersect::TridModelIntersect(), TridModelStrip::TridModelStrip(), TridModelStripEnd::TridModelStripEnd(), UgliScintPlnNode::UgliScintPlnNode(), UgliSteelPlnNode::UgliSteelPlnNode(), EVD::UpdateChargeHists(), and WriteAlignmentModule::WriteAlignmentModule().

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

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

Definition at line 292 of file PlexPlaneId.h.

References fEncoded, and IsVetoShield().

Referenced by RerootToRawDataModule::ApplyTrigger(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), AsString(), PlexValidate::BuildAndTestSEId(), MinosOutline::BuildCalDet(), GeoGeometry::BuildDetector(), MinosOutline::BuildFar(), MinosOutline::BuildNear(), UgliGeometry::BuildNodes(), AlignmentHistograms::FillLongitudinalHitPos(), AlignmentHistograms::FillModuleResidual(), AlgTrackSRList::FindNumSkippedPlanes(), AlgFitTrackSR::FindNumSkippedPlanes(), UgliDbiStrip::FormatToOStream(), UgliDbiSteelPln::FormatToOStream(), UgliDbiStrip::GetCoverage(), UgliDbiScintMdl::GetCoverage(), UgliDbiTables::GetDbiSteelPlnByIndex(), AlignmentHistograms::GetMdlIndex(), PlexVetoShieldHack::GetMdlPlaneCoverage(), getModulesInPlnInfo(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), GetNext(), GetNumScintMdls(), GetNumStrips(), UgliPlnHandle::GetPlaneCoverage(), GetPrevious(), UgliGeometry::GetScintPlnNode(), UgliGeometry::GetZExtent(), StupidStripHandle::GlobalPos(), IsValid(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), UgliScintPlnNode::NumberOfStrips(), NumberOfStrips(), RerootExodus::PECAB2SEId(), AlgTrackSRList::PlaneIsActive(), CheezyDisplay::PlaneStripToXY(), PlexSEIdAltL::Print(), TridModelStripEnd::PrintToDigitText(), TridModelStrip::PrintToDigitText(), UgliGeometryReroot::StandardMdlName(), UgliDbiStrip::Store(), UgliDbiSteelPln::Store(), UgliDbiScintMdl::Store(), and TimeCalibratorSRModule::UpdateTable().

00293 {
00294    Int_t bitField = ( fEncoded & maskPlexIdCoverage ) >> shftPlexIdCoverage;
00295    if (IsVetoShield()) {
00296      if ( fEncoded & maskPlexIdVSCoverage2 ) bitField |= setPlexIdVSCoverage2;
00297      else                                    bitField |= setPlexIdVSCoverage;
00298    }
00299    return (PlaneCoverage::PlaneCoverage_t) bitField;
00300 }

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

Definition at line 302 of file PlexPlaneId.h.

References fEncoded, and IsVetoShield().

Referenced by UgliGeometryReroot::ABtoEastWest(), DigitText::AddStripIdText(), StraightTrackAlignment::AddTrack(), AlignmentHistograms::AlignmentHistograms(), FCPCFilterModule::Ana(), ChopModule::Ana(), PlexStripEndId::AsString(), PlexScintMdlId::AsString(), AsString(), CandTrackHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), PlexValidate::BuildAndTestSEId(), MinosOutline::BuildNear(), UgliStripNode::ClearFiber(), MakeAlignmentModule::ConvertToLocal(), TridUVPage::CreateSketches(), TridPageDetector::CreateSketches(), Calibrator::DecalAttenCorrectedTpos(), ChopEvaluation::Evaluate(), AlignmentHistograms::FillHitStrip(), AlignmentHistograms::FillLongitudinalHitPos(), NtpMaker::FillMCInfo(), AlignmentHistograms::FillModuleResidual(), NtpMCModule::FillNtpMCDigiScintHit(), NtpMCModule::FillNtpMCTruth(), AlgTrackSRList::FindNumSkippedPlanes(), UgliDbiStrip::FormatToOStream(), UgliDbiSteelPln::FormatToOStream(), Calibrator::GetAttenCorrectedTpos(), UgliDbiTables::GetDbiScintPlnByIndex(), PlexStripEndId::GetManifoldF1(), AlignmentHistograms::GetMdlIndex(), PlexVetoShieldHack::GetMdlPlaneView(), getModulesInPlnInfo(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), GetNext(), UgliGeometry::GetPlaneIdFromZ(), UgliPlnHandle::GetPlaneView(), PlexSEIdAltL::GetPlaneView(), CandStripHandle::GetPlaneView(), GetPrevious(), UgliStripNode::GetTPos(), StupidStripHandle::GetTPos(), BubUtil::GetTrkLenInStrip(), UgliDbiStrip::GetView(), UgliDbiScintMdl::GetView(), UgliGeometry::GetZExtent(), StupidStripHandle::GlobalPos(), AlgDigiPairList::IsCosmic(), CandStripHandle::KeyFromView(), UgliGeometryReroot::MakeTempDbiPosInfo(), RerootExodus::PECAB2SEId(), AlgTrackSRList::PlaneIsActive(), CheezyDisplay::PlaneStripToXY(), LIPlexMaps::PlotPlexStripMap(), PlexSEIdAltL::Print(), TridModelStripEnd::PrintToDigitText(), TridModelStrip::PrintToDigitText(), RerootExodus::SEIdToLPos(), RerootExodus::SEIdToTPos(), UgliGeometryReroot::StandardMdlName(), UgliDbiStrip::Store(), UgliDbiSteelPln::Store(), UgliDbiScintMdl::Store(), SwimGeo::SwimGeo(), PlexSEIdAltL::TestConsistency(), and UgliStripNode::WlsPigtail().

00303 {
00304    Int_t bitField = ( fEncoded & maskPlexIdView ) >> shftPlexIdView;
00305    if (IsVetoShield()) bitField |= setPlexIdVSView;
00306    return (PlaneView::PlaneView_t) bitField;
00307 }

PlexPlaneId PlexPlaneId::GetPrevious 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(), kScint, kScintOrSteel, kSteel, 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 274 of file PlexPlaneId.h.

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

00275 {
00276    // return supermodule # (0,1 if Far, else 0)
00277    if ( ! ( fEncoded & maskPlexIdIsFar ) ) return  0;
00278    UShort_t plane = GetPlane();
00279    if      ( plane <= LastPlaneFarSM0() )  return  0;
00280    else if ( plane <= LastPlaneFarSM1() )  return  1;
00281    else                                    return -1;
00282 }

Int_t PlexPlaneId::GetVetoSection  )  const [inline]
 

Definition at line 266 of file PlexPlaneId.h.

References GetPlane(), and IsVetoShield().

00267 {
00268    // return section # (1,2,3,4) or 0 if not part of VetoShield
00269    if ( ! IsVetoShield() ) return 0;
00270    UShort_t plane = GetPlane();
00271    return ( ( ( plane >> shftPlexIdVetoSection ) & 0x03 ) + 1  );
00272 }

Bool_t PlexPlaneId::IsNearSpect  )  const [inline]
 

Definition at line 284 of file PlexPlaneId.h.

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

00285 {
00286    // return true if part of NearDet spectrometer region
00287    if ( ! ( fEncoded & maskPlexIdIsNear ) ) return false;
00288    UShort_t plane = GetPlane();
00289    return ( plane > LastPlaneNearCalor() );
00290 }

Bool_t PlexPlaneId::IsNull  )  const [inline]
 

Definition at line 253 of file PlexPlaneId.h.

References fEncoded.

Referenced by BfldCache::FindPlaneMapFromId(), 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]
 

Definition at line 247 of file PlexPlaneId.h.

References fEncoded.

Referenced by AsString(), MinosOutline::BuildFar(), MinosOutline::BuildNear(), UgliGeometry::BuildNodes(), BfldCache::FindPlaneMapFromId(), GetNext(), GetNumScintMdls(), GetNumStrips(), RerootExodus::GetPlanePos(), RerootExodus::GetPlaneSpec(), GetPrevious(), RerootExodus::GetRotm(), UgliGeometry::GetScintPlnNode(), GeoGeometry::GetScintPlnNode(), UgliGeometry::GetSteelPlnNode(), GeoGeometry::GetSteelPlnNode(), IsValid(), MinosOutline::MinosOutline(), NumberOfStrips(), RerootExodus::PlaneName(), RerootExodus::RerootPlaneXYZ0(), AlgTrack::SetdS(), AlgFitTrack3::SwimAndFillMaps(), SwimGeo::SwimGeo(), PlexValidate::TestPlaneId(), and UgliSteelPlnNode::UgliSteelPlnNode().

00248 {
00249    //if (IsVetoShield()) return false;  // only if sharing steel bit
00250    return ( fEncoded & maskPlexIdIsSteel );
00251 }

Bool_t PlexPlaneId::IsValid  )  const [virtual]
 

Reimplemented in PlexStripEndId.

Definition at line 102 of file PlexPlaneId.cxx.

References GetPlaneCoverage(), IsNull(), and IsSteel().

Referenced by AlgTrackSRList::FindNumSkippedPlanes(), AlgFitTrackSR::FindNumSkippedPlanes(), ToyMCModule::Get(), GetNext(), GetPrevious(), PlexStripEndId::IsValid(), AlgTrackSRList::PlaneIsActive(), LIPlexMaps::PlotPlexStripMap(), AlgTrackSR::RunAlg(), AlgFarDetSliceList::RunAlg(), AlgFarDetSlice::RunAlg(), AlgTrack::SetdS(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), and AlgFitTrackSR::SwimVertexAndEndPoints().

00103 { 
00104   // test if plane # = all bits on as signal of invalid value
00105   // also fail if IsSteel=false but PlaneCoverage=NoActive
00106   if ( IsNull() ) return false;
00107   if ( ! IsSteel() && 
00108        GetPlaneCoverage() == PlaneCoverage::kNoActive ) return false;
00109   return true;
00110        
00111 }

Bool_t PlexPlaneId::IsVetoShield  )  const [inline]
 

Definition at line 259 of file PlexPlaneId.h.

References fEncoded, and IsNull().

Referenced by AsString(), GeoGeometry::BuildDetector(), MinosOutline::BuildFar(), UgliGeometry::BuildNodes(), TridUVPage::CreateModels(), TridPageDetector::CreateSketches(), StripAttenCalScheme::DecalAttenCorrected(), StripToStripCalScheme::DecalStripToStrip(), FabPlnInstallLookup::FabPlnInstallLookup(), StripAttenCalScheme::GetAttenCorrected(), GetPlaneCoverage(), GetPlaneView(), UgliGeometry::GetScintPlnNode(), UgliGeometry::GetSteelPlnNodePtrVector(), UgliScintPlnNode::GetStripNode(), UgliGeometry::GetStripNode(), StripToStripCalScheme::GetStripToStripCorrected(), GetVetoSection(), PlexSEIdAltL::IsVetoShield(), FabPlnInstallLookup::LookForOddEntries(), MinosOutline::MinosOutline(), FabPlnInstallLookup::NextInstall(), PlexStripEndId::PlexStripEndId(), TridModelStripEnd::PrintToDigitText(), TridModelStrip::PrintToDigitText(), PlexVetoShieldHack::RenumberMdlToMux(), PlexVetoShieldHack::RenumberMuxToMdl(), AlgThruMuonList::RunAlg(), AlgFitThruMuonList::RunAlg(), AlgMSTClusterList::RunAlgOnSlice(), AlgBandClusterList::RunAlgOnSlice(), PlexSEIdAltL::TestConsistency(), UgliSteelPlnNode::UgliSteelPlnNode(), Plexus::ValidateConsistency(), and vetoStrip().

00260 {
00261    if ( ! ( fEncoded & maskPlexIdIsFar ) ) return false;
00262    if ( IsNull() ) return false;
00263    return ( fEncoded & maskPlexIdIsVetoShield );
00264 }

UInt_t PlexPlaneId::LastPlaneFarSM0  )  [inline, static]
 

Definition at line 122 of file PlexPlaneId.h.

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

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

UInt_t PlexPlaneId::LastPlaneFarSM1  )  [inline, static]
 

Definition at line 123 of file PlexPlaneId.h.

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

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

UInt_t PlexPlaneId::LastPlaneNearCalor  )  [inline, static]
 

Definition at line 124 of file PlexPlaneId.h.

Referenced by DefaultPlaneCoverage(), DefaultPlaneView(), IsNearSpect(), AlgChopListSharp2::RunAlg(), AlgChopListSharp::RunAlg(), and AlgChopListMitre::RunAlg().

00124 { return 120; } //   0 + [  1-120]

UInt_t PlexPlaneId::LastPlaneNearSpect  )  [inline, static]
 

Definition at line 125 of file PlexPlaneId.h.

Referenced by DefaultPlaneCoverage(), DefaultPlaneView(), 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 PlaneCoverage::AsString(), DetectorType::AsString(), GetDetector(), GetPlaneCoverage(), IsSteel(), and MSG.

Referenced by PulserDriftCalScheme::GetDriftCorrected(), HardwareComponent::GetStripEndsForPlane(), 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 (DetectorType::kFar):        return 192; // 28+28+20+20+20+20+28+28
00128     case (DetectorType::kCalDet):     return  24;
00129     default:
00130       MSG("Plex",Msg::kWarning) 
00131         << "NumberOfStrips for PlaneCoverage::kTotal "
00132         << "on DetectorType::k" << DetectorType::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(), and option.

Referenced by PlexValidate::TestPlaneId().

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

void PlexPlaneId::SetDetector DetectorType::Detector_t  detector  )  [inline]
 

Definition at line 309 of file PlexPlaneId.h.

References fEncoded.

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

00310 {
00311    fEncoded = ( fEncoded & ~maskPlexIdDetector ) | 
00312       ( ( detector << shftPlexIdDetector ) & maskPlexIdDetector );
00313 }

void PlexPlaneId::SetIsSteel Bool_t  isSteel  )  [inline]
 

Reimplemented in PlexScintMdlId, and PlexStripEndId.

Definition at line 315 of file PlexPlaneId.h.

References fEncoded.

Referenced by GeoGeometry::BuildDetector(), UgliGeometry::BuildNodes(), UgliGeometryReroot::BuildShapes(), FabPlnInstallLookup::FabPlnInstallLookup(), GetNext(), GetPrevious(), UgliGeometry::GetScintPlnNode(), UgliGeometry::GetSteelPlnNode(), AlgFitTrackMS::InitArrays(), FabPlnInstallLookup::LookForOddEntries(), UgliGeometryReroot::MakeTempDbiPosInfo(), PlexPlaneId(), AlgFitTrackMS::SetupAlg(), and PlexValidate::TestPlaneId().

00316 {
00317   if (isSteel) fEncoded |=  maskPlexIdIsSteel;
00318   else         fEncoded &= ~maskPlexIdIsSteel;
00319 }

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 RawTriggerCodes::AsString(), DefaultPlaneCoverage(), DefaultPlaneView(), fEncoded, GetDetector(), LastPlaneFarSM1(), LastPlaneNearSpect(), MAXMSG, SetPlaneCoverage(), and SetPlaneView().

Referenced by 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    DetectorType::Detector_t detector = GetDetector();
00283    Bool_t out_of_range = false;
00284    Bool_t accept_out_of_range = false;
00285    switch (detector) {
00286    case DetectorType::kNear: 
00287       out_of_range = ( plane > LastPlaneNearSpect() );
00288       break;
00289    case DetectorType::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 DetectorType::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 321 of file PlexPlaneId.h.

References fEncoded, and maskPlexIdCoverage.

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

00322 {
00323    fEncoded = ( fEncoded & ~(maskPlexIdCoverage|maskPlexIdVSCoverage2) ) | 
00324       ( ( coverage << shftPlexIdCoverage ) & maskPlexIdCoverage );
00325    // set extra bit for higher VetoShield enum values
00326    if ( coverage >= PlaneCoverage::kVScS ) fEncoded |= maskPlexIdVSCoverage2;
00327 }

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

Definition at line 329 of file PlexPlaneId.h.

References fEncoded.

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

00330 {
00331    fEncoded = ( fEncoded & ~maskPlexIdView ) | 
00332       ( ( view << shftPlexIdView ) & maskPlexIdView );
00333 }


Friends And Related Function Documentation

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

Definition at line 221 of file PlexPlaneId.h.

00222 { return (lhs.fEncoded&zeroPlexIdStripInfo) != (rhs.fEncoded&zeroPlexIdStripInfo); }

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

Definition at line 212 of file PlexPlaneId.h.

00213 { return (lhs.fEncoded&zeroPlexIdStripInfo) <  (rhs.fEncoded&zeroPlexIdStripInfo); }

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

Definition at line 215 of file PlexPlaneId.h.

00216 { return (lhs.fEncoded&zeroPlexIdStripInfo) <= (rhs.fEncoded&zeroPlexIdStripInfo); }

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

Definition at line 218 of file PlexPlaneId.h.

00219 { return (lhs.fEncoded&zeroPlexIdStripInfo) == (rhs.fEncoded&zeroPlexIdStripInfo); }

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

Definition at line 224 of file PlexPlaneId.h.

00225 { return (lhs.fEncoded&zeroPlexIdStripInfo) >  (rhs.fEncoded&zeroPlexIdStripInfo); }

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

Definition at line 227 of file PlexPlaneId.h.

00228 { return (lhs.fEncoded&zeroPlexIdStripInfo) >= (rhs.fEncoded&zeroPlexIdStripInfo); }


Member Data Documentation

UInt_t PlexPlaneId::fEncoded [protected]
 

Definition at line 110 of file PlexPlaneId.h.

Referenced by GetDetector(), GetEncoded(), GetPlane(), GetPlaneCoverage(), GetPlaneView(), GetSuperModule(), IsNearSpect(), IsNull(), IsSteel(), IsVetoShield(), operator!=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), SetDetector(), SetIsSteel(), SetPlane(), SetPlaneCoverage(), and SetPlaneView().

Bool_t PlexPlaneId::fgCalDetCosmicsAView = false [static]
 

Definition at line 33 of file PlexPlaneId.cxx.


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 15:57:42 2007 for loon by  doxygen 1.3.9.1