Efficiency Studies for CMS-AN-2012/033 (Work In Progress)

This page is a log-record for our efficiency studies. Most of the stuff reported here follows the TagAndProbe main page and also documentation page for TagProbeFitTreeProducer . The aim is to obtain data driven efficiency of electron (muon) reco/selection. For electrons the overall reco+selection efficiency has been factorized as follows:
  • SuperClusterToPfElectron SC->PFlow (ID)
    • tpPairs = tagSC
    • allProbes = goodSuperClustersClean (defined above)
    • probe_passing = EleMatchedSuperClusterCands (SC candidates having match with PFlow Electrons passing basic pt, eta and PF2PAT EleId.)
  • PfToId
    • tpPairs = tagPtEta
    • allProbes = patElecPtEta
    • probe_passing = patElecPtEtaLvdp2012Id
  • IdToIso
    • tpPairs = tagPtEtaId
    • allProbes = patElecPtEtaLvdp2012Id
    • probe_passing = patElecLvdp2012
  • WP80ToHLTEle17 (misleading nomenclature: will be changed)
    • tpPairs = tagPtEtaIdIso
    • allProbes = patElecLvdp2012
    • probe_passing = patElecPassingEle17Hlt
  • WP80ToHLTEle8NotEle17
    • tpPairs = tagPtEtaIdIso
    • allProbes = patElecLvdp2012
    • probe_passing = patElecPassingEle8NotEle17Hlt (having Ele8 trigger match but not Ele17)

  • Authors: Lovedeep Kaur Saini(Punjab), Anil Singh (NCU), S. S. Yu (NCU), S. B. Beri (Panjab)

Scale Factors Vs MC Scale Factors.

The scale factors are to be evaluated using the tnp efficiencies in data and mc. They are then used to sclae the MC truth efficiencies. The utility of the procedure is obvious for the analyses where the signal is topologically different from the Z->ee, used to measure the efficiency. But the utility in this case appears little dubious to me.

Preparing For Muon Selection Efficiency.

Measuring everything with respect to tracks. A look at analysis main configuration is helpful:(here).

Analysis of the 80 GeV "bump" in failing probe distributions.

The problem is with the weird lineshape for the tp invariant mass in the case where the probe fails to pass electron Id and CRej cuts. Many hypotheses can be put forward and we try to test them one by one.

  • FSR Effect :
    • Testing strategy: Select events where one reco electron passes all the selection criteria to qualify as a tag. Let the other electron pass the denominator probe requirements. Henceforth divide the events into two categories: probePass(A) and probeFail (B). Again divide B into bins of probe pt B1, B2, B3 and B4 : compare IM shape for each bin with (a) di-genEle-InvariantMass (b) collect nearby final state photons into genEle and recalculate the invariant mass.

TagAndProbe roundtable: Illya's questionnaire

  • Which electron triggers are used for tag and probe in 2011?
  • How are trigger prescales for tag and probe triggers accounted for?
  • Do we introduce special treatment of double L1-seeded signal triggers?
  • What is the set of variables in which we bin the probes?
  • What is the binning?
  • The exact selection for the tag.
  • The set of control plots (such as dependence on tag selection).
  • MC treatment: matching to generator level?
  • MC treatment: if no binning in PU, how difference in PU data-MC is taken care of.
  • Tag-probe pairs: opposite sign required?
  • Which efficiencies are computed from counting and which from fits?
  • The fit
    • fit limits
    • binned or unbinned
    • simultaneous pass+fail or separate
    • the exact definition of signal PDF
    • the exact definition of background PDF
    • what comes out of the fit: efficiencies or Npass/fail?

Efficiency in data taking time-bins(Calculations on 11th March)

Efficiency in data taking time-bins(Calculations on 11th March (11th March))

Plan: Submit two sets of TnP tree production jobs
  • Trees based on straight GsfElectrons primarily for luminosity bussiness. Separate jobs submitted for following time bins:
    • Run2011A-May10ReReco-v1
      • Step: Sc->Gsf FitCanvasesForMay10
        SC->Gsf (DATA FIT)
        pT [GeV] BARREL ENDCAP
        20<pT<30 0.95 0.92
        30<pT<40 0.97 0.94
        40<pT<50 0.98 0.95
        50<pT<60 0.98 0.96
        60<pT<120 0.98 0.96
    • Run2011A-PromptReco-v4
      • Step: Sc->Gsf FitCanvasesForPromptRecoV4
        SC->Gsf (DATA FIT)
        pT [GeV] BARREL ENDCAP
        20<pT<30 0.96 0.93
        30<pT<40 0.97 0.94
        40<pT<50 0.98 0.95
        50<pT<60 0.98 0.96
        60<pT<120 0.99 0.97
    • Run2011A-05Aug2011-v1
      • Step: Sc->Gsf FitCanvasesForAug05
        SC->Gsf (DATA FIT)
        pT [GeV] BARREL ENDCAP
        20<pT<30 0.96 0.94
        30<pT<40 0.97 0.93
        40<pT<50 0.98 0.95
        50<pT<60 0.98 0.95
        60<pT<120 0.99 0.98
    • Run2011A-PromptReco-v6
      • Step: Sc->Gsf FitCanvasesForPromptV6
        SC->Gsf (DATA FIT)
        pT [GeV] BARREL ENDCAP
        20<pT<30 0.96 0.93
        30<pT<40 0.97 0.94
        40<pT<50 0.98 0.95
        50<pT<60 0.98 0.95
        60<pT<120 0.99 0.97
    • Run2011B-PromptReco-v1

  • Tress based on PF2PAT-ified Electrons for the analysis. For use in the analysis, we factorize the efficiency as follows:
    • ScToPFlow
    • PFlowToWP
    • WPToTrig

Why did we not club the first two steps into a single one ?
well because, the purity of sample selected using a SC probe is poorer than the one selected using an GsfElectron probe.

Efficiency (Calculations on 10th March)

Here are the numbers from the MC based calculations using the counting method. Below is the efficiency with which an "Iso" probe fires the Ele17 leg of the dielectron trigger:
SC->Gsf
pT [GeV] BARREL ENDCAP
20<pT<30 0.93 0.91
30<pT<40 0.97 0.94
40<pT<50 0.98 0.95
50<pT<60 0.98 0.96
60<pT<120 0.98 0.97
Gsf->Id
pT [GeV] BARREL ENDCAP
20<pT<30 0.79 0.61
30<pT<40 0.87 0.74
40<pT<57 0.91 0.81
50<pT<60 0.92 0.84
60<pT<120 0.93 0.88
Id->CR
pT [GeV] BARREL ENDCAP
20<pT<30 0.98 0.95
30<pT<40 0.98 0.94
40<pT<57 0.98 0.94
50<pT<60 0.97 0.93
60<pT<120 0.97 0.92
CR->Iso
pT [GeV] BARREL ENDCAP
20<pT<30 0.64 0.64
30<pT<40 0.82 0.76
40<pT<57 0.91 0.84
50<pT<60 0.95 0.88
60<pT<120 0.97 0.92
Iso->Ele17
pT [GeV] BARREL ENDCAP
20<pT<30 0.997 0.989
30<pT<40 0.998 0.990
40<pT<50 0.998 0.991
50<pT<60 0.998 0.991
60<pT<120 0.998 0.991

Efficiency (Calculations on 8th March)

Begin with an observation: Always use collection of references as allProbes and passing_probes. So here is my recipe for a working configuration:

eleCollection = cms.EDProducer(
 'MyCustomElectronSelector',
  patElectrons_ = cms.InputTag("patElectronsPFlow"),
  cuts = +myTightSelection+
)
eleRefCollection = cms.EDProducer(
    'MyCustomElectronRefSelector',
    patElectrons_ = cms.InputTag("patElectronsPFlow"),
    cuts = +myBasicProbeSelection+
)
passEleRefCollection = cms.EDProducer(
    'MyCustomElectronRefSelector',
    patElectrons_ = cms.InputTag("patElectronsPFlow"),
    cuts = +myPassProbeSelection+
)
tpPair = cms.EDProducer(
    "CandViewShallowCloneCombiner",
    decay = cms.string("eleCollection eleRefCollection"),
    checkCharge = cms.bool(False),
    cut   = cms.string("60 < mass < 120")
)
tpTree  = cms.EDAnalyzer(
    "TagProbeFitTreeProducer",
    mcTruthCommonStuff, CommonStuffForGsfElectronProbe,
    tagProbePairs = cms.InputTag("tpPair"),
    arbitration   = cms.string("Random2"),
    flags = cms.PSet(
        probe_passing = cms.InputTag("passEleRefCollection")
         ),
    probeMatches  = cms.InputTag("McMatchPtExa"),
    allProbes     = cms.InputTag("eleRefCollection")
    )
process.p = cms.Path(
     process.eleCollection
    +process.eleRefCollection
    +process.passEleRefCollection
    +process.tpPair
    +process.tpTree
    )
Another constant problem for me is the job submission at condor. Here is one successful command:
farmoutAnalysisJobs --save-failed-datafiles --input-files-per-job=1 --input-dbs-path=/DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START44_V9B-v1/AODSIM  newElePF2PAT_DYJets_Mar2 ~/exercise06/CMSSW_4_4_2/ ~/exercise06/CMSSW_4_4_2/src/PhysicsTools/PatAlgos/test/newPF2PAT.py

Efficiency (Calculations on 5th March)

Here is the revision of these tables. Sample: Fall11 DY (Madgraph) MC (no skim), Method Used: Counting
SC->PFlow
pT [GeV] BARREL ENDCAP
20<pT<30 0.89 0.75
30<pT<40 0.96 0.82
40<pT<50 0.97 0.85
50<pT<60 0.98 0.86
60<pT<120 0.98 0.86
SC->Gsf
pT [GeV] BARREL ENDCAP
20<pT<30 0.92 0.91
30<pT<40 0.97 0.95
40<pT<57 0.98 0.96
50<pT<60 0.98 0.96
60<pT<120 0.98 0.97
This time we have enough statistics and most of the jobs were successful so numbers are more reliable.
  • Discussion
    • The SC->PFlow efficiency numbers are practically same as yesterday. This removes the fear that skim may be biased.
    • The SC->Gsf efficiency seems like improved a lot compared to 2010 data. This talk shows Effi(Sc->Gsf) to be about 92-93 % in ECAL barrel and about 84-84 % in ECAL endcap.
    • A look at both these tables reassure that most of the in-efficiency seen for SC->PFlow step comes from PF-Identification.
The table below shows the numbers for Gsf->PFlow step:
Gsf->PFlow
pT [GeV] BARREL ENDCAP
20<pT<30 0.95 0.78
30<pT<40 0.98 0.84
40<pT<50 0.99 0.87
50<pT<60 0.99 0.88
60<pT<120 0.99 0.88
The column by column multiplication of Sc->Gsf and Gsf->PFlow tables give numbers consistent with Sc->PFlow table, more so in barrel region. Small discrepancies observed in endcap might probably be due to the smaller statistics in doing Gsf->PFlow step. A look at this [[][note]] indicates that our numbers are consistent with them. Now the next step is to evaluate the efficiencies for the other steps i.e PFlow->Iso, Iso->Trig. Table (PFlow->Iso, Iso->Trig) from a limited number of successful jobs was reported yesterday and jobs are running again to obtain better calculation.

Now a special question: To what level are the efficiency of a step can be correlated to tag quality ? PileUp is factor that may induce correlations between Tag and Probe legs especially for isolation calculation. We plan following activity:

  • Create Following Tag Collections:
    • optTag: Ele32Match + WPLvdp2011
    • looseTag: Ele32Match + WP95
    • tightTag: Ele32Match + WP75
    • hyperTightTag: Ele32Match + WP70
    • crazyTightTag: Ele32Match + WP60
Study the efficiency of ID->ISO step, using these tag selections and look for the dependence on tag quality.

Efficiency (Calculations on 4th March)

Sample: Private Skim on Fall11 DY (Madgraph) MC, Method Used: Counting, nearly 50% jobs failed.
SC->PFlow
pT [GeV] BARREL ENDCAP
20<pT<30 0.88 0.77
30<pT<40 0.95 0.81
40<pT<50 0.97 0.84
50<pT<60 0.96 0.87
60<pT<120 0.98 0.85
PFlow->ID
pT [GeV] BARREL ENDCAP
20<pT<30 0.81 0.60
30<pT<40 0.89 0.77
40<pT<50 0.91 0.81
50<pT<60 0.95 0.85
60<pT<120 0.88 0.75
ID->ISO
pT [GeV] BARREL ENDCAP
20<pT<30 0.78 0.65
30<pT<40 0.95 0.88
40<pT<57 0.97 0.96
50<pT<60 0.99 0.97
60<pT<120 1 1

  • Discussion
    • The numbers are smaller than what one usually sees.
    • The SC->PFlow includes PF-Id, that may be one reason for low values in sc->pflow step.
    • The PFlow->ID includes both the analysis-ID and conversion rejection, may want to factorize.
    • The ID->ISO too may be affected because of high pileup. Need to compare PU Corrected Vs Uncorrected deposits.
Now we factorize SC->PFlow into two steps:

A preliminary test with very small number of MC events (~10000 DY (ee+mm) events) gives some numbers in the table below. The table on right side shows SC to PFlow step and should have been identical to table on extreme left above.

SC->PFlow
pT [GeV] BARREL ENDCAP
20<pT<30 0.89 0.70
30<pT<40 0.96 0.82
40<pT<50 0.97 0.81
50<pT<60 0.97 0.82
60<pT<120 0.96 0.87
SC->Gsf
pT [GeV] BARREL ENDCAP
20<pT<30 0.94 0.95
30<pT<40 0.97 0.92
40<pT<50 0.98 0.96
50<pT<60 0.97 0.92
60<pT<120 0.96 0.87
Gsf->PFlow
pT [GeV] BARREL ENDCAP
20<pT<30 0.93 0.68
30<pT<40 0.98 0.81
40<pT<50 0.98 0.84
50<pT<60 1.00 0.89
60<pT<120 1.00 1.00
Note that the efficiency =1 in some bins. This is mainly due to very low statistics.

Talks and References

Organisation of Configuration Setup

We have organized the configurable information into a setup consisting of sequential modules.

Definition of common variables

The first module is the tnpCommonVars_cfi, it contain definitions for basic cuts on =SuperCluster='s, =Electron='s and =Jet='s. We also define here the parameter sets for the trigger matching which has to come downstream. The file can be seen here.

Definition of SuperCluster Sequence

The supercluster selection sequence is defined in tnpSupClusSel_cfi and the probe collection is : PassingSC17HLTSC . This acts as set of AllProbes for the calculation of efficiencies in SC->PFlowElectron step. The SuperCluster 's are selected with a basic cuts of pt >20 GeV and |η| within EcalAcceptance. This is done with the understanding that the effect of pt and |&eta| cuts will be a part of acceptance calculation. The cfi can be seen here.

Definition of Electron Sequence

Here we create all the possible (or atleast required) probe collections namely patElecPtEta, patElecPtEtaLvdp2012Id, patElecPtEtaLvdp2012 (full sel with iso) and patElecPtEtaLvdp2012IdMjjIso (our iso replaced by the detector based used in Mjj analysis). Since we want to be consistent with our main analysis chain, so we have imported PSet definitions from main analysis:
from DelPanj.TreeMaker.eSelLvdp2012_cff import *
The whole cfi can be seen here.

Definition of MC Sequence

Here we create MC matches between the probe collections and the genParticle (with pdgId = 11), these matches are stored in form of the value maps. This part of the configuration is used only for the case when we need to calculate the truth efficiency as well as TnP Efficiency. The cfi file is here

Definition of Jet Sequence

Here we create collection of clean patPFlowJets and create valuemaps between the probe candidate and jet multiplicity. This is included if we need to calculate the efficiency as function of Jet multiplicity.

Definition of TP Pair Sequence

Here the CandViewShallowCloneCombiner is used to make tagAndProbe pairs. We always use patElecPassingEle32Hlt as tag and the probe definitions are done with successively tighter selection. Here are the names:
  • tagSC
    • Tag: patElecPassingEle32Hlt
    • Probe: goodSuperClustersClean (SC17 Match+PtEtaCut)

  • tagPtEta
    • Tag: patElecPassingEle32Hlt
    • Probe: patElecPtEta (SC17 Matched+PtEtaCut)

  • tagPtEtaId
    • Tag: patElecPassingEle32Hlt
    • Probe: patElecPtEtaLvdp2012Id (SC17 Match+PtEtaCut+Id)

  • tagPtEtaIdIso
    • Tag: patElecPassingEle32Hlt
    • Probe: patElecLvdp2012 (SC17 Match+PtEtaCut+Id+Iso)

Combining All the Above

All the modules described above are imported and sequenced in the module tnpSequences_cfi. The cfi can be seen here.

Final Configuration

Final configuration import objects from above modules:
from PhysicsTools.TagAndProbe.tnpCommonVars_cfi import *
process.load('PhysicsTools.TagAndProbe.tnpSequences_cfi')
process.load("PhysicsTools.TagAndProbe.tnpPairs_cfi")
process.load("PhysicsTools.TagAndProbe.tnpMcEleMatch_cfi")
Use the predefined tag,probe collections and TnP Pairs to instantiate TagProbeFitTreeProducer which produces the TnP trees. We have following tree definitions:
  • SuperClusterToPfElectron
    • tpPairs = tagSC
    • allProbes = goodSuperClustersClean (defined above)
    • probe_passing = EleMatchedSuperClusterCands (SC candidates having match with PFlow Electrons passing basic pt, eta and PF2PAT EleId.)
  • PfToId
    • tpPairs = tagPtEta
    • allProbes = patElecPtEta
    • probe_passing = patElecPtEtaLvdp2012Id
  • IdToIso
    • tpPairs = tagPtEtaId
    • allProbes = patElecPtEtaLvdp2012Id
    • probe_passing = patElecLvdp2012
  • WP80ToHLTEle17 (misleading nomenclature: will be changed)
    • tpPairs = tagPtEtaIdIso
    • allProbes = patElecLvdp2012
    • probe_passing = patElecPassingEle17Hlt
  • WP80ToHLTEle8NotEle17
    • tpPairs = tagPtEtaIdIso
    • allProbes = patElecLvdp2012
    • probe_passing = patElecPassingEle8NotEle17Hlt (having Ele8 trigger match but not Ele17)
The configuration can be seen here.

OUTDATED INFORMATION (Don't Use !!!)

TRIGGER OBJECT MATCHING

  • In the beginRun, check if all the paths given from cfg have same process name:
         skipEvent_ = false;
         bool identical = true;
         std::vector<edm::InputTag>::const_iterator iMyHLT = hltTags_.begin();
         edm::InputTag lastTag = *iMyHLT;
         while ((iMyHLT != hltTags_.end()) && identical) {
         if ((*iMyHLT).process() == lastTag.process()) identical = true; //compare n^th with (n-1)^th path
         else identical = false;
         lastTag = *iMyHLT;
        ++iMyHLT;
        }
       if (!identical) skipEvent_ = true; //If a path with unidentical process name  is found, skip events.
       

  • In the beginRun , Initialize the HLTConfigProvider and throw exception if failure (it needs edm::Run, edm::EventSetup, HLTProcessNam and a bool ).
        if(!hltConfig_.init(iRun,iSetup,hltTags_[0].process(),changed_) ){
        edm::LogError("TriggerCandProducer") << "Error! Can't initialize HLTConfigProvider";
        throw cms::Exception("HLTConfigProvider::init() returned non 0");
       } if(printIndex_ && changed_) std::cout << "HLT configuration changed !" << std::endl;
       

  • In the produce, access following collections:
    • edm::View<object>
    • trigger::TriggerEvent
    • edm::TriggerResults

Aim Of The Exercise

To determine the trigger efficiency for electrons. We want to check the performance of EG trigger paths, for example :

  • HLT_Photon15_Cleaned_L1R
  • HLT_Ele15_CaloEleId_L1R
We plan to find the efficiency of passing these triggers using official tag-probe package, suitably configured for our requirements.

Note: For easy and comfortable running, we strongly recommend the user to go through this page completely before start trying. Since there are some modifications that need be made in the standard tag-probe package.

Setting up Tag and Probe Package

Use following recipe to obtain and build the official TnP package.
cmsrel CMSSW_3_9_4
cd CMSSW_3_9_4/src/
cmsenv
cmscvsroot CMSSW
cvs co -r V03-01-02 PhysicsTools/TagAndProbe
cvs co -r V00-03-20 RecoEgamma/ElectronIdentification
scram b -j4
Since we need to configure this package for studying trigger efficiencies, some more checkouts are required. Use following recipe:
cvs co -d Scripts UserCode/Lovedeep/TnP/Scripts/
mv Scripts/* . ; rmdir Scripts
This imports a script called "TnPJob.py". It's job is to read the standard configuration files (Electron_TagProbeTreeProducer_cfg.py and testTagProbeFitTreeAnalyzer_Zee.py) and regenerate python configuration (same file names as original ones but prefixed with the word New) corresponding to the trigger paths of interest. For the user comfort we are also temporarily importing mytestTagProbeFitTreeAnalyzer_Zee.py to be used as (and in place of) testTagProbeFitTreeAnalyzer_Zee.py. ( This import occurs during cvs co -d Scripts UserCode/Lovedeep/TnP/Scripts/ execution).

Running Tag and Probe Package

To create a cmssw configuration file (NewtestTagProbeFitTreeAnalyzer_Zee.py) that will test the HLT paths of interest, run the script with,
./TnPJob.py -names HLT_Ele15_SW_CaloEleId_L1R HLT_Photon15_Cleaned_L1R
Or if alternately, one wishes to study a large number of triggers, this script can be used in following way as well:
./TnPJob.py -file  someFileName.txt
Where "someFileName.txt", is the name of flat text file containing names of the "interesting" trigger paths (one per row).

For testing, one can specify one or more input data files in NewElectron_TagProbeTreeProducer_cfg.py in the fileNames in PoolSource. To specify the data input, goto DBS: https://cmsweb.cern.ch/dbs_discovery/ , search for your data sets, and click on "sites" and find the site you're interested in and click "lfn". The list should be something like:

 
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/EEC21BFA-25B4-DF11-840A-001617DBD5AC.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/EEAA24FA-25B4-DF11-A5F1-000423D98950.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/C40EDB4E-1DB4-DF11-A83C-0030487C90C2.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/C2497931-2CB4-DF11-A92C-003048F1183E.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/AC68ABE0-19B4-DF11-BB93-0030487C7E18.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/92F10BD6-22B4-DF11-B5FC-0030487CD812.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/7ACE82CB-19B4-DF11-8D26-0030487C7828.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/72E4744F-1DB4-DF11-AE6F-0030487CD6F2.root',
        '/store/data/Run2010A/EG/RECO/v4/000/144/114/602C2073-1DB4-DF11-A7FB-0030487D05B0.root',

Finally it is the time to run the job:

cmsRun NewElectron_TagProbeTreeProducer_cfg.py 
A successful execution will give testNewWrite.root as output root file which contains tag and probe tree. Efficiencies are now obtained by doing fits over the contents of the tree. To run fitting machinery do,
cmsRun NewtestTagProbeFitTreeAnalyzer_Zee.py
Running above commands may take a while, final output is testEff_YOUR_TRIGGER.root. For paths used in this exercise, we get testEff_HLT_Ele15_SW_CaloEleId_L1R.root and testEff_HLT_Photon15_Cleaned_L1R.root. These output files contain the detailed plots for the trigger efficiencies, which can be retrieved and cosmetics be arranged using a file named PlotEffi.cxx One may need to edit it according to the directory names in the final output rootfiles. For example, for the output file considered here as an example (testEff_HLT_Ele15_SW_CaloEleId_L1R.root), we are interested in the plots stored in a directory called TreeHLTHLTEle15SWCaloEleIdL1R, hence we edit PlotEffi.cxx and change the TString basedir from "IdToHLT" to "TreeHLTHLTEle15SWCaloEleIdL1R". Then to use this macro, run following command on terminal:
root.exe -b -l -q testEffi*.root 'PlotEffi.cxx("data")'

If one wishes to submit crab jobs to produce tag and probe tree,

source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.csh
eval `scramv1 runtime -csh`
source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.csh 
voms-proxy-init -voms cms
crab -create -submit -cfg CrabTnP.crab
Note: One need to edit the CrabTnP.crab to suit his purpose.

Further Configuring TnP

We may need some other modifications on official recipe to work as per the requirements. Following are the needed modifications:

  • Asking for a trigger path that does not exist in a given data file, the standard package may lead to exceptions. This can be dealt by editing PhysicsTools/TagAndProbe/src/TriggerCandProducer.icc via adding some try-catches. We need to rebuild the package after these modifications.
    • Find following lines in produce() method of TriggerCandProducer (near line#114,115)
                   std::vector<std::string> filters
                           = hltConfig_.moduleLabels( hltTag_.label() );
      
      , modify it with:
                      std::vector<std::string> filters;
                      try{   filters = hltConfig_.moduleLabels( hltTag_.label() );}
                      catch(...) {}
      
    • Also, find following lines in beginRun() method of TriggerCandProducer (near line#202)
                      std::vector<std::string> filters = hltConfig_.moduleLabels( hltTag_.label() );
      
      , modify it as:
       
                      try {
                              std::vector<std::string> filters = hltConfig_.moduleLabels( hltTag_.label() );
                        }
                      catch (...){
                             std::cout << "Trigger is not in the setup "<< hltTag_.label()  << std::endl;
                       }
    • Note: modified file present here: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/Lovedeep/TnP/ToModify/TriggerCandProducer.icc?view=markup

  • We may need a probe variable probe_sc_abseta, which is not available in present Electron_TagProbeTreeProducer_cfg.py, edit the modified NewElectron_TagProbeTreeProducer_cfg.py. In this file, there is module named ProbeVariablesToStore, add therein the new variable as
     
             probe_sc_abseta    = cms.string("abs(superCluster.eta)"),
    

  • Want to edit Electron Identification conditions (e.g. change the standard WP95 conditions of official package to WP80 selection requirements), edit NewElectron_TagProbeTreeProducer_cfg.py:
    • search for process.PassingId or process.PassingId80 attribute of the process, modify the required variables, and pass the required modified InputProducer to the process process.PassingHLT.
                      process.PassingHLT = cms.EDProducer("trgMatchedGsfElectronProducer",
                          InputProducer = cms.InputTag("PassingId80"),
                          hltTag = cms.untracked.InputTag(HLTPath,"","HLT"),
                          triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
                      )
    • make another tag-probe pair:
                      process.tagId80 = cms.EDProducer("CandViewShallowCloneCombiner",
                          decay = cms.string("Tag PassingId80"), # charge coniugate states are implied
                          checkCharge = cms.bool(False),
                          cut   = cms.string("60 < mass < 120"),
      )
      and add process.tagId80 to a sequence named process.allTagsAndProbes.
    • search for process.IdToHLT, edit it as:
                      process.Id80ToHLT = cms.EDAnalyzer("TagProbeFitTreeProducer",
                          mcTruthCommonStuff, CommonStuffForGsfElectronProbe,
                          tagProbePairs = cms.InputTag("tagId80"),
                          arbitration   = cms.string("Random2"),
                          flags = cms.PSet(
                              probe_passing = cms.InputTag("PassingHLT"),
                              probe_passingId80 = cms.InputTag("PassingId80")
                          ),
                          probeMatches  = cms.InputTag("McMatchId"),
                          allProbes     = cms.InputTag("PassingId80")
                      )
                      process.Id80ToHLT.variables.probe_dRjet = cms.InputTag("GsfDRToNearestJet")
                      process.Id80ToHLT.variables.probe_nJets = cms.InputTag("JetMultiplicityInGsfEvents")
      
      and add process.Id80ToHLT to a sequence named process.tree_sequence.

Note: For a reference here is the modified config file for tree making: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/Lovedeep/TnP/ToModify/WP80Electron_TagProbeTreeProducer_cfg.py?view=markup

  • Need to edit a lot in fitting config file, testTagProbeFitTreeAnalyzer_Zee.py. (Currently we are supplying these modifications ready-made in mytestTagProbeFitTreeAnalyzer_Zee.py)
    • Edit the names of the variables needed for efficiency computation in the parameter Variables as they appear in input probe tree variables like:
                          Variables = cms.PSet(
                              mass = cms.vstring("Tag-Probe Mass", "60.0", "120.0", "GeV/c^{2}"),
                              probe_gsfEle_pt = cms.vstring("Probe p_{T}", "0", "1000", "GeV/c"),
                              probe_sc_eta = cms.vstring("Probe #eta", "-2.5", "2.5", "")
                          ),
    • Edit the boolean probe variables intended to be used for efficiency computation in the parameter Categories like:
                              Categories = cms.PSet(
                                  mcTrue = cms.vstring("MC true", "dummy[true=1,false=0]"),
                                  probe_passing = cms.vstring("Probe Passing", "dummy[pass=1,fail=0]")
                              ),
    • We need to edit the parameter Efficiencies which defines some details of efficiency calculations like:
                                      pt_eta = cms.PSet(
                                          EfficiencyCategoryAndState = cms.vstring("probe_passing","pass"),
                                          UnbinnedVariables = cms.vstring("mass"),
                                          BinnedVariables = cms.PSet(
                                              probe_gsfEle_pt = cms.vdouble(20, 30, 40, 50, 60, 70, 80, 90, 100, 110,120),
                                              probe_sc_eta = cms.vdouble(-2.4,-1.2, 0.0, 1.2, 2.4)
                                          ),
                                          BinToPDFmap = cms.vstring("gaussPlusLinear")
                                      ),
      , herein, EfficiencyCategoryAndState and BinnedVariables parameters are modifies as the input file requirements.
    • Note: Here is the modified file: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/Lovedeep/TnP/Scripts/mytestTagProbeFitTreeAnalyzer_Zee.py?view=markup

Old Results from "outdated" information

For Record: 2012ID SFs with n without PUreweight:

2012 8TeV data (53X )

SFs along with fit and systematic uncertainties ( For details click here )

  • Scale-Factors:
Tight- without PU-rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.838 + 0.024- 0.024 ± 0.043 0.942 + 0.011- 0.011 ± 0.045 0.980 + 0.003- 0.001 ± 0.002 0.982 + 0.001- 0.001 ± 0.002 0.985 + 0.001- 0.001 ± 0.001 0.984 + 0.001- 0.001 ± 0.001
0.8 < abs(η) < 1.442 0.861 + 0.024- 0.024 ± 0.025 0.925 + 0.013- 0.012 ± 0.008 0.955 + 0.004- 0.004 ± 0.005 0.965 + 0.002- 0.002 ± 0.005 0.974 + 0.001- 0.001 ± 0.001 0.978 + 0.001- 0.001 ± 0.004
1.442 < abs(η) < 1.556 1.021 + 0.110- 0.101 ± 0.205 0.889 + 0.041- 0.040 ± 0.049 0.996 + 0.018- 0.018 ± 0.013 0.989 + 0.008- 0.008 ± 0.002 0.961 + 0.004- 0.004 ± 0.002 0.982 + 0.007- 0.007 ± 0.005
1.556 < abs(η) < 2.0 0.951 + 0.054- 0.053 ± 0.032 0.932 + 0.025- 0.024 ± 0.020 0.970 + 0.008- 0.008 ± 0.008 0.968 + 0.003- 0.003 ± 0.002 0.989 + 0.001- 0.001 ± 0.002 0.991 + 0.004- 0.004 ± 0.005
2.0 < abs(η) < 2.5 1.055 + 0.056- 0.054 ± 0.029 0.984 + 0.025- 0.024 ± 0.029 1.027 + 0.008- 0.008 ± 0.006 1.018 + 0.004- 0.002 ± 0.001 1.012 + 0.002- 0.002 ± 0.002 1.008 + 0.003- 0.003 ± 0.001

Tight- PU-rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.818 + 0.023- 0.023 ± 0.042 0.928 + 0.010- 0.010 ± 0.044 0.973 + 0.003- 0.001 ± 0.002 0.979 + 0.001- 0.001 ± 0.002 0.984 + 0.001- 0.001 ± 0.000 0.983 + 0.001- 0.001 ± 0.000
0.8 < abs(η) < 1.442 0.840 + 0.023- 0.023 ± 0.024 0.914 + 0.012- 0.012 ± 0.008 0.948 + 0.004- 0.004 ± 0.005 0.961 + 0.002- 0.002 ± 0.005 0.972 + 0.001- 0.001 ± 0.001 0.977 + 0.001- 0.001 ± 0.004
1.442 < abs(η) < 1.556 1.008 + 0.108- 0.099 ± 0.203 0.877 + 0.040- 0.039 ± 0.049 0.983 + 0.018- 0.018 ± 0.003 0.983 + 0.008- 0.008 ± 0.002 0.957 + 0.004- 0.004 ± 0.000 0.978 + 0.007- 0.007 ± 0.004
1.556 < abs(η) < 2.0 0.906 + 0.051- 0.050 ± 0.031 0.907 + 0.024- 0.023 ± 0.019 0.957 + 0.007- 0.007 ± 0.008 0.962 + 0.003- 0.003 ± 0.002 0.985 + 0.001- 0.001 ± 0.001 0.986 + 0.004- 0.004 ± 0.001
2.0 < abs(η) < 2.5 0.991 + 0.051- 0.050 ± 0.027 0.939 + 0.023- 0.023 ± 0.037 1.001 + 0.008- 0.008 ± 0.006 1.002 + 0.004- 0.002 ± 0.001 0.999 + 0.002- 0.002 ± 0.002 0.995 + 0.003- 0.003 ± 0.001

Medium - no PU rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.882+ 0.024- 0.023 ± 0.041 0.974 + 0.010- 0.010 ± 0.032 1.010 + 0.003- 0.003± 0.003 1.006 + 0.001- 0.001± 0.000 1.009 + 0.001- 0.001± 0.001 1.008 + 0.002- 0.001± 0.002
0.8 < abs(η) < 1.442 0.968 + 0.026- 0.025 ± 0.073 0.962 + 0.011- 0.011 ± 0.031 0.981 + 0.011- 0.014± 0.006 0.987 + 0.001- 0.001± 0.000 0.993 + 0.001- 0.001± 0.001 0.995 + 0.002- 0.001± 0.001
1.442 < abs(η) < 1.556 1.118 + 0.127- 0.114 ± 0.162 0.992 + 0.051- 0.050 ± 0.044 1.046 + 0.016- 0.015± 0.003 1.011 + 0.007- 0.007± 0.001 0.994 + 0.003- 0.003± 0.002 0.997 + 0.006- 0.006± 0.002
1.556 < abs(η) < 2.0 0.946 + 0.049- 0.047 ± 0.043 0.996 + 0.021- 0.020 ± 0.006 0.992 + 0.006- 0.006± 0.009 0.993 + 0.003- 0.003± 0.000 1.008 + 0.002- 0.001± 0.000 1.009 + 0.003- 0.003± 0.000
2.0 < abs(η) < 2.5 1.121 + 0.025- 0.025 ± 0.015 1.004 + 0.020- 0.020 ± 0.018 1.045 + 0.006- 0.006± 0.005 1.031 + 0.003- 0.003± 0.000 1.019 + 0.001- 0.001± 0.000 1.014 + 0.002- 0.002± 0.001

Medium - PU rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.859 + 0.023- 0.023 ± 0.040 0.962 + 0.010- 0.010 ± 0.032 1.004 + 0.003- 0.003 ± 0.003 1.003 + 0.001- 0.001 ± 0.002 1.007 + 0.001- 0.001 ± 0.001 1.007 + 0.001- 0.001 ± 0.002
0.8 < abs(η) < 1.442 0.942 + 0.025- 0.025 ± 0.071 0.951 + 0.011- 0.011 ± 0.030 0.975 + 0.011- 0.013 ± 0.006 0.984 + 0.001- 0.001 ± 0.001 0.992 + 0.001- 0.001 ± 0.001 0.995 + 0.002- 0.001 ± 0.001
1.442 < abs(η) < 1.556 1.099 + 0.125- 0.112 ± 0.160 0.975 + 0.050- 0.048 ± 0.043 1.034 + 0.015- 0.014 ± 0.003 1.006 + 0.007- 0.007 ± 0.002 0.991 + 0.003- 0.003 ± 0.004 0.993 + 0.005- 0.005 ± 0.002
1.556 < abs(η) < 2.0 0.908 + 0.046- 0.045 ± 0.041 0.972 + 0.020- 0.020 ± 0.006 0.983 + 0.006- 0.006 ± 0.009 0.990 + 0.003- 0.003 ± 0.001 1.006 + 0.002- 0.001 ± 0.002 1.007 + 0.003- 0.003 ± 0.000
2.0 < abs(η) < 2.5 1.050 + 0.022- 0.022 ± 0.014 0.963 + 0.019- 0.019 ± 0.017 1.025 + 0.006- 0.006 ± 0.005 1.022 + 0.003- 0.003 ± 0.002 1.013 + 0.001- 0.001 ± 0.003 1.009 + 0.002- 0.002 ± 0.001

Loose - no PU rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.877 + 0.023- 0.023 ± 0.042 0.974 + 0.010- 0.010 ± 0.037 1.011 + 0.003- 0.003 ± 0.003 1.006 + 0.001- 0.001 ± 0.002 1.009 + 0.001- 0.001 ± 0.001 1.009 + 0.001- 0.001 ± 0.001
0.8 < abs(η) < 1.442 0.878 + 0.021- 0.020 ± 0.056 0.973 + 0.011- 0.011 ± 0.023 0.988 + 0.003- 0.003 ± 0.007 0.993 + 0.001- 0.001 ± 0.001 0.995 + 0.001- 0.001 ± 0.001 0.999 + 0.001- 0.001 ± 0.002
1.442 < abs(η) < 1.556 1.124 + 0.126- 0.110 ± 0.135 0.913 + 0.031- 0.031 ± 0.018 1.056 + 0.011- 0.013 ± 0.008 1.003 + 0.004- 0.004 ± 0.002 0.990 + 0.003- 0.003 ± 0.004 0.998 + 0.005- 0.005 ± 0.002
1.556 < abs(η) < 2.0 0.869 + 0.017- 0.017 ± 0.026 0.960 + 0.018- 0.018 ± 0.029 0.989 + 0.005- 0.005 ± 0.005 0.995 + 0.002- 0.002 ± 0.001 1.005 + 0.002- 0.002 ± 0.001 1.007 + 0.003- 0.003 ± 0.001
2.0 < abs(η) < 2.5 1.104 + 0.046- 0.045 ± 0.062 1.009 + 0.019- 0.019 ± 0.047 1.035 + 0.006- 0.006 ± 0.003 1.027 + 0.003- 0.003 ± 0.001 1.010 + 0.001- 0.001 ± 0.009 1.012 + 0.002- 0.002 ± 0.002

Loose - PU rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.855 + 0.023- 0.022 ± 0.041 0.962 + 0.010- 0.010 ± 0.037 1.005 + 0.003- 0.003 ± 0.003 1.004 + 0.001- 0.001 ± 0.002 1.008 + 0.001- 0.001 ± 0.001 1.008 + 0.001- 0.001 ± 0.001
0.8 < abs(η) < 1.442 0.858 + 0.020- 0.020 ± 0.055 0.962 + 0.011- 0.011 ± 0.009 0.981 + 0.003- 0.003 ± 0.004 0.991 + 0.001- 0.001 ± 0.000 0.994 + 0.001- 0.001 ± 0.001 0.999 + 0.001- 0.001 ± 0.002
1.442 < abs(η) < 1.556 1.109 + 0.124- 0.108 ± 0.133 0.903 + 0.031- 0.030 ± 0.018 1.044 + 0.011- 0.013 ± 0.008 0.998 + 0.004- 0.004 ± 0.002 0.989 + 0.002- 0.002 ± 0.004 0.994 + 0.004- 0.005 ± 0.002
1.556 < abs(η) < 2.0 0.838 + 0.016- 0.016 ± 0.025 0.939 + 0.018- 0.018 ± 0.028 0.980 + 0.005- 0.005 ± 0.005 0.992 + 0.002- 0.002 ± 0.001 1.004 + 0.002- 0.002 ± 0.001 1.006 + 0.003- 0.003 ± 0.001
2.0 < abs(η) < 2.5 1.034 + 0.043- 0.042 ± 0.058 0.970 + 0.018- 0.018 ± 0.045 1.017 + 0.006- 0.006 ± 0.003 1.019 + 0.003- 0.003 ± 0.001 1.005 + 0.001- 0.001 ± 0.009 1.009 + 0.002- 0.002 ± 0.002

Veto - no PU rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.870 + 0.023- 0.023 ± 0.034 0.968 + 0.010- 0.010 ± 0.024 1.012 + 0.002- 0.002 ± 0.004 1.009 + 0.001- 0.001 ± 0.002 1.009 + 0.001- 0.001 ± 0.001 1.009 + 0.001- 0.001 ± 0.001
0.8 < abs(η) < 1.442 0.865 + 0.020- 0.020 ± 0.063 0.970 + 0.011- 0.011 ± 0.024 0.990 + 0.003- 0.003 ± 0.007 0.993 + 0.001- 0.001 ± 0.001 0.992 + 0.000- 0.001 ± 0.004 0.997 + 0.001- 0.001 ± 0.001
1.442 < abs(η) < 1.556 1.097 + 0.127- 0.109 ± 0.133 1.025 + 0.047- 0.044 ± 0.079 1.047 + 0.009- 0.009 ± 0.011 1.001 + 0.004- 0.003 ± 0.002 0.988 + 0.004- 0.004 ± 0.004 1.004 + 0.003- 0.003 ± 0.003
1.556 < abs(η) < 2.0 0.959 + 0.042- 0.041 ± 0.054 0.990 + 0.017- 0.017 ± 0.037 0.975 + 0.005- 0.005 ± 0.003 0.989 + 0.001- 0.001 ± 0.001 0.996 + 0.001- 0.001 ± 0.001 0.996 + 0.002- 0.002 ± 0.001
2.0 < abs(η) < 2.5 0.981 + 0.041- 0.039 ± 0.055 1.009 + 0.016- 0.016 ± 0.021 1.016 + 0.002- 0.002 ± 0.003 1.008 + 0.002- 0.002 ± 0.001 1.004 + 0.001- 0.002 ± 0.001 0.999 + 0.003- 0.003 ± 0.001

Veto - PU rew          
pT 10 - 15 15 - 20 20 - 30 30 - 40 40 - 50 50 - 200
0.0 < abs(η) < 0.8 0.850 + 0.022- 0.022 ± 0.033 0.956 + 0.009- 0.009 ± 0.024 1.007 + 0.002- 0.002 ± 0.003 1.006 + 0.001- 0.001 ± 0.002 1.008 + 0.001- 0.001 ± 0.001 1.008 + 0.001- 0.001 ± 0.001
0.8 < abs(η) < 1.442 0.846 + 0.020- 0.019 ± 0.062 0.959 + 0.011- 0.011 ± 0.023 0.984 + 0.003- 0.003 ± 0.007 0.991 + 0.001- 0.001 ± 0.001 0.991 + 0.000- 0.001 ± 0.004 0.997 + 0.001- 0.001 ± 0.001
1.442 < abs(η) < 1.556 1.082 + 0.125- 0.107 ± 0.131 1.017 + 0.046- 0.044 ± 0.079 1.038 + 0.009- 0.009 ± 0.011 0.997 + 0.004- 0.003 ± 0.002 0.986 + 0.004- 0.004 ± 0.004 1.002 + 0.003- 0.003 ± 0.003
1.556 < abs(η) < 2.0 0.930 + 0.041- 0.040 ± 0.052 0.972 + 0.017- 0.017 ± 0.036 0.966 + 0.005- 0.005 ± 0.003 0.985 + 0.001- 0.001 ± 0.001 0.994 + 0.001- 0.001 ± 0.001 0.995 + 0.002- 0.002 ± 0.001
2.0 < abs(η) < 2.5 0.919 + 0.038- 0.037 ± 0.051 0.975 + 0.015- 0.015 ± 0.020 0.999 + 0.002- 0.002 ± 0.003 1.000 + 0.002- 0.002 ± 0.000 0.998 + 0.001- 0.002 ± 0.001 0.994 + 0.003- 0.003 ± 0.001

-- LovedeepKaurSaini - 14-Sep-2010

Edit | Attach | Watch | Print version | History: r43 < r42 < r41 < r40 < r39 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r43 - 2013-02-17 - LovedeepKaurSaini
 
    • 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-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