Changeset 3325 for trunk/MagicSoft/include-Classes/MMcFormat
- Timestamp:
- 02/26/04 10:55:25 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.hxx
r2871 r3325 8 8 class MMcEvt : public MParContainer 9 9 { 10 private: 10 public: 11 // 12 // ParticleId for Monte Carlo simulation 13 // 14 enum ParticleId_t 15 { 16 kGAMMA = 1, 17 kPOSITRON = 2, 18 kELECTRON = 3, 19 kPROTON = 14, 20 kHELIUM = 402, 21 kOXYGEN = 1608, 22 kIRON = 5626 23 }; 24 25 private: 11 26 UInt_t fEvtNumber; 12 27 UShort_t fPartId; // Type of particle … … 122 137 {fPartId=PartId;} //Set Type of particle 123 138 139 TString GetParticleName() const 140 { 141 switch (fPartId) 142 { 143 case kGAMMA: return "Gamma"; 144 case kPOSITRON: return "Positron"; 145 case kELECTRON: return "Electron"; 146 case kPROTON: return "Proton"; 147 case kHELIUM: return "Helium"; 148 case kOXYGEN: return "Oxygen"; 149 case kIRON: return "Iron"; 150 } 151 152 return Form("%d", fPartId); 153 } 154 TString GetEnergyStr() const 155 { 156 if (fEnergy>1000) 157 return Form("%.1fTeV", fEnergy/1000); 158 159 if (fEnergy>10) 160 return Form("%dGeV", (Int_t)(fEnergy+.5)); 161 162 if (fEnergy>1) 163 return Form("%.1fGeV", fEnergy); 164 165 return Form("%dMeV", (Int_t)(fEnergy*1000+.5)); 166 } 167 124 168 void SetEnergy(Float_t Energy) 125 169 { fEnergy=Energy; } //Set Energy
Note:
See TracChangeset
for help on using the changeset viewer.