CMS 3D CMS Logo

HcalHitMaker.h
Go to the documentation of this file.
1 #ifndef HcalHitMaker_h
2 #define HcalHitMaker_h
3 
8 
9 //#include "Math/GenVector/Transform3D.h"
11 
12 //#include <boost/cstdint.hpp>
13 
14 class CaloGeometryHelper;
15 
16 class HcalHitMaker : public CaloHitMaker {
17 public:
21 
22  HcalHitMaker(EcalHitMaker&, unsigned);
23  ~HcalHitMaker() override { ; }
24 
26  inline void setSpotEnergy(double e) override { spotEnergy = e; }
27 
29  bool addHit(double r, double phi, unsigned layer = 0) override;
30 
32  bool addHit(const XYZPoint& point, unsigned layer = 0);
33 
34  // get the hits
35  const std::map<CaloHitID, float>& getHits() override { return hitMap_; };
36 
38  bool setDepth(double, bool inCm = false);
39 
40 private:
42 
46  int onHcal;
47 
48  double currentDepth_;
50  double radiusFactor_;
52 
53 public:
54  static int getSubHcalDet(const FSimTrack* t) {
55  // std::cout << " getSubHcalDet " << std::endl;
56  // According to DataFormats/ HcalDetId/ interface/ HcalSubdetector.h
57  // std::cout << " onHcal " << t->onHcal() << " onVFcal " << t->onVFcal() << std::endl;
58  if (t->onHcal() == 1)
59  return HcalBarrel;
60  if (t->onHcal() == 2)
61  return HcalEndcap;
62  if (t->onVFcal() == 2)
63  return HcalForward;
64  return -1;
65  }
66 };
67 #endif
const FSimTrack * myTrack
Definition: HcalHitMaker.h:43
std::map< CaloHitID, float > hitMap_
Definition: CaloHitMaker.h:61
math::XYZVector XYZPoint
Definition: CaloHitMaker.h:23
Transform3D locToGlobal_
Definition: HcalHitMaker.h:49
double radiusFactor_
Definition: HcalHitMaker.h:50
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
bool addHit(double r, double phi, unsigned layer=0) override
add the hit in the HCAL in local coordinates
Definition: HcalHitMaker.cc:30
ROOT::Math::Transform3DPJ Transform3D
Definition: HcalHitMaker.h:20
HcalHitMaker(EcalHitMaker &, unsigned)
Definition: HcalHitMaker.cc:10
void setSpotEnergy(double e) override
Set the spot energy.
Definition: HcalHitMaker.h:26
bool mapCalculated_
Definition: HcalHitMaker.h:51
XYZPoint ecalEntrance_
Definition: HcalHitMaker.h:44
math::XYZVector XYZVector
Definition: HcalHitMaker.h:18
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
math::XYZVector XYZPoint
EcalHitMaker & myGrid
Definition: HcalHitMaker.h:41
math::XYZVector XYZVector
Definition: CaloHitMaker.h:22
math::XYZVector XYZPoint
Definition: HcalHitMaker.h:19
XYZVector particleDirection
Definition: HcalHitMaker.h:45
~HcalHitMaker() override
Definition: HcalHitMaker.h:23
double spotEnergy
Definition: CaloHitMaker.h:48
double currentDepth_
Definition: HcalHitMaker.h:48
bool setDepth(double, bool inCm=false)
set the depth in X0 or Lambda0 units depending on showerType
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
static int getSubHcalDet(const FSimTrack *t)
Definition: HcalHitMaker.h:54
const std::map< CaloHitID, float > & getHits() override
Definition: HcalHitMaker.h:35