-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into AddingHLTEl50PFJet165
- Loading branch information
Showing
176 changed files
with
26,536 additions
and
21,523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
CalibCalorimetry/EcalTPGTools/interface/EcalReadoutTools.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef CalibCalorimetry_EcalTPGTools_EcalReadoutTools_H | ||
#define CalibCalorimetry_EcalTPGTools_EcalReadoutTools_H | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
|
||
#include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
#include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h" | ||
#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h" | ||
#include "Geometry/EcalMapping/interface/EcalMappingRcd.h" | ||
|
||
class EcalReadoutTools { | ||
|
||
private: | ||
const EcalTrigTowerConstituentsMap * triggerTowerMap_; | ||
const EcalElectronicsMapping* elecMap_; | ||
|
||
public: | ||
EcalReadoutTools(const edm::Event &iEvent, const edm::EventSetup &iSetup); | ||
EcalReadoutTools(const EcalReadoutTools&) = delete; | ||
EcalReadoutTools& operator=(const EcalReadoutTools&) = delete; | ||
|
||
EcalTrigTowerDetId readOutUnitOf(const EBDetId& xtalId) const; | ||
EcalScDetId readOutUnitOf(const EEDetId& xtalId) const; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "CalibCalorimetry/EcalTPGTools/interface/EcalReadoutTools.h" | ||
|
||
EcalReadoutTools::EcalReadoutTools(const edm::Event &iEvent, const edm::EventSetup &iSetup) { | ||
|
||
edm::ESHandle<EcalTrigTowerConstituentsMap> hTriggerTowerMap; | ||
iSetup.get<IdealGeometryRecord>().get(hTriggerTowerMap); | ||
triggerTowerMap_ = hTriggerTowerMap.product(); | ||
|
||
edm::ESHandle< EcalElectronicsMapping > ecalmapping; | ||
iSetup.get< EcalMappingRcd >().get(ecalmapping); | ||
elecMap_ = ecalmapping.product(); | ||
|
||
} | ||
|
||
EcalTrigTowerDetId EcalReadoutTools::readOutUnitOf(const EBDetId& xtalId) const{ | ||
return triggerTowerMap_->towerOf(xtalId); | ||
} | ||
|
||
EcalScDetId EcalReadoutTools::readOutUnitOf(const EEDetId& xtalId) const{ | ||
const EcalElectronicsId& EcalElecId = elecMap_->getElectronicsId(xtalId); | ||
int iDCC= EcalElecId.dccId(); | ||
int iDccChan = EcalElecId.towerId(); | ||
const bool ignoreSingle = true; | ||
const std::vector<EcalScDetId> id = elecMap_->getEcalScDetId(iDCC, iDccChan, ignoreSingle); | ||
return id.size()>0?id[0]:EcalScDetId(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.