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

Reducing the GEMDigiSimLink size and turning off gem multi bx readout during Run3 #34840

Merged
merged 9 commits into from
Aug 27, 2021
63 changes: 18 additions & 45 deletions SimDataFormats/GEMDigiSimLink/interface/GEMDigiSimLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,30 @@

class GEMDigiSimLink {
public:
GEMDigiSimLink(std::pair<unsigned int, int> digi,
Local3DPoint entryPoint,
LocalVector momentumAtEntry,
float timeOfFlight,
float energyLoss,
int particleType,
unsigned int detUnitId,
unsigned int trackId,
EncodedEventId eventId,
unsigned short processType) {
_entryPoint = entryPoint;
_momentumAtEntry = momentumAtEntry;
_timeOfFlight = timeOfFlight;
_energyLoss = energyLoss;
_particleType = particleType;
_detUnitId = detUnitId;
_trackId = trackId;
_eventId = eventId;
_processType = processType;
_digi = digi;
GEMDigiSimLink(uint16_t strip, int8_t bx, int16_t particleType, uint32_t trackId, EncodedEventId eventId) {
strip_ = strip;
bx_ = bx;
particleType_ = particleType;
trackId_ = trackId;
eventId_ = eventId;
}

GEMDigiSimLink() { ; }
GEMDigiSimLink() {}
~GEMDigiSimLink() {}

~GEMDigiSimLink() { ; }

unsigned int getStrip() const { return _digi.first; }
int getBx() const { return _digi.second; }
Local3DPoint getEntryPoint() const { return _entryPoint; }
LocalVector getMomentumAtEntry() const { return _momentumAtEntry; }
float getTimeOfFlight() const { return _timeOfFlight; }
float getEnergyLoss() const { return _energyLoss; }
int getParticleType() const { return _particleType; }
unsigned int getDetUnitId() const { return _detUnitId; }
unsigned int getTrackId() const { return _trackId; }
EncodedEventId getEventId() const { return _eventId; }
unsigned short getProcessType() const { return _processType; }
unsigned int getStrip() const { return strip_; }
int getBx() const { return bx_; }
int getParticleType() const { return particleType_; }
unsigned int getTrackId() const { return trackId_; }
EncodedEventId getEventId() const { return eventId_; }

inline bool operator<(const GEMDigiSimLink& other) const { return getStrip() < other.getStrip(); }

private:
std::pair<unsigned int, int> _digi;

Local3DPoint _entryPoint;
LocalVector _momentumAtEntry;
float _timeOfFlight;
float _energyLoss;
int _particleType;
unsigned int _detUnitId;
unsigned int _trackId;
EncodedEventId _eventId;
unsigned short _processType;
uint16_t strip_;
int8_t bx_;
int16_t particleType_;
uint32_t trackId_;
EncodedEventId eventId_;
};
#endif
6 changes: 4 additions & 2 deletions SimDataFormats/GEMDigiSimLink/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<lcgdict>

<class name="GEMDigiSimLink" ClassVersion="10">
<class name="GEMDigiSimLink" ClassVersion="11">
<version ClassVersion="11" checksum="2786838115"/>
<version ClassVersion="10" checksum="665696725"/>
</class>
<class name="edm::DetSet<GEMDigiSimLink>"/>
Expand All @@ -11,7 +12,8 @@
<class name="edm::Wrapper< std::vector<edm::DetSet<GEMDigiSimLink> > >" splitLevel="0" />
<class name="edm::Wrapper< edm::DetSetVector<GEMDigiSimLink> >" splitLevel="0" />

<class name="ME0DigiSimLink" ClassVersion="10">
<class name="ME0DigiSimLink" ClassVersion="11">
<version ClassVersion="11" checksum="2786838115"/>
<version ClassVersion="10" checksum="665696725"/>
</class>
<class name="edm::DetSet<ME0DigiSimLink>"/>
Expand Down
1 change: 1 addition & 0 deletions SimMuon/GEMDigitizer/interface/GEMSignalModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class GEMSignalModel : public GEMDigiModel {
double timeResolution_;
double timeJitter_;
double signalPropagationSpeed_;
bool bx0filter_;
bool digitizeOnlyMuons_;
double resolutionX_;

Expand Down
1 change: 1 addition & 0 deletions SimMuon/GEMDigitizer/plugins/GEMDigiProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void GEMDigiProducer::fillDescriptions(edm::ConfigurationDescriptions& descripti
desc.add<bool>("simulateElectronBkg", true);
// flase == simulate only neutral bkg
desc.add<bool>("simulateIntrinsicNoise", false);
desc.add<bool>("bx0filter", false);

desc.add<double>("instLumi", 7.5);
// in units of 1E34 cm^-2 s^-1. Internally the background is parmetrized from FLUKA+GEANT result at 5E+34 (PU 140). We are adding a 1.5 factor for PU 200
Expand Down
6 changes: 3 additions & 3 deletions SimMuon/GEMDigitizer/python/muonGEMDigis_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
premix_stage2.toModify(simMuonGEMDigis, mixLabel = "mixData")

from Configuration.Eras.Modifier_run2_common_cff import run2_common
run2_common.toModify( simMuonGEMDigis, instLumi = 1.5)
run2_common.toModify( simMuonGEMDigis, instLumi = 1.5, bx0filter = True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you keep it to False, so Run-2 behaviour will not be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were only 5 GE1/1 super chambers for the slice test.
And as far as I know, they didn't support the multi bx mode at that moment.
@jshlee Could you confirm it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bx0filter = True is correct for run2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, from #34840 (comment) you expect to change the behaviour of Run-2.


from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify( simMuonGEMDigis, instLumi = 2.0)
run3_common.toModify( simMuonGEMDigis, instLumi = 2.0, bx0filter = True)

from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toModify( simMuonGEMDigis, instLumi = 5)
phase2_common.toModify( simMuonGEMDigis, instLumi = 5, bx0filter = False)
11 changes: 1 addition & 10 deletions SimMuon/GEMDigitizer/src/GEMDigiModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,7 @@ void GEMDigiModule::addLinksWithPartId(unsigned int strip, int bx) {
if (hit == nullptr)
continue;

theGemDigiSimLinks_.push_back(GEMDigiSimLink(digi,
hit->entryPoint(),
hit->momentumAtEntry(),
hit->timeOfFlight(),
hit->energyLoss(),
hit->particleType(),
hit->detUnitId(),
hit->trackId(),
hit->eventId(),
hit->processType()));
theGemDigiSimLinks_.push_back(GEMDigiSimLink(strip, bx, hit->particleType(), hit->trackId(), hit->eventId()));
}
}

Expand Down
3 changes: 3 additions & 0 deletions SimMuon/GEMDigitizer/src/GEMSignalModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ GEMSignalModel::GEMSignalModel(const edm::ParameterSet& config)
timeResolution_(config.getParameter<double>("timeResolution")),
timeJitter_(config.getParameter<double>("timeJitter")),
signalPropagationSpeed_(config.getParameter<double>("signalPropagationSpeed")),
bx0filter_(config.getParameter<bool>("bx0filter")),
digitizeOnlyMuons_(config.getParameter<bool>("digitizeOnlyMuons")),
resolutionX_(config.getParameter<double>("resolutionX")),
muonPdgId(13),
Expand Down Expand Up @@ -67,6 +68,8 @@ void GEMSignalModel::simulate(const GEMEtaPartition* roll,
if (!(digiMuon || digiElec))
continue;
const int bx(getSimHitBx(&hit, engine));
if (bx != 0 and bx0filter_)
continue;
const std::vector<std::pair<int, int> >& cluster(simulateClustering(top, &hit, bx, engine));
for (const auto& digi : cluster) {
detectorHitMap_.emplace(digi, &hit);
Expand Down
11 changes: 1 addition & 10 deletions SimMuon/GEMDigitizer/src/ME0DigiModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ void ME0DigiModel::addLinksWithPartId(unsigned int strip, int bx) {
if (hit == nullptr)
continue;

theME0DigiSimLinks_.push_back(ME0DigiSimLink(digi,
hit->entryPoint(),
hit->momentumAtEntry(),
hit->timeOfFlight(),
hit->energyLoss(),
hit->particleType(),
hit->detUnitId(),
hit->trackId(),
hit->eventId(),
hit->processType()));
theME0DigiSimLinks_.push_back(ME0DigiSimLink(strip, bx, hit->particleType(), hit->trackId(), hit->eventId()));
}
}
8 changes: 0 additions & 8 deletions SimMuon/GEMDigitizer/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
<flags EDM_PLUGIN="1"/>
</library>

<library file="GEMDigiSimLinkReader.cc" name="GEMDigiSimLinkReader">
<flags EDM_PLUGIN="1"/>
</library>

<library file="ME0DigiSimLinkReader.cc" name="ME0DigiSimLinkReader">
<flags EDM_PLUGIN="1"/>
</library>

<library file="ME0DigiReader.cc" name="ME0DigiReader">
<flags EDM_PLUGIN="1"/>
</library>