CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/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* oddLayerGeometry( int iendcap ) const 
00070    { return (iendcap==1? poszOddLayerGeometry:negzOddLayerGeometry);}
00071   const CSCLayerGeometry* 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 
00197    bool gangedStrips() const { return gangedStrips_; }
00198 
00199   // STATIC FUNCTION
00200 
00204   static int whatChamberType( int istation, int iring );
00205 
00206  private:
00207 
00209   float specsValue( int index ) const {
00210     return theSpecsValues[ index ];  
00211   }
00212 
00213   // A ChamberSpecs has 4 associated LayerGeometry's
00214   CSCLayerGeometry* poszOddLayerGeometry;
00215   CSCLayerGeometry* poszEvenLayerGeometry;
00216   CSCLayerGeometry* negzOddLayerGeometry;
00217   CSCLayerGeometry* negzEvenLayerGeometry;
00218 
00219   //  theChamberType is a unique integer 1-10 for a station, ring pair.
00220 
00221   //  The type value is defined as <br>
00222   //        1           for S = 1  and R=A=4 split strips in ME11 <br>
00223   //      2,3,4 =  R+1  for S = 1  and R = 1,2,3 <br>
00224   //      5-10  = 2*S+R for S = 2,3,4 and R = 1,2 <br>
00225   
00226   int theChamberType;
00227 
00228   // Careful that the following order of data members is required to ensure
00229   // correct initialization in constructor initialization list!
00230 
00231   // Store for specs parameter values
00232   CSCSpecsParcel theSpecsValues;
00233 
00234   int nstrips; // no. of strips per layer
00235   float stripDeltaPhi;   // Delta-phi width of strip in this chamber type (in mrad)
00236   float centreToIntersectionOffset; // Possible correction to whereStripsMeet
00237 
00238   bool gangedStrips_;
00239 
00240   // Names of chamber types
00241   static const std::string theName[10];
00242 
00243   // Name of this class 
00244   static const std::string myName;
00245 
00246 };
00247 
00248 #endif // Geometry_CSCGeometry_CSCChamberSpecs_H