Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NtpMCStdHep.h

Go to the documentation of this file.
00001 
00002 // NtpMCStdHep
00003 //
00004 // NtpMCStdHep is an ntuple class to hold stdhep data for a single
00005 // particle which can be either a primary or a secondary generated
00006 // during particle transport through the detector. 
00007 //
00008 // Based on Roy Lee's CandEventSR/StdHepSR class
00009 //
00011 
00012 #ifndef NTPMCSTDHEP_H
00013 #define NTPMCSTDHEP_H
00014 
00015 #include "TMath.h"
00016 #include "TObject.h"
00017 #include "MCNtuple/NtpMCStdHepHit.h" // data member
00018 
00019 class NtpMCStdHep;
00020 std::ostream &operator << (std::ostream& os, const NtpMCStdHep& sh);
00021 
00022 class NtpMCStdHep : public TObject {
00023 
00024  public:
00025   // Constructors & Destructors
00026   NtpMCStdHep();
00027   virtual ~NtpMCStdHep() {}
00028 
00029   // State testing methods
00030   virtual std::ostream& Print(std::ostream& os,
00031                               const Option_t* option="",
00032                               std::string printpreface="",
00033                               const TClonesArray* stdheparray=0) const;
00034   virtual void Print(const Option_t* option="") const;
00035 
00036   // particle momentum
00037   Float_t P() const {return TMath::Sqrt(p4[0]*p4[0]+p4[1]*p4[1]+p4[2]*p4[2]);}
00038   Float_t Charge() const; // particle charge
00039   std::string ParticleName() const; // particle name
00040        
00041  public:
00042 
00043   // Ntuple is treated like a C-struct with public data members and
00044   // rule-breaking field data members not prefaced by "f" and all
00045   // lowercase, by popular demand.
00046  
00047   UInt_t index;               // index of this stdhep entry in stdhep array
00048   Short_t mc;                 // index of associated mc primary in mc array
00049   Int_t parent[2];            // indices of first/last parent
00050   Int_t child[2];             // indices of first/last child 
00051   Int_t IstHEP;               // status code(see list in UserManual MC chapter)
00052   Int_t IdHEP;                // particle ID (PDG standard)
00053   Float_t mass;               // particle mass (GeV)
00054   Float_t p4[4];              // momentum 4-vector (GeV)
00055   Float_t vtx[4];             // vertex 4-vector ((x,y,z)(m),t(sec))
00056   Int_t ndethit;              // number of det digihits produced by this track
00057   NtpMCStdHepHit dethit[2];   // record info about first/last detector digihit
00058  
00059   ClassDef(NtpMCStdHep,8)
00060 };
00061   
00062 #endif // NTPMCSTDHEP_H

Generated on Mon Feb 15 11:07:06 2010 for loon by  doxygen 1.3.9.1