Main Page
Namespaces
Classes
Package Documentation
DQMOffline
JetMET
interface
SusyDQM
HT.h
Go to the documentation of this file.
1
//author: Francesco Costanza (DESY)
2
//date: 05/05/11
3
4
#ifndef HT_H
5
#define HT_H
6
7
#include "
DataFormats/Common/interface/Handle.h
"
8
#include "
DataFormats/JetReco/interface/CaloJet.h
"
9
#include "
DataFormats/JetReco/interface/CaloJetCollection.h
"
10
#include "
DataFormats/JetReco/interface/PFJet.h
"
11
#include "
DataFormats/JetReco/interface/PFJetCollection.h
"
12
#include "
DataFormats/JetReco/interface/JPTJet.h
"
13
#include "
DataFormats/JetReco/interface/JPTJetCollection.h
"
14
15
#include "TVector2.h"
16
#include <vector>
17
#include <iostream>
18
#include <cmath>
19
20
template
<
class
T>
21
class
HT
{
22
23
private
:
24
double
Hx
,
Hy
;
25
26
public
:
27
int
njet
;
28
TVector2
v
;
29
double
ScalarSum
;
30
31
typedef
typename
edm::Handle< T >
Handler
;
32
HT
( Handler jetcoll,
double
ptThreshold
,
double
maxAbsEta
):
33
Hx(0),
34
Hy(0),
35
ScalarSum(0)
36
{
37
typedef
typename
T::const_iterator Iter;
38
for
(Iter
jet
= jetcoll->begin();
jet
!=jetcoll->end(); ++
jet
){
39
if
((
jet
->pt()>
ptThreshold
) && (std::fabs(
jet
->eta())<maxAbsEta)){
40
njet++;
41
Hx +=
jet
->px();
42
Hy +=
jet
->py();
43
ScalarSum +=
jet
->pt();
44
}
45
}
46
v=TVector2(Hx,Hy);
47
}
48
};
49
50
#endif
metsig::jet
Definition:
SignAlgoResolutions.h:40
PFJetCollection.h
JPTJet.h
HT::ScalarSum
double ScalarSum
Definition:
HT.h:29
CaloJetCollection.h
HT::HT
HT(Handler jetcoll, double ptThreshold, double maxAbsEta)
Definition:
HT.h:32
edm::Handle
Definition:
AssociativeIterator.h:48
HT::Handler
edm::Handle< T > Handler
Definition:
HT.h:31
HT::Hx
double Hx
Definition:
HT.h:24
HT::Hy
double Hy
Definition:
HT.h:24
HT::njet
int njet
Definition:
HT.h:27
refitMuons_cfi.ptThreshold
ptThreshold
Definition:
refitMuons_cfi.py:61
HT::v
TVector2 v
Definition:
HT.h:28
CaloJet.h
HT
Definition:
HT.h:21
JPTJetCollection.h
PFJet.h
muons1stStep_cfi.maxAbsEta
maxAbsEta
Definition:
muons1stStep_cfi.py:24
Handle.h
Generated for CMSSW Reference Manual by
1.8.11