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 
24 
25 namespace CLHEP {
26  class HepRandomEngine;
27 }
28 
30 public:
32  ~BetafuncEvtVtxGenerator() override;
33 
34  void beginRun(const edm::Run&, const edm::EventSetup&) override;
35  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
36 
38  //virtual CLHEP::Hep3Vector * newVertex();
39  HepMC::FourVector newVertex(CLHEP::HepRandomEngine*) const override;
40 
41  TMatrixD const* GetInvLorentzBoost() const override;
42 
44  void sigmaZ(double s = 1.0);
45 
47  void X0(double m = 0) { fX0 = m; }
49  void Y0(double m = 0) { fY0 = m; }
51  void Z0(double m = 0) { fZ0 = m; }
52 
54  void betastar(double m = 0) { fbetastar = m; }
56  void emittance(double m = 0) { femittance = m; }
57 
59  double BetaFunction(double z, double z0) const;
60 
61 private:
66 
67  void setBoost(double alpha, double phi);
68 
69 private:
70  bool readDB_;
71 
72  double fX0, fY0, fZ0;
73  double fSigmaZ;
74  //double fdxdz, fdydz;
76  // double falpha;
77  double fTimeOffset;
78 
79  TMatrixD boost_;
80 
81  void update(const edm::EventSetup& iEventSetup);
83 };
84 
85 #endif
BetafuncEvtVtxGenerator::BetafuncEvtVtxGenerator
BetafuncEvtVtxGenerator(const edm::ParameterSet &p)
Definition: BetafuncEvtVtxGenerator.cc:36
BetafuncEvtVtxGenerator::X0
void X0(double m=0)
set mean in X in cm
Definition: BetafuncEvtVtxGenerator.h:47
BetafuncEvtVtxGenerator::~BetafuncEvtVtxGenerator
~BetafuncEvtVtxGenerator() override
Definition: BetafuncEvtVtxGenerator.cc:55
BetafuncEvtVtxGenerator
Definition: BetafuncEvtVtxGenerator.h:29
edm::ESWatcher< SimBeamSpotObjectsRcd >
BetafuncEvtVtxGenerator::emittance
void emittance(double m=0)
emittance (no the normalized)
Definition: BetafuncEvtVtxGenerator.h:56
BetafuncEvtVtxGenerator::fZ0
double fZ0
Definition: BetafuncEvtVtxGenerator.h:72
BetafuncEvtVtxGenerator::sigmaZ
void sigmaZ(double s=1.0)
set resolution in Z in cm
Definition: BetafuncEvtVtxGenerator.cc:138
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
zMuMuMuonUserData.alpha
alpha
zGenParticlesMatch = cms.InputTag(""),
Definition: zMuMuMuonUserData.py:9
BetafuncEvtVtxGenerator::fbetastar
double fbetastar
Definition: BetafuncEvtVtxGenerator.h:75
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
BetafuncEvtVtxGenerator::fTimeOffset
double fTimeOffset
Definition: BetafuncEvtVtxGenerator.h:77
BetafuncEvtVtxGenerator::operator=
BetafuncEvtVtxGenerator & operator=(const BetafuncEvtVtxGenerator &rhs)=delete
BetafuncEvtVtxGenerator::BetaFunction
double BetaFunction(double z, double z0) const
beta function
Definition: BetafuncEvtVtxGenerator.cc:101
BetafuncEvtVtxGenerator::fY0
double fY0
Definition: BetafuncEvtVtxGenerator.h:72
BetafuncEvtVtxGenerator::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: BetafuncEvtVtxGenerator.cc:60
alignCSCRings.s
s
Definition: alignCSCRings.py:92
BetafuncEvtVtxGenerator::fSigmaZ
double fSigmaZ
Definition: BetafuncEvtVtxGenerator.h:73
BetafuncEvtVtxGenerator::setBoost
void setBoost(double alpha, double phi)
Definition: BetafuncEvtVtxGenerator.cc:105
BetafuncEvtVtxGenerator::femittance
double femittance
Definition: BetafuncEvtVtxGenerator.h:75
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
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:79
BetafuncEvtVtxGenerator::parameterWatcher_
edm::ESWatcher< SimBeamSpotObjectsRcd > parameterWatcher_
Definition: BetafuncEvtVtxGenerator.h:82
BetafuncEvtVtxGenerator::Z0
void Z0(double m=0)
set mean in Z in cm
Definition: BetafuncEvtVtxGenerator.h:51
edm::ParameterSet
Definition: ParameterSet.h:36
SimBeamSpotObjectsRcd.h
BetafuncEvtVtxGenerator::GetInvLorentzBoost
TMatrixD const * GetInvLorentzBoost() const override
Definition: BetafuncEvtVtxGenerator.cc:147
BaseEvtVtxGenerator.h
BetafuncEvtVtxGenerator::Y0
void Y0(double m=0)
set mean in Y in cm
Definition: BetafuncEvtVtxGenerator.h:49
BetafuncEvtVtxGenerator::betastar
void betastar(double m=0)
set beta_star
Definition: BetafuncEvtVtxGenerator.h:54
edm::EventSetup
Definition: EventSetup.h:57
BetafuncEvtVtxGenerator::readDB_
bool readDB_
Definition: BetafuncEvtVtxGenerator.h:70
BetafuncEvtVtxGenerator::update
void update(const edm::EventSetup &iEventSetup)
Definition: BetafuncEvtVtxGenerator.cc:62
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:79
BetafuncEvtVtxGenerator::fX0
double fX0
Definition: BetafuncEvtVtxGenerator.h:72