Revision: | 1.1 |
Committed: | Fri Jul 22 18:21:46 2011 UTC (13 years, 9 months ago) by bendavid |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_029c, Mit_029b, Mit_029a, Mit_028a, Mit_028, Mit_027, Mit_027a, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, HEAD |
Log Message: | add experimental multidimensional pileup reweighting |
# | User | Rev | Content |
---|---|---|---|
1 | bendavid | 1.1 | //-------------------------------------------------------------------------------------------------- |
2 | // $Id: | ||
3 | // | ||
4 | // PUReweightingMulti | ||
5 | // | ||
6 | // Authors: J.Bendavid | ||
7 | //-------------------------------------------------------------------------------------------------- | ||
8 | |||
9 | #ifndef MITPHYSICS_UTILS_PUREWEIGHTINGMULTI_H | ||
10 | #define MITPHYSICS_UTILS_PUREWEIGHTINGMULTI_H | ||
11 | |||
12 | #include "MitAna/DataTree/interface/PileupInfoCol.h" | ||
13 | #include <THnSparse.h> | ||
14 | #include <TH3D.h> | ||
15 | |||
16 | namespace mithep { | ||
17 | |||
18 | class PUReweightingMulti { | ||
19 | |||
20 | public: | ||
21 | |||
22 | PUReweightingMulti(const THnSparse *sparse, int maxn = 100, double minprob = 1e-12); | ||
23 | |||
24 | ~PUReweightingMulti(); | ||
25 | |||
26 | double TargetPdf(int *npus, int ndim) const; | ||
27 | TH3D *Target3D(); | ||
28 | TH3D *Weights3D(const TH3D *source3d); | ||
29 | |||
30 | protected: | ||
31 | void Setup(); | ||
32 | |||
33 | |||
34 | const THnSparse *fSparse; | ||
35 | int fNsBins; | ||
36 | int fNDim; | ||
37 | int fMaxN; | ||
38 | double fMinProb; | ||
39 | int fNCacheBins; | ||
40 | Double_t *fWeights; | ||
41 | UShort_t *fIndices; | ||
42 | Double_t *fCache; | ||
43 | Int_t *fOffsets; | ||
44 | Int_t *fIndOffsets; | ||
45 | Double_t *fFactors; | ||
46 | |||
47 | ClassDef(PUReweightingMulti, 0) // PUReweighting | ||
48 | }; | ||
49 | |||
50 | |||
51 | } | ||
52 | |||
53 | #endif |