ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/interface/AnaFwkMod.h
Revision: 1.12
Committed: Fri Sep 13 10:16:35 2013 UTC (11 years, 7 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, HEAD
Changes since 1.11: +8 -2 lines
Log Message:
Add pileup histograms for run-dependent Monte Carlo

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.12 // $Id: AnaFwkMod.h,v 1.11 2013/08/26 22:43:59 bendavid Exp $
3 loizides 1.1 //
4     // AnaFwkMod
5     //
6     // This module collects interesting global information, like the overall number of processed
7     // events and puts this information into the OutputList.
8     //
9     // Authors: C.Loizides
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITANA_TREEEMOD_ANAFWKMOD_H
13     #define MITANA_TREEEMOD_ANAFWKMOD_H
14    
15     #include "MitAna/TreeMod/interface/BaseMod.h"
16 loizides 1.7 #include "MitAna/DataTree/interface/EventHeaderCol.h"
17 bendavid 1.11 #include "MitAna/DataTree/interface/MCEventInfo.h"
18 bendavid 1.9 #include "MitAna/DataTree/interface/PileupInfoFwd.h"
19 loizides 1.1
20 loizides 1.4 class TTree;
21 loizides 1.1 class TH1D;
22 bendavid 1.9 class TH3D;
23 loizides 1.1 class TStopwatch;
24    
25     namespace mithep
26     {
27     class AnaFwkMod : public BaseMod
28     {
29     public:
30     AnaFwkMod(const char *name="AnaFwkMod",
31     const char *title="Analysis framework module");
32    
33 loizides 1.8 Long64_t GetPrintScale() const { return fPrintScale; }
34 loizides 1.6 Long64_t GetSkipNEvents() const { return fSkipNEvents; }
35 loizides 1.8 void SetPrintScale(UInt_t n) { fPrintScale = n; }
36 loizides 1.6 void SetSkipNEvents(Long64_t n) { fSkipNEvents = n; }
37    
38 loizides 1.1 protected:
39 loizides 1.6 void BeginRun();
40     Bool_t Notify();
41     void CopyAllEventHeaders();
42     void Process();
43     void SlaveBegin();
44     void SlaveTerminate();
45    
46 loizides 1.5 TString fAllHeadTreeName; //all events tree name
47     TString fAllHeadBrName; //all event headers branch name
48 loizides 1.6 Long64_t fSkipNEvents; //number of events to skip from beginning (def=0)
49 loizides 1.8 UInt_t fPrintScale; //scale of when to print event number/timings (def=100)
50 loizides 1.4 TStopwatch *fSWtotal; //!stop watch for overall timing
51     TStopwatch *fSWevent; //!stop watch per n events
52     EventHeaderArr fAllHeaders; //!pointer to array of all event headers
53     TTree *fAllHeadTree; //!all event headers tree in current file
54     EventHeader *fAllEventHeader; //!all event header
55     Bool_t fReload; //!reload tree after file changed
56 loizides 1.5 Int_t fCurEnt; //!curent entry in AllEvents tree
57     Int_t fNEventsSkimmed; //!number of skimmed events
58 loizides 1.6 Int_t fNEventsSkipped; //!number of skippeded events
59 bendavid 1.9 const PileupInfoCol *fPileupInfo; //!
60     TString fPileupInfoName; //Name of PileupInfo Branch for pileup truth distributions
61     Bool_t fDoPUInfo;
62     TH1D *hNPU; //in-time pileup distribution
63     TH3D *hNPU50ns; //three-dimensional pileup distribution (bx=0,-2,+2) suitable for 50ns spacing
64 ceballos 1.10 TH1D *hNPUTrue; //true pileup distribution
65 bendavid 1.11 const MCEventInfo *fMCEventInfo; //!MC Event Info pointer
66     TString fMCEventInfoName; //name of MC Event info branch
67     TH1D *hDTotalMCWeight; //total monte carlo weight from mc event header
68 bendavid 1.12 TH1D *hNPURunABObs; //"observed" pileup distribution for Run dependent MC, run AB
69     TH1D *hNPURunCObs; //"observed" pileup distribution for Run dependent MC, run C
70     TH1D *hNPURunDObs; //"observed" pileup distribution for Run dependent MC, run D
71     TH1D *hNPURunABTrue; //"true" pileup distribution for Run dependent MC, run AB
72     TH1D *hNPURunCTrue; //"true" pileup distribution for Run dependent MC, run C
73     TH1D *hNPURunDTrue; //"true" pileup distribution for Run dependent MC, run D
74    
75 loizides 1.4 ClassDef(AnaFwkMod, 1) // Analysis framework module
76 loizides 1.1 };
77     }
78     #endif