Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

TMBMCpart.hpp

Go to the documentation of this file.
00001 #ifndef TMBMCpart_H
00002 #define TMBMCpart_H
00003 
00005 // file: TMBMCpart.hpp                                                  //
00006 // TMBTree MCpart class 
00007 //    has MCparticle information
00008 //
00009 // created: 21-March-2002  Serban Protopopescu
00010 //                                                                      //
00012 
00013 #include "tmb_tree/TMBLorentzVector.hpp"
00014 
00015 #ifndef ROOT_TRef
00016 #include "TRef.h"
00017 #endif
00018 #ifndef ROOT_TRefArray
00019 #include "TRefArray.h"
00020 #endif
00021 
00022 #include <cmath>
00023 class TMBMCvtx;
00024 
00029 class TMBMCpart : public TMBLorentzVector {
00030 
00031 private:
00032   Float_t        _q;            
00033   Int_t          _pdgid;        
00034   Int_t          _status;       
00035   TRef           _vtx;          
00036   TRef           _vtxend;       
00037 
00038 public:
00039   TMBMCpart() {;}
00040   TMBMCpart(Float_t px, Float_t py, Float_t pz,Float_t E,
00041             Float_t q, Float_t pt, Float_t phi, Float_t eta, 
00042             Int_t pdgid, Int_t status, TRef vtx, TRef vtxend);
00043 
00044   Float_t charge()   const    {return _q;}
00045 
00046   inline Int_t pdgid() const {return _pdgid;}
00047   inline Int_t abspdgid() const {return pdgid() > 0 ? pdgid() : -pdgid();}
00048   const TMBMCvtx*       getPMCvtx() const {return _vtx.IsValid() ? (TMBMCvtx*)_vtx.GetObject() : 0;}
00049   const TMBMCvtx*       getDMCvtx() const {return _vtxend.IsValid() ? (TMBMCvtx*)_vtxend.GetObject() : 0;}
00050   bool isStable() const {bool stable=true; if(getDMCvtx()) stable=false; return stable;}
00051   bool isStableParticle() const {bool stable=true; if(getDMCvtx()) stable=false; if ( _status > 1 || _status < 0 ) stable=false; return stable;}
00052   bool isLepton()const{return abs(_pdgid)>10 && abs(_pdgid)<19;}
00053 
00054   Int_t status() const { return _status; }
00055   Float_t zFrag() const { return Float_t(_status/10)/1000.; }
00056 
00057   ~TMBMCpart() {;}
00058 
00059    ClassDef(TMBMCpart, 2)   //TMBTree MCpart class
00060 };
00061 
00062 #endif

Generated on Tue Mar 28 10:13:05 2006 for CAF by doxygen 1.3.4