00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef PLEXSCINTMDLID_H
00013 #define PLEXSCINTMDLID_H
00014
00015 #include <iosfwd>
00016
00017 #include "Plex/PlexPlaneId.h"
00018
00019 class PlexScintMdlId;
00020 std::ostream& operator<<(std::ostream& os, const PlexScintMdlId& p);
00021
00022 class PlexScintMdlId : public PlexPlaneId {
00023
00024 public:
00025
00026 PlexScintMdlId();
00027 PlexScintMdlId(PlexPlaneId plnid, Int_t module);
00028 PlexScintMdlId(Detector::Detector_t detector,
00029 Int_t plane, Int_t module,
00030 PlaneView::PlaneView_t view=PlaneView::kUnknown,
00031 PlaneCoverage::PlaneCoverage_t cover=PlaneCoverage::kUnknown);
00032
00033 virtual ~PlexScintMdlId() { ; }
00034
00035
00036 explicit PlexScintMdlId(const UInt_t encoded);
00037 inline UInt_t GetEncoded() const { return fEncoded; }
00038
00039 const char *AsString(Option_t *option="") const;
00040
00041 UShort_t GetModule() const;
00042 UChar_t GetModuleType() const;
00043
00044
00045
00046
00047 Int_t BuildPlnMdlKey() const;
00048 static PlexScintMdlId UnbuildPlnMdlKey(Detector::Detector_t det, Int_t key);
00049
00050 void Print(Option_t *option="") const;
00051
00052 void SetModule(UInt_t module);
00053
00054 friend Bool_t operator< (const PlexScintMdlId &lhs, const PlexScintMdlId &rhs);
00055 friend Bool_t operator<=(const PlexScintMdlId &lhs, const PlexScintMdlId &rhs);
00056 friend Bool_t operator==(const PlexScintMdlId &lhs, const PlexScintMdlId &rhs);
00057 friend Bool_t operator!=(const PlexScintMdlId &lhs, const PlexScintMdlId &rhs);
00058 friend Bool_t operator> (const PlexScintMdlId &lhs, const PlexScintMdlId &rhs);
00059 friend Bool_t operator>=(const PlexScintMdlId &lhs, const PlexScintMdlId &rhs);
00060
00061
00062
00063
00064
00065 static PlexScintMdlId StripToScintMdl(const PlexPlaneId& plnid, Int_t strip);
00066 static Short_t GetStripInMdl(const PlexPlaneId& plnid, UInt_t strip);
00067 static Short_t GetMapperStripInMdl(const PlexPlaneId& plnid, UInt_t strip);
00068 static UShort_t GetNumStripsInPln(const PlexPlaneId& plnid);
00069 static UShort_t GetNumScintMdlsInPln(const PlexPlaneId& plnid);
00070
00071 protected:
00072
00073 private:
00074
00075
00076
00077 void SetIsSteel(Bool_t ) {;}
00078
00079 ClassDef(PlexScintMdlId,1)
00080 };
00081
00082 #ifndef __CINT__
00083 inline PlexScintMdlId::PlexScintMdlId() { fEncoded = defaultPlexScintMdlId; }
00084 inline PlexScintMdlId::PlexScintMdlId(const UInt_t encoded)
00085 { fEncoded = encoded; }
00086 #endif
00087
00088 #endif // PLEXSCINTMDLID_H