Software for WMuNu Analysis


This page collects recipes to run the basic software of the WMuNu analysis. The different modules used in the analysis are contained in the packages:

  • AnalysisDataFormats/EWK - Definition of the class WMuNuCandidate
  • ElectroWeakAnalysis/WMuNu - Basic modules for histogram plotting

Code and tags

To obtain the latest version of the code do:

cvs co -r V00-01-01 AnalysisDataFormats/EWK  
cvs co -r V00-10-00 ElectroWeakAnalysis/WMuNu
scramv1 b
cd ElectroWeakAnalysis/WMuNu/test

Tested for the 3_X_X series (up to 3_5_6)

Note: For running the examples, it is not neccesary to check-out AnalysisDataFormats/EWK since the latest change is already included in the release for >3_3X.


WMuNuCandidate defines a class with an specific W object which include references to its daughters (muon & MET), based on a Composite Candidate with added functions for acoplanarity and transverse mass. Inherits from CompositeCandidate "DataFormats/Candidate/interface/CompositeCandidate.h".

To create a WMuNuCandidate:

      #include "AnalysisDataFormats/EWK/interface/WMuNuCandidate.h"
      edm::Ptr<reco::MET> met(metCollection,0);
      edm::Ptr<reco::Muon> muon(muonCollection,indx);
      WMuNuCandidate* WCand = new WMuNuCandidate(muon,met);

To use a WMuNuCandidate from an already created collection:

      Handle<reco::WMuNuCandidateCollection> WMuNuCollection;
      const WMuNuCandidate& WMuNu = WMuNuCollection->at(0);
      const reco::Muon & mu = WMuNu.getMuon(); // gets the muon with all its properties
      const reco::MET  & met =WMuNu.getNeutrino(); // gets the neutrino with all its properties

      double Charge=WMuNu.charge(); // all standard Candidate utilities can be used (only be careful with z component)
      double acop = WMuNu.acop(); // special function for the acoplanarity between muon and met

      // pz is not defined for the neutrino (yet): be careful when using standard candidate functions.
      // Special functions for transverse components as used in the WMuNu analysis have been added:

      double massT = WMuNu.massT(); // Transverse Mass
      double w_et = WMuNu.eT();     // Transverse energy

      // Plans to include an estimate of the neutrino pz in the future

Analysis based on WMuNuCandidates

In the ElectroWeakAnalysis/WMuNu there is a set of modules intended for the WMuNu analysis using WMuNu candidates.

  • "ElectroWeakAnalysis/WMuNu/src/"

Creates a collection of WMuNu candidates to be added to the event.

For each global muon in the event, a WMuNuCandidate is created & stored in a new collection. The met kind used to create the Candidates can be chosen through the configuration file (metTag_).

WMuNu Candidates are then ordered by pt. The candidate to be used for the inclusive analysis will be the first one in the collection.

  • "ElectroWeakAnalysis/WMuNu/src/"

Selector program based on WMuNu candidates, which optionally creates some basic 1D plots for analysis (through the plotHistograms_ option in the cfg file: False: Selector (no output); True: Basic analysis program ).

It also produces at request a ntuple with the basic analysis variables (after preselection: trigger, z veto, jet veto if applied).

The cut variables are plotted sequentially - the last of the cuts to be applied (and therefore the final analysis plot) are the Transverse Mass of the WMuNu or selected MET in the event.

  • "ElectroWeakAnalysis/WMuNu/python" --> cffs with standard paths for analysis

For a producer of 3 WMuNuCandidate collections for the 3 met definitions, include in your cfg:

process.path = cms.Path(process.allWMuNus)

For basic histogram analysis modules, include in your cfg:

process.path = cms.Path(process.selcorMet)

See the cff for the current defaults.

To adapt the selection proccess to your analysis needs you just need to modify the module accordingly in your cfg (eg: to change from track-only to combined isolation do process.selcorMet.IsCombinedIso=cms.untracked.bool(False) )

  • Configuration file examples in the test directory
--> From RECO/AOD, adds WMuNuCandidate collections to the event (intended to save the AOD with the new collections)

--> From RECO/AOD, adds WMuNuCandidate collections to the event & does standard selection --> creates basic plots

--> From RECO/AOD, creates WMuNu Collections on the fly and does standard selection (using CaloMET) --> no plots created

Note: From Summer09 to now, some changes of collections names have been made. Please take care that the default jet collection (antikt in Summer09, ak afterwards) is correct in your cfg... Else, you will get a warning.


Independent program which does not use the candidate collections, just standard RECO/AOD objects

- WMuNu standard selection run over the new samples for validation. It can run on any sample with NMuons>=1, even with low luminosities --> prototype to use for data

- Programs ready to compare:

  • All selection variables before any cut is applied
  • Each variable after all other cuts have been applied (N-1 cuts plots)

- Useful both for Validation & for Cut optimization

  • ElectroWeakAnalysis/src/
    --> histograms before cuts and after (N-1) cuts
  • ElectroWeakAnalysis/bin/WMuNuValidatorMacro.C
    --> macro to make comparison plots
  • ElectroWeakAnalysis/test/
    -->example configuration file

In order to run the validation program:

cd ElectroWeakAnalysis/WMuNu/test
cmsRun   (--> over sample to validate with file_to_validate.root as output)
cmsRun   (--> over reference sample   with reference_file.root as output)
WMuNuValidatorMacro file_to_validate.root reference_file.root corMet -n


- The Validator has to be run twice (one over the reference sample, one over the sample to validate)

- The TDirectory to validate can be defined at runtime (default options in the configuration file are corMet, pfMet, tcMet. For different options just edit the

- Runtime options of the macro: linear (-l) / logarithmic (default) ; normalized histograms(-n) / not normalized (default) ; run in batch (-b)

Output examples: Validation of Summer09 Samples

Code ported to DQM/Physics (plots already there in the GUI for the new RelVals).

Output Examples

This code was used for the EWKWMN October Exercise.

Example of plots and efficiencies for signal and background can be seen in the webpage for EWKWMN.

How to run the analyzer on the grid

crabWMuNuValidation.cfg is an example of how to run on the grid. For more details on crab, WorkBookRunningGrid

How to run the analyzer with real data

The same set of programs have been used (unchanged) for the first studies with data in the WMuNu channel.


EWKMuon Webpage


Please mail any comments, critics, requests to

Responsible: Maria Cepeda

-- JonathanEfron - 20 Jul 2009

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r10 - 2010-10-19 - MariaCepeda
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

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