2 #define SISTRIPGEOM_H 1 
    9 #include <CLHEP/Matrix/Matrix.h> 
   10 #include <CLHEP/Vector/ThreeVector.h> 
   14 #include "EVENT/SimTrackerHit.h" 
   16 #include "UTIL/BitField64.h" 
   27 #define EPS 5           // in micrometers -- FIXME: Cambiado de 5 a 9 PROV 
   28 #define LAYERCOD   1000 // Const to encode and decode layers==disk 
   29 #define LADDERCOD    10 // Const to encode and decode ladders==petal 
   30 #define SENSORCOD     1 // Const to encode and decode sensors 
   32 #define STRIPOFF      1 // Const to encode and decode strip offset 
   33 #define STRIPCODRPHI  1 // Const to encode and decode strip in RPhi 
   34 #define STRIPCODZ    -1 // Const to encode and decode strip in Z 
   97         virtual std::map<std::string,int> 
decodeCellID(
const UTIL::BitField64 & cellDec) 
const = 0;
 
   98         virtual std::map<std::string,int> 
decodeCellID(
const int & cellDec) 
const = 0;
 
  103         virtual std::pair<StripType,int> 
decodeStripID(
const int & encStripID) 
const = 0;
 
  104         virtual std::pair<StripType,int> 
decodeStripID(
const UTIL::BitField64 & cellDec) 
const = 0;
 
  107                 const int & stripID, UTIL::BitField64 * bf) = 0;
 
  119         virtual short int getLayerType(
short int layerID) 
const;
 
  132         virtual short int getNLadders(
short int layerID) 
const;
 
  146         virtual double getLadderPhi(
short int layerID, 
short int ladderID) 
const;
 
  153         virtual short int getNSensors(
short int layerID) 
const;
 
  158         virtual int getSensorNStripsInRPhi(short int layerID) const;
 
  160         virtual double getSensorPitchInZ(short int layerID) const;
 
  164         virtual double getSensorPitchInRPhi(short int layerID, double posZ) const = 0;*/
 
  166         virtual int getSensorNStrips(
const int & layerID, 
const int & sensorID) 
const=0;
 
  168         virtual double getSensorPitch(
const int & layerID, 
const int & sensorID, 
 
  169                 const double & posZ) 
const = 0;
 
  193                 short int ladderID, 
short int sensorID, 
const CLHEP::Hep3Vector & point) = 0;
 
  197                 short int ladderID, 
short int sensorID,
 
  198                 const CLHEP::Hep3Vector & vec) = 0;
 
  202                 short int ladderID, 
const CLHEP::HepMatrix & matrix) = 0;
 
  208                 short int ladderID, 
short int sensorID, 
const CLHEP::Hep3Vector & point) = 0;
 
  212                 short int ladderID, 
short int sensorID, 
 
  213                 const CLHEP::Hep3Vector & vec) = 0;
 
  217                 short int ladderID, 
const CLHEP::HepMatrix & matrix) = 0;
 
  223                 short int sensorID, 
const CLHEP::Hep3Vector & point) 
const = 0;
 
  229                 const CLHEP::Hep3Vector & point) 
const = 0;
 
  232         virtual double getStripPosY(
const int & layerID, 
const int & sensorID, 
 
  233                 const int & stripID, 
const double & posZ) 
const =0;
 
  235         virtual int getStripID(
const int & layerID, 
const int & sensorID, 
 
  236                 const double & posRPhi, 
const double & posZ) 
const = 0;
 
  241                 const int & sensorID, 
const CLHEP::Hep3Vector & point) 
const = 0;
 
  247                 const int & sensorID, 
const CLHEP::Hep3Vector & point) 
const = 0;
 
  252                 const int & sensorID, 
const int & stripID) 
const = 0;
 
  256                 const int & sensorID, 
 
  257                 const int & stripIDFront, 
const int & stripIDRear) 
const = 0;
 
  321 #endif // SISTRIPGEOM_H 
virtual double getSensorRimWidthInZ(short int layerID) const 
Get width of sensor rim in Z (passive part of silicon) 
 
std::vector< double > _sensorWidth
 
virtual void printGearParams() const =0
Method printing general Gear parameters. 
 
virtual double getSensorThick(short int layerID) const 
Get sensor thickness. 
 
virtual double getLadderPhi(short int layerID, short int ladderID) const 
Get ladder rotation - phi angle. 
 
std::vector< double > _layerThickness
 
virtual CLHEP::Hep3Vector transformPointToLocal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &point)=0
Transform given point from global ref. system to local ref. system (sensor) 
 
std::vector< int > _sensorNStripsInRear
 
std::vector< double > _ladderOffsetZ
 
std::vector< double > _ladderThick
 
std::vector< int > _numberOfLadders
 
virtual short int getLayerType(short int layerID) const 
Get layer type. 
 
virtual CLHEP::Hep3Vector transformPointToRotatedLocal(const int &diskID, const int &sensorID, const CLHEP::Hep3Vector &point) const =0
Transforming a given point to the local ref. 
 
virtual CLHEP::HepMatrix transformMatxToGlobal(short int layerID, short int ladderID, const CLHEP::HepMatrix &matrix)=0
Transform given diagonal matrix from local ref. system (sensor) to global ref. system. 
 
virtual double getSensorLength(short int layerID) const 
Get sensor length. 
 
CLHEP::Hep3Vector _magField
 
std::vector< double > _layerHalfPhi
 
virtual void printSensorParams(short int layerID) const =0
Method printing sensor Gear parameters. 
 
std::vector< double > _layerHalfThickness
 
Gear geometry class - holds all geometry information about silicon strip sensors. ...
 
std::vector< int > _layerRealID
 
virtual short int getNLayers() const 
Get number of layers. 
 
virtual short int getNLadders(short int layerID) const 
Get number of ladders. 
 
virtual short int getLayerIDCTypeNo(int realLayerID) const 
Transform real layer ID to C-type numbering 0 - n ... 
 
std::vector< double > _ladderOffsetY
 
virtual double getLadderOffsetZ(short int layerID) const 
Get ladder offset in Z. 
 
virtual double getSensorWidthMin(short int layerID) const 
Get sensor width 2 (the narrower one for forward-type sensors) 
 
virtual CLHEP::HepMatrix transformMatxToLocal(short int layerID, short int ladderID, const CLHEP::HepMatrix &matrix)=0
Transform given matrix from global ref. system to local ref. system (sensor) 
 
virtual double getStripPosY(const int &layerID, const int &sensorID, const int &stripID, const double &posZ) const =0
Get strip y-position. 
 
virtual double getLadderLength(short int layerID) const 
Get ladder length. 
 
std::vector< double > _sensorPitchInRear
 
std::vector< double > _layerTheta
 
virtual double getLayerRadius(short int layerID) const 
Get layer radius. 
 
std::vector< int > _layerType
 
virtual bool isPointOutOfSensor(short int layerID, const CLHEP::Hep3Vector &point) const =0
Get info whether the given point is out of Si sensor. 
 
std::vector< double > _sensorThick
 
virtual std::string getGearType()
Get gear type. 
 
virtual CLHEP::Hep3Vector get3MagField()
Get magnetic field - Three vector. 
 
std::vector< double > _layerZ
 
std::vector< double > _sensorRimWidthInZ
 
virtual ~SiStripGeom()
Destructor. 
 
virtual bool isPointInsideSensor(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &point) const =0
Get info whether the given point is inside of Si sensor. 
 
std::vector< double > _ladderLength
 
virtual double getLadderThick(short int layerID) const 
Get ladder thickness. 
 
virtual double getBy()
Get magnetic field - y. 
 
virtual short int getNSensors(short int layerID) const 
Get number of sensors for given ladder. 
 
virtual double getBz()
Get magnetic field - z. 
 
std::vector< double > _layerLadderWidth
 
virtual void updateCanonicalCellID(const int &cellID, const int &stripType, const int &stripID, UTIL::BitField64 *bf)=0
Stores the cellID0 and cellID1 of the LCIO object to the file. 
 
short int _numberOfLayers
 
std::vector< double > _sensorGapInBtw
 
virtual double getSensorRimWidthInRPhi(short int layerID) const 
Get width of sensor rim in R-Phi (passive part of silicon) 
 
std::vector< double > _layerActiveSiOffset
 
std::vector< int > _numberOfSensors
 
virtual CLHEP::Hep3Vector transformPointFromRotatedLocal(const int &diskID, const int &sensorID, const CLHEP::Hep3Vector &point) const =0
Transforming a given point from the reference system rotated around the center of a petal to its loca...
 
std::vector< int > _sensorNStripsInFront
 
std::vector< double > _layerPhiOffset
 
virtual CLHEP::Hep3Vector getCrossLinePoint(const int &diskID, const int &sensorID, const int &stripIDFront, const int &stripIDRear) const =0
Get the point which crossed two strips. 
 
virtual int getStripID(const int &layerID, const int &sensorID, const double &posRPhi, const double &posZ) const =0
Get strip ID. 
 
std::vector< double > _sensorWidth2
 
std::vector< double > _layerLadderGap
 
virtual int getSensorNStrips(const int &layerID, const int &sensorID) const =0
Get number of strips in Z axis (in each sensor) 
 
std::vector< double > _ladderWidth
 
virtual double getBx()
Pure virtual method, PROVISIONAL. 
 
virtual CLHEP::Hep3Vector getStripUnitVector(const int &diskID, const int &sensorID, const int &stripID) const =0
Get director vector of a strip (inside the local Ref. 
 
virtual double getLadderOffsetY(short int layerID) const 
Get ladder offset in Y. 
 
std::vector< int > _laddersInLayer
 
std::vector< double > _layerRadius
 
std::vector< double > _sensorPitchInFront
 
virtual double getLayerHalfPhi(const int &layerID) const 
Get layer semiangle. 
 
virtual int cellID0withSensor0(const int &cellID0) const =0
Returns the input cellID0 where the field sensor is put to 0. 
 
virtual std::pair< StripType, int > decodeStripID(const int &encStripID) const =0
Decode stripID. 
 
virtual double getLadderTheta(short int layerID) const =0
Get ladder rotation - theta angle. 
 
virtual void initGearParams()=0
Method initializing class - reads Gear parameters from XML file Pure virtual method, have to be implemented by a concrete instance. 
 
virtual double getLayerPhi0(short int layerID) const 
Get layer phi zero angle. 
 
std::vector< double > _sensorLength
 
virtual double getSensorPitch(const int &layerID, const int &sensorID, const double &posZ) const =0
Get sensor pitch. 
 
virtual CLHEP::Hep3Vector transformPointToGlobal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &point)=0
Transform given point from local ref. system (sensor) to global ref. system. 
 
std::vector< double > _sensorRimWidthInRPhi
 
virtual int encodeStripID(StripType type, int stripID) const 
Encode stripID. 
 
virtual std::map< std::string, int > decodeCellID(const UTIL::BitField64 &cellDec) const =0
Encode cellID. 
 
std::vector< double > _layerLadderHalfWidth
 
virtual int getLayerRealID(short int layerID) const 
Get layer real ID. 
 
virtual double getSensorGapInBetween(short int layerID) const 
Get gap size inbetween sensors. 
 
virtual CLHEP::Hep3Vector transformVecToLocal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &vec)=0
Transform given vector from global ref. system to local ref. system (sensor) 
 
SiStripGeom(const std::string &detector)
Constructor. 
 
virtual double getSensorWidthMax(short int layerID) const 
Get sensor width (the wider one for forward-type sensors) 
 
std::vector< double > _layerPhi0
 
std::vector< double > _layerLadderLength
 
virtual double getLadderWidth(short int layerID) const 
Get ladder width (the wider one for forward sensors) 
 
virtual CLHEP::Hep3Vector transformVecToGlobal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &vec)=0
Transform given vector from local ref. system (sensor) to global ref. system.