File indexing completed on 2024-04-06 12:13:23
0001 #ifndef BeamHalo_Producer_h
0002 #define BeamHalo_Producer_h
0003
0004 #include <map>
0005 #include <string>
0006
0007 #include "HepMC/GenEvent.h"
0008
0009 #include "CLHEP/Random/RandFlat.h"
0010
0011 #include "FWCore/Framework/interface/one/EDProducer.h"
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/Framework/interface/LuminosityBlock.h"
0014 #include "FWCore/Framework/interface/Run.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016
0017 namespace CLHEP {
0018 class HepRandomEngine;
0019 }
0020
0021 namespace edm {
0022 class BeamHaloProducer : public one::EDProducer<EndRunProducer, one::WatchLuminosityBlocks, one::SharedResources> {
0023 public:
0024
0025 BeamHaloProducer(const ParameterSet&);
0026
0027 ~BeamHaloProducer() override;
0028
0029 void setRandomEngine(CLHEP::HepRandomEngine* v);
0030
0031 private:
0032 bool call_ki_bhg_init(long& seed);
0033 bool call_bh_set_parameters(int* ival, float* fval, const std::string cval_string);
0034 bool call_ki_bhg_fill(int& iret, float& weight);
0035 bool call_ki_bhg_stat(int& iret);
0036
0037 private:
0038 void produce(Event& e, const EventSetup& es) override;
0039 void endRunProduce(Run& r, const EventSetup& es) override;
0040 void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override;
0041 void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override {}
0042
0043 void clear();
0044
0045 HepMC::GenEvent* evt;
0046
0047 int GENMOD_;
0048 int LHC_B1_;
0049 int LHC_B2_;
0050 int IW_MUO_;
0051 int IW_HAD_;
0052 float EG_MIN_;
0053 float EG_MAX_;
0054 std::string G3FNAME_;
0055
0056 bool isInitialized_;
0057 };
0058
0059 }
0060
0061 #endif