NWU NTuple Maker

Following recipe from:

  • Mounting the workspace:

cmsrel CMSSW_5_3_8
cd CMSSW_5_3_8/src
cvs co -d NWU/ntupleProducer -r B12-11 UserCode/NWU/ntupleProducer
addpkg CommonTools/ParticleFlow   V00-03-16
addpkg RecoParticleFlow/PFProducer V15-01-11 
addpkg DataFormats/METReco V03-03-11-01 
addpkg JetMETCorrections/Type1MET V04-06-09-02
addpkg CommonTools/RecoUtils V00-01-04
addpkg DataFormats/ParticleFlowCandidate V15-03-04-01
addpkg DataFormats/TrackReco V10-02-02-01
addpkg DataFormats/VertexReco V02-00-04-01
addpkg PhysicsTools/PatAlgos V08-09-52  
cvs up -r V08-09-07-05 PhysicsTools/PatAlgos/python/patTemplate_cfg.py   
addpkg PhysicsTools/PatUtils V03-09-28
addpkg DataFormats/StdDictionaries V00-02-14
addpkg FWCore/GuiBrowsers V00-00-70
addpkg RecoMET/METProducers V03-03-12-02
addpkg DataFormats/PatCandidates V06-05-06-07
cvs co -r V00-00-13 RecoMET/METFilters
cvs co -r V00-00-08 RecoMET/METAnalyzers
cvs co -r V00-03-23 CommonTools/RecoAlgos
cvs co -r V01-00-11-01 DPGAnalysis/Skims
cvs co -r V00-11-17 DPGAnalysis/SiStripTools
cvs co -r V00-00-08 DataFormats/TrackerCommon
cvs co -r V01-09-05 RecoLocalTracker/SubCollectionProducers
cvs co -r V00-00-30-02 -d EGamma/EGammaAnalysisTools UserCode/EGamma/EGammaAnalysisTools
cvs up -r 1.13 EGamma/EGammaAnalysisTools/interface/PFIsolationEstimator.h
cvs up -r 1.20 EGamma/EGammaAnalysisTools/src/PFIsolationEstimator.cc
cvs co -r HCP2012_V05 EgammaAnalysis/ElectronTools
cvs co -r V09-00-01 RecoEgamma/EgammaTools

If no track MET information is needed, then do

scramv1 b -j 9

Adding Track MET

If you need track MET, proceed with:

cvs co -r 1.2 RecoMET/METProducers/src/ParticleFlowForChargedMETProducer.cc
cvs co -r 1.1 RecoMET/METProducers/src/TrackMETProducer.cc
cvs co -r 1.2 RecoMET/METProducers/interface/ParticleFlowForChargedMETProducer.h
cvs co -r 1.1 RecoMET/METProducers/interface/TrackMETProducer.h
cvs up -r 1.17 RecoMET/METProducers/src/SealModule.cc
cvs co -r 1.1 RecoMET/METProducers/python/TrackMET_cfi.py
cvs co -r 1.2 RecoMET/METProducers/python/pfChargedMET_cfi.py

Now, you need to update some of the files in the ntuplemaker environment in order to obtain the Track MET information.

  • In file NWU/ntupleProducer/test/ntupleProducer_cfg.py:
    • Add to the list of processes being loaded:
    • Add to the list of input tags:
      TrckMETTag = cms.untracked.InputTag('trackMET'),
      saveTrackMET = cms.untracked.bool(True),

  • In file NWU/ntupleProducer/src/ntupleProducer.cc
    • Add to ntupleProducer::ntupleProducer(...)
      trackmetTag_      = iConfig.getUntrackedParameter<edm::InputTag>("TrackMETTag");
      saveTrackMET_     = iConfig.getUntrackedParameter<bool>("saveTrackMET");
    • Add to ntupleProducer::analyze(...)
      // Get TrackMET // 
      if (saveTrackMET_) {
          Handle<METCollection> trkMET;
          iEvent.getByLabel(trackmetTag_, trkMET);
          METCollection::const_iterator trkmet = trkMET->begin();
         if (trkMET->begin() != trkMET->end()) {
              track_MET->SetMagPhi(trkmet->et(), trkmet->phi());

  • In file NWU/ntupleProducer/interface/ntupleProducer.h
    • Add to the includes
      #include "RecoMET/METProducers/interface/TrackMETProducer.h"
      #include "RecoMET/METProducers/interface/ParticleFlowForChargedMETProducer.h"
    • Add to the private variables of the ntupleProducer class
      edm::InputTag trackmetTag_;
      bool saveTrackMET_;
      TCMET* track_MET;

Then, finally,

scramv1 b -j 9
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2013-06-11 - RafaelTeixeiraDeLima
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox 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