ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/PhysicsMod/interface/FullExampleMod.h
Revision: 1.7
Committed: Fri Mar 12 13:51:26 2010 UTC (15 years, 1 month ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, 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, HEAD
Branch point for: Mit_025c_branch
Changes since 1.6: +12 -1 lines
Log Message:
Update full example to be used as physics example also

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: FullExampleMod.h,v 1.6 2009/09/29 19:16:58 loizides Exp $
3 //
4 // FullExampleMod
5 //
6 // This TAM module shows how to use TAM. It takes a couple of branches
7 // and produces a pt and eta distribution.
8 //
9 // More information about TAM in general can be found at
10 // http://www.cmsaf.mit.edu/twiki/bin/view/Software/TAM
11 //
12 // Authors: C.Loizides, J.Bendavid
13 //--------------------------------------------------------------------------------------------------
14
15 #ifndef MITANA_PHYSICSMOD_FULLEXAMPLEMOD_H
16 #define MITANA_PHYSICSMOD_FULLEXAMPLEMOD_H
17
18 #include "MitAna/TreeMod/interface/BaseMod.h"
19 #include "MitAna/DataTree/interface/CollectionsFwd.h"
20
21 class TH1D;
22
23 namespace mithep
24 {
25 class FullExampleMod : public BaseMod
26 {
27 public:
28 FullExampleMod(const char *name="FullExampleMod",
29 const char *title="Example analysis module with all branches");
30
31 protected:
32 void Begin();
33 void Process();
34 void SlaveBegin();
35 void SlaveTerminate();
36 void Terminate();
37
38 void SetMCPartName(TString name) { fMCPartName = name; }
39 void SetTrackName(TString name) { fTrackName = name; }
40 void SetMuonName(TString name) { fMuonName = name; }
41 void SetElectronName(TString name) { fElectronName = name; }
42 void SetElectronsFromBranch(Bool_t b) { fElectronsFromBranch = b; }
43 void SetMuonsFromBranch(Bool_t b) { fMuonsFromBranch = b; }
44
45
46
47 TString fMCPartName; //name of particle collection
48 TString fTrackName; //name of track collection
49 TString fMuonName; //name of muon collection
50 TString fElectronName; //name of electron collection
51 Bool_t fMuonsFromBranch; //muons are loaded from a branch
52 Bool_t fElectronsFromBranch; //electrons are loaded from a branch
53 const MCParticleCol *fParticles; //!MCParticle branch
54 const TrackCol *fTracks; //!Track branch
55 const MuonCol *fMuons; //!Muon branch
56 const ElectronCol *fElectrons; //!Electron branch
57 TH1D *fMCPtHist; //!MCParticle pt histogram
58 TH1D *fMCEtaHist; //!MCParticle eta histogram
59 TH1D *fTrackPtHist; //!Track pt histogram
60 TH1D *fTrackEtaHist; //!Track eta histogram
61 TH1D *fMuonPtHist; //!Muon pt histogram
62 TH1D *fMuonEtaHist; //!Muon eta histogram
63 TH1D *fElectronPtHist; //!Electron pt histogram
64 TH1D *fElectronEtaHist; //!Electron eta histogram
65
66 ClassDef(FullExampleMod, 1) // Full example analysis module
67 };
68 }
69 #endif