Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:34

0001 #ifndef PreshowerHitMaker_h
0002 #define PreshowerHitMaker_h
0003 
0004 #include "FastSimulation/CaloHitMakers/interface/CaloHitMaker.h"
0005 #include "FastSimulation/CaloGeometryTools/interface/Transform3DPJ.h"
0006 
0007 class CaloGeometryHelper;
0008 class LandauFluctuationGenerator;
0009 class RandomEngineAndDistribution;
0010 
0011 class PreshowerHitMaker : public CaloHitMaker {
0012 public:
0013   typedef math::XYZVector XYZVector;
0014   typedef math::XYZVector XYZPoint;
0015   typedef ROOT::Math::Transform3DPJ Transform3D;
0016 
0017   PreshowerHitMaker(CaloGeometryHelper* calo,
0018                     const XYZPoint&,
0019                     const XYZVector&,
0020                     const XYZPoint&,
0021                     const XYZVector&,
0022                     const LandauFluctuationGenerator* aGenerator,
0023                     const RandomEngineAndDistribution* engine);
0024 
0025   ~PreshowerHitMaker() override { ; }
0026 
0027   inline void setSpotEnergy(double e) override { spotEnergy = e; }
0028   bool addHit(double r, double phi, unsigned layer = 0) override;
0029 
0030   const std::map<CaloHitID, float>& getHits() override { return hitMap_; };
0031   // for tuning
0032   inline void setMipEnergy(double e1, double e2) {
0033     mip1_ = e1;
0034     mip2_ = e2;
0035   }
0036 
0037   float totalLayer1() const { return totalLayer1_; }
0038   float totalLayer2() const { return totalLayer2_; }
0039   float layer1Calibrated() const { return 0.024 / 81.1E-6 * totalLayer1_; }
0040   float layer2Calibrated() const { return 0.024 * 0.7 / 81.1E-6 * totalLayer2_; }
0041   float totalCalibrated() const { return 0.024 / 81.1E-6 * (totalLayer1_ + 0.7 * totalLayer2_); }
0042 
0043 private:
0044   XYZPoint psLayer1Entrance_;
0045   XYZVector psLayer1Dir_;
0046   XYZPoint psLayer2Entrance_;
0047   XYZVector psLayer2Dir_;
0048   bool layer1valid_;
0049   bool layer2valid_;
0050   Transform3D locToGlobal1_;
0051   Transform3D locToGlobal2_;
0052   float anglecorrection1_;
0053   float anglecorrection2_;
0054   double mip1_, mip2_;
0055   float totalLayer1_;
0056   float totalLayer2_;
0057   /// The Landau Fluctuation generator
0058   const LandauFluctuationGenerator* theGenerator;
0059   const RandomEngineAndDistribution* random;
0060 };
0061 
0062 #endif