ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/interface/CATopJetAlgorithm.h
Revision: 1.1
Committed: Wed Jun 8 17:25:31 2011 UTC (13 years, 11 months ago) by tboccali
Content type: text/plain
Branch: MAIN
CVS Tags: EDMV42_Step2_V6, EDMV42_Step2_V5a, EDMV42_Step2_V5, tauCandV42, hbbsubstructDev_11, hbbsubstructDev_10, hbbsubstructDev_9, hbbsubstructDev_8, hbbsubstructDev_7, hbbsubstructDev_6, hbbsubstructDev_5, hbbsubstructDev_4, hbbsubstructDev_3, hbbsubstructDev_2, hbbsubstructDev_1, hbbsubstructDev, V21TauCand_0, TauCandidates_0, EDMV42_Step2_V4a, EDMV42_Step2_V4, EDMV42_Step2_V3, EDMV42_Step2_V2, EDMV42_Step2_V1, EdmV42, EdmV41alpha1, EdmV40alpha1, EdmV40alpha, V21emuCand, EdmV33Jun12v2_consistent, Step2ForV33_v2, Step2ForV33_v1, EdmV33Jun12v2, EdmV33Jun12v1, EdmV33Jun12v0, Step2ForV32_v2, Step2ForV32_v0, Step2ForV31_v0, EdmV32May24v0, EdmV31May21v1, EdmV31May17v0, May14thStep2, EdmV30Apr10, EdmV21Apr10v2, EdmV22May9, EdmV21Apr06, EdmV21Apr10, EdmV21Apr04, EdmV21Apr03, EdmV21Apr2, EdmV21Mar30, EdmV20Mar12, EdmV11Oct2011_fixMET, EdmV11Oct2011, EdmV10Oct2011, EdmV9Sept2011, Sept19th2011_2, Sept19th2011, Sept19th, VHNtupleV9_AR1, VHSept15_AR1, Sept14th2011_2, Sept14th2011, Sept13th2011, AR_Sep8_LightNtuple, VHBB_EDMNtupleV3, AndreaAug10th, HBB_EDMNtupleV1_ProcV2, Jul28th2011, Jul26th2011, Jul25th2011, Jul22nd2011, Jul21st2011, Jul20th2011, Jul18th2011, Jul17th2011, Jul8th2011, Jun30th2011, Jun28th2011, Jun21th2011, Jun16th2011, Jun15th2011, Jun14th2011, Jun9th2011v2, Jun9th2011, HEAD
Branch point for: V42TauCandidate, hbbsubstructDevPostHCP, V21TauCand, TauCandidatesV21, V21emuCandidate
Log Message:
first addition

File Contents

# Content
1 #ifndef RecoJets_JetAlgorithms_CATopJetAlgorithm_h
2 #define RecoJets_JetAlgorithms_CATopJetAlgorithm_h
3
4
5
6 /* *********************************************************
7 * \class CATopJetAlgorithm
8 * Jet producer to produce top jets using the C-A algorithm to break
9 * jets into subjets as described here:
10 * "Top-tagging: A Method for Identifying Boosted Hadronic Tops"
11 * David E. Kaplan, Keith Rehermann, Matthew D. Schwartz, Brock Tweedie
12 * arXiv:0806.0848v1 [hep-ph]
13 *
14 ************************************************************/
15
16 #include <vector>
17 #include <list>
18 #include <functional>
19 #include <TMath.h>
20 #include <iostream>
21
22 #include "DataFormats/Candidate/interface/Candidate.h"
23 #include "DataFormats/CaloTowers/interface/CaloTower.h"
24 #include "DataFormats/CaloTowers/interface/CaloTowerFwd.h"
25 #include "DataFormats/JetReco/interface/CaloJet.h"
26 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
27 #include "DataFormats/JetReco/interface/BasicJet.h"
28 #include "DataFormats/JetReco/interface/BasicJetCollection.h"
29 #include "DataFormats/Math/interface/deltaR.h"
30 #include "RecoJets/JetAlgorithms/interface/JetAlgoHelper.h"
31 #include "RecoJets/JetAlgorithms/interface/CompoundPseudoJet.h"
32 #include "DataFormats/Candidate/interface/LeafCandidate.h"
33 #include "FWCore/Framework/interface/Event.h"
34
35 #include "RecoJets/JetAlgorithms/interface/CompoundPseudoJet.h"
36
37 #include <fastjet/JetDefinition.hh>
38 #include <fastjet/PseudoJet.hh>
39 #include <fastjet/ClusterSequence.hh>
40
41
42 class CATopJetAlgorithm{
43 public:
44 /** Constructor
45 */
46 CATopJetAlgorithm(edm::InputTag mSrc,
47 bool verbose,
48 int algorithm,
49 int useAdjacency,
50 double centralEtaCut,
51 double ptMin,
52 const std::vector<double> & sumEtBins,
53 const std::vector<double> & rBins,
54 const std::vector<double> & ptFracBins,
55 const std::vector<double> & deltarBins,
56 const std::vector<double> & nCellBins,
57 double seedThreshold,
58 bool useMaxTower,
59 double sumEtEtaCut,
60 double etFrac) :
61 mSrc_ (mSrc ),
62 verbose_ (verbose ),
63 algorithm_ (algorithm ),
64 useAdjacency_ (useAdjacency ),
65 centralEtaCut_ (centralEtaCut ),
66 ptMin_ (ptMin ),
67 sumEtBins_ (sumEtBins ),
68 rBins_ (rBins ),
69 ptFracBins_ (ptFracBins ),
70 deltarBins_ (deltarBins ),
71 nCellBins_ (nCellBins ),
72 seedThreshold_ (seedThreshold ),
73 useMaxTower_ (useMaxTower ),
74 sumEtEtaCut_ (sumEtEtaCut ),
75 etFrac_ (etFrac )
76 { }
77
78 /// Find the ProtoJets from the collection of input Candidates.
79 void run( const std::vector<fastjet::PseudoJet> & cell_particles,
80 std::vector<CompoundPseudoJet> & hardjetsOutput,
81 edm::EventSetup const & c
82 );
83
84 private:
85
86 edm::InputTag mSrc_; //<! calo tower input source
87 bool verbose_; //<!
88 int algorithm_; //<! 0 = KT, 1 = CA, 2 = anti-KT
89 int useAdjacency_; //<! choose adjacency requirement:
90 //<! 0 = no adjacency
91 //<! 1 = deltar adjacency
92 //<! 2 = modified adjacency
93 //<! 3 = calotower neirest neigbor based adjacency (untested)
94 double centralEtaCut_; //<! eta for defining "central" jets
95 double ptMin_; //<! lower pt cut on which jets to reco
96 std::vector<double> sumEtBins_; //<! sumEt bins over which cuts vary. vector={bin 0 lower bound, bin 1 lower bound, ...}
97 std::vector<double> rBins_; //<! Jet distance paramter R. R values depend on sumEt bins.
98 std::vector<double> ptFracBins_; //<! deltap = fraction of full jet pt for a subjet to be consider "hard".
99 std::vector<double> deltarBins_; //<! Applicable only if useAdjacency=1. deltar adjacency values for each sumEtBin
100 std::vector<double> nCellBins_; //<! Applicable only if useAdjacency=3. number of cells apart for two subjets to be considered "independent"
101 // NOT USED:
102 double seedThreshold_; //<! calo tower seed threshold - NOT USED
103 bool useMaxTower_; //<! use max tower for jet adjacency criterion, false is to use the centroid - NOT USED
104 double sumEtEtaCut_; //<! eta for event SumEt - NOT USED
105 double etFrac_; //<! fraction of event sumEt / 2 for a jet to be considered "hard" - NOT USED
106 std::string jetType_; //<! CaloJets or GenJets - NOT USED
107
108
109 // Decide if the two jets are in adjacent cells
110 bool adjacentCells(const fastjet::PseudoJet & jet1, const fastjet::PseudoJet & jet2,
111 const std::vector<fastjet::PseudoJet> & cell_particles,
112 const fastjet::ClusterSequence & theClusterSequence,
113 double nCellMin ) const;
114
115
116 // Attempt to break up one "hard" jet into two "soft" jets
117
118 bool decomposeJet(const fastjet::PseudoJet & theJet,
119 const fastjet::ClusterSequence & theClusterSequence,
120 const std::vector<fastjet::PseudoJet> & cell_particles,
121 double ptHard, double nCellMin, double deltarcut,
122 fastjet::PseudoJet & ja, fastjet::PseudoJet & jb,
123 std::vector<fastjet::PseudoJet> & leftovers) const;
124
125 };
126
127
128
129 #endif