ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/PhysicsMod/interface/SimpleExampleMod.h
Revision: 1.5
Committed: Tue Mar 17 17:36:24 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009, Mit_008, Mit_008pre2
Changes since 1.4: +2 -2 lines
Log Message:
Typo

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.5 // $Id: SimpleExampleMod.h,v 1.4 2008/12/10 17:25:17 loizides Exp $
3 loizides 1.1 //
4 loizides 1.5 // SimpleExampleMod
5 loizides 1.1 //
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/Collections.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     ~SimpleExampleMod() {}
35    
36     const char *GetPartName() const { return fPartName; }
37     void SetPartName(const char *n) { fPartName=n; }
38    
39     protected:
40     void Begin();
41     void BeginRun();
42     void EndRun();
43     void Process();
44     void SlaveBegin();
45     void SlaveTerminate();
46     void Terminate();
47    
48 loizides 1.3 TString fPartName; //branch name of MCParticle collection
49     const MCParticleCol *fParticles; //!pointer to generated particle branch
50     TH1D *fPtHist; //!pt histogram
51     TH1D *fEtaHist; //!eta histogram
52    
53 loizides 1.4 ClassDef(SimpleExampleMod, 1) // Simple example analysis module
54 loizides 1.1 };
55     }
56     #endif