Changeset 3325 for trunk/MagicSoft/Mars
- Timestamp:
- 02/26/04 10:55:25 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3324 r3325 12 12 * mreport/MReport.cc, mreport/MReportFileRead.cc: 13 13 - introduced return case -1 14 15 * Makefile.rules: 16 - remove all dependancy files when calling 'rmdep' 17 18 * mbase/MAGIC.h, mmc/MMcEvt.hxx: 19 - moved ParticleId_t to MMcEvt 20 - implemented MMcEvt::GetParticleName 21 - implemented MMcEvt::GetEnergyStr 22 23 * mfilter/MFGeomag.cc, mfilter/MFParticleId.cc, mhist/MHCompProb.cc, 24 mhist/MHEvent.cc, mhist/MHHadronness.cc, 25 mmontecarlo/MMcTriggerRateCalc.cc, mranforest/MHRanForest.cc: 26 - fixed usage of ParticleId_t 27 28 * msignal/Makefile: 29 - removed obsolete includes 14 30 15 31 -
trunk/MagicSoft/Mars/Makefile.rules
r2858 r3325 48 48 49 49 rmdep: 50 @echo " Removing dependency file ..."51 @rm -f *Dep.d 50 @echo " Removing dependency files..." 51 @rm -f *Dep.d */*Dep.d 52 52 53 53 rmcore: -
trunk/MagicSoft/Mars/mbase/MAGIC.h
r3318 r3325 29 29 30 30 // 31 // ParticleId for Monte Carlo simulation32 //33 typedef enum34 {35 kGAMMA = 1,36 kPOSITRON = 2,37 kELECTRON = 3,38 kPROTON = 14,39 kHELIUM = 402,40 kOXYGEN = 1608,41 kIRON = 562642 } ParticleId_t;43 44 //45 31 // ColorId for calibration 46 32 // -
trunk/MagicSoft/Mars/mfilter/MFGeomag.cc
r2990 r3325 36 36 // 37 37 ///////////////////////////////////////////////////////////////////////////// 38 39 38 #include "MFGeomag.h" 40 39 … … 156 155 switch (fMcEvt->GetPartId()) 157 156 { 158 case kGAMMA:157 case MMcEvt::kGAMMA: 159 158 if (!fGammaElectron) //accept gammas if not set to electrons 160 159 return kTRUE; … … 162 161 break; 163 162 164 case kHELIUM:163 case MMcEvt::kHELIUM: 165 164 rig /= 2; //double charge 166 165 break; 167 166 168 case kPROTON: //protons169 case kPOSITRON: //positrons170 break; 171 172 case kELECTRON: //electrons167 case MMcEvt::kPROTON: //protons 168 case MMcEvt::kPOSITRON: //positrons 169 break; 170 171 case MMcEvt::kELECTRON: //electrons 173 172 indadd = 1152; //second part of table (negative particles) 174 173 break; -
trunk/MagicSoft/Mars/mfilter/MFParticleId.cc
r2206 r3325 140 140 switch (fValue) 141 141 { 142 case kGAMMA: 143 out << "kGAMMA"; 144 break; 145 case kPROTON: 146 out << "kPROTON"; 147 break; 148 case kHELIUM: 149 out << "kHELIUM"; 150 break; 151 case kOXYGEN: 152 out << "kOXYGEN"; 153 break; 154 case kIRON: 155 out << "kIRON"; 156 break; 142 case MMcEvt::kGAMMA: out << "MMcEvt::kGAMMA"; break; 143 case MMcEvt::kPOSITRON: out << "MMcEvt::kPOSITRON"; break; 144 case MMcEvt::kELECTRON: out << "MMcEvt::kELECTRON"; break; 145 case MMcEvt::kPROTON: out << "MMcEvt::kPROTON"; break; 146 case MMcEvt::kHELIUM: out << "MMcEvt::kHELIUM"; break; 147 case MMcEvt::kOXYGEN: out << "MMcEvt::kOXYGEN"; break; 148 case MMcEvt::kIRON: out << "MMcEvt::kIRON"; break; 157 149 default: 158 150 out << fValue; -
trunk/MagicSoft/Mars/mhist/MHCompProb.cc
r2173 r3325 168 168 { 169 169 case 0: // First loop : fill the fixed-bin histograms with gammas. 170 if (mcevt.GetPartId() == kGAMMA)170 if (mcevt.GetPartId() == MMcEvt::kGAMMA) 171 171 Fill(*fHists); 172 172 return kTRUE; 173 173 174 174 case 1: // Second Loop: fill the variable-bin histograms with protons. 175 if (mcevt.GetPartId() != kGAMMA)175 if (mcevt.GetPartId() != MMcEvt::kGAMMA) 176 176 Fill(*fHistVar); 177 177 return kTRUE; -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r3239 r3325 237 237 TString txt("#splitline{"); 238 238 239 switch (fMcEvt->GetPartId()) 240 { 241 case kGAMMA: 242 txt += "Gamma: "; 243 break; 244 case kPROTON: 245 txt += "Proton: "; 246 break; 247 case kHELIUM: 248 txt += "Helium: "; 249 break; 250 default: 251 s += "Particle Id#"; 252 s += fMcEvt->GetPartId(); 253 s += ": "; 254 } 239 txt += fMcEvt->GetParticleName(); 255 240 256 241 s.Insert(0, txt); … … 258 243 s += "}{ E="; 259 244 260 if (fMcEvt->GetEnergy()>1000) 261 s += Form("%.1fTeV", fMcEvt->GetEnergy()/1000); 262 else 263 if (fMcEvt->GetEnergy()>10) 264 s += Form("%dGeV", (Int_t)(fMcEvt->GetEnergy()+.5)); 265 else 266 if (fMcEvt->GetEnergy()>1) 267 s += Form("%.1fGeV", fMcEvt->GetEnergy()); 268 else 269 s += Form("%dMeV", (Int_t)(fMcEvt->GetEnergy()*1000+.5)); 245 s+= fMcEvt->GetEnergyStr(); 270 246 271 247 s += " r="; -
trunk/MagicSoft/Mars/mhist/MHHadronness.cc
r2522 r3325 216 216 const Int_t particleid = fMatrix ? (Int_t)(*fMatrix)[fMap] : fMcEvt->GetPartId(); 217 217 218 if (particleid== kGAMMA)218 if (particleid==MMcEvt::kGAMMA) 219 219 fGhness->Fill(h, w); 220 220 else -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
r2207 r3325 332 332 switch (fPartId) 333 333 { 334 case kPROTON:334 case MMcEvt::kPROTON: 335 335 if ((Int_t)floor(-100*fMcCorRunHeader->GetSlopeSpec()+0.5) != 275) 336 336 { 337 *fLog << err << dbginf <<"Spectrum slope as read from input file (";337 *fLog << err << "Spectrum slope as read from input file ("; 338 338 *fLog << fMcCorRunHeader->GetSlopeSpec() << ") does not match the expected "; 339 339 *fLog << "one (-2.75) for protons" << endl << "... aborting." << endl; … … 342 342 rate.SetFlux(0.1091, 2.75); 343 343 break; 344 case kHELIUM:344 case MMcEvt::kHELIUM: 345 345 if ((Int_t)floor(-100*fMcCorRunHeader->GetSlopeSpec()+0.5) != 262) 346 346 { 347 *fLog << err << dbginf <<"Spectrum slope as read from input file (";347 *fLog << err << "Spectrum slope as read from input file ("; 348 348 *fLog << fMcCorRunHeader->GetSlopeSpec() << ") does not match the expected "; 349 349 *fLog << "one (-2.62) for Helium" << endl << "... aborting." << endl; … … 353 353 break; 354 354 default: 355 *fLog << err << dbginf <<"Unknown incident flux parameters for ";355 *fLog << err << "Unknown incident flux parameters for "; 356 356 *fLog << fPartId<< " particle Id ... aborting." << endl; 357 357 return kFALSE; -
trunk/MagicSoft/Mars/mranforest/MHRanForest.cc
r2516 r3325 90 90 if (!fMcEvt) 91 91 { 92 TString str = AddSerialNumber("MMcEvt"); 93 str += " not found... aborting."; 94 *fLog << err << dbginf << str << endl; 92 *fLog << err << AddSerialNumber("MMcEvt") << " not found... aborting." << endl; 95 93 return kFALSE; 96 94 } … … 99 97 if (!fRanForest) 100 98 { 101 *fLog << err << dbginf <<"MRanForest not found... aborting." << endl;99 *fLog << err << "MRanForest not found... aborting." << endl; 102 100 return kFALSE; 103 101 } … … 116 114 117 115 Double_t hest=0; 118 Double_t htrue=fMcEvt->GetPartId()== kGAMMA ? 0. : 1.;116 Double_t htrue=fMcEvt->GetPartId()==MMcEvt::kGAMMA ? 0. : 1.; 119 117 120 118 Int_t ntrees=fRanForest->GetNumTrees(); -
trunk/MagicSoft/Mars/msignal/Makefile
r3322 r3325 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase -I../mmc -I../mraw -I../mgeom -I../mfilter \ 25 -I../mdata -I../mhbase -I../mhist -I../mgui -I../mimage \ 26 -I../mhistmc -I../mfileio -I../mmain -I../mcalib \ 27 -I../mpointing -I../mtools -I../manalysis 24 INCLUDES = -I. -I../mbase -I../mgui -I../mraw -I../manalysis \ 25 -I../mgeom -I../mtools 28 26 29 # mgui (MCamEvent), mgeom(MGeomCam) 27 # mgui (MCamEvent): MExtractSignalCam 28 # mgeom(MGeomCam): MArrivalTime 29 # mtools(MCubicSpline): MArrivalTime 30 # mraw (MRawEvtData): MExtractSignal 31 # manalysis (MPedestalCam): MExtractSignal 30 32 31 33 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.