ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/PhysicsMod/interface/SimpleExampleMod.h
Revision: 1.7
Committed: Mon Jun 15 15:00:16 2009 UTC (15 years, 10 months ago) by loizides
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, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, HEAD
Branch point for: Mit_025c_branch
Changes since 1.6: +2 -2 lines
Log Message:
Added proper fwd defs plus split up complilation of MitAna/DataTree LinkDefs.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: SimpleExampleMod.h,v 1.6 2009/05/12 18:41:41 loizides Exp $
3 //
4 // SimpleExampleMod
5 //
6 // This TAM module shows how to use TAM. It takes the MCParticle branch
7 // and produces the pt and eta distribution of the contained particles.
8 //
9 // The module also declares all relevant member functions of a TAModule
10 // and has extensive comments for each of them, even if for this simple
11 // example they are not implemented.
12 //
13 // More information about TAM in general can be found at
14 // http://www.cmsaf.mit.edu/twiki/bin/view/Software/TAM
15 //
16 // Authors: C.Loizides
17 //--------------------------------------------------------------------------------------------------
18
19 #ifndef MITANA_PHYSICSMOD_SIMPLEEXAMPLEMOD_H
20 #define MITANA_PHYSICSMOD_SIMPLEEXAMPLEMOD_H
21
22 #include "MitAna/TreeMod/interface/BaseMod.h"
23 #include "MitAna/DataTree/interface/MCParticleFwd.h"
24
25 class TH1D;
26
27 namespace mithep
28 {
29 class SimpleExampleMod : public BaseMod
30 {
31 public:
32 SimpleExampleMod(const char *name="SimpleExampleMod",
33 const char *title="Simple example analysis module");
34
35 const char *GetPartName() const { return fPartName; }
36 void SetPartName(const char *n) { fPartName=n; }
37
38 protected:
39 void Begin();
40 void BeginRun();
41 void EndRun();
42 void Process();
43 void SlaveBegin();
44 void SlaveTerminate();
45 void Terminate();
46
47 TString fPartName; //branch name of MCParticle collection
48 const MCParticleCol *fParticles; //!pointer to generated particle branch
49 TH1D *fPtHist; //!pt histogram
50 TH1D *fEtaHist; //!eta histogram
51
52 ClassDef(SimpleExampleMod, 1) // Simple example analysis module
53 };
54 }
55 #endif