fmssim
Cell.h
Go to the documentation of this file.
00001 #ifndef _FMS_GEOMETRY_CELL_H_
00002 #define _FMS_GEOMETRY_CELL_H_
00003 
00004 //
00005 // Cell.h
00006 //
00007 // Created by TB on 9/16/11.
00008 // Copyright 2011 BNL. All rights reserved.
00009 //
00010 
00011 #include <TObject.h>
00012 
00013 class TVector3;
00014 #include <TVector3.h>
00015 namespace fms {
00016    
00017    namespace geometry {
00018       
00019       
00020 #if 0
00021 
00025       struct Description {
00026          Int_t mRowMin; // Minimum row index
00027          Int_t mRowMax; // Maximum row index
00028          Int_t mColumnMin; // Minimum column index
00029          Int_t mColumnMax; // Maximum column index
00030          Double_t mCellWidth; // Of each cell
00031          Double_t mCellHeight; // Of each cell
00032          Double_t mZ; // z coordinate of front face
00033       };
00034 #endif
00035       
00044       class Cell : public TObject {
00045          
00046       public:
00047          
00048          Cell(Double_t xmin = 0., Double_t xmax = 0.,
00049               Double_t ymin = 0., Double_t ymax = 0.);
00050          
00051          virtual ~Cell();
00052          
00056          virtual Double_t Width() const = 0;
00057          
00061          virtual Double_t Height() const = 0;
00062          
00066          virtual Double_t XMin() const;
00067          
00071          virtual Double_t XMax() const;
00072          
00076          virtual Double_t YMin() const;
00077          
00081          virtual Double_t YMax() const;
00082          
00088          virtual Bool_t Contains(const TVector3&) const;
00089          
00094          virtual void Mask(Bool_t = true);
00095          
00099          virtual Bool_t IsMasked() const;
00100          
00105          virtual Int_t GetQtBoard() const;
00106          
00111          virtual void SetQtBoard(Int_t);
00112          
00118          virtual UInt_t Channel() const;
00119          
00125          virtual void SetChannel(UInt_t);
00126          
00127 #if 0
00128          // To implement:
00129          // Z coordinate of the face nearest the interaction point.
00130          virtual Double_t ZMin() const = 0;
00131          // Z coordinate of the face furthest from the interaction point.
00132          virtual Double_t ZMax() const  = 0;
00133          // Some kind of detector subsystem ID
00134          virtual Int_t Nstb() const = 0;
00135          virtual Int_t Row() const = 0; // [1, N]
00136          virtual Int_t Column() const = 0; // [1, N]
00137          virtual Int_t RowMin() const = 0;
00138          virtual Int_t RowMax() const = 0;
00139          virtual Int_t ColumnMin() const = 0;
00140          virtual Int_t ColumnMax() const = 0;
00141 #endif
00142          
00143       protected:
00144          
00145          Bool_t mMasked;
00146          
00147          UInt_t mChannel;
00148          Int_t mColumn;
00149          Int_t mRow;
00150          Int_t mQtBoard;
00151          
00152          Double_t mXMin;
00153          Double_t mXMax;
00154          Double_t mYMin;
00155          Double_t mYMax;
00156          
00157          ClassDef(fms::geometry::Cell, 1)
00158       };
00159       
00160       inline Double_t Cell::XMin() const { return mXMin; }
00161       inline Double_t Cell::XMax() const { return mXMax; }
00162       inline Double_t Cell::YMin() const { return mYMin; }
00163       inline Double_t Cell::YMax() const { return mYMax; }
00164       inline void Cell::Mask(Bool_t b) { mMasked = b; }
00165       inline Bool_t Cell::IsMasked() const { return mMasked; }
00166       inline Int_t Cell::GetQtBoard() const { return mQtBoard; }
00167       inline void Cell::SetQtBoard(Int_t i) { mQtBoard = i; }
00168       inline UInt_t Cell::Channel() const { return mChannel; }
00169       inline void Cell::SetChannel(UInt_t c) { mChannel = c; }
00170       
00171    } // namespace geometry
00172    
00173 } // namespace fms
00174 
00175 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines