Create Python File for RAW

The first thing you need to do is create a python file. There is information on this at the CMSSW workbook section 6.2. The way that I created my python file is by using the program cmsDriver.py.

cmsDriver.py Configuration/Generator/python/H200ZZ4L_Tauola_7TeV_cfi.py -s GEN,SIM,DIGI,L1,DIGI2RAW,HLT --conditions FrontierConditions_GlobalTag,auto:startup --datatier GEN-SIM-RAW --eventcontent RAWSIM -n 1 --no_exec

Now you need to edit this file to make it correct it from 4 leptons to two leptons and two neutrinos. First change the corresponding lines in the code to look like the following.

'MDME(182,1)=1           !Z decay into e- e+', 
'MDME(183,1)=1           !Z decay into nu_e nu_ebar', 
'MDME(184,1)=1           !Z decay into mu- mu+', 
'MDME(185,1)=1           !Z decay into nu_mu nu_mubar', 
'MDME(186,1)=1           !Z decay into tau- tau+', 
'MDME(187,1)=1           !Z decay into nu_tau nu_taubar', 

Then you need to add the filters to only get the events with two leptons and two neutrinos.

process.leptonfilter = cms.EDFilter("MCParticlePairFilter",
    Status = cms.untracked.vint32(3, 3),
    ParticleID1 = cms.untracked.vint32(11, -11, 13, -13, 15, -15),
    ParticleID2 = cms.untracked.vint32(11, -11, 13, -13, 15, -15)
)
process.neutrinofilter = cms.EDFilter("MCParticlePairFilter",
    Status = cms.untracked.vint32(3, 3),
    ParticleID1 = cms.untracked.vint32(12, -12, 14, -14, 16, -16),
    ParticleID2 = cms.untracked.vint32(12, -12, 14, -14, 16, -16)
)
process.ProductionFilterSequence = cms.Sequence(process.generator*process.leptonfilter*process.neutrinofilter)

Then you need add after the line

for path in process.paths: 
getattr(process,path)._seq = process.ProductionFilterSequence*getattr(process,path)._seq

Attached at the bottom of this page is the python file described here.

Aditional Info for RAW

The page that has the different global tags is located here at Global Tages for MonteCarlo Production. I chose to use startup37 because it was not an ideal detector so it should give a better feel for the MET.

Also the infomation on the numbers to use for the particles can be found in the Particle Data Book or in this document.

I have also found that this combo of filters is leaving 44.3% of the events generated (it is cutting 4 lepton and 4 neutrino events).

I have here a c++ program that calculates ideally what you would expect the filter to give with Z to neutrinos being twice as likely as Z to leptons.

#include <ctime>    // For time()
#include <cstdlib>  // For srand() and rand()
#include <iostream>

using namespace std;

int main() {
  int first, second;
  int first_n, second_n;
  int count=0;
  int i=0;
  srand(time(0));  // Initialize random number generator.
  for (;i<100000000;i++ ){
    first = (rand() % 3) + 1;
    second = (rand() % 3) + 1;
    if((first == 1 && second > 1)||(first > 1 && second == 1)){
      count++;
    }
  }
  cout << "All finished with " << count << " passing out of " << i << " or " << (double(count)/double(i))*100.0 << " percent." << endl;
  
}
When I ran it I get 44.4398 percent so it looks like we are good!

Side note: Added to this the leptons we get that we keep 55.5563 percent. Of H to ZZ to leptons or neutrinos only keeping leptons gives 11.1072 percent. So 2L2NU is four times as likely as 4L!

Create Python File for RECO

For the Reco part I again used cmsDriver.py
cmsDriver.py reco -s RAW2DIGI,RECO --filein anInputRawFile.root --fileout H200ZZ2L2NU_Tauola_7TeV_RAW2DIGI_RECO_START37.root --conditions FrontierConditions_GlobalTag,START37_V5::All --no_exec
This one doesn't need anything fancy. Crab overwrites your filein so you really don't need that I think, but I left it in there since it shouldn't hurt.

Resources

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt H2002L2NU_Tauloa_7TeV_Gen_SIM_DIGI_L1_DIGI2RAW_HLT_START37.py.txt r1 manage 9.2 K 2010-06-29 - 14:57 MatthewKress This is the python file to generate the 2L2NU MonteCarlo files.
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2010-06-29 - MatthewKress
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback