00001 #ifndef FastSimulation_TrackingRecHitProducer_SiPixelGaussianSmearingRecHitConverterAlgorithm_h
00002 #define FastSimulation_TrackingRecHitProducer_SiPixelGaussianSmearingRecHitConverterAlgorithm_h
00003
00004
00009
00010
00011
00012
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014
00015
00016 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00017
00018
00019 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00020 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
00021
00022
00023 #include "DataFormats/GeometryVector/interface/Point3DBase.h"
00024 #include "DataFormats/GeometrySurface/interface/LocalError.h"
00025
00026
00027 #include <vector>
00028 #include <string>
00029
00030 class TFile;
00031 class TH1F;
00032 class PixelErrorParametrization;
00033 class RandomEngine;
00034 class HistogramGenerator;
00035
00036 class SiPixelGaussianSmearingRecHitConverterAlgorithm {
00037 public:
00038
00039 explicit SiPixelGaussianSmearingRecHitConverterAlgorithm(
00040 const edm::ParameterSet& pset,
00041 GeomDetType::SubDetector pixelPart,
00042 std::vector<TH1F*>& alphaMultiplicityCumulativeProbabilities,
00043 std::vector<TH1F*>& betaMultiplicityCumulativeProbabilities,
00044 TFile* pixelResolutionFile,
00045 const RandomEngine* engine);
00046
00047
00048 virtual ~SiPixelGaussianSmearingRecHitConverterAlgorithm();
00049
00050
00051 Local3DPoint getPosition() {return thePosition;}
00052 double getPositionX() {return thePositionX;}
00053 double getPositionY() {return thePositionY;}
00054 double getPositionZ() {return thePositionZ;}
00055 LocalError getError() {return theError;}
00056 double getErrorX() {return theErrorX;}
00057 double getErrorY() {return theErrorY;}
00058 double getErrorZ() {return theErrorZ;}
00059 unsigned int getPixelMultiplicityAlpha() {return thePixelMultiplicityAlpha;}
00060 unsigned int getPixelMultiplicityBeta() {return thePixelMultiplicityBeta;}
00061
00062
00063
00064 void smearHit( const PSimHit& simHit, const PixelGeomDetUnit* detUnit, const double boundX, const double boundY);
00065
00066 private:
00067
00068 bool useCMSSWPixelParameterization;
00069
00070 bool isFlipped(const PixelGeomDetUnit* theDet) const;
00071
00072 bool negativeErrorProtection;
00073
00074
00075 double resAlpha_binMin , resAlpha_binWidth;
00076 unsigned int resAlpha_binN;
00077 double resBeta_binMin , resBeta_binWidth;
00078 unsigned int resBeta_binN;
00079
00080 edm::ParameterSet pset_;
00081
00082 GeomDetType::SubDetector thePixelPart;
00083
00084 std::vector<TH1F*> theAlphaMultiplicityCumulativeProbabilities;
00085 std::vector<TH1F*> theBetaMultiplicityCumulativeProbabilities;
00086
00087 std::map<unsigned,const HistogramGenerator*> theAlphaHistos;
00088 std::map<unsigned,const HistogramGenerator*> theBetaHistos;
00089
00090 TFile* thePixelResolutionFile;
00091
00092 unsigned int theLayer;
00093
00094 Local3DPoint thePosition;
00095 double thePositionX;
00096 double thePositionY;
00097 double thePositionZ;
00098 LocalError theError;
00099 double theErrorX;
00100 double theErrorY;
00101 double theErrorZ;
00102 unsigned int thePixelMultiplicityAlpha;
00103 unsigned int thePixelMultiplicityBeta;
00104
00105 PixelErrorParametrization* pixelError;
00106
00107
00108 const RandomEngine* random;
00109
00110 };
00111
00112 #endif