Changeset 2693 for trunk/MagicSoft/Mars/mfilter
- Timestamp:
- 12/17/03 16:54:33 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mfilter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc
r2588 r2693 136 136 // would result in redistributing cos(Theta). 137 137 // 138 // If 'fUseOrigDistribution' is set to kTRUE (by SetUseOrigDistribution())138 // If the reference distribution doesn't contain entries (GetEntries()==0) 139 139 // the original distribution will be used as the nominal distribution; 140 140 // note that also in this case a dummy nominal distribution has to be … … 150 150 fName = name ? (TString)name : gsDefName; 151 151 fTitle = title ? (TString)title : gsDefTitle; 152 153 fUseOrigDistribution = kFALSE;154 152 } 155 153 … … 162 160 if (fHistRes) 163 161 delete fHistRes; 164 }165 166 // --------------------------------------------------------------------------167 //168 //169 //170 void MFEventSelector2::SetUseOrigDistribution(Bool_t b)171 {172 fUseOrigDistribution = b;173 174 *fLog << inf;175 *fLog << "MFEventSelector2 set ";176 if (!b)177 *fLog << "not ";178 *fLog << "to use the distribution from the input file as target distribution." << endl;179 162 } 180 163 … … 268 251 // set the nominal distribution equal to the original distribution 269 252 270 TH1 *hnp = fUseOrigDistribution ? (TH1*)(fHistOrig->GetHist()).Clone() : &fHistNom->GetHist(); 253 const Bool_t useorigdist = fHistNom->GetHist().GetEntries()==0; 254 TH1 *hnp = useorigdist ? (TH1*)(fHistOrig->GetHist()).Clone() : &fHistNom->GetHist(); 271 255 272 256 TH1 &hn = *hnp; … … 336 320 } 337 321 338 if ( fUseOrigDistribution)322 if (useorigdist) 339 323 delete hnp; 340 324 } -
trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h
r2587 r2693 41 41 TCanvas *fCanvas; //! canvas for online display 42 42 43 Bool_t fUseOrigDistribution;44 45 43 Bool_t fResult; 46 44 Int_t fCounter[2]; … … 60 58 ~MFEventSelector2(); 61 59 62 void SetUseOrigDistribution(Bool_t b=kTRUE); 63 MH3 *GetHistOrig() { return fHistOrig; } 60 MH3 *GetHistOrig() { return fHistOrig; } 64 61 65 62 void SetNumMax(Long_t max=-1) { fNumMax = max; }
Note:
See TracChangeset
for help on using the changeset viewer.