Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run-dependent pixel simulation using additionally compressed SimHit info #46884

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import FWCore.ParameterSet.Config as cms
runDependentForPixelVal = cms.Modifier()
4 changes: 3 additions & 1 deletion Configuration/PyReleaseValidation/python/relval_premix.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
workflows[250202.181]=['TTbar13TeVPUppmx2018',['TTbar_13UP18','PREMIXUP18_PU25','DIGIPRMXLOCALUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
workflows[250202.182]=['',['TTbar_13UP18_RD','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25_RD']]
workflows[250202.183]=['',['TTbar_13UP18_RD_IB','DIGIPRMXUP18_PU25_RD_IB','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25_RD']]
workflows[250202.184]=['',['TTbar_13UP18','PREMIXUP18_PU25_RDPix','DIGIPRMXLOCALUP18_PU25_RDPix','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
#workflows[250202.184]=['',['TTbar_13UP18','PREMIXUP18_PU25_RDPix','DIGIPRMXLOCALUP18_PU25_RDPix','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
workflows[250202.184]=['',['TTbar_13UP18','PREMIXUP18_PU25_RDPixLite','DIGIPRMXLOCALUP18_PU25_RDPix','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
workflows[250202.185]=['',['TTbar_13UP18','PREMIXUP18_PU25_RDPixLite','DIGIPRMXLOCALUP18_PU25_RDPixLite','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
workflows[250203.18]=['',['H125GGgluonfusion_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
workflows[250204.18]=['',['QQH1352T_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
workflows[250205.18]=['',['ZTT_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']]
Expand Down
7 changes: 7 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2089,12 +2089,17 @@ def lhegensim2018ml(fragment,howMuch):
{'--era':'Run2_2018'},
{'--procModifiers':'premix_stage1,runDependentForPixel'},
premixUp2015Defaults])
premixUp2018_RDPixLite = merge([{'--conditions':'auto:phase1_2018_realistic_rd'},
{'--era':'Run2_2018'},
{'--procModifiers':'premix_stage1,runDependentForPixelVal'},
premixUp2015Defaults])

steps['PREMIXUP15_PU25']=merge([PU25,Kby(100,100),premixUp2015Defaults])
steps['PREMIXUP15_PU50']=merge([PU50,Kby(100,100),premixUp2015Defaults50ns])
steps['PREMIXUP17_PU25']=merge([PU25UP17,Kby(100,100),premixUp2017Defaults])
steps['PREMIXUP18_PU25']=merge([PU25UP18,Kby(100,100),premixUp2018Defaults])
steps['PREMIXUP18_PU25_RDPix']=merge([PU25UP18,Kby(100,100),premixUp2018_RDPix])
steps['PREMIXUP18_PU25_RDPixLite']=merge([PU25UP18,Kby(100,100),premixUp2018_RDPixLite])

digiPremixUp2015Defaults25ns = {
'--conditions' : 'auto:run2_mc',
Expand Down Expand Up @@ -2169,6 +2174,8 @@ def lhegensim2018ml(fragment,howMuch):

steps['DIGIPRMXLOCALUP18_PU25_RDPix']=merge([{'--conditions':'auto:phase1_2018_realistic_rd', '--procModifiers':'premix_stage2,runDependentForPixel'}, digiPremixLocalPileupUp2018Defaults25ns])

steps['DIGIPRMXLOCALUP18_PU25_RDPixLite']=merge([{'--conditions':'auto:phase1_2018_realistic_rd', '--procModifiers':'premix_stage2,runDependentForPixelVal'}, digiPremixLocalPileupUp2018Defaults25ns])

premixProd25ns = {'-s' : 'DIGI,DATAMIX,L1,DIGI2RAW,HLT:@relval2016',
'--eventcontent' : 'PREMIXRAW',
'--datatier' : 'PREMIXRAW'}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#ifndef PixelSimHitExtraInfoLite_h
#define PixelSimHitExtraInfoLite_h

#include "DataFormats/GeometryVector/interface/LocalPoint.h"
#include "DataFormats/Math/interface/libminifloat.h"
#include <vector>
#include <cstdint>

class PixelSimHitExtraInfoLite {
public:
PixelSimHitExtraInfoLite(size_t Hindex, const Local3DPoint& entryP, const Local3DPoint& exitP, unsigned int ch) {
index_ = Hindex;
// theEntryPoint_ = entryP;
// theExitPoint_ = exitP;
theEntryPointX_ = MiniFloatConverter::float32to16(entryP.x());
theEntryPointY_ = MiniFloatConverter::float32to16(entryP.y());
theEntryPointZ_ = MiniFloatConverter::float32to16(entryP.z());
theExitPointX_ = MiniFloatConverter::float32to16(exitP.x());
theExitPointY_ = MiniFloatConverter::float32to16(exitP.y());
theExitPointZ_ = MiniFloatConverter::float32to16(exitP.z());
chan_.push_back(ch);
};
PixelSimHitExtraInfoLite() = default;
~PixelSimHitExtraInfoLite() = default;
size_t hitIndex() const { return index_; };
const uint16_t& entryPointX() const { return theEntryPointX_; }
const uint16_t& entryPointY() const { return theEntryPointY_; }
const uint16_t& entryPointZ() const { return theEntryPointZ_; }
const uint16_t& exitPointX() const { return theExitPointX_; }
const uint16_t& exitPointY() const { return theExitPointY_; }
const uint16_t& exitPointZ() const { return theExitPointZ_; }

Local3DPoint& entryPoint() {
UncompressedEntryPoint_ = Local3DPoint(MiniFloatConverter::float16to32(theEntryPointX_),
MiniFloatConverter::float16to32(theEntryPointY_),
MiniFloatConverter::float16to32(theEntryPointZ_));
return UncompressedEntryPoint_;
}
Local3DPoint& exitPoint() {
UncompressedExitPoint_ = Local3DPoint(MiniFloatConverter::float16to32(theExitPointX_),
MiniFloatConverter::float16to32(theExitPointY_),
MiniFloatConverter::float16to32(theExitPointZ_));
return UncompressedExitPoint_;
}

const std::vector<unsigned int>& channel() const { return chan_; };

inline bool operator<(const PixelSimHitExtraInfoLite& other) const { return hitIndex() < other.hitIndex(); }

void addDigiInfo(unsigned int theDigiChannel) { chan_.push_back(theDigiChannel); }
bool isInTheList(unsigned int channelToCheck) {
bool result_in_the_list = false;
for (unsigned int icheck = 0; icheck < chan_.size(); icheck++) {
if (channelToCheck == chan_[icheck]) {
result_in_the_list = true;
break;
}
}
return result_in_the_list;
}

private:
size_t index_;
uint16_t theEntryPointX_;
uint16_t theEntryPointY_;
uint16_t theEntryPointZ_;
uint16_t theExitPointX_;
uint16_t theExitPointY_;
uint16_t theExitPointZ_;
Local3DPoint UncompressedEntryPoint_;
Local3DPoint UncompressedExitPoint_;
std::vector<unsigned int> chan_;
};
#endif
1 change: 1 addition & 0 deletions SimDataFormats/TrackerDigiSimLink/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
#include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
#include "SimDataFormats/TrackerDigiSimLink/interface/StripCompactDigiSimLinks.h"
#include "SimDataFormats/TrackerDigiSimLink/interface/PixelSimHitExtraInfo.h"
#include "SimDataFormats/TrackerDigiSimLink/interface/PixelSimHitExtraInfoLite.h"

#endif // TRACKERDIGISIMLINK_CLASSES_H
15 changes: 15 additions & 0 deletions SimDataFormats/TrackerDigiSimLink/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,19 @@
<class name="edm::Wrapper< edm::DetSetVector<PixelSimHitExtraInfo> >" splitLevel="0" />


<class name="PixelSimHitExtraInfoLite" ClassVersion="3">
<field name="index_" transient="true" />
<field name="UncompressedEntryPoint_" transient="true" />
<field name="UncompressedExitPoint_" transient="true" />
<version ClassVersion="3" checksum="425674366"/>
</class>
<class name="edm::DetSet<PixelSimHitExtraInfoLite>"/>
<class name="std::vector<PixelSimHitExtraInfoLite>"/>
<class name="edm::DetSetVector<PixelSimHitExtraInfoLite>"/>
<class name="std::vector<edm::DetSet<PixelSimHitExtraInfoLite> >"/>
<class name="edm::Wrapper< edm::DetSet<PixelSimHitExtraInfoLite> >" splitLevel="0" />
<class name="edm::Wrapper< std::vector<edm::DetSet<PixelSimHitExtraInfoLite> > >" splitLevel="0" />
<class name="edm::Wrapper< edm::DetSetVector<PixelSimHitExtraInfoLite> >" splitLevel="0" />


</lcgdict>
2 changes: 2 additions & 0 deletions SimGeneral/MixingModule/python/SiPixelSimParameters_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def _modifyPixelDigitizerForRun3( digitizer ):
KillBadFEDChannels = cms.bool(False),
UseReweighting = cms.bool(False),
applyLateReweighting = cms.bool(False),
usePixelExtraLiteFormat = cms.bool(False),
store_SimHitEntryExitPoints = cms.bool(False),
store_SimHitEntryExitPointsLite = cms.bool(False),
PrintClusters = cms.bool(False),
PrintTemplates = cms.bool(False),
DoPixelAging = cms.bool(False),
Expand Down
4 changes: 4 additions & 0 deletions SimGeneral/MixingModule/python/aliases_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,16 @@
from Configuration.ProcessModifiers.runDependentForPixel_cff import runDependentForPixel
(runDependentForPixel).toModify(simSiPixelDigis, mix = _pixelCommon + [cms.PSet(type = cms.string('PixelSimHitExtraInfoedmDetSetVector'))])

from Configuration.ProcessModifiers.runDependentForPixelVal_cff import runDependentForPixelVal
(runDependentForPixelVal).toModify(simSiPixelDigis, mix = _pixelCommon + [cms.PSet(type = cms.string('PixelSimHitExtraInfoedmDetSetVector'))] + [cms.PSet(type = cms.string('PixelSimHitExtraInfoLiteedmDetSetVector'))])

from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
(~phase2_hfnose).toModify(simHFNoseUnsuppressedDigis, mix = None)

from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
phase1Pixel.toModify(simSiPixelDigis, mix = _pixelCommon + [cms.PSet(type = cms.string('PixelFEDChanneledmNewDetSetVector'))])
(phase1Pixel & runDependentForPixel).toModify(simSiPixelDigis, mix = _pixelCommon + [cms.PSet(type = cms.string('PixelSimHitExtraInfoedmDetSetVector'))] + [cms.PSet(type = cms.string('PixelFEDChanneledmNewDetSetVector'))])
(phase1Pixel & runDependentForPixelVal).toModify(simSiPixelDigis, mix = _pixelCommon + [cms.PSet(type = cms.string('PixelSimHitExtraInfoedmDetSetVector'))] + [cms.PSet(type = cms.string('PixelSimHitExtraInfoLiteedmDetSetVector'))] + [cms.PSet(type = cms.string('PixelFEDChanneledmNewDetSetVector'))])

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(simSiStripDigis, mix = None)
Expand Down
12 changes: 12 additions & 0 deletions SimGeneral/MixingModule/python/pixelDigitizer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,19 @@
(runDependentForPixel & premix_stage1).toModify(pixelDigitizer,
UseReweighting = False,
applyLateReweighting = False,
usePixelExtraLiteFormat = False,
store_SimHitEntryExitPoints = True,
store_SimHitEntryExitPointsLite = False,
AdcFullScale = 1023,
MissCalibrate = False
)
from Configuration.ProcessModifiers.runDependentForPixelVal_cff import runDependentForPixelVal
(runDependentForPixelVal & premix_stage1).toModify(pixelDigitizer,
UseReweighting = False,
applyLateReweighting = False,
usePixelExtraLiteFormat = False,
store_SimHitEntryExitPoints = True,
store_SimHitEntryExitPointsLite = True,
AdcFullScale = 1023,
MissCalibrate = False
)
Expand Down
14 changes: 13 additions & 1 deletion SimGeneral/PreMixingModule/python/mixOne_premix_on_sim_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
pixeldigiCollectionSig = cms.InputTag("simSiPixelDigis"),
pixeldigiCollectionPile = cms.InputTag("simSiPixelDigis"),
pixeldigiExtraCollectionPile = cms.InputTag("simSiPixelDigis"),
pixeldigiExtraLiteCollectionPile = cms.InputTag("simSiPixelDigis"),
PixelDigiCollectionDM = cms.string('siPixelDigisDM'),
),
strip = cms.PSet(
Expand Down Expand Up @@ -158,7 +159,18 @@
(runDependentForPixel & premix_stage2).toModify(mixData.workers.pixel,
UseReweighting=False,
applyLateReweighting=True,
store_SimHitEntryExitPoints=False
usePixelExtraLiteFormat = False,
store_SimHitEntryExitPoints=False,
store_SimHitEntryExitPointsLite = False
)

from Configuration.ProcessModifiers.runDependentForPixelVal_cff import runDependentForPixelVal
(runDependentForPixelVal & premix_stage2).toModify(mixData.workers.pixel,
UseReweighting=False,
applyLateReweighting=True,
usePixelExtraLiteFormat = True,
store_SimHitEntryExitPoints=False,
store_SimHitEntryExitPointsLite = False
)

from Configuration.Eras.Modifier_fastSim_cff import fastSim
Expand Down
Loading