Skip to content

Commit

Permalink
Merge pull request cms-sw#719 from davidlange6/SLHC_for_62X_V3
Browse files Browse the repository at this point in the history
Slhc for 62 x v3
  • Loading branch information
davidlt committed Sep 9, 2013
2 parents 0eaa37a + b9cf72a commit c753eb4
Show file tree
Hide file tree
Showing 629 changed files with 743,860 additions and 158,764 deletions.
64 changes: 50 additions & 14 deletions CalibCalorimetry/HcalAlgos/src/HcalDbHardcode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,38 @@ HcalPedestal HcalDbHardcode::makePedestal (HcalGenericDetId fId, bool fSmear, do
// Temporary disabling of lumi-dependent pedestal to avoid it being too big
// for TDC evaluations...
// float value0 = 4.* width.getWidth(0); // to be far enough from 0
float value0 = fId.genericSubdet() == HcalGenericDetId::HcalGenForward ? 11. : 18.; // fC

float value0(11.);
if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward)
value0 = 11.;
else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter)
value0 = 10.;
else if ((fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) ||
(fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap)) {

double eff_lumi = (lumi>200) ? lumi - 200. : 0.;

float const darkCurrentPerArea(35.); // uA/mm^2 MPPC after 7*10^11 n/cm^2
float const sensorArea(6.16); // mm^2 for 2.8mm diameter SiPM device

float darkCurrent(darkCurrentPerArea*sensorArea*eff_lumi/3000.);

float const currentFractionToQIE(1/5.);
float chargeToQIE(darkCurrent*25.*currentFractionToQIE); // uA*ns = fC

//end cap gets 1/7th the dose so we need to scale down the calculation
if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap)
chargeToQIE *= 0.143;
else {
// in the HB depth 3 is actually two sensors which are bigger.
HcalDetId hid(fId);
if (hid.depth() == 3)
chargeToQIE *= 2*1.148;
}

value0 = 18. + chargeToQIE;
}


float value [4] = {value0, value0, value0, value0};
if (fSmear) {
Expand Down Expand Up @@ -503,18 +534,22 @@ HcalTimingParam HcalDbHardcode::makeTimingParam (HcalGenericDetId fId) {
HcalGain HcalDbHardcode::makeGain (HcalGenericDetId fId, bool fSmear) {
HcalGainWidth width = makeGainWidth (fId);
float value0 = 0;

static float const hbhevalue = 1./90./10.; //90 is pe/GeV 10 is fC/pe.
if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) {
if (HcalDetId(fId).depth() == 1) value0 = 0.003333;
else if (HcalDetId(fId).depth() == 2) value0 = 0.003333;
else if (HcalDetId(fId).depth() == 3) value0 = 0.003333;
else if (HcalDetId(fId).depth() == 4) value0 = 0.003333;
else value0 = 0.003333; // GeV/fC
HcalDetId hid(fId);
if (hid.depth() == 1) value0 = hbhevalue;
else if (hid.depth() == 2) value0 = hbhevalue;
else if (hid.depth() == 3) value0 = hbhevalue;
else if (hid.depth() == 4) value0 = hbhevalue;
else value0 = hbhevalue; // GeV/fC
} else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
if (HcalDetId(fId).depth() == 1) value0 = 0.003333;
else if (HcalDetId(fId).depth() == 2) value0 = 0.003333;
else if (HcalDetId(fId).depth() == 3) value0 = 0.003333;
else if (HcalDetId(fId).depth() == 4) value0 = 0.003333;
else value0 = 0.003333; // GeV/fC
HcalDetId hid(fId);
if (hid.depth() == 1) value0 = hbhevalue;
else if (hid.depth() == 2) value0 = hbhevalue;
else if (hid.depth() == 3) value0 = hbhevalue;
else if (hid.depth() == 4) value0 = hbhevalue;
else value0 = hbhevalue; // GeV/fC
// if (fId.genericSubdet() != HcalGenericDetId::HcalGenForward) value0 = 0.177; // GeV/fC
} else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
HcalDetId hid(fId);
Expand All @@ -523,9 +558,10 @@ HcalGain HcalDbHardcode::makeGain (HcalGenericDetId fId, bool fSmear) {
else
value0 = 0.02083; // GeV/fC
} else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
if (HcalDetId(fId).depth() == 1) value0 = 0.2146;
else if (HcalDetId(fId).depth() == 2) value0 = 0.3375;
} else value0 = 0.003333; // GeV/fC
HcalDetId hid(fId);
if (hid.depth() == 1) value0 = 0.2146;
else if (hid.depth() == 2) value0 = 0.3375;
} else value0 = hbhevalue; // GeV/fC
float value [4] = {value0, value0, value0, value0};
if (fSmear) for (int i = 0; i < 4; i++) value [i] = CLHEP::RandGauss::shoot (value0, width.getValue (i));
HcalGain result (fId.rawId (), value[0], value[1], value[2], value[3]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
iLumi = cms.double(-1.), # for Upgrade: fb-1
HcalReLabel = HcalReLabel, # for Upgrade
HERecalibration = cms.bool(False), # True for Upgrade
HEreCalibCutoff = cms.double(20.), # if above is True
HFRecalibration = cms.bool(False), # True for Upgrade
GainWidthsForTrigPrims = cms.bool(False) # True Upgrade
)
Expand Down
6 changes: 3 additions & 3 deletions CalibCalorimetry/HcalPlugins/src/HERecalibration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

#include "HERecalibration.h"

HERecalibration::HERecalibration(double integrated_lumi):iLumi(integrated_lumi), darkening()
HERecalibration::HERecalibration(double integrated_lumi, double cutoff):
iLumi(integrated_lumi),cutoff_(cutoff),darkening()
{ }

HERecalibration::~HERecalibration() { }
Expand All @@ -34,9 +35,8 @@ double HERecalibration::getCorr(int ieta, int idepth) {

// int init_ieta = ieta;
ieta = abs(ieta)-16; // 0 - 13
double cutoff = 20.0; // cutoff to avoid too big corrections!

if(corr[ieta][idepth] > cutoff) return cutoff;
if(corr[ieta][idepth] > cutoff_) return cutoff_;
else return corr[ieta][idepth];
}

Expand Down
3 changes: 2 additions & 1 deletion CalibCalorimetry/HcalPlugins/src/HERecalibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class HERecalibration {

public:
HERecalibration(double integrated_lumi);
HERecalibration(double integrated_lumi, double cutoff);
~HERecalibration();

double getCorr(int ieta, int idepth);
Expand All @@ -30,6 +30,7 @@ class HERecalibration {

void initialize();
double iLumi;
double cutoff_;
HEDarkening darkening;

// Tabulated mean energy values per layer and per depth
Expand Down
9 changes: 6 additions & 3 deletions CalibCalorimetry/HcalPlugins/src/HcalHardcodeCalibrations.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -*- C++ -*-
// Original Author: Fedor Ratnikov
// $Id: HcalHardcodeCalibrations.cc,v 1.43 2013/04/23 16:06:26 abdullin Exp $
// $Id: HcalHardcodeCalibrations.cc,v 1.44 2013/06/03 17:44:52 abdullin Exp $
//
//

Expand Down Expand Up @@ -117,15 +117,18 @@ HcalHardcodeCalibrations::HcalHardcodeCalibrations ( const edm::ParameterSet& iC
else switchGainWidthsForTrigPrims = false;


// HE recalibration preparation
// HE and HF recalibration preparation
iLumi = 0.;
if ( iConfig.exists("iLumi") )
iLumi=iConfig.getParameter<double>("iLumi");

if( iLumi > 0.0 ) {
bool he_recalib = iConfig.getParameter<bool>("HERecalibration");
bool hf_recalib = iConfig.getParameter<bool>("HFRecalibration");
if(he_recalib) he_recalibration = new HERecalibration(iLumi);
if(he_recalib) {
double cutoff = iConfig.getParameter<double>("HEreCalibCutoff");
he_recalibration = new HERecalibration(iLumi,cutoff);
}
if(hf_recalib) hf_recalibration = new HFRecalibration();

// std::cout << " HcalHardcodeCalibrations: iLumi = " << iLumi << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions CalibCalorimetry/HcalPlugins/src/HcalHardcodeCalibrations.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Original Author: Fedor Ratnikov Oct 21, 2005
// $Id: HcalHardcodeCalibrations.h,v 1.25 2013/04/23 15:41:27 abdullin Exp $
// $Id: HcalHardcodeCalibrations.h,v 1.26 2013/06/07 10:58:04 abdullin Exp $
//
// ESSource to generate default HCAL calibration objects
//
Expand All @@ -13,7 +13,7 @@
#include "Geometry/CaloTopology/interface/HcalTopology.h"
#include "CondFormats/HcalObjects/interface/AllObjects.h"
#include "HERecalibration.h"
#include "HFRecalibration.h"
#include "DataFormats/HcalCalibObjects/interface/HFRecalibration.h"

class ParameterSet;

Expand Down
4 changes: 2 additions & 2 deletions Configuration/AlCa/python/autoCond.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
'hltonline' : 'PRE_P62_V8::All',
# GlobalTag for POSTLS1 upgrade studies:
'upgradePLS1' : 'POSTLS162_V1::All',
'upgrade2017' : 'DES17_61_V5::All', # placeholder (GT not meant for 62X)
'upgrade2019' : 'DES19_61_V5::All', # placeholder (GT not meant for 62X)
'upgrade2017' : 'DES17_62_V7::All', # placeholder (GT not meant for 62X)
'upgrade2019' : 'DES19_62_V7::All', # placeholder (GT not meant for 62X)
'upgradePLS3' : 'POSTLS261_V2::All' # placeholder (GT not meant for 62X)
}

Expand Down
19 changes: 14 additions & 5 deletions Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,11 +963,20 @@ def define_Configs(self):
self.GeometryCFF='Configuration/StandardSequences/GeometryRecoDB_cff'
self.geometryDBLabel=None
simGeometry=''
if self._options.fast:
if 'start' in self._options.conditions.lower():
self.GeometryCFF='FastSimulation/Configuration/Geometries_START_cff'
else:
self.GeometryCFF='FastSimulation/Configuration/Geometries_MC_cff'
if self._options.fast:
def inGeometryFastSimKeys(opt):
from Configuration.StandardSequences.GeometryConf import FastSimGeometryConf
if opt in FastSimGeometryConf:
return FastSimGeometryConf[opt]
else:
return opt
if self._options.geometry != defaultOptions.geometry:
self.GeometryCFF=inGeometryFastSimKeys(self._options.geometry)
else:
if 'start' in self._options.conditions.lower():
self.GeometryCFF='FastSimulation/Configuration/Geometries_START_cff'
else:
self.GeometryCFF='FastSimulation/Configuration/Geometries_MC_cff'
else:
def inGeometryKeys(opt):
from Configuration.StandardSequences.GeometryConf import GeometryConf
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
import FWCore.ParameterSet.Config as cms
# Mostly copied from Configuration/StandardSequences/python/Geometry_cff.py
# The R39F16 Version of the Phase 1 Pixel Upgrade
from SLHCUpgradeSimulations.Geometry.Longbarrel_cmsSimIdealGeometryXML_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import *

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



# Reconstruction geometry services
# Tracking Geometry
from Geometry.CommonDetUnit.globalTrackingGeometry_cfi import *
#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.idealForDigiTrackerGeometry_cff import *
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 *
Expand Down
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.cmsExtendedGeometryPhase2TkBE5DXML_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingSLHCGeometry_cfi import *
Loading

0 comments on commit c753eb4

Please sign in to comment.