StrawHits.StrawHits Class Reference
Inheritance diagram for StrawHits.StrawHits:

## Public Member Functions

def | __init__
def | getTrIDs
| returns list of keys __trackEdgeHits (MCtrackIDs>0 with more than RecoSettings .trackMinNofHits hits). More...
def | getTrIDsALL
| returns list of keys __trackHits (MCtrackIDs>0. More...
def | getReFitTrIDs
| returns list of keys __reFitTracks. More...
def | getReFitChi2Ndf
def | getReFitNdf
def | getReFitVertex
| returns vertex (if number of tracks!=2 will return None!). More...
def | getStepDoca
| returns doca's of each extrapolation steps (size is defined in RecoSettings .VertexExtrSteps). More...
def | getReFitPosDirPval
| returns vertex (if number of tracks!=2 will return None!). More...
def | getNofPHits
| returns number of hits in proper tracker stations (Z>0) calculated from __trackHits and __vetoHits. More...
def | getStartHit
| returns TVector3 of a tracker entry hit (Z>0) from __trackEdgeHits. More...
def | checkVetoHits
| returns number of hits with Z<0 of __trackHits. More...
def | PrintNewTracks
def | compareFitTracks
def | readEvent
| to be called per each event. More...
def | FitTracks

## Private Member Functions

def | __clean
| to be called for each new event (called in readEvent()) cleans all dictionaries (__trackHits, __trackEdgeHits, __vetoHits, __nStations). More...
def | __hitSmear
| returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit. More...
def | __getIniDir
def | __prepareIniPosMomCov
def | __prepareWireMeasurements

## Private Attributes

| __tree
| root tree to be read. More...
| __modules
| geometry description modules. More...
| __debug
| debug level [0,3] More...
| __resolution
| hit resolition More...
| __trackHits
| {MCtrackID : [{'pos':TVector3, 'det':detID, 'dw':distance to wire, 'smdw': smeared dw} where [TVector3] list of each hit position. More...
| __oldSmearedHits
| __trackEdgeHits
| {MCtrackID : {X : TVector3}} where x='entry' or 'exit', TVector3 coordinates of last or first hit. More...
| __vetoHits
| {MCtrackID : number of hits at Z<0 (veto tracker)}. More...
| __nStations
| {MCtrackID: number of crossed stations (exclude veto tracker)}. More...
| __random
| root random engent for hit smearing (see __hitSmear). More...
| __fitter
| __reFitTracks
| __docaEval

## Detailed Description

    StrawHit class

Definition at line 12 of file StrawHits.py.

## Constructor & Destructor Documentation

def StrawHits.StrawHits.__init__ | ( |  | self,
|  |  | tree,
|  |  | modules,
|  |  | resolution,
|  |  | debug = `0`,
|  |  | mhistdict = `None`,
|  |  | ship_geo = `None`
| ) |  |

Definition at line 14 of file StrawHits.py.

## Member Function Documentation

def StrawHits.StrawHits.__clean | ( |  | self | ) |

private

to be called for each new event (called in readEvent()) cleans all dictionaries (__trackHits, __trackEdgeHits, __vetoHits, __nStations).

Definition at line 90 of file StrawHits.py.

References StrawHits.StrawHits.__docaEval.

def StrawHits.StrawHits.__getIniDir | ( |  | self,
|  |  | trID
| ) |  |

private

Definition at line 330 of file StrawHits.py.

References MCTrackInfo.MCTrackInfo.__debug, StrawHits.StrawHits.__debug, StrawHits.StrawHits.__trackEdgeHits, StrawHits.StrawHits.__trackHits, and StrawHits.StrawHits.__vetoHits.

def StrawHits.StrawHits.__hitSmear | ( |  | self,
|  |  | tid,
|  |  | hid,
|  |  | new = `False`
| ) |  |

private

returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.

Parameters

  tid | - MCtrackID.
  hid | - hit index of __trackHits
  new | - to generate new smearing (True) or get from SmearedHits (det.position still recalculated!)

Returns
  a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.

Definition at line 205 of file StrawHits.py.

References MCTrackInfo.MCTrackInfo.__debug, StrawHits.StrawHits.__debug, StrawHits.StrawHits.__modules, StrawHits.StrawHits.__resolution, and StrawHits.StrawHits.__trackHits.

def StrawHits.StrawHits.__prepareIniPosMomCov | ( |  | self,
|  |  | tid,
|  |  | original = `True`
| ) |  |

private

Definition at line 343 of file StrawHits.py.

References StrawHits.StrawHits.__getIniDir(), StrawHits.StrawHits.__resolution, StrawHits.StrawHits.__trackEdgeHits, and StrawHits.StrawHits.getNofPHits().

def StrawHits.StrawHits.__prepareWireMeasurements | ( |  | self,
|  |  | tid,
|  |  | fTrack
| ) |  |

private

Definition at line 367 of file StrawHits.py.

References MCTrackInfo.MCTrackInfo.__debug, StrawHits.StrawHits.__debug, StrawHits.StrawHits.__hitSmear(), StrawHits.StrawHits.__resolution, StrawHits.StrawHits.__trackHits, and StrawHits.StrawHits.__vetoHits.

def StrawHits.StrawHits.checkVetoHits | ( |  | self,
|  |  | tid
| ) |  |

returns number of hits with Z<0 of __trackHits.

Parameters

  tid | - MCtrackID.

Returns
  number of hits with Z<0 of __trackHits.

Definition at line 181 of file StrawHits.py.

References StrawHits.StrawHits.__vetoHits.

def StrawHits.StrawHits.compareFitTracks | ( |  | self,
|  |  | tid,
|  |  | theFitTracks
| ) |  |

Definition at line 195 of file StrawHits.py.

def StrawHits.StrawHits.FitTracks | ( |  | self,
|  |  | old = `True`
| ) |  |

Definition at line 399 of file StrawHits.py.

References MCTrackInfo.MCTrackInfo.__debug, StrawHits.StrawHits.__debug, StrawHits.StrawHits.__docaEval, StrawHits.StrawHits.__nStations, StrawHits.StrawHits.__prepareIniPosMomCov(), StrawHits.StrawHits.__prepareWireMeasurements(), StrawHits.StrawHits.__trackEdgeHits, and RecoSettings.chargePDG().

def StrawHits.StrawHits.getNofPHits | ( |  | self,
|  |  | tid
| ) |  |

returns number of hits in proper tracker stations (Z>0) calculated from __trackHits and __vetoHits.

Parameters

  tid | - MCtrackID.

Returns
  number of hits in proper tracker stations (Z>0).

Definition at line 165 of file StrawHits.py.

References StrawHits.StrawHits.__trackHits, and StrawHits.StrawHits.__vetoHits.

def StrawHits.StrawHits.getReFitChi2Ndf | ( |  | self,
|  |  | tid
| ) |  |

Definition at line 127 of file StrawHits.py.

def StrawHits.StrawHits.getReFitNdf | ( |  | self,
|  |  | tid
| ) |  |

Definition at line 132 of file StrawHits.py.

def StrawHits.StrawHits.getReFitPosDirPval | ( |  | self,
|  |  | tid
| ) |  |

returns vertex (if number of tracks!=2 will return None!).

Returns
  new vertex (if number of tracks!=2 will return None!).

Definition at line 157 of file StrawHits.py.

def StrawHits.StrawHits.getReFitTrIDs | ( |  | self | ) |

returns list of keys __reFitTracks.

Returns
  list of MCtrackIDs of "good" tracks.

Definition at line 122 of file StrawHits.py.

def StrawHits.StrawHits.getReFitVertex | ( |  | self | ) |

returns vertex (if number of tracks!=2 will return None!).

Returns
  new vertex (if number of tracks!=2 will return None!).

Definition at line 140 of file StrawHits.py.

def StrawHits.StrawHits.getStartHit | ( |  | self,
|  |  | tid
| ) |  |

returns TVector3 of a tracker entry hit (Z>0) from __trackEdgeHits.

Parameters

  tid | - MCtrackID.

Returns
  position of a tracker entry hit (Z>0) from __trackEdgeHits.

Definition at line 173 of file StrawHits.py.

References StrawHits.StrawHits.__trackEdgeHits.

def StrawHits.StrawHits.getStepDoca | ( |  | self,
|  |  | step
| ) |  |

returns doca's of each extrapolation steps (size is defined in RecoSettings .VertexExtrSteps).

Returns
  new vertex (if number of tracks!=2 will return None!).

Definition at line 149 of file StrawHits.py.

References StrawHits.StrawHits.__docaEval.

def StrawHits.StrawHits.getTrIDs | ( |  | self | ) |

returns list of keys __trackEdgeHits (MCtrackIDs>0 with more than RecoSettings .trackMinNofHits hits).

Returns
  list of MCtrackIDs of "good" tracks.

Definition at line 102 of file StrawHits.py.

References StrawHits.StrawHits.__trackEdgeHits.

def StrawHits.StrawHits.getTrIDsALL | ( |  | self | ) |

returns list of keys __trackHits (MCtrackIDs>0.

Returns
  list of MCtrackIDs of MC assigned tracks.

Definition at line 112 of file StrawHits.py.

References StrawHits.StrawHits.__trackEdgeHits.

def StrawHits.StrawHits.PrintNewTracks | ( |  | self | ) |

Definition at line 189 of file StrawHits.py.

def StrawHits.StrawHits.readEvent | ( |  | self | ) |

to be called per each event.

Fills __trackHits, __trackEdgeHits, __vetoHits, __nStations.

Returns
  number of "good" tracks (size of __trackEdgeHits)

Definition at line 232 of file StrawHits.py.

References MCTrackInfo.MCTrackInfo.__clean(), StrawHits.StrawHits.__clean(), MCTrackInfo.MCTrackInfo.__debug, StrawHits.StrawHits.__debug, StrawHits.StrawHits.__nStations, StrawHits.StrawHits.__trackEdgeHits, StrawHits.StrawHits.__trackHits, and StrawHits.StrawHits.__vetoHits.

## Member Data Documentation

StrawHits.StrawHits.__debug

private

debug level [0,3]

Definition at line 20 of file StrawHits.py.

StrawHits.StrawHits.__docaEval

private

Definition at line 41 of file StrawHits.py.

StrawHits.StrawHits.__fitter

private

Definition at line 38 of file StrawHits.py.

StrawHits.StrawHits.__modules

private

geometry description modules.

Definition at line 18 of file StrawHits.py.

StrawHits.StrawHits.__nStations

private

{MCtrackID: number of crossed stations (exclude veto tracker)}.

Definition at line 32 of file StrawHits.py.

StrawHits.StrawHits.__oldSmearedHits

private

Definition at line 25 of file StrawHits.py.

StrawHits.StrawHits.__random

private

root random engent for hit smearing (see __hitSmear).

Definition at line 34 of file StrawHits.py.

StrawHits.StrawHits.__reFitTracks

private

Definition at line 40 of file StrawHits.py.

StrawHits.StrawHits.__resolution

private

hit resolition

Definition at line 22 of file StrawHits.py.

StrawHits.StrawHits.__trackEdgeHits

private

{MCtrackID : {X : TVector3}} where x='entry' or 'exit', TVector3 coordinates of last or first hit.

Created for tracks with more than RecoSettings .trackMinNofHits hits.

Definition at line 28 of file StrawHits.py.

StrawHits.StrawHits.__trackHits

private

{MCtrackID : [{'pos':TVector3, 'det':detID, 'dw':distance to wire, 'smdw': smeared dw} where [TVector3] list of each hit position.

Created if MCtrackID>0.

Definition at line 24 of file StrawHits.py.

StrawHits.StrawHits.__tree

private

root tree to be read.

Definition at line 16 of file StrawHits.py.

StrawHits.StrawHits.__vetoHits

private

{MCtrackID : number of hits at Z<0 (veto tracker)}.

Definition at line 30 of file StrawHits.py.

The documentation for this class was generated from the following file:

- StrawHits.py