Changeset 1853
- Timestamp:
- 03/21/03 15:27:44 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1852 r1853 1 1 -*-*- END OF LINE -*-*- 2 3 2003/03/21: Thomas Bretz4 * manalysis/MEnergyEstParam.[h,cc]5 - Added StopMapping and Print functions.6 2 7 3 2003/03/21: Abelardo Moralejo … … 16 12 17 13 14 18 15 2003/03/21: Thomas Bretz 16 17 * manalysis/MEnergyEstParam.[h,cc] 18 - Added StopMapping and Print functions. 19 19 20 20 * manalysis/MSel*.h: … … 32 32 - added a events counter which counts the real number of 33 33 processed events. 34 35 * mdata/MDataChain.[h,cc]: 36 - implemented random numbers 37 - implemented a conversion from degrees to radians and vice versa 34 38 35 39 -
trunk/MagicSoft/Mars/mdata/MDataChain.cc
r1661 r1853 18 18 ! Author(s): Thomas Bretz 04/2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 220 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 72 72 // abs(x) absolute value of x, |x| 73 73 // floor(x) round down to the nearest integer (floor(9.9)=9) 74 // 74 // r2d(x) transform radians to degrees 75 // d2r(x) transform degrees to radians 76 // rand(x) returns a uniform deviate on the interval ( 0, x ]. 77 // (gRandom->Uniform(x) is returned) 78 // randp(x) returns gRandom->Poisson(x) 79 // rande(x) returns gRandom->Exp(x) 80 // randi(x) returns gRandom->Integer(x) 81 // randg(x) returns gRandom->Gaus(0, x) 82 // randl(x) returns gRandom->Landau(0, x) 83 // 84 // REMARK: 85 // - All the random functions are returning 0 if gRandom==0 86 // - You may get better results if you are using a TRandom3 75 87 // 76 88 // FIXME: The possibility to use other objects inheriting from MData … … 86 98 #include <ctype.h> // isalnum, ... 87 99 #include <stdlib.h> // strtod, ... 100 101 #include <TRandom.h> 88 102 89 103 #include "MLog.h" … … 231 245 if (txt=="sgn") return kESgn; 232 246 if (txt=="floor") return kEFloor; 247 if (txt=="r2d") return kERad2Deg; 248 if (txt=="d2r") return kEDeg2Rad; 249 if (txt=="rand") return kERandom; 250 if (txt=="randp") return kERandomP; 251 if (txt=="rande") return kERandomE; 252 if (txt=="randi") return kERandomI; 253 if (txt=="randg") return kERandomG; 254 if (txt=="randl") return kERandomL; 233 255 if (txt[0]=='-') return kENegative; 234 256 if (txt[0]=='+') return kEPositive; … … 477 499 case kEPositive: return val; 478 500 case kEFloor: return floor(val); 501 case kERad2Deg: return val*180/TMath::Pi(); 502 case kEDeg2Rad: return val*TMath::Pi()/180; 503 case kERandom: return gRandom ? gRandom->Uniform(val) : 0; 504 case kERandomP: return gRandom ? gRandom->Poisson(val) : 0; 505 case kERandomE: return gRandom ? gRandom->Exp(val) : 0; 506 case kERandomI: return gRandom ? gRandom->Integer(val) : 0; 507 case kERandomG: return gRandom ? gRandom->Gaus(0, val) : 0; 508 case kERandomL: return gRandom ? gRandom->Landau(0, val) : 0; 479 509 case kENoop: return val; 480 510 } … … 561 591 case kEPositive: str += "+" ; break; 562 592 case kEFloor: str += "floor"; break; 593 case kERad2Deg: str += "r2d" ; break; 594 case kEDeg2Rad: str += "d2r" ; break; 595 case kERandom: str += "rand" ; break; 596 case kERandomP: str += "randp"; break; 597 case kERandomE: str += "rande"; break; 598 case kERandomI: str += "randi"; break; 599 case kERandomG: str += "randg"; break; 600 case kERandomL: str += "randl"; break; 563 601 case kENoop: 564 602 break; … … 585 623 return fMember->GetDataMember(); 586 624 } 625 -
trunk/MagicSoft/Mars/mdata/MDataChain.h
r1661 r1853 40 40 kEPositive, 41 41 kENegative, 42 kEFloor 42 kEFloor, 43 kERad2Deg, 44 kEDeg2Rad, 45 kERandom, 46 kERandomP, 47 kERandomE, 48 kERandomI, 49 kERandomG, 50 kERandomL 43 51 } OperatorType_t; 44 52 -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1852 r1853 617 617 tlist.AddToList(read); 618 618 619 620 619 if (filter) 621 622 623 624 620 { 621 tlist.AddToList(filter); 622 fillh.SetFilter(filter); 623 } 625 624 626 625 tlist.AddToList(&fillh); 627 628 626 629 627 MEvtLoop evtloop; -
trunk/MagicSoft/Mars/mhist/MHMatrix.h
r1852 r1853 93 93 Double_t operator[](Int_t col) { return fM(fRow, col); } 94 94 95 Bool_t Fill(MParList *plist, MTask *read, MF *filter= 0);95 Bool_t Fill(MParList *plist, MTask *read, MF *filter=NULL); 96 96 97 97 TString GetDataMember() const;
Note:
See TracChangeset
for help on using the changeset viewer.