170 likes | 330 Views
Generator Interface. Generator Interface in CMSSW. existing/planned interfaces with generators content of the event record AOB/Announcements. General purpose generators. There are 2 classical “general purpose” event generators for the LHC:
E N D
Generator Interface Generator Interface in CMSSW • existing/planned interfaces with generators • content of the event record • AOB/Announcements Filip Moortgat, ETHZ
General purpose generators There are 2 classical “general purpose” event generators for the LHC: PYTHIA direct interface exists HERWIG direct interface being implemented Filip Moortgat, ETHZ
What about C++ generators? Two FORTRAN generators are being rewritten in C++ : PYTHIA8 see Torbjorn’s talk next HERWIG++/ThePEG will present status later They are not yet fully ready for physics, but would be good to have them interfaced already for testing/validation. SHERPA indirect interface exists (through HepMC ascii file) Filip Moortgat, ETHZ
What about ME/NLO codes? I would like to start off with two prototype implementations of “complex generator chains”, e. g. : MC@NLO + HERWIG ALPGEN + PYTHIA (volunteer needed) Can we interface with the LCG MCDB for the intermediate files? We have to make sure the provenance is not lost! (biggest challenge) Several others should follow (CompHep, MadGraph, …) Filip Moortgat, ETHZ
Ntuple converter There exists a tool to convert CMKIN ntuples to CMSSW rootuples. It is meant: - for comparison and validation - for complex chains which are not yet supported Do not use it for e.g. new PYTHIA sample generation Filip Moortgat, ETHZ
Proposed new structure Proposed new structure of GeneratorInterface in CMSSW: GeneratorInterface / Pythia6Interface Herwig6Interface Pythia8Interface Herwig++Interface HydjetInterface TopRexInterface MC@NLOInterface ALPGENInterface MadGraphInterface CosmicMuonGenerator BeamHaloGenerator … more upon request Filip Moortgat, ETHZ
Proposed new structure (2) Plus: GeneratorInterface / ParticleGuns MCFileReader NtupleConverter • 1 (or 2) responsibles per package: • development + maintaining • wiki page with howto and examples • Volunteers please send me an email! Filip Moortgat, ETHZ
Wiki pages • Proposal : • one central “GeneratorInterface” page • which points to individual pages for every generator • (reflecting the repository structure) • maintained by the responsible of the particular • generator interface • containing examples of config cards Filip Moortgat, ETHZ
Recipe for the impatient user • Demo: to generate PYTHIA Min Bias events with CMSSW: • scramv1 project CMSSW CMSSW_0_6_0; • cd CMSSW_0_6_0/src; • cmscvsroot CMSSW; cvs login; (passwd: 98passwd) • cvs co -r CMSSW_0_6_0 IOMC; • cd IOMC/GeneratorInterface/test; • eval `scramv1 runtime -csh`; • cmsRun mcinput.cfg; (or any other cfg file) mcpool.root containing 20 min bias events Filip Moortgat, ETHZ
Example of config file Example “mcinput.cfg” : process TEST = { source = PythiaSource { untracked int32 maxEvents = 50 PSet PythiaParameters { vstring parameterSets = { "pythiaMB" } vstring pythiaMB = { 'MSEL=0 ! User defined processes', 'MSUB(11)=1 ! Min bias process', 'MSUB(12)=1 ! Min bias process', . . . } } module out = PoolOutputModule { untracked string fileName = "mcpool.root" } } Filip Moortgat, ETHZ
Analysis in Full Framework Mode One can access HepMC information in an EDAnalyzer or an EDFilter (see examples in IOMC/GeneratorInterface/) Handle<HepMCProduct> evt; iEvent.getByType(evt); HepMC::GenEvent * myGenEvent = new HepMC::GenEvent(*(evt>GetEvent())); // loop over all particles for ( HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p ) { // select only muons with a pt > 20 GeV if ( abs((*p)->pdg_id()) == 13 && (*p)->momentum().perp() > 20 ) {…} } Filip Moortgat, ETHZ
Analysis in FWLight Mode At the root prompt (macro): Thanks to Chris Jones! gSystem->Load("libPhysicsToolsFWLite"); AutoLibraryLoader::enable(); TFile f("mcpool.root"); Events.Draw("PythiaSource.getHepMCData().particles_size()"); TTree* events = (TTree*) (f.Get("Events")); TBranch* MCBranch = events->GetBranch("edmHepMCProduct_PythiaSource__TEST.obj"); edm::HepMCProduct prod; MCBranch->SetAddress(&prod); int nev = events->GetEntries(); for (int ev = 0; ev < nev ; ++ev){ MCBranch->GetEntry(ev); cout << "Number of particles for event " << ev << " = " << prod.getHepMCData().particles_size() << endl; Filip Moortgat, ETHZ
Analysis in FWLight Mode (2) . . . for ( HepMC::GenEvent::particle_const_iterator p = prod.getHepMCData().particles_begin(); p != prod.getHepMCData().particles_end(); ++p ) { cout << "Pt of the particle = " << (*p)->momentum().perp() << endl;} } for ( HepMC::GenEvent::vertex_const_iterator v = prod.getHepMCData().vertices_begin(); v != prod.getHepMCData().vertices_end(); ++v ) { cout << "Z position of the vertex = " << (*v)->position().z() << endl;} } } Filip Moortgat, ETHZ
Content of the event record • HepMC GenEvent content: • particles, vertices, scale, process ID, weights • random numbers? • add possibility to store cross-section per event? (e.g. PARI(1)) • (for sure we need to store it per sample!) • add possibility to add extra pdf information in GenEvent? • (x1, x2, …) • other information? Speak up now!! Filip Moortgat, ETHZ
Other issues • last Thursday’s GENSER meeting on • “Bug reporting for MC Generators” • during LHC data taking, many bug reports expected • CMS Policy for all generator problems/bugs: • use the CMS Generator Savannah page, • or send an email to cms-generator@cern.ch • if the bug is confirmed by the generator group, proceed with • bug report to the MC authors Filip Moortgat, ETHZ
Other issues (2) • Cosmic Muon Generator • (Philip Biallass, replacing Volker Drollinger): • MC muons do not match real data; new parametrization • to be released soon. • Particle Data Table: new version released soon Filip Moortgat, ETHZ
Announcements • Next week @ CERN: “Flavour in the era of the LHC” workshop • http://mlm.home.cern.ch/mlm/FlavLHC.html • Monday afternoon discussion on the SUSY Les Houches Accord • “Tools for SUSY/BSM” workshop in Annecy, June 26-28. • http://lappweb.in2p3.fr/TOOLS2006 Filip Moortgat, ETHZ