Changeset 1542 for trunk/MagicSoft/include-Classes
- Timestamp:
- 10/16/02 10:40:39 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.cxx
r1353 r1542 1 1 #include "MMcEvt.hxx" 2 2 3 #include <iostream.h> 4 #include <fstream.h> 5 3 #include "MLog.h" 4 #include "MLogManip.h" 6 5 7 6 //========== … … 18 17 19 18 20 MMcEvt::MMcEvt() { 21 // 22 // default constructor 23 // set all values to zero 19 MMcEvt::MMcEvt() 20 { 21 // 22 // default constructor 23 // set all values to zero 24 24 fName = "MMcEvt"; 25 25 fTitle = "Event info from Monte Carlo"; 26 26 27 fPartId = 0 ; 28 fEnergy = 0. ; 29 30 fTheta = 0. ; 31 fPhi = 0. ; 32 33 fCoreD = 0. ; 34 fCoreX = 0. ; 35 fCoreY = 0. ; 36 fImpact = 0. ; 37 38 fPhotIni = 0 ; 39 fPassPhotAtm = 0 ; 40 fPassPhotRef = 0 ; 41 fPassPhotCone = 0 ; 42 fPhotElfromShower = 0 ; 43 fPhotElinCamera = 0 ; 44 } 45 46 MMcEvt::MMcEvt( UShort_t usPId, 27 Clear(); 28 } 29 30 MMcEvt::MMcEvt( UShort_t usPId, 47 31 Float_t fEner, 48 32 Float_t fThet, … … 99 83 100 84 101 void MMcEvt::Clear(Option_t *opt) {102 // 103 //104 // reset all values to zero105 106 fPartId = 0;107 fEnergy = 0.;108 109 fTheta = 0.;110 fPhi = 0.;111 112 fCoreD = 0.;113 fCoreX = 0.;114 fCoreY = 0.;115 fImpact = 0.;116 117 fPhotIni = 0;118 fPassPhotAtm = 0;119 fPassPhotRef = 0;120 fPassPhotCone = 0;121 fPhotElfromShower = 0;122 fPhotElinCamera = 0;85 void MMcEvt::Clear(Option_t *opt) 86 { 87 // 88 // reset all values to values as nonsense as possible 89 // 90 fPartId = 0; 91 fEnergy = -1; 92 93 fTheta = 0; 94 fPhi = 0; 95 96 fCoreD = 0; 97 fCoreX = 0; 98 fCoreY = 0; 99 fImpact = -1; 100 101 fPhotIni = 0; 102 fPassPhotAtm = 0; 103 fPassPhotRef = 0; 104 fPassPhotCone = 0; 105 fPhotElfromShower = 0; 106 fPhotElinCamera = 0; 123 107 } 124 108 … … 186 170 if (str.IsNull()) 187 171 { 188 cout<< endl;189 cout<< "Monte Carlo output:" << endl;190 cout<< " Particle Id: ";172 *fLog << all << endl; 173 *fLog << "Monte Carlo output:" << endl; 174 *fLog << " Particle Id: "; 191 175 switch(fPartId) 192 176 { 193 177 case kGAMMA: 194 cout<< "Gamma" << endl;178 *fLog << "Gamma" << endl; 195 179 break; 196 180 case kPROTON: 197 cout<< "Proton" << endl;181 *fLog << "Proton" << endl; 198 182 break; 199 183 case kHELIUM: 200 cout<< "Helium" << endl;184 *fLog << "Helium" << endl; 201 185 break; 202 186 } 203 cout<< " Energy: " << fEnergy << "GeV" << endl;204 cout<< " Impactpar.: " << fImpact/100 << "m" << endl;205 cout<< " Photoelectrons: " << fPhotElfromShower << endl;206 cout<< endl;187 *fLog << " Energy: " << fEnergy << "GeV" << endl; 188 *fLog << " Impactpar.: " << fImpact/100 << "m" << endl; 189 *fLog << " Photoelectrons: " << fPhotElfromShower << endl; 190 *fLog << endl; 207 191 return; 208 192 } … … 211 195 { 212 196 case kGAMMA: 213 cout<< "Particle: Gamma" << endl;197 *fLog << "Particle: Gamma" << endl; 214 198 break; 215 199 case kPROTON: 216 cout<< "Particle: Proton" << endl;200 *fLog << "Particle: Proton" << endl; 217 201 break; 218 202 case kHELIUM: 219 cout<< "Particle: Helium" << endl;203 *fLog << "Particle: Helium" << endl; 220 204 break; 221 205 } 222 206 if (str.Contains("energy", TString::kIgnoreCase)) 223 cout<< "Energy: " << fEnergy << "GeV" << endl;207 *fLog << "Energy: " << fEnergy << "GeV" << endl; 224 208 if (str.Contains("impact", TString::kIgnoreCase)) 225 cout<< "Impact: " << fImpact << "cm" << endl;226 } 209 *fLog << "Impact: " << fImpact << "cm" << endl; 210 }
Note:
See TracChangeset
for help on using the changeset viewer.