Python
|
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...
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... | |
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.
def MCTrackInfo.MCTrackInfo.__init__ | ( | self, | |
tree, | |||
debug = 0 |
|||
) |
Definition at line 12 of file MCTrackInfo.py.
|
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.
tight | - if true, not only HNL vertex but also propagated tracks are checked. |
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).
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.
trID | - index of the MCTrack |
Definition at line 108 of file MCTrackInfo.py.
References MCTrackInfo.MCTrackInfo.__productCharge, and MCTrackInfo.MCTrackInfo.readTrack().
def MCTrackInfo.MCTrackInfo.getEventWeight | ( | self | ) |
returns event 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.
Definition at line 85 of file MCTrackInfo.py.
References MCTrackInfo.MCTrackInfo.__decayProdTrID.
def MCTrackInfo.MCTrackInfo.getHNLdecayVertex | ( | self | ) |
returns HNL decay vertex coordinates (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.
trID | - index of the MCTrack |
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.
trID | - track index (MCtrID). |
z | - coordinate of the plane. |
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.
Definition at line 95 of file MCTrackInfo.py.
References MCTrackInfo.MCTrackInfo.__productMoment.
def MCTrackInfo.MCTrackInfo.PrintHNL | ( | self | ) |
prints HNL decay products
Definition at line 58 of file MCTrackInfo.py.
References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productInfo, and MCTrackInfo.MCTrackInfo.__productMoment.
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.
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.
trID | - track index (MCtrID). |
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.
z | - the value [cm]. |
Definition at line 52 of file MCTrackInfo.py.
References MCTrackInfo.MCTrackInfo.__zAcc.
|
private |
debug level [0,3].
Definition at line 16 of file MCTrackInfo.py.
|
private |
MCTrID (index of the track in MCtrack list) for HNL daughter products.
Definition at line 24 of file MCTrackInfo.py.
|
private |
HNL decay vertex coordinates (TVector3).
Assigned in readEvent()
Definition at line 22 of file MCTrackInfo.py.
|
private |
Charge of several stored products (not only HNL daughter) as {MCTrID : value}.
Correspond to $__productVertex.
Definition at line 30 of file MCTrackInfo.py.
|
private |
Basic information on the particle (pdg, mother pdg,...
to be added - z decay!)
Definition at line 32 of file MCTrackInfo.py.
|
private |
Momentum of several stored products (not only HNL daughter) as {MCTrID : TVector3}.
Correspond to $__productVertex.
Definition at line 28 of file MCTrackInfo.py.
|
private |
Production vertices of several stored products (not only HNL daughter) as {MCTrID : TVector3}.
Definition at line 26 of file MCTrackInfo.py.
|
private |
root tree to be read.
Definition at line 14 of file MCTrackInfo.py.
|
private |
|
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.