Changeset 14944 for fact/tools/rootmacros/PulseTemplates
- Timestamp:
- 02/21/13 14:54:44 (12 years ago)
- Location:
- fact/tools/rootmacros/PulseTemplates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/Sample.C
r14754 r14944 41 41 mMaxNumber = 0; 42 42 mSampleSize = 0; 43 mVerbosityLvl = 0; 43 44 mSeed = 4357; 44 45 } … … 199 200 int nbins = inputHisto->GetXaxis()->GetNbins(); 200 201 202 if (mVerbosityLvl > 1) cout << "nbins: " << nbins << endl; 201 203 //we need to get the binning 202 204 203 205 //entries of TH1 204 vector< float> entries;206 vector<double> entries; 205 207 206 208 //quantity of entries in bin 207 209 int quantity = 0; 208 floatvalue = 0;210 double value = 0; 209 211 for (int i=0;i<nbins;i++) 210 212 { 211 213 value = inputHisto->GetBinLowEdge(i); 212 214 quantity = inputHisto->GetBinContent(i); 213 // cout << value << "(" << quantity << ") ";214 215 for (int j = 0; j < quantity; j++) 215 216 { … … 220 221 //get size of sample to be bootstrapped 221 222 int sampleSize = entries.size(); 223 224 if (mVerbosityLvl > 1) cout << "sampleSize: " << sampleSize << endl; 222 225 223 226 //Vector with positions in original sample … … 256 259 { 257 260 if (size == 0){ 258 cout << "Bootstrapping: size of vector = 0; nothing to do" << endl;261 if (mVerbosityLvl > 1) cout << "Bootstrapping: size of vector = 0; nothing to do" << endl; 259 262 return; 260 263 } -
fact/tools/rootmacros/PulseTemplates/Sample.h
r14744 r14944 106 106 int mSeed; 107 107 TRandom3 mRandom; 108 int mVerbosityLvl; 108 109 109 110 };
Note:
See TracChangeset
for help on using the changeset viewer.