16 #include "CLHEP/Random/RandomEngine.h"
17 #include "CLHEP/Random/RandFlat.h"
37 #include "HepMC/IO_HEPEVT.h"
39 #define pylist pylist_
61 #define pypars pypars_
76 pythiaPylistVerbosity_ (pset.getUntrackedParameter<int>(
"pythiaPylistVerbosity",0)),
77 pythiaHepMCVerbosity_ (pset.getUntrackedParameter<bool>(
"pythiaHepMCVerbosity",
false)),
78 maxEventsToPrint_ (pset.getUntrackedParameter<int>(
"maxEventsToPrint",1)),
79 comEnergy_(pset.getParameter<double>(
"comEnergy")),
80 extCrossSect_(pset.getUntrackedParameter<double>(
"crossSection", -1.)),
81 extFilterEff_(pset.getUntrackedParameter<double>(
"filterEfficiency", -1.)),
84 std::ostringstream header_str;
86 header_str <<
"ExhumeProducer: initializing Exhume/Pythia.\n";
103 string processType = process_pset.
getParameter<
string>(
"ProcessType");
104 if(processType ==
"Higgs"){
106 int higgsDecay = process_pset.
getParameter<
int>(
"HiggsDecay");
108 sigID_ = 100 + higgsDecay;
109 }
else if(processType ==
"QQ"){
111 int quarkType = process_pset.
getParameter<
int>(
"QuarkType");
112 double thetaMin = process_pset.
getParameter<
double>(
"ThetaMin");
114 ((
Exhume::QQ*)exhumeProcess_)->SetThetaMin(thetaMin);
116 }
else if(processType ==
"GG"){
118 double thetaMin = process_pset.
getParameter<
double>(
"ThetaMin");
134 double massRangeLow = process_pset.
getParameter<
double>(
"MassRangeLow");
135 double massRangeHigh = process_pset.
getParameter<
double>(
"MassRangeHigh");
142 produces<HepMCProduct>();
143 produces<GenEventInfoProduct>();
144 produces<GenRunInfoProduct, edm::InRun>();
146 header_str <<
"ExhumeProducer: starting event generation ...\n";
153 std::ostringstream footer_str;
154 footer_str <<
"ExhumeProducer: event generation done.\n";
167 std::ostringstream footer_str;
173 footer_str <<
"\n" <<
" You have just been ExHuMEd." <<
"\n" <<
"\n";
174 footer_str <<
" The cross section for process " << name
175 <<
" is " << cs <<
" fb" <<
"\n" <<
"\n";
176 footer_str <<
" The efficiency of event generation was " << eff <<
"%" <<
"\n" <<
"\n";
181 genRunInfoProd->setInternalXSec(cs);
184 genRunInfoProd->setExternalXSecNLO(-1.);
186 run.
put(genRunInfoProd);
191 auto_ptr<HepMCProduct> bare_product(
new HepMCProduct());
192 edm::LogInfo(
"") <<
"ExhumeProducer: Generating event ...\n";
197 HepMC::GenEvent*
genEvt =
conv.read_next_event();
198 genEvt->set_signal_process_id(
sigID_);
199 genEvt->set_event_scale(
pypars.pari[16]);
219 <<
"----------------------" <<
"\n";
224 if(genEvt) bare_product->addHepMCData(genEvt);
225 event.put(bare_product);
228 event.put(genEventInfo);
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
static unsigned long long const kNanoSecPerSec
void call_pylist(int mode)
auto_ptr< ClusterSequence > cs
double CrossSectionCalculation()
bool pythiaHepMCVerbosity_
HepMC verbosity flag.
CLHEP::HepRandomEngine * randomEngine
static HepMC::IO_HEPEVT conv
virtual void produce(edm::Event &e, const EventSetup &es)
Interface to the PYGIVE pythia routine, with add'l protections.
DEFINE_FWK_MODULE(HiMixingModule)
unsigned int pythiaPylistVerbosity_
Pythia PYLIST Verbosity flag.
Exhume::CrossSection * exhumeProcess_
CLHEP::HepRandomEngine * fRandomEngine
CLHEP::RandFlat * fRandomGenerator
Exhume::Event * exhumeEvent_
void SetMassRange(const double &Min_, const double &Max_)
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
virtual ~ExhumeProducer()
Destructor.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
unsigned int eventNumber_
static unsigned long long const kAveEventPerSec
void put(std::auto_ptr< PROD > product)
Put a new product.
unsigned int maxEventsToPrint_
Events to print if verbosity.
ExhumeProducer(const ParameterSet &)
Constructor.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")