CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
objects.VertexAnalyzer.VertexAnalyzer Class Reference
Inheritance diagram for objects.VertexAnalyzer.VertexAnalyzer:

Public Member Functions

def __init__
 
def beginLoop
 
def declareHandles
 
def mindist
 
def process
 
def testGoodVertex
 
def write
 

Public Attributes

 allVertices
 
 count
 
 doHists
 
 fixedWeight
 
 pileup
 

Static Public Attributes

int fixedWeight = 1
 
 verbose = False
 
 vertexWeight = None,
 

Detailed Description

selects a list of good primary vertices,
and optionally add a pile-up weight to MC events.

The list of good primary vertices is put in event.goodVertices.
if no good vertex is found, the process function returns False.

The weight is put in event.vertexWeight, and is multiplied to
the global event weight, event.eventWeight. 

Example:

vertexAna = cfg.Analyzer(
  'VertexAnalyzer',
  goodVertices = 'goodPVFilter',
  vertexWeight = 'vertexWeightFall112011AB',
  # uncomment the following line if you want a vertex weight = 1 (no weighting)
  # fixedWeight = 1, 
  verbose = False
  )

If fixedWeight is set to None, the vertex weight is read from the EDM collection with module name
'vertexWeightFall112011AB'.
Otherwise, the weight is set to fixedWeight.

The vertex weight collection was at some point produced in the PAT+CMG step,
and could directly be accessed from the PAT or CMG tuple. 
In the most recent versions of the PAT+CMG tuple, this collection is not present anymore,
and an additional full framework process must be ran to produce this collection,
so that this analyzer can read it. An example cfg to do that can be found here:
http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/CMG/CMGTools/H2TauTau/prod/vertexWeight2011_cfg.py?view=markup

Definition at line 10 of file VertexAnalyzer.py.

Constructor & Destructor Documentation

def objects.VertexAnalyzer.VertexAnalyzer.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 45 of file VertexAnalyzer.py.

Member Function Documentation

def objects.VertexAnalyzer.VertexAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 91 of file VertexAnalyzer.py.

def objects.VertexAnalyzer.VertexAnalyzer.declareHandles (   self)

Definition at line 57 of file VertexAnalyzer.py.

def objects.VertexAnalyzer.VertexAnalyzer.mindist (   self,
  vertices 
)

Definition at line 159 of file VertexAnalyzer.py.

def objects.VertexAnalyzer.VertexAnalyzer.process (   self,
  event 
)

Definition at line 100 of file VertexAnalyzer.py.

def objects.VertexAnalyzer.VertexAnalyzer.testGoodVertex (   self,
  vertex 
)

Definition at line 147 of file VertexAnalyzer.py.

def objects.VertexAnalyzer.VertexAnalyzer.write (   self,
  setup 
)

Definition at line 167 of file VertexAnalyzer.py.

Member Data Documentation

objects.VertexAnalyzer.VertexAnalyzer.allVertices

Definition at line 55 of file VertexAnalyzer.py.

objects.VertexAnalyzer.VertexAnalyzer.count

Definition at line 95 of file VertexAnalyzer.py.

objects.VertexAnalyzer.VertexAnalyzer.doHists

Definition at line 48 of file VertexAnalyzer.py.

objects.VertexAnalyzer.VertexAnalyzer.fixedWeight

Definition at line 63 of file VertexAnalyzer.py.

int objects.VertexAnalyzer.VertexAnalyzer.fixedWeight = 1
static

Definition at line 175 of file VertexAnalyzer.py.

objects.VertexAnalyzer.VertexAnalyzer.pileup

Definition at line 52 of file VertexAnalyzer.py.

objects.VertexAnalyzer.VertexAnalyzer.verbose = False
static
objects.VertexAnalyzer.VertexAnalyzer.vertexWeight = None,
static

Definition at line 174 of file VertexAnalyzer.py.