Skip to content

Commit

Permalink
Merge pull request #9 from mark-grimes/mergeIanna_new-geometry-scenarios
Browse files Browse the repository at this point in the history
Implementing dildick's comments for pull request 2304
  • Loading branch information
ianna committed Feb 18, 2014
2 parents 272f543 + 9a81670 commit 50f5627
Show file tree
Hide file tree
Showing 94 changed files with 11,645 additions and 1,082 deletions.
19 changes: 10 additions & 9 deletions CalibCalorimetry/HcalAlgos/interface/HcalPedestalAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"

#include "CondFormats/HcalObjects/interface/AllObjects.h"
#include "Geometry/CaloTopology/interface/HcalTopology.h"

#include "TH1F.h"
#include "TF1.h"
Expand Down Expand Up @@ -44,13 +45,13 @@ class HcalPedestalAnalysis{
~HcalPedestalAnalysis();

void setup(const std::string& m_outputFileROOT);

void setTopology(const HcalTopology* topo) {fTopology = (HcalTopology*)(topo);}
void SampleAnalysis();

int done(const HcalPedestals* fInputPedestals,
const HcalPedestalWidths* fInputWidths,
HcalPedestals* fOutputPedestals,
HcalPedestalWidths* fOutputWidths);
const HcalPedestalWidths* fInputWidths,
HcalPedestals* fOutputPedestals,
HcalPedestalWidths* fOutputWidths);

void processEvent(const HBHEDigiCollection& hbhe,
const HODigiCollection& ho,
Expand All @@ -62,11 +63,11 @@ class HcalPedestalAnalysis{
// N>0 : mod(N,100000) drifts + width changes
// int(N/100000) missing channels
static int HcalPedVal(int nstat[4], const HcalPedestals* fRefPedestals,
const HcalPedestalWidths* fRefPedestalWidths,
HcalPedestals* fRawPedestals,
HcalPedestalWidths* fRawPedestalWidths,
HcalPedestals* fValPedestals,
HcalPedestalWidths* fValPedestalWidths);
const HcalPedestalWidths* fRefPedestalWidths,
HcalPedestals* fRawPedestals,
HcalPedestalWidths* fRawPedestalWidths,
HcalPedestals* fValPedestals,
HcalPedestalWidths* fValPedestalWidths);

protected:

Expand Down
33 changes: 16 additions & 17 deletions CalibCalorimetry/HcalAlgos/src/HcalPedestalAnalysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ HcalPedestalAnalysis::HcalPedestalAnalysis(const edm::ParameterSet& ps)
fRawPedestals (0),
fRawPedestalWidths (0),
fValPedestals (0),
fValPedestalWidths (0)
{
fTopology=0;
fValPedestalWidths (0),
fTopology (0) {

m_coder = 0;
m_shape = 0;
evt=0;
Expand All @@ -31,18 +31,18 @@ HcalPedestalAnalysis::HcalPedestalAnalysis(const edm::ParameterSet& ps)
for(int i=0; i<4; i++) m_stat[i]=0;
for(int k=0;k<4;k++) state.push_back(true);

// user cfg parameters
// user cfg parameters
m_outputFileMean = ps.getUntrackedParameter<string>("outputFileMeans", "");
if ( m_outputFileMean.size() != 0 ) {
cout << "Hcal pedestal means will be saved to " << m_outputFileMean.c_str() << endl;
std::cout << "Hcal pedestal means will be saved to " << m_outputFileMean.c_str() << std::endl;
}
m_outputFileWidth = ps.getUntrackedParameter<string>("outputFileWidths", "");
if ( m_outputFileWidth.size() != 0 ) {
cout << "Hcal pedestal widths will be saved to " << m_outputFileWidth.c_str() << endl;
std::cout << "Hcal pedestal widths will be saved to " << m_outputFileWidth.c_str() << std::endl;
}
m_outputFileROOT = ps.getUntrackedParameter<string>("outputFileHist", "");
if ( m_outputFileROOT.size() != 0 ) {
cout << "Hcal pedestal histograms will be saved to " << m_outputFileROOT.c_str() << endl;
std::cout << "Hcal pedestal histograms will be saved to " << m_outputFileROOT.c_str() << std::endl;
}
m_nevtsample = ps.getUntrackedParameter<int>("nevtsample",0);
// for compatibility with previous versions
Expand All @@ -52,16 +52,16 @@ HcalPedestalAnalysis::HcalPedestalAnalysis(const edm::ParameterSet& ps)
m_pedValflag = ps.getUntrackedParameter<int>("pedValflag",0);
if(m_pedValflag<0) m_pedValflag=0;
if (m_nevtsample>0 && m_pedValflag>0) {
cout<<"WARNING - incompatible cfg options: nevtsample = "<<m_nevtsample<<", pedValflag = "<<m_pedValflag<<endl;
cout<<"Setting pedValflag = 0"<<endl;
std::cout<<"WARNING - incompatible cfg options: nevtsample = "<<m_nevtsample<<", pedValflag = "<<m_pedValflag<<std::endl;
std::cout<<"Setting pedValflag = 0"<<std::endl;
m_pedValflag=0;
}
if(m_pedValflag>1) m_pedValflag=1;
m_startTS = ps.getUntrackedParameter<int>("firstTS", 0);
if(m_startTS<0) m_startTS=0;
m_endTS = ps.getUntrackedParameter<int>("lastTS", 9);

fTopology=new HcalTopology(HcalTopologyMode::LHC,2,3);
// fTopology=new HcalTopology(HcalTopologyMode::LHC,2,3);

// m_logFile.open("HcalPedestalAnalysis.log");

Expand Down Expand Up @@ -506,11 +506,11 @@ void HcalPedestalAnalysis::GetPedConst(map<HcalDetId, map<int,PEDBUNCH> > &toolT
int HcalPedestalAnalysis::done(const HcalPedestals* fInputPedestals,
const HcalPedestalWidths* fInputPedestalWidths,
HcalPedestals* fOutputPedestals,
HcalPedestalWidths* fOutputPedestalWidths)
{
int nstat[4];
HcalPedestalWidths* fOutputPedestalWidths) {

// Pedestal objects
int nstat[4];

// Pedestal objects
// inputs...
fRefPedestals = fInputPedestals;
fRefPedestalWidths = fInputPedestalWidths;
Expand All @@ -521,8 +521,7 @@ int HcalPedestalAnalysis::done(const HcalPedestals* fInputPedestals,
fValPedestalWidths = fOutputPedestalWidths;
fRawPedestals = new HcalPedestals(fTopology,m_pedsinADC);
fRawPedestalWidths = new HcalPedestalWidths(fTopology,m_pedsinADC);
}
else {
} else {
fRawPedestals = fOutputPedestals;
fRawPedestalWidths = fOutputPedestalWidths;
fValPedestals = new HcalPedestals(fTopology,m_pedsinADC);
Expand Down Expand Up @@ -590,7 +589,7 @@ int HcalPedestalAnalysis::done(const HcalPedestals* fInputPedestals,
hfHists.PEDMEAN->Write();

m_file->Close();
cout << "Hcal histograms written to " << m_outputFileROOT.c_str() << endl;
std::cout << "Hcal histograms written to " << m_outputFileROOT.c_str() << std::endl;
return (int)m_AllPedsOK;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ void HcalPedestalAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& e
edm::ESHandle<HcalTopology> topology;
eventSetup.get<HcalRecNumberingRecord>().get( topology );
m_topo=new HcalTopology(*topology);
m_pedAnal->setTopology(m_topo);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import FWCore.ParameterSet.Config as cms

# Ideal geometry, needed for transient ECAL alignement
from Configuration.Geometry.GeometryExtended2023RPCUpscope_2p1_64_cff import *



# Reconstruction geometry services
# Tracking Geometry
#bah - well, this is not a cfi!
from Geometry.CommonDetUnit.globalTrackingSLHCGeometry_cfi import *

#Tracker
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerNumberingBuilder.trackerTopologyConstants_cfi import *

#Muon
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *

# Alignment
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerSLHCGeometry_cff import *
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *
trackerSLHCGeometry.applyAlignment = cms.bool(False)

# Calorimeters
from Geometry.CaloEventSetup.CaloTopology_cfi import *
from Geometry.CaloEventSetup.CaloGeometry_cff import *
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
from Geometry.EcalMapping.EcalMapping_cfi import *
from Geometry.EcalMapping.EcalMappingRecord_cfi import *

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import FWCore.ParameterSet.Config as cms

# Ideal geometry, needed for transient ECAL alignement
from Configuration.Geometry.GeometryExtended2023RPCUpscope_2p4_192_cff import *



# Reconstruction geometry services
# Tracking Geometry
#bah - well, this is not a cfi!
from Geometry.CommonDetUnit.globalTrackingSLHCGeometry_cfi import *

#Tracker
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerNumberingBuilder.trackerTopologyConstants_cfi import *

#Muon
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *

# Alignment
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerSLHCGeometry_cff import *
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *
trackerSLHCGeometry.applyAlignment = cms.bool(False)

# Calorimeters
from Geometry.CaloEventSetup.CaloTopology_cfi import *
from Geometry.CaloEventSetup.CaloGeometry_cff import *
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
from Geometry.EcalMapping.EcalMapping_cfi import *
from Geometry.EcalMapping.EcalMappingRecord_cfi import *

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import FWCore.ParameterSet.Config as cms

# Ideal geometry, needed for transient ECAL alignement
from Configuration.Geometry.GeometryExtended2023RPCUpscope_2p4_256_cff import *



# Reconstruction geometry services
# Tracking Geometry
#bah - well, this is not a cfi!
from Geometry.CommonDetUnit.globalTrackingSLHCGeometry_cfi import *

#Tracker
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerNumberingBuilder.trackerTopologyConstants_cfi import *

#Muon
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *

# Alignment
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerSLHCGeometry_cff import *
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *
trackerSLHCGeometry.applyAlignment = cms.bool(False)

# Calorimeters
from Geometry.CaloEventSetup.CaloTopology_cfi import *
from Geometry.CaloEventSetup.CaloGeometry_cff import *
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
from Geometry.EcalMapping.EcalMapping_cfi import *
from Geometry.EcalMapping.EcalMappingRecord_cfi import *

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import FWCore.ParameterSet.Config as cms

# Ideal geometry, needed for transient ECAL alignement
from Configuration.Geometry.GeometryExtended2023RPCUpscope_2p4_64_cff import *



# Reconstruction geometry services
# Tracking Geometry
#bah - well, this is not a cfi!
from Geometry.CommonDetUnit.globalTrackingSLHCGeometry_cfi import *

#Tracker
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerNumberingBuilder.trackerTopologyConstants_cfi import *

#Muon
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *

# Alignment
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerSLHCGeometry_cff import *
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *
trackerSLHCGeometry.applyAlignment = cms.bool(False)

# Calorimeters
from Geometry.CaloEventSetup.CaloTopology_cfi import *
from Geometry.CaloEventSetup.CaloGeometry_cff import *
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
from Geometry.EcalMapping.EcalMapping_cfi import *
from Geometry.EcalMapping.EcalMappingRecord_cfi import *

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

#
# Geometry master configuration
#
# Ideal geometry, needed for simulation
from Geometry.CMSCommonData.cmsExtendedGeometry2023RPCUpscopeXML_2p1_64_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingSLHCGeometry_cfi import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

#
# Geometry master configuration
#
# Ideal geometry, needed for simulation
from Geometry.CMSCommonData.cmsExtendedGeometry2023RPCUpscopeXML_2p4_192_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingSLHCGeometry_cfi import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

#
# Geometry master configuration
#
# Ideal geometry, needed for simulation
from Geometry.CMSCommonData.cmsExtendedGeometry2023RPCUpscopeXML_2p4_256_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingSLHCGeometry_cfi import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

#
# Geometry master configuration
#
# Ideal geometry, needed for simulation
from Geometry.CMSCommonData.cmsExtendedGeometry2023RPCUpscopeXML_2p4_64_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingSLHCGeometry_cfi import *
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
from Geometry.EcalMapping.EcalMapping_cfi import *
from Geometry.EcalMapping.EcalMappingRecord_cfi import *
from Geometry.HcalCommonData.hcalSimNumberingInitialization_cfi import *
from Geometry.HcalCommonData.hcalNumberingInitialization_cfi import *

1 change: 0 additions & 1 deletion Configuration/Geometry/python/GeometrySLHCRecoDB_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#Tracker
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingSLHCGeometryDB_cfi import *
from Geometry.HcalCommonData.hcalSimNumberingInitialization_cfi import *
trackerSLHCGeometryDB.applyAlignment = cms.bool(False)
#
# When there will be an alignment, perhaps, it will use a label
Expand Down
4 changes: 2 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ def genvalid(fragment,d,suffix='all',fi=''):
'--conditions':'auto:upgrade2019',
'--mc':'',
'--magField' : '38T_PostLS1',
'--customise' : 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise',
'--customise' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2019',
'--geometry' : 'Extended2019'
}

Expand Down Expand Up @@ -2643,7 +2643,7 @@ def genvalid(fragment,d,suffix='all',fi=''):
'--conditions':'W19_300_62E2::All',
'--mc':'',
'--magField' : '38T_PostLS1',
'--customise' : 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise',
'--customise' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2019,SLHCUpgradeSimulations/Configuration/aging.customise_aging_300',
'--geometry' : 'Extended2019'
}

Expand Down
2 changes: 1 addition & 1 deletion DQM/DTMonitorModule/src/DTChamberEfficiency.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DTChamberEfficiency::DTChamberEfficiency(const ParameterSet& pSet)
thecscSegments = pSet.getParameter<InputTag>("cscSegments");

theMeasurementExtractor = new MuonDetLayerMeasurements(thedt4DSegments,thecscSegments,
labelRPCRecHits,true,false,false);
labelRPCRecHits,InputTag(),true,false,false,false);

theNavigationType = pSet.getParameter<string>("NavigationType");

Expand Down
Loading

0 comments on commit 50f5627

Please sign in to comment.