Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
19
template
<
class
T>
20
class
HT
{
21
22
private
:
23
double
Hx
,
Hy
;
24
25
public
:
26
int
njet
;
27
TVector2
v
;
28
double
ScalarSum
;
29
30
typedef
typename
edm::Handle< T >
Handler
;
31
HT
(
Handler
jetcoll,
double
ptThreshold,
double
maxAbsEta):
32
Hx
(0),
33
Hy
(0),
34
ScalarSum
(0)
35
{
36
typedef
typename
T::const_iterator Iter;
37
for
(Iter
jet
= jetcoll->begin();
jet
!=jetcoll->end(); ++
jet
){
38
if
((
jet
->pt()>ptThreshold) && (
abs
(
jet
->eta())<maxAbsEta)){
39
njet
++;
40
Hx
+=
jet
->px();
41
Hy
+=
jet
->py();
42
ScalarSum
+=
jet
->pt();
43
}
44
}
45
v
=TVector2(
Hx
,
Hy
);
46
}
47
};
48
49
50
51
52
53
54
55
#endif
metsig::jet
Definition:
SignAlgoResolutions.h:41
PFJetCollection.h
JPTJet.h
HT::ScalarSum
double ScalarSum
Definition:
HT.h:28
CaloJetCollection.h
HT::HT
HT(Handler jetcoll, double ptThreshold, double maxAbsEta)
Definition:
HT.h:31
abs
#define abs(x)
Definition:
mlp_lapack.h:159
Handle.h
edm::Handle
Definition:
AssociativeIterator.h:48
HT::Handler
edm::Handle< T > Handler
Definition:
HT.h:30
HT::Hx
double Hx
Definition:
HT.h:23
HT::Hy
double Hy
Definition:
HT.h:23
HT::njet
int njet
Definition:
HT.h:26
HT::v
TVector2 v
Definition:
HT.h:27
CaloJet.h
HT
Definition:
HT.h:20
JPTJetCollection.h
PFJet.h
Generated for CMSSW Reference Manual by
1.8.5