1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#ifndef PreshowerHitMaker_h
#define PreshowerHitMaker_h
#include "FastSimulation/CaloHitMakers/interface/CaloHitMaker.h"
#include "FastSimulation/CaloGeometryTools/interface/Transform3DPJ.h"
class CaloGeometryHelper;
class LandauFluctuationGenerator;
class RandomEngineAndDistribution;
class PreshowerHitMaker : public CaloHitMaker {
public:
typedef math::XYZVector XYZVector;
typedef math::XYZVector XYZPoint;
typedef ROOT::Math::Transform3DPJ Transform3D;
PreshowerHitMaker(CaloGeometryHelper* calo,
const XYZPoint&,
const XYZVector&,
const XYZPoint&,
const XYZVector&,
const LandauFluctuationGenerator* aGenerator,
const RandomEngineAndDistribution* engine);
~PreshowerHitMaker() override { ; }
inline void setSpotEnergy(double e) override { spotEnergy = e; }
bool addHit(double r, double phi, unsigned layer = 0) override;
const std::map<CaloHitID, float>& getHits() override { return hitMap_; };
// for tuning
inline void setMipEnergy(double e1, double e2) {
mip1_ = e1;
mip2_ = e2;
}
float totalLayer1() const { return totalLayer1_; }
float totalLayer2() const { return totalLayer2_; }
float layer1Calibrated() const { return 0.024 / 81.1E-6 * totalLayer1_; }
float layer2Calibrated() const { return 0.024 * 0.7 / 81.1E-6 * totalLayer2_; }
float totalCalibrated() const { return 0.024 / 81.1E-6 * (totalLayer1_ + 0.7 * totalLayer2_); }
private:
XYZPoint psLayer1Entrance_;
XYZVector psLayer1Dir_;
XYZPoint psLayer2Entrance_;
XYZVector psLayer2Dir_;
bool layer1valid_;
bool layer2valid_;
Transform3D locToGlobal1_;
Transform3D locToGlobal2_;
float anglecorrection1_;
float anglecorrection2_;
double mip1_, mip2_;
float totalLayer1_;
float totalLayer2_;
/// The Landau Fluctuation generator
const LandauFluctuationGenerator* theGenerator;
const RandomEngineAndDistribution* random;
};
#endif
|