forked from cms-sw/cmssw
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#200 from mariadalfonso/MT272Xconfig
MT2 72x config
- Loading branch information
Showing
7 changed files
with
105 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
CMGTools/TTHAnalysis/python/analyzers/ttHhistoCounterAnalyzer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import operator | ||
import itertools | ||
import copy | ||
from math import * | ||
|
||
from ROOT import std | ||
from ROOT import TLorentzVector, TVectorD | ||
|
||
from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer | ||
from PhysicsTools.HeppyCore.framework.event import Event | ||
from PhysicsTools.HeppyCore.statistics.counter import Counter, Counters | ||
from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle | ||
|
||
import ROOT | ||
import os | ||
|
||
class ttHhistoCounterAnalyzer( Analyzer ): | ||
def __init__(self, cfg_ana, cfg_comp, looperName ): | ||
super(ttHhistoCounterAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName) | ||
|
||
def declareHandles(self): | ||
super(ttHhistoCounterAnalyzer, self).declareHandles() | ||
|
||
def beginLoop(self, setup): | ||
super(ttHhistoCounterAnalyzer,self).beginLoop(setup) | ||
self.counters.addCounter('pairs') | ||
count = self.counters.counter('pairs') | ||
count.register('all events') | ||
if "outputfile" in setup.services : | ||
setup.services["outputfile"].file.cd() | ||
self.inputCounter = ROOT.TH1F("Count","Count",1,0,2) | ||
|
||
def process(self, event): | ||
self.readCollections( event.input ) | ||
self.inputCounter.Fill(1) | ||
|
||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters