CMS 3D CMS Logo

BetafuncEvtVtxGenerator.h
Go to the documentation of this file.
1 #ifndef IOMC_BetafuncEvtVtxGenerator_H
2 #define IOMC_BetafuncEvtVtxGenerator_H
3 
4 /*
5 ________________________________________________________________________
6 
7  BetafuncEvtVtxGenerator
8 
9  Smear vertex according to the Beta function on the transverse plane
10  and a Gaussian on the z axis. It allows the beam to have a crossing
11  angle (dx/dz and dy/dz).
12 
13  Based on GaussEvtVtxGenerator.h
14  implemented by Francisco Yumiceva (yumiceva@fnal.gov)
15 
16  FERMILAB
17  2006
18 ________________________________________________________________________
19 */
20 
26 
27 namespace CLHEP {
28  class HepRandomEngine;
29 }
30 
32 public:
34  ~BetafuncEvtVtxGenerator() override;
35 
36  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
37 
39  //virtual CLHEP::Hep3Vector * newVertex();
40  HepMC::FourVector newVertex(CLHEP::HepRandomEngine*) const override;
41 
42  TMatrixD const* GetInvLorentzBoost() const override;
43 
45  void sigmaZ(double s = 1.0);
46 
48  void X0(double m = 0) { fX0 = m; }
50  void Y0(double m = 0) { fY0 = m; }
52  void Z0(double m = 0) { fZ0 = m; }
53 
55  void betastar(double m = 0) { fbetastar = m; }
57  void emittance(double m = 0) { femittance = m; }
58 
60  double BetaFunction(double z, double z0) const;
61 
62 private:
67 
68  void setBoost(double alpha, double phi);
69 
70 private:
71  bool readDB_;
72 
73  double fX0, fY0, fZ0;
74  double fSigmaZ;
75  //double fdxdz, fdydz;
77  // double falpha;
78  double fTimeOffset;
79 
80  TMatrixD boost_;
81 
82  void update(const edm::EventSetup& iEventSetup);
85 };
86 
87 #endif
BetafuncEvtVtxGenerator::BetafuncEvtVtxGenerator
BetafuncEvtVtxGenerator(const edm::ParameterSet &p)
Definition: BetafuncEvtVtxGenerator.cc:33
BetafuncEvtVtxGenerator::X0
void X0(double m=0)
set mean in X in cm
Definition: BetafuncEvtVtxGenerator.h:48
BetafuncEvtVtxGenerator::~BetafuncEvtVtxGenerator
~BetafuncEvtVtxGenerator() override
Definition: BetafuncEvtVtxGenerator.cc:55
BetafuncEvtVtxGenerator
Definition: BetafuncEvtVtxGenerator.h:31
edm::ESWatcher< SimBeamSpotObjectsRcd >
BetafuncEvtVtxGenerator::emittance
void emittance(double m=0)
emittance (no the normalized)
Definition: BetafuncEvtVtxGenerator.h:57
BetafuncEvtVtxGenerator::fZ0
double fZ0
Definition: BetafuncEvtVtxGenerator.h:73
BetafuncEvtVtxGenerator::sigmaZ
void sigmaZ(double s=1.0)
set resolution in Z in cm
Definition: BetafuncEvtVtxGenerator.cc:136
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
BetafuncEvtVtxGenerator::fbetastar
double fbetastar
Definition: BetafuncEvtVtxGenerator.h:76
SimBeamSpotObjects.h
BetafuncEvtVtxGenerator::fTimeOffset
double fTimeOffset
Definition: BetafuncEvtVtxGenerator.h:78
BetafuncEvtVtxGenerator::operator=
BetafuncEvtVtxGenerator & operator=(const BetafuncEvtVtxGenerator &rhs)=delete
alpha
float alpha
Definition: AMPTWrapper.h:105
BetafuncEvtVtxGenerator::BetaFunction
double BetaFunction(double z, double z0) const
beta function
Definition: BetafuncEvtVtxGenerator.cc:99
ESGetToken.h
BetafuncEvtVtxGenerator::fY0
double fY0
Definition: BetafuncEvtVtxGenerator.h:73
alignCSCRings.s
s
Definition: alignCSCRings.py:92
BetafuncEvtVtxGenerator::fSigmaZ
double fSigmaZ
Definition: BetafuncEvtVtxGenerator.h:74
BetafuncEvtVtxGenerator::setBoost
void setBoost(double alpha, double phi)
Definition: BetafuncEvtVtxGenerator.cc:103
BetafuncEvtVtxGenerator::femittance
double femittance
Definition: BetafuncEvtVtxGenerator.h:76
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
DDAxes::z
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
CLHEP
Definition: CocoaGlobals.h:27
BetafuncEvtVtxGenerator::newVertex
HepMC::FourVector newVertex(CLHEP::HepRandomEngine *) const override
return a new event vertex
Definition: BetafuncEvtVtxGenerator.cc:77
BetafuncEvtVtxGenerator::parameterWatcher_
edm::ESWatcher< SimBeamSpotObjectsRcd > parameterWatcher_
Definition: BetafuncEvtVtxGenerator.h:83
BetafuncEvtVtxGenerator::Z0
void Z0(double m=0)
set mean in Z in cm
Definition: BetafuncEvtVtxGenerator.h:52
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SimBeamSpotObjectsRcd.h
BetafuncEvtVtxGenerator::GetInvLorentzBoost
TMatrixD const * GetInvLorentzBoost() const override
Definition: BetafuncEvtVtxGenerator.cc:145
BetafuncEvtVtxGenerator::beamToken_
edm::ESGetToken< SimBeamSpotObjects, SimBeamSpotObjectsRcd > beamToken_
Definition: BetafuncEvtVtxGenerator.h:84
BaseEvtVtxGenerator.h
BetafuncEvtVtxGenerator::Y0
void Y0(double m=0)
set mean in Y in cm
Definition: BetafuncEvtVtxGenerator.h:50
BetafuncEvtVtxGenerator::betastar
void betastar(double m=0)
set beta_star
Definition: BetafuncEvtVtxGenerator.h:55
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< SimBeamSpotObjects, SimBeamSpotObjectsRcd >
BetafuncEvtVtxGenerator::readDB_
bool readDB_
Definition: BetafuncEvtVtxGenerator.h:71
BetafuncEvtVtxGenerator::update
void update(const edm::EventSetup &iEventSetup)
Definition: BetafuncEvtVtxGenerator.cc:61
DDAxes::phi
ESWatcher.h
BetafuncEvtVtxGenerator::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: BetafuncEvtVtxGenerator.cc:57
BaseEvtVtxGenerator
Definition: BaseEvtVtxGenerator.h:23
BetafuncEvtVtxGenerator::boost_
TMatrixD boost_
Definition: BetafuncEvtVtxGenerator.h:80
BetafuncEvtVtxGenerator::fX0
double fX0
Definition: BetafuncEvtVtxGenerator.h:73