Skip to content

Commit

Permalink
add some debug to PhysicalEtAdder
Browse files Browse the repository at this point in the history
---
yaml
---
svn_rev: 139993
current_ref: refs/heads/usePFclusteringInRegionsForMuonsBackUp
current_commit: 252c450
head_branch: refs/heads/CMSSW_4_1_X
  • Loading branch information
R. Alex Barbieri committed May 14, 2014
1 parent b33b546 commit b7aa279
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ refs/heads/CMSSW_4_1_X: a4334f9063dcad3cb0c038ac911fd8357c3bbaaa
refs/heads/with_VBF_Hbb_fragment: 5b1f2347e6db46cfd6288879a97056d280cf27c5
refs/heads/withOnlineToOfflineProducer: c0b9423e0d6c6d5315f93d1ee32e9bf68078d9c0
refs/heads/withNewDZ: a67661d3e05d8a51194ddc51d1ff68044af2314a
refs/heads/usePFclusteringInRegionsForMuonsBackUp: 1cd3e8e09ab14dfafcc77e4f40c7007028a4b154
refs/heads/usePFclusteringInRegionsForMuonsBackUp: 252c4507d30da9c838013ec506616cf2103c9d63
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "L1Trigger/L1TCalorimeter/plugins/PhysicalEtAdder.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "CondFormats/L1TObjects/interface/L1CaloEtScale.h"
#include "CondFormats/DataRecord/interface/L1JetEtScaleRcd.h"
Expand All @@ -18,6 +19,8 @@
#include "FWCore/Framework/interface/ESHandle.h"
#include <vector>

#include <stdio.h>

double getPhysicalEta(int etaIndex, bool forward = false);
double getPhysicalPhi(int phiIndex);

Expand Down Expand Up @@ -66,11 +69,7 @@ l1t::PhysicalEtAdder::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
edm::ESHandle< L1CaloEtScale > jetScale ;
iSetup.get< L1JetEtScaleRcd >().get( jetScale ) ;

edm::ESHandle< L1CaloEtScale > hwForJetScale ;
iSetup.get< L1JetEtScaleRcd >().get( hwForJetScale ) ;

edm::ESHandle< L1CaloEtScale > htMissScale ;
std::vector< bool > htMissMatched ;
iSetup.get< L1HtMissScaleRcd >().get( htMissScale ) ;

int firstBX = old_egammas->getFirstBX();
Expand Down Expand Up @@ -244,11 +243,21 @@ int getRegionEta(int gtEta, bool forward)
int centralGtEta[] = {11, 12, 13, 14, 15, 16, 17, -100, 10, 9, 8, 7, 6, 5, 4};
int forwardGtEta[] = {18, 19, 20, 21, -100, -100, -100, -100, 3, 2, 1, 0};

//printf("%i, %i\n",gtEta,forward);

int regionEta;

if(!forward)
{
return centralGtEta[gtEta];
regionEta = centralGtEta[gtEta];
} else
return forwardGtEta[gtEta];
regionEta = forwardGtEta[gtEta];

if(regionEta == -100)
edm::LogError("EtaIndexError")
<< "Bad eta index passed to PhysicalEtAdder::getRegionEta, " << gtEta << std::endl;

return regionEta;
}

// adapted these from the UCT2015 codebase.
Expand Down

0 comments on commit b7aa279

Please sign in to comment.