Python
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MCTrackInfo.MCTrackInfo Class Reference

For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
. More...

Inheritance diagram for MCTrackInfo.MCTrackInfo:

Public Member Functions

def __init__
 
def setAccPlaneZ
 set z of the last full acceptance plane (to be used in checkEllipticAcc), depends on RecoSettings. More...
 
def PrintHNL
 prints HNL decay products More...
 
def getEventWeight
 returns event weight. More...
 
def getHNLdecayVertex
 returns HNL decay vertex coordinates (TVector3 __HNLdecayCoord). More...
 
def getHNLdecayTrIDs
 returns list of MCtrIDs (index in MCTrack collection) fot HNL decay products. More...
 
def getTrIDs
 returns list of all MCtrIDs read by readEvent and readTrack - not only HNL decay products. More...
 
def getCharge
 returns charge of a particle with the given trID (index in MCTrack collection). More...
 
def getMomentum
 returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection). More...
 
def checkEllipticAcc
 checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at __zAcc. More...
 
def checkVertexUpDown
 for Tracker Performance studies. More...
 
def getTrackPropagation
 for Tracker Performance studies. More...
 
def readTrack
 reads one additional track with trID from MCTrack collection. More...
 
def readEvent
 reads HNL decay products from MCTrack collection (two at the moment!). More...
 

Private Member Functions

def __clean
 clears all dictionaries and lists. More...
 

Private Attributes

 __tree
 root tree to be read. More...
 
 __debug
 debug level [0,3]. More...
 
 __zAcc
 z of the last full acceptance plane (to be used in checkEllipticAcc), must be set later. More...
 
 __weight
 event weight. More...
 
 __HNLdecayCoord
 HNL decay vertex coordinates (TVector3). More...
 
 __decayProdTrID
 MCTrID (index of the track in MCtrack list) for HNL daughter products. More...
 
 __productVertex
 Production vertices of several stored products (not only HNL daughter) as {MCTrID : TVector3}. More...
 
 __productMoment
 Momentum of several stored products (not only HNL daughter) as {MCTrID : TVector3}. More...
 
 __productCharge
 Charge of several stored products (not only HNL daughter) as {MCTrID : value}. More...
 
 __productInfo
 Basic information on the particle (pdg, mother pdg,... More...
 

Detailed Description

For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
.

More description here

Definition at line 10 of file MCTrackInfo.py.

Constructor & Destructor Documentation

def MCTrackInfo.MCTrackInfo.__init__ (   self,
  tree,
  debug = 0 
)

Definition at line 12 of file MCTrackInfo.py.

Member Function Documentation

def MCTrackInfo.MCTrackInfo.__clean (   self)
private

clears all dictionaries and lists.

To be called inside readEvent.

Definition at line 40 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, and MCTrackInfo.MCTrackInfo.__weight.

def MCTrackInfo.MCTrackInfo.checkEllipticAcc (   self,
  tight = True 
)

checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at __zAcc.

For tight cut each HNL daughter is propagated to __zAcc (see getTrackPropagation) and checked if it in the acceptance (see RecoSettings .checkEllipticAcc). Also checks HNL decay vertex.

Parameters
tight- if true, not only HNL vertex but also propagated tracks are checked.
Returns
True if the vertex (and both tracks, if tight cut) are in the acceptance.

Definition at line 133 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, MCTrackInfo.MCTrackInfo.__zAcc, RecoSettings.checkEllipticAcc(), and MCTrackInfo.MCTrackInfo.getTrackPropagation().

def MCTrackInfo.MCTrackInfo.checkVertexUpDown (   self)

for Tracker Performance studies.

Returns -1, 0, 1 depending on vertex topology. defines direction in y: 0 if both momY the same direction, -1 if (negative up, positive down).

Returns
0 if both momY the same direction, -1 if (negative up, positive down).

Definition at line 150 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productMoment, and MCTrackInfo.MCTrackInfo.__productVertex.

def MCTrackInfo.MCTrackInfo.getCharge (   self,
  trID 
)

returns charge of a particle with the given trID (index in MCTrack collection).

May return None. Tries to get charge from __productCharge; if it is not available, tries to add the track calling readTrack. If fails, returns None.

Parameters
trID- index of the MCTrack
Returns
charge of the track or None

Definition at line 108 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__productCharge, and MCTrackInfo.MCTrackInfo.readTrack().

def MCTrackInfo.MCTrackInfo.getEventWeight (   self)

returns event weight.

Returns
value of __weight

Definition at line 71 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__weight.

def MCTrackInfo.MCTrackInfo.getHNLdecayTrIDs (   self)

returns list of MCtrIDs (index in MCTrack collection) fot HNL decay products.

Returns
list of MCtrIDs (index in MCTrack collection) fot HNL decay products.

Definition at line 85 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__decayProdTrID.

def MCTrackInfo.MCTrackInfo.getHNLdecayVertex (   self)

returns HNL decay vertex coordinates (TVector3 __HNLdecayCoord).

Returns
TVector3 __HNLdecayCoord

Definition at line 78 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__HNLdecayCoord.

def MCTrackInfo.MCTrackInfo.getMomentum (   self,
  trID 
)

returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection).

May return None. Tries to get momentum from __productMoment; if it is not available, tries to add the track calling readTrack. If fails, returns None.

Parameters
trID- index of the MCTrack
Returns
momentum of the track (TVector3) or None

Definition at line 120 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__productMoment, and MCTrackInfo.MCTrackInfo.readTrack().

def MCTrackInfo.MCTrackInfo.getTrackPropagation (   self,
  trID,
  z 
)

for Tracker Performance studies.

Returns TVector3. Linear propagation of a given track to a plane (0,0,z) perendicular to Z-axis.

Parameters
trID- track index (MCtrID).
z- coordinate of the plane.
Returns
coordinates of the point of track crossing the given plalne (TVector3).

Definition at line 168 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__productMoment, MCTrackInfo.MCTrackInfo.__productVertex, and MCTrackInfo.MCTrackInfo.readTrack().

def MCTrackInfo.MCTrackInfo.getTrIDs (   self)

returns list of all MCtrIDs read by readEvent and readTrack - not only HNL decay products.

Returns
list of MCtrIDs (index in MCTrack collection) fot all tracks read by readEvent and readTrack.

Definition at line 95 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__productMoment.

def MCTrackInfo.MCTrackInfo.PrintHNL (   self)
def MCTrackInfo.MCTrackInfo.readEvent (   self)

reads HNL decay products from MCTrack collection (two at the moment!).

Returns number of daughters. Fills __HNLdecayCoord and __productVertex, __productMoment, __productCharge dictionaries for HNL daughters.

Returns
number of daughters (loop stops at daughter==2 at the moment!).

Definition at line 217 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__clean(), MCTrackInfo.MCTrackInfo.__debug, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productInfo, MCTrackInfo.MCTrackInfo.__productMoment, MCTrackInfo.MCTrackInfo.__productVertex, MCTrackInfo.MCTrackInfo.__weight, and RecoSettings.chargePDG().

def MCTrackInfo.MCTrackInfo.readTrack (   self,
  trID 
)

reads one additional track with trID from MCTrack collection.

Returns 1 if success, 0 otherwise. fills __productVertex, __productMoment, __productCharge dictionaries.

Parameters
trID- track index (MCtrID).
Returns
1 if successful, 0 if trID is not found and the dictionaries are not modified.

Definition at line 184 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__debug, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productInfo, MCTrackInfo.MCTrackInfo.__productMoment, MCTrackInfo.MCTrackInfo.__productVertex, and RecoSettings.chargePDG().

def MCTrackInfo.MCTrackInfo.setAccPlaneZ (   self,
  z 
)

set z of the last full acceptance plane (to be used in checkEllipticAcc), depends on RecoSettings.

trackMinNofStations.

Parameters
z- the value [cm].

Definition at line 52 of file MCTrackInfo.py.

References MCTrackInfo.MCTrackInfo.__zAcc.

Member Data Documentation

MCTrackInfo.MCTrackInfo.__debug
private

debug level [0,3].

Definition at line 16 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__decayProdTrID
private

MCTrID (index of the track in MCtrack list) for HNL daughter products.

Definition at line 24 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__HNLdecayCoord
private

HNL decay vertex coordinates (TVector3).

Assigned in readEvent()

Definition at line 22 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__productCharge
private

Charge of several stored products (not only HNL daughter) as {MCTrID : value}.

Correspond to $__productVertex.

Definition at line 30 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__productInfo
private

Basic information on the particle (pdg, mother pdg,...

to be added - z decay!)

Definition at line 32 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__productMoment
private

Momentum of several stored products (not only HNL daughter) as {MCTrID : TVector3}.

Correspond to $__productVertex.

Definition at line 28 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__productVertex
private

Production vertices of several stored products (not only HNL daughter) as {MCTrID : TVector3}.

Definition at line 26 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__tree
private

root tree to be read.

Definition at line 14 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__weight
private

event weight.

Read in readEvent as weight of HNL.

Definition at line 20 of file MCTrackInfo.py.

MCTrackInfo.MCTrackInfo.__zAcc
private

z of the last full acceptance plane (to be used in checkEllipticAcc), must be set later.

Definition at line 18 of file MCTrackInfo.py.


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