Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:11

0001 #ifndef FastSimulation_CaloGeometryTools_CrystalNeighbour_h
0002 #define FastSimulation_CaloGeometryTools_CrystalNeighbour_h
0003 /** 
0004  * 
0005  * Stores basic information on the neighbour. Used in EcalHitMaker
0006  *
0007  * \author Florian Beaudette
0008  * \date: 08-Jun-2004 - 06-Oct-2006
0009  */
0010 class CrystalNeighbour {
0011 public:
0012   CrystalNeighbour(unsigned number = 999, int status = -2) : number_(number), status_(status) { ; }
0013   ~CrystalNeighbour() { ; };
0014   /// Number of the crystal. This has nothing to do with the UniqueID
0015   inline unsigned number() const { return number_; };
0016   /// get the status 0 : gap; 1: crack ; -1 : does not exist ; -2 not calculated yet
0017   inline int status() const { return status_; };
0018   /// set the status
0019   inline void setStatus(int status) { status_ = status; };
0020   /// set the number
0021   inline void setNumber(unsigned n) { number_ = n; };
0022 
0023   /// set if this direction should be projected
0024   /// this means something only if the direction is N,E,W,S
0025   inline void setToBeGlued(bool proj) { tobeprojected_ = proj; };
0026 
0027   /// do the edge in this direction should be glued ?
0028   inline bool toBeGlued() const { return tobeprojected_; };
0029 
0030 private:
0031   unsigned number_;
0032   int status_;
0033   bool tobeprojected_;
0034 };
0035 #endif