CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/Geometry/CSCGeometry/interface/CSCChamberSpecs.h

Go to the documentation of this file.
00001 #ifndef Geometry_CSCGeometry_CSCChamberSpecs_H
00002 #define Geometry_CSCGeometry_CSCChamberSpecs_H
00003 
00027 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00028 
00029 #include <cmath>
00030 #include <string>
00031 #include <vector>
00032 
00033 class CSCGeometry;
00034 class CSCLayerGeometry;
00035 class CSCWireGroupPackage;
00036 class Topology; //@@ Can go once GeomDetType has it removed.
00037 class TrapezoidalPlaneBounds;
00038 
00039 class CSCChamberSpecs : public GeomDetType { 
00040 
00041 public:
00042 
00043   typedef std::vector<float> CSCSpecsParcel;
00044 
00046   CSCChamberSpecs();
00047 
00049   CSCChamberSpecs( const CSCGeometry* geom, int iChamberType , 
00050                    const TrapezoidalPlaneBounds& mediaShape,
00051                    const CSCSpecsParcel& fupar,
00052                    const CSCWireGroupPackage& wg 
00053                   );
00054 
00056   ~CSCChamberSpecs();
00057 
00059   bool operator!=( const CSCChamberSpecs& specs ) const;
00060   bool operator==( const CSCChamberSpecs& specs ) const;
00061 
00062   //@@ Topology() will be removed from GeomDetType interface (good, so we're no longer forced to pick something)
00063   //@@ But still there as of Aug-2007. So much for design.
00064 
00066   virtual const Topology& topology() const;
00067 
00069   const CSCLayerGeometry* const oddLayerGeometry( int iendcap ) const 
00070    { return (iendcap==1? poszOddLayerGeometry:negzOddLayerGeometry);}
00071   const CSCLayerGeometry* const evenLayerGeometry( int iendcap ) const 
00072    { return (iendcap==1? poszEvenLayerGeometry:negzEvenLayerGeometry);}
00073 
00084   int chamberType() const; 
00085 
00090   std::string chamberTypeName() const;
00091 
00092 
00093   // CHAMBER 'PARAMETER' FUNCTIONS
00094   //@@ FIXME these must all be sorted out in a world of real conditions & calibration
00095 
00096   float stripResolution()     const {return specsValue(0);}
00097   float wireResolution()      const {return specsValue(1);}
00098   float efficiency()          const {return specsValue(2);}
00099   float timeWindow()          const {return specsValue(3);}
00100 
00104   float neutronRate()         const {return specsValue(4);}
00105 
00109   int nStrips()               const {return nstrips;}
00110 
00114   int   nNodes()              const {return int( specsValue(6) );}
00115   int   nWiresPerGroup()      const {return int( specsValue(7) );}
00116   int   nFloatingStrips()     const {return int( specsValue(8) );}
00117 
00121   float stripPhiPitch() const {return 1.E-03 * stripDeltaPhi;}
00122 
00127   float ctiOffset() const {return centreToIntersectionOffset;}
00128 
00132   float wireSpacing() const;
00133  
00137   float anodeCathodeSpacing() const {return specsValue(9);}
00138 
00139   float gasGain()             const;
00140 
00141   float voltage()             const {return specsValue(11);}
00142 
00143   float calibrationError()    const {return specsValue(13);}
00144 
00145   float electronAttraction()  const {return specsValue(14);}
00146 
00150   float fractionQS()          const {return specsValue(15);}
00151 
00155   float chargePerCount() const;
00156 
00160   float wireRadius()          const {return specsValue(17);}
00161 
00165   float shaperPeakingTime()   const {return specsValue(18);}
00166   
00170   float constantNoise() const {return specsValue(22);}
00171 
00175   float e_pF() const {return specsValue(23);}
00176 
00182   //@@ Why 1/sqrt(time)?!?
00183   float wireNoise(float timeInterval) const {
00184     const float WIRE_CAPACITANCE = 8.; // in pF
00185     return (constantNoise() + nWiresPerGroup()*WIRE_CAPACITANCE)
00186            / sqrt(timeInterval/100.);
00187   }
00188  
00189   float stripNoise(float timeInterval) const;
00190 
00191   //@@ The following is nonsense to be fixed at some stage
00192   //  float adcThreshold()        const {return 9.99;}  
00193 
00194 
00195   // STATIC FUNCTION
00196 
00200   static int whatChamberType( int istation, int iring );
00201 
00202  private:
00203 
00205   float specsValue( int index ) const {
00206     return theSpecsValues[ index ];  
00207   }
00208 
00209   // A ChamberSpecs has 4 associated LayerGeometry's
00210   CSCLayerGeometry* poszOddLayerGeometry;
00211   CSCLayerGeometry* poszEvenLayerGeometry;
00212   CSCLayerGeometry* negzOddLayerGeometry;
00213   CSCLayerGeometry* negzEvenLayerGeometry;
00214 
00215   //  theChamberType is a unique integer 1-10 for a station, ring pair.
00216 
00217   //  The type value is defined as <br>
00218   //        1           for S = 1  and R=A=4 split strips in ME11 <br>
00219   //      2,3,4 =  R+1  for S = 1  and R = 1,2,3 <br>
00220   //      5-10  = 2*S+R for S = 2,3,4 and R = 1,2 <br>
00221   
00222   int theChamberType;
00223 
00224   // Careful that the following order of data members is required to ensure
00225   // correct initialization in constructor initialization list!
00226 
00227   // Store for specs parameter values
00228   CSCSpecsParcel theSpecsValues;
00229 
00230   int nstrips; // no. of strips per layer
00231   float stripDeltaPhi;   // Delta-phi width of strip in this chamber type (in mrad)
00232   float centreToIntersectionOffset; // Possible correction to whereStripsMeet
00233 
00234   // Names of chamber types
00235   static const std::string theName[10];
00236 
00237   // Name of this class 
00238   static const std::string myName;
00239 
00240 };
00241 
00242 #endif // Geometry_CSCGeometry_CSCChamberSpecs_H