ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/src/MCParticle.cc
Revision: 1.1
Committed: Fri Jul 25 11:32:45 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006, Mit_005, Mit_004, MITHEP_2_0_x
Log Message:
Merged gen and sim particles into new MCParticle class

File Contents

# User Rev Content
1 bendavid 1.1 // $Id: MCParticle.cc,v 1.3 2008/07/16 09:32:05 bendavid Exp $
2    
3     #include "MitAna/DataTree/interface/MCParticle.h"
4    
5     ClassImp(mithep::MCParticle)
6    
7     using namespace mithep;
8    
9     //--------------------------------------------------------------------------------------------------
10     Double_t MCParticle::Charge() const
11     {
12     // Get Charge from Pdg Lookup
13    
14     TParticlePDG* pdgEntry = PdgEntry();
15     if (pdgEntry)
16     return pdgEntry->Charge()/3.0;
17     else {
18     return -99.0;
19     printf("Pdg Code %i not found in table, returning Charge=-99.0", fPdgId);
20     }
21     }
22    
23     //--------------------------------------------------------------------------------------------------
24     void MCParticle::Print(Option_t */*opt*/) const
25     {
26     printf("id=%5d st=%3d px=%.3f py=%.3f pz=%.3f e=%.3f\n",
27     PdgId(), Status(), Px(), Py(), Pz(), E());
28     }