File indexing completed on 2024-04-06 12:19:02
0001
0002
0003
0004
0005
0006 #ifndef RandomXiThetaGunProducer_H
0007 #define RandomXiThetaGunProducer_H
0008
0009 #include "FWCore/Framework/interface/one/EDProducer.h"
0010
0011 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0012
0013 #include "HepPDT/ParticleDataTable.hh"
0014 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0015
0016 #include "CLHEP/Random/RandFlat.h"
0017 #include "CLHEP/Random/RandGauss.h"
0018
0019 namespace CLHEP {
0020 class HepRandomEngine;
0021 }
0022 namespace edm {
0023
0024 class RandomXiThetaGunProducer : public one::EDProducer<> {
0025 public:
0026 RandomXiThetaGunProducer(const ParameterSet&);
0027 ~RandomXiThetaGunProducer() override = default;
0028
0029 private:
0030 void produce(Event&, const EventSetup&) override;
0031 void generateParticle(double z_sign, double mass, unsigned int barcode, HepMC::GenVertex* vtx) const;
0032
0033 edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> tableToken_;
0034
0035 unsigned int verbosity_;
0036 unsigned int particleId_;
0037
0038 double energy_;
0039 double xi_min_, xi_max_;
0040 double theta_x_mean_, theta_x_sigma_;
0041 double theta_y_mean_, theta_y_sigma_;
0042
0043 unsigned int nParticlesSector45_;
0044 unsigned int nParticlesSector56_;
0045
0046 CLHEP::HepRandomEngine* engine_;
0047 };
0048
0049 }
0050
0051 #endif