ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/RhoGetter.h
Revision: 1.2
Committed: Wed Mar 30 12:13:22 2011 UTC (14 years, 1 month ago) by yilmaz
Content type: text/plain
Branch: MAIN
CVS Tags: HiForest_V02_85, HiForest_V02_84, HiForest_V02_83, HiForest_V02_82, HiForest_V02_81, HiForest_V02_80, HiForest_V02_79, HiForest_V02_78, HiForest_V02_77, HiForest_V02_76, HiForest_V02_75, HiForest_V02_74, HiForest_V02_73, HiForest_V02_72, HiForest_V02_71, HiForest_V02_70, HiForest_V02_69, HiForest_V02_68, HiForest_V02_67, HiForest_V02_66, HiForest_V02_65, HiForest_V02_64, HiForest_V02_63, HiForest_V02_62, HiForest_V02_61, HiForest_V02_60, HiForest_V02_59, HiForest_V02_58, HiForest_V02_57, HiForest_V02_56, HiForest_V02_55, HiForest_V02_54, HiForest_V02_53, HiForest_V02_52, HiForest_V02_51, HiForest_V02_50, HiForest_V02_49, HiForest_V02_48, HiForest_V02_47, HiForest_V02_46, HiForest_V02_45, HiForest_V02_44, HiForest_V02_43, HiForest_V02_42, HiForest_V02_41, HiForest_V02_40, HiForest_V02_39, HiForest_V02_38, HiForest_V02_37, HiForest_V02_36, HiForest_V02_35, HiForest_V02_34, HiForest_V02_33, HiForest_V02_32, HiForest_V02_31, HiForest_V02_30, HiForest_V02_27, HiForest_V02_26, QM_2012, HiForest_V02_25, HiForest_V02_24, HiForest_V02_23, HiForest_V02_22, HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HiForest_V02_09, HiForest_V02_08, HiForest_V02_07, HiForest_V02_06, HiForest_V02_05, HiForest_V02_04, HiForest_V02_03, HiForest_V02_02, HiForest_V02_01, HiForest_V02_00, hi44X_02, hi413_03, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09, hi413_08, hi413_07, hi413_06, hi413_05, hi413_04, hi413_02, hi39X_01, tag_d20110915, cmssw39x_base, cmssw39X_base, HEAD
Branch point for: branch_44x, cmssw39x_branch
Changes since 1.1: +2 -2 lines
Error occurred while calculating annotation data.
Log Message:
BF

File Contents

# Content
1
2 #ifndef __RHOyyy__
3 #define __RHOyyy__
4
5 #include <vector>
6
7 static double rhoBins[11] = {-5,-4,-3,-2,-1,0,1,2,3,4,5};
8
9 double getRho(double eta, const std::vector<double> rhos){
10 int j = 0;
11 double deta = 99;
12 for(unsigned int i = 0; i < rhos.size() ; ++i){
13 double d = fabs(eta-rhoBins[i]);
14 if(d < deta){
15 deta = d;
16 j = i;
17 }
18 }
19 return rhos[j];
20
21 /*
22 for(unsigned int i = 0; i < rhos.size()-1 ; ++i){
23 if(eta > rhoBins[i]) j = i+1;
24 }
25 double r = rhos[j-1]*fabs(eta - rhoBins[j]) + rhos[j]*fabs(eta - rhoBins[j-1]);
26 r /= fabs(rhoBins[j]-rhoBins[j-1]);
27 return r;
28 */
29
30 }
31
32 #endif
33