Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120975
b: "refs/heads/CMSSW_7_0_X"
c: 1da4238
h: "refs/heads/CMSSW_7_0_X"
i:
  120973: cf45628
  120971: fae5f57
  120967: f59dcd1
  120959: 7aa1ab9
v: v3
  • Loading branch information
Ianna Osborne committed Oct 9, 2012
1 parent c6d7a6e commit e57c572
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 59 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"refs/heads/hi_d20131223": d7335b053d7fe03e98f9f59af6a20004362628e8
refs/heads/gh-pages: a3d9046c56a3ca3dc64ad63f7295276c81ac876a
"refs/heads/analysis_53X_01": 3019419e9784b2b092fc6b5c503b2e0177cbe926
"refs/heads/CMSSW_7_0_X": 8354481795ad9142173424c2e4484f8e083b7d8d
"refs/heads/CMSSW_7_0_X": 1da4238ea57a54411f804a977236446f5bcf6ffc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
//
// Original Author: Luca Malgeri
// Created: $Date: 2006/11/21 16:47:46 $
// $Id: HcalRecHitRecalib.h,v 1.3 2006/11/21 16:47:46 malgeri Exp $
// Created: $Date: 2007/09/11 13:46:29 $
// $Id: HcalRecHitRecalib.h,v 1.4 2007/09/11 13:46:29 malgeri Exp $
//
//

Expand All @@ -35,40 +35,28 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMapHcal.h"

//
// class decleration
//

class HcalRecHitRecalib : public edm::EDProducer {
public:
explicit HcalRecHitRecalib(const edm::ParameterSet&);
~HcalRecHitRecalib();


virtual void produce(edm::Event &, const edm::EventSetup&);

private:
// ----------member data ---------------------------

// edm::InputTag hbheLabel_,hoLabel_,hfLabel_;
// std::string HBHEHitsProducer_;
// std::string HFHitsProducer_;
// std::string HOHitsProducer_;
// std::string HBHEHits_;
// std::string HFHits_;
// std::string HOHits_;

edm::InputTag hbheLabel_,hoLabel_,hfLabel_;
std::string RecalibHBHEHits_;
std::string RecalibHFHits_;
std::string RecalibHOHits_;

std::string hcalfile_;
std::string hcalfileinpath_;

CaloMiscalibMapHcal mapHcal_;
double refactor_;
double refactor_mean_;

class HcalRecHitRecalib : public edm::EDProducer
{
public:
explicit HcalRecHitRecalib(const edm::ParameterSet&);
~HcalRecHitRecalib();

virtual void beginRun(edm::Run&, edm::EventSetup const&);
virtual void produce(edm::Event &, const edm::EventSetup&);

private:
edm::InputTag hbheLabel_;
edm::InputTag hoLabel_;
edm::InputTag hfLabel_;
std::string RecalibHBHEHits_;
std::string RecalibHFHits_;
std::string RecalibHOHits_;

std::string hcalfile_;
std::string hcalfileinpath_;

CaloMiscalibMapHcal mapHcal_;
double refactor_;
double refactor_mean_;
};
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/Framework/interface/ESHandle.h"

#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
Expand All @@ -15,18 +16,6 @@ HcalRecHitRecalib::HcalRecHitRecalib(const edm::ParameterSet& iConfig)
hoLabel_ = iConfig.getParameter<edm::InputTag>("hoInput");
hfLabel_ = iConfig.getParameter<edm::InputTag>("hfInput");

HcalTopologyMode::Mode mode = HcalTopologyMode::LHC;
int maxDepthHB = 2;
int maxDepthHE = 3;
if( iConfig.exists( "hcalTopologyConstants" ))
{
const edm::ParameterSet hcalTopoConsts = iConfig.getParameter<edm::ParameterSet>( "hcalTopologyConstants" );
StringToEnumParser<HcalTopologyMode::Mode> parser;
mode = (HcalTopologyMode::Mode) parser.parseString(hcalTopoConsts.getParameter<std::string>("mode"));
maxDepthHB = hcalTopoConsts.getParameter<int>("maxDepthHB");
maxDepthHE = hcalTopoConsts.getParameter<int>("maxDepthHE");
}

// HBHEHitsProducer_ = iConfig.getParameter< std::string > ("HBHERecHitsProducer");
// HOHitsProducer_ = iConfig.getParameter< std::string > ("HERecHitsProducer");
// HFHitsProducer_ = iConfig.getParameter< std::string > ("HERecHitsProducer");
Expand All @@ -47,20 +36,11 @@ HcalRecHitRecalib::HcalRecHitRecalib(const edm::ParameterSet& iConfig)
produces< HORecHitCollection >(RecalibHOHits_);

// here read them from xml (particular to HCAL)
HcalTopology topology( mode, maxDepthHB, maxDepthHE );

mapHcal_.prefillMap(topology);

hcalfileinpath_=iConfig.getUntrackedParameter<std::string> ("fileNameHcal","");
edm::FileInPath hcalfiletmp("CalibCalorimetry/CaloMiscalibTools/data/"+hcalfileinpath_);

hcalfile_=hcalfiletmp.fullPath();


MiscalibReaderFromXMLHcal hcalreader_(mapHcal_);
if(!hcalfile_.empty()) hcalreader_.parseXMLMiscalibFile(hcalfile_);
mapHcal_.print();

}


Expand All @@ -70,6 +50,18 @@ HcalRecHitRecalib::~HcalRecHitRecalib()

}

void
HcalRecHitRecalib::beginRun(edm::Run&, edm::EventSetup const& iSetup)
{
edm::ESHandle<HcalTopology> topology;
iSetup.get<IdealGeometryRecord>().get( topology );

mapHcal_.prefillMap(*topology);

MiscalibReaderFromXMLHcal hcalreader_(mapHcal_);
if(!hcalfile_.empty()) hcalreader_.parseXMLMiscalibFile(hcalfile_);
mapHcal_.print();
}

// ------------ method called to produce the data ------------
void
Expand Down

0 comments on commit e57c572

Please sign in to comment.