ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/PhysicsMod/interface/SimpleExampleMod.h
Revision: 1.6
Committed: Tue May 12 18:41:41 2009 UTC (15 years, 11 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009a
Changes since 1.5: +1 -2 lines
Log Message:
Save number of triggered events.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.6 // $Id: SimpleExampleMod.h,v 1.5 2009/03/17 17:36:24 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    
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 loizides 1.3 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 loizides 1.4 ClassDef(SimpleExampleMod, 1) // Simple example analysis module
53 loizides 1.1 };
54     }
55     #endif