ATLAS Offline Software
Loading...
Searching...
No Matches
JetFitterPtEtaCategories.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <vector>
6#include <utility>
7#include <math.h>
8
9/******************************************************
10 @class JetFitterPtEtaCategories
11********************************************************/
12
13
14//using namespace std;
15
16std::pair<int,double> getPtCategory(double Pt)
17{
18
19 double correctionfactor=1e3;//PLEASE CHANGE IT TO 1 FOR INTERNAL CODE USE (GeV)
20 int actualpT=-1;
21 double interval=1;
22
23 if (fabs(Pt)<25*correctionfactor){
24 actualpT=0;
25 } else if (fabs(Pt)>=25*correctionfactor&&fabs(Pt)<35*correctionfactor) {
26 actualpT=1;
27// interval=5;
28 } else if (fabs(Pt)>=35*correctionfactor&&fabs(Pt)<50*correctionfactor) {
29 actualpT=2;
30// interval=15;
31 } else if (fabs(Pt)>=50*correctionfactor&&fabs(Pt)<80*correctionfactor) {
32 actualpT=3;
33// interval=20;
34 } else if (fabs(Pt)>=80*correctionfactor&&fabs(Pt)<120*correctionfactor) {
35 actualpT=4;
36// interval=40;
37 } else if (fabs(Pt)>=120*correctionfactor&&fabs(Pt)<200*correctionfactor) {
38 actualpT=5;
39// interval=65/2;
40 } else if (fabs(Pt)>=200*correctionfactor) {
41 actualpT=6;
42// interval=200/6;
43 }
44
45 return std::pair<int,double>(actualpT,interval);
46}
47
48std::pair<int,double> getEtaCategory(double eta)
49{
50
51 int actualeta=-1;
52 double interval=1;
53
54 if (fabs(eta)>1.5){
55 actualeta=2;
56// interval=2.;
57 } else if (fabs(eta)>=0.7&&fabs(eta)<1.5){
58 actualeta=1;
59// interval=1.;
60 } else {
61 actualeta=0;
62// interval=0.6;
63 }
64
65 return std::pair<int,double>(actualeta,interval);
66}
67
69{
70 return 7;
71}
72
74{
75 return 3;
76}
77
78
Scalar eta() const
pseudorapidity method
std::pair< int, double > getPtCategory(double Pt)
int getNPtBins()
std::pair< int, double > getEtaCategory(double eta)
int getNEtaBins()