Revision: | 1.4 |
Committed: | Mon Aug 10 16:07:26 2009 UTC (15 years, 8 months ago) by phedex |
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, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, HEAD |
Changes since 1.3: | +8 -8 lines |
Log Message: | Use TH2DAsymError class to store asymmetric statistical and systematic errors. Do comment and style cleanup. |
# | User | Rev | Content |
---|---|---|---|
1 | loizides | 1.1 | //-------------------------------------------------------------------------------------------------- |
2 | phedex | 1.4 | // $Id: FakeEventHeader.h,v 1.3 2009/07/20 19:05:04 loizides Exp $ |
3 | loizides | 1.1 | // |
4 | // FakeEventHeader | ||
5 | // | ||
6 | // Class to hold information specific for events where some fakable object has been promoted | ||
7 | // to a (faked) lepton. | ||
8 | // | ||
9 | // Authors: S. Xie | ||
10 | //-------------------------------------------------------------------------------------------------- | ||
11 | |||
12 | #ifndef MITPHYSICS_FAKEMODS_FAKEEVENTHEADER_H | ||
13 | #define MITPHYSICS_FAKEMODS_FAKEEVENTHEADER_H | ||
14 | |||
15 | #include "MitAna/DataTree/interface/DataObject.h" | ||
16 | loizides | 1.2 | #include "MitAna/DataTree/interface/JetCol.h" |
17 | #include "MitPhysics/FakeMods/interface/FakeObjectCol.h" | ||
18 | loizides | 1.1 | |
19 | namespace mithep | ||
20 | { | ||
21 | class FakeEventHeader : public DataObject | ||
22 | { | ||
23 | public: | ||
24 | FakeEventHeader() : fWeight(1.0), fWeightLowError(0.0), fWeightHighError(0.0) {} | ||
25 | ~FakeEventHeader() {} | ||
26 | |||
27 | Double_t Weight() const { return fWeight; } | ||
28 | Double_t WeightLowError() const { return fWeightLowError; } | ||
29 | Double_t WeightHighError() const { return fWeightHighError; } | ||
30 | const FakeObject *FakeObj(UInt_t i) const { return fFakeObjects.At(i); } | ||
31 | UInt_t FakeObjsSize() const { return fFakeObjects.GetEntries(); } | ||
32 | const Jet *UnfakedJet(UInt_t i) const { return fJets.At(i); } | ||
33 | UInt_t NJets() const { return fJets.GetEntries(); } | ||
34 | void SetWeight(Double_t w) { fWeight = w; } | ||
35 | void SetWeightLowError(Double_t error) { fWeightLowError = error; } | ||
36 | void SetWeightHighError(Double_t error) { fWeightHighError = error; } | ||
37 | void AddJets(const Jet *jet) { fJets.Add(jet); } | ||
38 | void AddFakeObject(const Particle *p, EObjType faketype, | ||
39 | Bool_t fakeTag, Bool_t mcTag); | ||
40 | void AddFakeObject(const mithep::FakeObject *fo); | ||
41 | |||
42 | protected: | ||
43 | |||
44 | phedex | 1.4 | Double_t fWeight; //fake event weight |
45 | Double_t fWeightLowError; //fake event weight low error | ||
46 | Double_t fWeightHighError; //fake event weight high error | ||
47 | FakeObjectArr fFakeObjects; //fake objects | ||
48 | JetOArr fJets; //collection of jets after some have been | ||
49 | loizides | 1.1 | |
50 | loizides | 1.3 | ClassDef(FakeEventHeader, 1) // Fake event header class |
51 | loizides | 1.1 | }; |
52 | } | ||
53 | |||
54 | //-------------------------------------------------------------------------------------------------- | ||
55 | inline void mithep::FakeEventHeader::AddFakeObject(const Particle *p, EObjType faketype, | ||
56 | Bool_t fakeTag, Bool_t mcTag) | ||
57 | { | ||
58 | phedex | 1.4 | // Add new fake object |
59 | loizides | 1.1 | mithep::FakeObject *newFake = fFakeObjects.AddNew(); |
60 | newFake->SetParticle(p); | ||
61 | newFake->SetFakeType(faketype); | ||
62 | newFake->SetFakeTag(fakeTag); | ||
63 | newFake->SetMCTag(mcTag); | ||
64 | } | ||
65 | |||
66 | //-------------------------------------------------------------------------------------------------- | ||
67 | inline void mithep::FakeEventHeader::AddFakeObject(const mithep::FakeObject *fo) | ||
68 | { | ||
69 | phedex | 1.4 | // Add new fake object with default parameters taken from the original object. |
70 | loizides | 1.1 | mithep::FakeObject *newFake = fFakeObjects.AddNew(); |
71 | newFake->SetParticle(fo->FakeParticle()); | ||
72 | newFake->SetFakeType(fo->ObjType()); | ||
73 | newFake->SetFakeTag(fo->FakeTag()); | ||
74 | newFake->SetMCTag(fo->MCTag()); | ||
75 | } | ||
76 | #endif |