Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-30 02:36:45

0001 /*
0002  *
0003  * This is a part of CTPPS offline software.
0004  * Author:
0005  *   Fabrizio Ferro (ferro@ge.infn.it)
0006  *
0007  */
0008 
0009 #ifndef DataFormats_CTPPSReco_CTPPSPixelRecHit_H
0010 #define DataFormats_CTPPSReco_CTPPSPixelRecHit_H
0011 
0012 #include "DataFormats/GeometrySurface/interface/LocalError.h"
0013 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0014 
0015 // Reconstructed hits in CTPPS Pixel detector
0016 
0017 class CTPPSPixelRecHit {
0018 public:
0019   CTPPSPixelRecHit(LocalPoint lp = LocalPoint(0., 0., 0.),
0020                    LocalError le = LocalError(0., 0., 0.),
0021                    bool edge = false,
0022                    bool bad = false,
0023                    bool rocs = false,
0024                    int minrow = 0,
0025                    int mincol = 0,
0026                    int size = 0,
0027                    int rowsize = 0,
0028                    int colsize = 0)
0029       : thePoint_(lp),
0030         theError_(le),
0031         isOnEdge_(edge),
0032         hasBadPixels_(bad),
0033         spanTwoRocs_(rocs),
0034         minPixelRow_(minrow),
0035         minPixelCol_(mincol),
0036         clusterSize_(size),
0037         clusterSizeRow_(rowsize),
0038         clusterSizeCol_(colsize) {}
0039 
0040   inline LocalPoint point() const { return thePoint_; }
0041   inline LocalError error() const { return theError_; }
0042 
0043   inline bool isOnEdge() const { return isOnEdge_; }
0044   inline bool hasBadPixels() const { return hasBadPixels_; }
0045   inline bool spanTwoRocs() const { return spanTwoRocs_; }
0046 
0047   inline unsigned int minPixelRow() const { return minPixelRow_; }
0048   inline unsigned int minPixelCol() const { return minPixelCol_; }
0049 
0050   inline unsigned int clusterSize() const { return clusterSize_; }
0051   inline unsigned int clusterSizeRow() const { return clusterSizeRow_; }
0052   inline unsigned int clusterSizeCol() const { return clusterSizeCol_; }
0053 
0054 private:
0055   LocalPoint thePoint_;
0056   LocalError theError_;
0057 
0058   bool isOnEdge_;
0059   bool hasBadPixels_;
0060   bool spanTwoRocs_;
0061 
0062   unsigned int minPixelRow_;
0063   unsigned int minPixelCol_;
0064 
0065   unsigned int clusterSize_;
0066   unsigned int clusterSizeRow_;
0067   unsigned int clusterSizeCol_;
0068 };
0069 
0070 inline bool operator<(CTPPSPixelRecHit& a, CTPPSPixelRecHit& b) { return (a.point().mag() < b.point().mag()); };
0071 
0072 #endif