1 |
//--------------------------------------------------------------------------------------------------
|
2 |
// $Id: MergeLeptonsMod.h,v 1.4 2009/06/15 15:00:21 loizides Exp $
|
3 |
//
|
4 |
// MergeLeptonsMod
|
5 |
//
|
6 |
// This module merges muon and electron collections. (Note if need be this can easily be
|
7 |
// generalized).
|
8 |
//
|
9 |
// Authors: C.Loizides
|
10 |
//--------------------------------------------------------------------------------------------------
|
11 |
|
12 |
#ifndef MITPHYSICS_MODS_MERGELEPTONSMOD_H
|
13 |
#define MITPHYSICS_MODS_MERGELEPTONSMOD_H
|
14 |
|
15 |
#include "MitAna/TreeMod/interface/BaseMod.h"
|
16 |
#include "MitAna/DataTree/interface/ElectronFwd.h"
|
17 |
#include "MitAna/DataTree/interface/MuonFwd.h"
|
18 |
#include "MitAna/DataTree/interface/ParticleFwd.h"
|
19 |
#include "TH1D.h"
|
20 |
|
21 |
namespace mithep
|
22 |
{
|
23 |
class MergeLeptonsMod : public BaseMod
|
24 |
{
|
25 |
public:
|
26 |
MergeLeptonsMod(const char *name="MergeLeptonsMod",
|
27 |
const char *title="Merging leptons module");
|
28 |
|
29 |
const char *GetElectronsName() const { return fElName; }
|
30 |
const char *GetMergedName() const { return fMergedName; }
|
31 |
const char *GetMuonsName() const { return fMuName; }
|
32 |
const char *GetOutputName() const { return GetMergedName(); }
|
33 |
void SetElectronsName(const char *n) { fElName=n; }
|
34 |
void SetMergedName(const char *n) { fMergedName=n; }
|
35 |
void SetMuonsName(const char *n) { fMuName=n; }
|
36 |
void SetOutputName(const char *n) { SetMergedName(n); }
|
37 |
|
38 |
protected:
|
39 |
void BeginRun();
|
40 |
void Process();
|
41 |
void SlaveBegin();
|
42 |
void SlaveTerminate();
|
43 |
|
44 |
TString fElName; //name of electrons collection (input)
|
45 |
TString fMuName; //name of muons collection (input)
|
46 |
TString fMergedName; //name of merged collection (output)
|
47 |
const ElectronCol *fElIn; //!pointer to electron collection
|
48 |
const MuonCol *fMuIn; //!pointer to muon collection
|
49 |
ParticleOArr *fColOut; //!pointer to merged collection
|
50 |
TH1D* fRecoWMuons;
|
51 |
TH1D* fRecoWElectrons;
|
52 |
|
53 |
ClassDef(MergeLeptonsMod, 1) // Merging leptons module
|
54 |
};
|
55 |
}
|
56 |
#endif
|