ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/PhysicsMod/interface/SimpleExampleMod.h
Revision: 1.2
Committed: Fri Nov 28 20:27:23 2008 UTC (16 years, 5 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.1: +2 -2 lines
Log Message:
Added PlotKineMod and PublisherMod. Needs more finetuning.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.2 // $Id: SimpleExampleMod.h,v 1.1 2008/11/25 14:30:53 loizides Exp $
3 loizides 1.1 //
4     // SimpleExampleAnaMod
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/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     TString fPartName; //branch name of MCParticle collection
41 loizides 1.2 MCParticleCol *fParticles; //!pointer to generated particle branch
42 loizides 1.1 TH1D *fPtHist; //!pt histogram
43     TH1D *fEtaHist; //!eta histogram
44    
45     void Begin();
46     void BeginRun();
47     void EndRun();
48     void Process();
49     void SlaveBegin();
50     void SlaveTerminate();
51     void Terminate();
52    
53     ClassDef(SimpleExampleMod,1) // TAM simple example analysis module
54     };
55     }
56     #endif