CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FastSimulation/TrackingRecHitProducer/interface/SiPixelGaussianSmearingRecHitConverterAlgorithm.h

Go to the documentation of this file.
00001 #ifndef FastSimulation_TrackingRecHitProducer_SiPixelGaussianSmearingRecHitConverterAlgorithm_h
00002 #define FastSimulation_TrackingRecHitProducer_SiPixelGaussianSmearingRecHitConverterAlgorithm_h
00003 
00004 //---------------------------------------------------------------------------
00009 //---------------------------------------------------------------------------
00010 
00011 
00012 //Framework
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 
00015 // PSimHit
00016 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00017 
00018 // Geometry
00019 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00020 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
00021 // template object
00022 #include "RecoLocalTracker/SiPixelRecHits/interface/SiPixelTemplate.h"
00023 
00024 // Vectors
00025 #include "DataFormats/GeometryVector/interface/Point3DBase.h"
00026 #include "DataFormats/GeometrySurface/interface/LocalError.h"
00027 
00028 // STL
00029 #include <vector>
00030 #include <string>
00031 
00032 class TFile;
00033 class RandomEngine;
00034 class SimpleHistogramGenerator;
00035 
00036 class SiPixelGaussianSmearingRecHitConverterAlgorithm {
00037 public:
00038   //--- Constructor, virtual destructor (just in case)
00039   explicit SiPixelGaussianSmearingRecHitConverterAlgorithm(                
00040    const edm::ParameterSet& pset,
00041    GeomDetType::SubDetector pixelPart,
00042    const RandomEngine* engine);
00043 
00044   // destructor
00045   virtual ~SiPixelGaussianSmearingRecHitConverterAlgorithm();
00046   
00047   // return results
00048   Local3DPoint getPosition()  {return thePosition;}
00049   double       getPositionX() {return thePositionX;}
00050   double       getPositionY() {return thePositionY;}
00051   double       getPositionZ() {return thePositionZ;}
00052   LocalError   getError()     {return theError;}
00053   double       getErrorX()    {return theErrorX;}
00054   double       getErrorY()    {return theErrorY;}
00055   double       getErrorZ()    {return theErrorZ;}
00056   unsigned int getPixelMultiplicityAlpha() {return theClslenx;}
00057   unsigned int getPixelMultiplicityBeta()  {return theClsleny;}
00058   //
00059   
00060   //
00061   void smearHit( const PSimHit& simHit, const PixelGeomDetUnit* detUnit, const double boundX, const double boundY);
00062 
00063 private:
00064   // Switch between old (ORCA) and new (CMSSW) pixel parameterization
00065   bool useCMSSWPixelParameterization;
00066   // template object
00067   SiPixelTemplate templ;
00068   int tempId;
00069   //
00070   bool isFlipped(const PixelGeomDetUnit* theDet) const;
00071   void initializeBarrel();
00072   void initializeForward();
00073   //isForward, true for forward, false for barrel
00074   bool isForward;
00075   //
00076   //
00077   // resolution bins
00078   double rescotAlpha_binMin , rescotAlpha_binWidth;
00079   unsigned int rescotAlpha_binN;
00080   double rescotBeta_binMin  , rescotBeta_binWidth;
00081   unsigned int rescotBeta_binN;
00082   int resqbin_binMin, resqbin_binWidth;
00083   unsigned int resqbin_binN;
00084   //
00085   edm::ParameterSet pset_;
00086   // Useful private members
00087   GeomDetType::SubDetector thePixelPart;
00088 
00089   std::map<unsigned,const SimpleHistogramGenerator*> theXHistos;
00090   std::map<unsigned,const SimpleHistogramGenerator*> theYHistos;
00091 
00092   TFile* thePixelResolutionFile1;
00093   std::string thePixelResolutionFileName1;
00094   //Splite the resolution histograms for cvs uploading
00095   TFile* thePixelResolutionFile2;
00096   std::string thePixelResolutionFileName2;
00097 
00098   unsigned int theLayer;
00099   // output
00100   Local3DPoint thePosition;
00101   double       thePositionX;
00102   double       thePositionY;
00103   double       thePositionZ;
00104   LocalError   theError;
00105   double       theErrorX;
00106   double       theErrorY;
00107   double       theErrorZ;
00108   unsigned int theClslenx;
00109   unsigned int theClsleny;
00110   //
00111   // The random engine
00112   const RandomEngine* random;
00113 
00114 };
00115 
00116 #endif