Skip to content

Commit

Permalink
Merge pull request #391 from amarini/topic_newjec
Browse files Browse the repository at this point in the history
New JEC
  • Loading branch information
amarini authored Dec 5, 2018
2 parents 7faaf01 + 3aef006 commit c9bea66
Show file tree
Hide file tree
Showing 469 changed files with 125,892 additions and 123,519 deletions.
3 changes: 3 additions & 0 deletions Nero/interface/NeroEvent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class NeroEvent : virtual public NeroCollection, virtual public BareEvent

// need to convert the name to bit in the enum
map<string,unsigned> metNameToBit;

// Ecal Bad Filter Token
edm::EDGetTokenT<bool> ecalBadCalibFilterUpdate_token ;
};


Expand Down
21 changes: 18 additions & 3 deletions Nero/src/NeroEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ NeroEvent::NeroEvent(edm::ConsumesCollector & cc,edm::ParameterSet iConfig):
filter_token = cc.consumes<edm::TriggerResults>(iConfig.getParameter < edm::InputTag > ("metFilterToken"));
*( metfilterNames) = iConfig.getParameter < std::vector<std::string> > ("metfilterNames");

// bad filters
ecalBadCalibFilterUpdate_token= cc.consumes<bool>(edm::InputTag("ecalBadCalibReducedMINIAODFilter"));

}

NeroEvent::~NeroEvent(){
Expand All @@ -53,27 +56,39 @@ int NeroEvent::analyze(const edm::Event& iEvent){

unsigned int filter=0;

// override ECAL Bad Filters
edm::Handle < bool > passecalBadCalibFilterUpdate ;
iEvent.getByToken(ecalBadCalibFilterUpdate_token,passecalBadCalibFilterUpdate);
if (not passecalBadCalibFilterUpdate.isValid()) cout<<"[NeroEvents]::[ERROR] EcalBadFilterUpdate not valid"<<std::endl;
bool _passecalBadCalibFilterUpdate = (*passecalBadCalibFilterUpdate );


if ( metFiltersResults.isValid() and not metFiltersResults.failedToGet() ) {

//std::auto_ptr<std::vector<bool> > metFilters(new std::vector<bool>() );
std::auto_ptr<bool> passesMETFilters(new bool(true));

for ( unsigned int i = 0; i < names.size(); ++i) {
if ( std::find( metfilterNames->begin(), metfilterNames->end(), names.triggerName(i) ) != metfilterNames->end() ) {
bool passThisFilter=metFiltersResults->accept( i );
if (names.triggerName(i) == "Flag_ecalBadCalibFilter")
passThisFilter=_passecalBadCalibFilterUpdate;

if (names.triggerName(i) != "Flag_eeBadScFilter" and not isRealData)
{
*passesMETFilters = *passesMETFilters && metFiltersResults->accept( i );
//*passesMETFilters = *passesMETFilters && metFiltersResults->accept( i );
*passesMETFilters = *passesMETFilters && passThisFilter;//metFiltersResults->accept( i );
}
unsigned bitflag = Unknown;
const auto& it = metNameToBit.find(names.triggerName(i) );
if ( it != metNameToBit.end()) bitflag = it->second;
else {
std::cout<<"[NeroEvent]::[analyze]::[ERROR] trigger Name in cfg "<< names.triggerName(i) <<" has no selection bit associated. Will not be saved"<<std::endl;
}
filter |= metFiltersResults->accept(i) * bitflag;
filter |= passThisFilter * bitflag;

#ifdef VERBOSE
if(VERBOSE>0)std::cout << "MetFilter : " << names.triggerName(i) << " is registered " << metFiltersResults->accept(i) << std::endl;
if(VERBOSE>0)std::cout << "MetFilter : " << names.triggerName(i) << " is registered " << passThisFilter << std::endl;
#endif

}
Expand Down
3 changes: 2 additions & 1 deletion Nero/src/NeroFatJets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ void NeroFatJets::init()
{
BareFatJets::init();
// set up jet energy corrections
string jecBasePathMC="jec/Summer16_23Sep2016V4";
//string jecBasePathMC="jec/Summer16_23Sep2016V4";
string jecBasePathMC="jec/Fall17_17Nov2017_V32";
//
cout<<"[NeroFatJets]::[init]::[INFO] Taking JEC for MC="<<jecBasePathMC<<"_MC_L2Relative_AK8PFchs.txt [..]"<<endl;
cout<<"[NeroFatJets]::[init]::[INFO] Taking JEC for DATA="<<jecBasePath<<"_DATA_L2Relative_AK8PFchs.txt [..]"<<endl;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions Nero/test/jec/Fall17_17Nov2017B_V32_DATA_L1FastJet_AK4PF.txt

Large diffs are not rendered by default.

File renamed without changes.
83 changes: 83 additions & 0 deletions Nero/test/jec/Fall17_17Nov2017B_V32_DATA_L1FastJet_AK4PFchs.txt

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions Nero/test/jec/Fall17_17Nov2017B_V32_DATA_L1FastJet_AK8PF.txt

Large diffs are not rendered by default.

File renamed without changes.
83 changes: 83 additions & 0 deletions Nero/test/jec/Fall17_17Nov2017B_V32_DATA_L1FastJet_AK8PFchs.txt

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions Nero/test/jec/Fall17_17Nov2017B_V32_DATA_L1JPTOffset_AK4JPT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{1 JPTrawEta 4 JPTrawEt JetE JPTrawE JPTrawOff 1-(1-t*(1+[0]*pow((x+[1])/(x+[2]),[3])*pow((x+[4]),[5])))*z/y Correction L1JPTOffset}
-5.5 -4.5 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
-4.5 -4 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
-4 -3.5 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
-3.5 -3 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
-3 -2.5 14 7 7000 7 7000 7 7000 0 400 0.00405738 35 50 -9.14145 35 0.23997
-2.5 -2 14 7 7000 7 7000 7 7000 0 400 0.0281977 35 50 -7.7316 45 -0.00841414
-2 -1.5 14 7 7000 7 7000 7 7000 0 400 0.427553 35 75 -2.10537 45 -0.364433
-1.5 -1 14 7 7000 7 7000 7 7000 0 400 0.329056 35 75 -2.51248 45 -0.349128
-1 -0.5 14 7 7000 7 7000 7 7000 0 400 0.64267 35 75 -2.28701 45 -0.44478
-0.5 0 14 7 7000 7 7000 7 7000 0 400 0.973569 35 75 -2.08311 45 -0.491554
0 0.5 14 7 7000 7 7000 7 7000 0 400 0.973569 35 75 -2.08311 45 -0.491554
0.5 1 14 7 7000 7 7000 7 7000 0 400 0.64267 35 75 -2.28701 45 -0.44478
1 1.5 14 7 7000 7 7000 7 7000 0 400 0.329056 35 75 -2.51248 45 -0.349128
1.5 2 14 7 7000 7 7000 7 7000 0 400 0.427553 35 75 -2.10537 45 -0.364433
2 2.5 14 7 7000 7 7000 7 7000 0 400 0.0281977 35 50 -7.7316 45 -0.00841414
2.5 3 14 7 7000 7 7000 7 7000 0 400 0.00405738 35 50 -9.14145 35 0.23997
3 3.5 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
3.5 4 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
4 4.5 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
4.5 5.5 14 7 7000 7 7000 7 7000 0 400 0 0 0 0 0 0
83 changes: 83 additions & 0 deletions Nero/test/jec/Fall17_17Nov2017B_V32_DATA_L1RC_AK4PF.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{1 JetEta 3 JetPt JetA Rho max(0.0001,1-(y/x)*([0]+[1]*(z-1.519)+[2]*pow(z-1.519,2))) Correction L1FastJet}
-5.191 -4.889 9 1 3500 0 10 0 200 0.836978 0.41767 0.00344045
-4.889 -4.716 9 1 3500 0 10 0 200 1.0626 0.46937 0.00420624
-4.716 -4.538 9 1 3500 0 10 0 200 1.20615 0.568673 0.00467049
-4.538 -4.363 9 1 3500 0 10 0 200 1.266 0.705786 0.00481942
-4.363 -4.191 9 1 3500 0 10 0 200 1.31969 0.844977 0.00497964
-4.191 -4.013 9 1 3500 0 10 0 200 1.41198 0.963229 0.00526955
-4.013 -3.839 9 1 3500 0 10 0 200 1.5373 1.04852 0.00552657
-3.839 -3.664 9 1 3500 0 10 0 200 1.64083 1.12496 0.00563017
-3.664 -3.489 9 1 3500 0 10 0 200 1.60551 1.20602 0.00515408
-3.489 -3.314 9 1 3500 0 10 0 200 1.36986 1.25103 0.003751
-3.314 -3.139 9 1 3500 0 10 0 200 1.12902 1.25258 0.000751035
-3.139 -2.964 9 1 3500 0 10 0 200 1.13297 1.18192 -0.00255624
-2.964 -2.853 9 1 3500 0 10 0 200 0.784234 1.12468 -0.00668207
-2.853 -2.65 9 1 3500 0 10 0 200 0.367467 1.08184 -0.0108105
-2.65 -2.5 9 1 3500 0 10 0 200 0.0986003 1.06957 -0.01323
-2.5 -2.322 9 1 3500 0 10 0 200 -0.212896 1.09082 -0.0135266
-2.322 -2.172 9 1 3500 0 10 0 200 -0.244113 1.12144 -0.0124748
-2.172 -2.043 9 1 3500 0 10 0 200 0.0130328 1.13576 -0.0102401
-2.043 -1.93 9 1 3500 0 10 0 200 -0.00930098 1.16214 -0.00903471
-1.93 -1.83 9 1 3500 0 10 0 200 -0.0403644 1.18004 -0.00788486
-1.83 -1.74 9 1 3500 0 10 0 200 -0.0811854 1.19501 -0.00684002
-1.74 -1.653 9 1 3500 0 10 0 200 -0.046416 1.20411 -0.00583676
-1.653 -1.566 9 1 3500 0 10 0 200 -0.0306486 1.21444 -0.00505705
-1.566 -1.479 9 1 3500 0 10 0 200 0.0408008 1.21308 -0.00411593
-1.479 -1.392 9 1 3500 0 10 0 200 0.164844 1.20236 -0.0029402
-1.392 -1.305 9 1 3500 0 10 0 200 0.417699 1.17636 -0.00129985
-1.305 -1.218 9 1 3500 0 10 0 200 0.587952 1.16295 -0.000119893
-1.218 -1.131 9 1 3500 0 10 0 200 0.709325 1.1567 0.000678877
-1.131 -1.044 9 1 3500 0 10 0 200 0.761895 1.15605 0.00122278
-1.044 -0.957 9 1 3500 0 10 0 200 0.74422 1.16305 0.00136424
-0.957 -0.879 9 1 3500 0 10 0 200 0.755478 1.16041 0.00175909
-0.879 -0.783 9 1 3500 0 10 0 200 0.748865 1.16485 0.00191167
-0.783 -0.696 9 1 3500 0 10 0 200 0.633271 1.18626 0.00148728
-0.696 -0.609 9 1 3500 0 10 0 200 0.528558 1.20267 0.00103166
-0.609 -0.522 9 1 3500 0 10 0 200 0.366579 1.2243 0.000289365
-0.522 -0.435 9 1 3500 0 10 0 200 0.214845 1.24228 -0.000361409
-0.435 -0.348 9 1 3500 0 10 0 200 0.0799769 1.25712 -0.000929882
-0.348 -0.261 9 1 3500 0 10 0 200 -0.0705786 1.27295 -0.00156911
-0.261 -0.174 9 1 3500 0 10 0 200 -0.201367 1.28483 -0.0020516
-0.174 -0.087 9 1 3500 0 10 0 200 -0.344025 1.29947 -0.0026141
-0.087 0 9 1 3500 0 10 0 200 -0.406352 1.30402 -0.00280291
0 0.087 9 1 3500 0 10 0 200 -0.442112 1.30567 -0.00288774
0.087 0.174 9 1 3500 0 10 0 200 -0.47507 1.30935 -0.00299885
0.174 0.261 9 1 3500 0 10 0 200 -0.417005 1.30177 -0.00272255
0.261 0.348 9 1 3500 0 10 0 200 -0.209165 1.27545 -0.00177242
0.348 0.435 9 1 3500 0 10 0 200 -0.00897048 1.251 -0.000856237
0.435 0.522 9 1 3500 0 10 0 200 0.163321 1.23057 -8.43312e-05
0.522 0.609 9 1 3500 0 10 0 200 0.257968 1.22021 0.000354879
0.609 0.696 9 1 3500 0 10 0 200 0.364785 1.20517 0.000872226
0.696 0.783 9 1 3500 0 10 0 200 0.47979 1.18407 0.00138329
0.783 0.879 9 1 3500 0 10 0 200 0.69969 1.14702 0.00213158
0.879 0.957 9 1 3500 0 10 0 200 0.870717 1.12043 0.00249868
0.957 1.044 9 1 3500 0 10 0 200 0.965656 1.11047 0.00245584
1.044 1.131 9 1 3500 0 10 0 200 0.987467 1.10536 0.00218442
1.131 1.218 9 1 3500 0 10 0 200 0.958983 1.10222 0.00185188
1.218 1.305 9 1 3500 0 10 0 200 1.07269 1.07832 0.00214502
1.305 1.392 9 1 3500 0 10 0 200 1.05127 1.07373 0.00178789
1.392 1.479 9 1 3500 0 10 0 200 1.05709 1.06942 0.00135646
1.479 1.566 9 1 3500 0 10 0 200 1.02475 1.0713 0.000691955
1.566 1.653 9 1 3500 0 10 0 200 0.888322 1.08091 -0.000387771
1.653 1.74 9 1 3500 0 10 0 200 0.827975 1.07206 -0.00122987
1.74 1.83 9 1 3500 0 10 0 200 0.76696 1.06029 -0.00231192
1.83 1.93 9 1 3500 0 10 0 200 0.754401 1.04767 -0.00358451
1.93 2.043 9 1 3500 0 10 0 200 0.732604 1.03021 -0.004988
2.043 2.172 9 1 3500 0 10 0 200 0.601643 1.01166 -0.00668627
2.172 2.322 9 1 3500 0 10 0 200 0.237521 0.990279 -0.00891682
2.322 2.5 9 1 3500 0 10 0 200 0.148559 0.964159 -0.0101415
2.5 2.65 9 1 3500 0 10 0 200 0.0343436 0.987241 -0.0112423
2.65 2.853 9 1 3500 0 10 0 200 -0.0604717 1.04377 -0.0104162
2.853 2.964 9 1 3500 0 10 0 200 0.0379657 1.14502 -0.00811455
2.964 3.139 9 1 3500 0 10 0 200 0.133124 1.25103 -0.00565669
3.139 3.314 9 1 3500 0 10 0 200 0.160397 1.32918 -0.00294772
3.314 3.489 9 1 3500 0 10 0 200 0.455339 1.34153 -0.000472429
3.489 3.664 9 1 3500 0 10 0 200 0.660558 1.30384 0.000672078
3.664 3.839 9 1 3500 0 10 0 200 0.859093 1.20915 0.00182778
3.839 4.013 9 1 3500 0 10 0 200 0.920114 1.12347 0.00246695
4.013 4.191 9 1 3500 0 10 0 200 1.04305 1.01317 0.00326908
4.191 4.363 9 1 3500 0 10 0 200 1.10664 0.880621 0.00364396
4.363 4.538 9 1 3500 0 10 0 200 0.969847 0.749081 0.00320299
4.538 4.716 9 1 3500 0 10 0 200 0.787406 0.62168 0.00264152
4.716 4.889 9 1 3500 0 10 0 200 0.533998 0.534829 0.00182478
4.889 5.191 9 1 3500 0 10 0 200 0.312478 0.481125 0.00117922
Loading

0 comments on commit c9bea66

Please sign in to comment.