ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/JetIDMod.cc
Revision: 1.9
Committed: Thu Jan 22 22:25:27 2009 UTC (16 years, 3 months ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.8: +2 -2 lines
Log Message:
fix in the qqH sel at gen level

File Contents

# Content
1 // $Id: JetIDMod.cc,v 1.8 2009/01/20 12:39:49 ceballos Exp $
2
3 #include "MitPhysics/Mods/interface/JetIDMod.h"
4 #include "MitCommon/MathTools/interface/MathUtils.h"
5 #include "MitPhysics/Init/interface/ModNames.h"
6
7 using namespace mithep;
8
9 ClassImp(mithep::JetIDMod)
10
11 //--------------------------------------------------------------------------------------------------
12 JetIDMod::JetIDMod(const char *name, const char *title) :
13 BaseMod(name,title),
14 fJetBranchName(Names::gkCaloJetBrn),
15 fGoodJetsName(ModNames::gkGoodJetsName),
16 fUseJetCorrection(kTRUE),
17 fJetEtCut(20.0),
18 fJets(0)
19 {
20 // Constructor.
21 }
22
23 //--------------------------------------------------------------------------------------------------
24 void JetIDMod::Process()
25 {
26 // Process entries of the tree.
27
28 LoadBranch(fJetBranchName);
29
30 JetOArr *GoodJets = new JetOArr;
31 GoodJets->SetName(fGoodJetsName);
32
33 // loop over jets
34 for (UInt_t i=0; i<fJets->GetEntries(); ++i) {
35 const Jet *jet = fJets->At(i);
36
37 if (jet->AbsEta() > 5.0)
38 continue;
39
40 Double_t jetet = jet->Et();
41 if (fUseJetCorrection)
42 jetet *= jet->L2RelativeCorrectionScale() * jet->L3AbsoluteCorrectionScale();
43
44 if (jetet < fJetEtCut)
45 continue;
46
47 // add good jet to collection
48 GoodJets->Add(jet);
49 }
50
51 // sort according to pt
52 GoodJets->Sort();
53
54 // add to event for other modules to use
55 AddObjThisEvt(GoodJets);
56 }
57
58 //--------------------------------------------------------------------------------------------------
59 void JetIDMod::SlaveBegin()
60 {
61 // Run startup code on the computer (slave) doing the actual analysis. Here,
62 // we just request the jet collection branch.
63
64 ReqBranch(fJetBranchName, fJets);
65 }