CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/FastSimulation/CaloHitMakers/interface/PreshowerHitMaker.h

Go to the documentation of this file.
00001 #ifndef PreshowerHitMaker_h
00002 #define PreshowerHitMaker_h
00003 
00004 #include "FastSimulation/CaloHitMakers/interface/CaloHitMaker.h"
00005 #include "FastSimulation/CaloGeometryTools/interface/Transform3DPJ.h"
00006 
00007 class CaloGeometryHelper;
00008 class LandauFluctuationGenerator;
00009 
00010 class PreshowerHitMaker : public CaloHitMaker
00011 {
00012  public:
00013 
00014   typedef math::XYZVector XYZVector;
00015   typedef math::XYZVector XYZPoint;
00016   typedef ROOT::Math::Transform3DPJ Transform3D;
00017 
00018   PreshowerHitMaker(CaloGeometryHelper * calo, 
00019                     const XYZPoint & , 
00020                     const XYZVector& , 
00021                     const XYZPoint& ,
00022                     const XYZVector&,
00023                     const LandauFluctuationGenerator* aGenerator);
00024 
00025   ~PreshowerHitMaker() {;} 
00026   
00027   inline void setSpotEnergy(double e) { spotEnergy=e;} 
00028   bool addHit(double r,double phi,unsigned layer=0);
00029 
00030   const std::map<unsigned,float>& getHits() { return hitMap_ ;} ;
00031  // for tuning
00032   inline void setMipEnergy(double e1, double e2) { mip1_=e1 ; mip2_=e2;} 
00033   
00034   float totalLayer1() const { return totalLayer1_;}
00035   float totalLayer2() const { return totalLayer2_;}
00036   float layer1Calibrated() const { return 0.024/81.1E-6*totalLayer1_;}
00037   float layer2Calibrated() const { return 0.024*0.7/81.1E-6*totalLayer2_;}
00038   float totalCalibrated() const { return 0.024/81.1E-6*(totalLayer1_+0.7*totalLayer2_);}
00039 
00040  private:
00041 
00042   XYZPoint psLayer1Entrance_;
00043   XYZVector psLayer1Dir_;
00044   XYZPoint psLayer2Entrance_;
00045   XYZVector psLayer2Dir_;
00046   bool layer1valid_;
00047   bool layer2valid_;
00048   Transform3D locToGlobal1_;
00049   Transform3D locToGlobal2_;
00050   float anglecorrection1_;
00051   float anglecorrection2_;
00052   double mip1_,mip2_;
00053   float totalLayer1_;
00054   float totalLayer2_;
00056   const LandauFluctuationGenerator*  theGenerator;
00057 
00058 };
00059 
00060 #endif