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

ECAL Phase 2 Development WF 28234.61 fix #36748

Merged
merged 6 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,13 @@ def setup_(self, step, stepName, stepDict, k, properties):
# temporarily remove trigger & downstream steps
mods = {'--era': stepDict[step][k]['--era']+',phase2_ecal_devel'}
if 'Digi' in step:
mods['-s'] = 'DIGI:pdigi_valid'
mods['-s'] = 'DIGI:pdigi_valid,DIGI2RAW'
elif 'Reco' in step:
mods['-s'] = 'RAW2DIGI,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly'
mods['--datatier'] = 'GEN-SIM-RECO,DQMIO'
mods['--eventcontent'] = 'FEVTDEBUGHLT,DQM'
elif 'HARVEST' in step:
mods['-s'] = 'HARVESTING:@ecalOnlyValidation+@ecal'
stepDict[stepName][k] = merge([mods, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return fragment=="TTbar_14TeV" and '2026' in key
Expand Down
2 changes: 1 addition & 1 deletion Configuration/StandardSequences/python/DigiToRaw_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
fastSim.toReplaceWith(DigiToRawTask, DigiToRawTask.copyAndExclude([siPixelRawData,SiStripDigiToRaw,castorRawData,ctppsRawData]))

from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toReplaceWith(DigiToRawTask, DigiToRawTask.copyAndExclude([esDigiToRaw]))
phase2_ecal_devel.toReplaceWith(DigiToRawTask, DigiToRawTask.copyAndExclude([L1TDigiToRawTask, ecalPacker, esDigiToRaw, cscpacker]))
3 changes: 3 additions & 0 deletions Configuration/StandardSequences/python/Reconstruction_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@
)
reconstruction_ecalOnly = cms.Sequence(reconstruction_ecalOnlyTask)

from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toReplaceWith(reconstruction_ecalOnlyTask, reconstruction_ecalOnlyTask.copyAndExclude([pfClusteringPSTask, pfClusteringECALTask, particleFlowSuperClusterECALOnly]))

reconstruction_hcalOnlyTask = cms.Task(
bunchSpacingProducer,
offlineBeamSpot,
Expand Down
3 changes: 3 additions & 0 deletions DQMOffline/Configuration/python/DQMOffline_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
ecal_dqm_source_offline +
es_dqm_source_offline )

from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toReplaceWith(DQMOfflineEcalOnly, DQMOfflineEcalOnly.copyAndExclude([es_dqm_source_offline]))

#offline version of the online DQM: used in validation/certification
DQMOfflineHcal = cms.Sequence( hcalOfflineSourceSequence )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
_phase2_timing_ecalRecHitTask = cms.Task( ecalRecHitTask.copy() , ecalDetailedTimeRecHit )
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
phase2_timing.toReplaceWith( ecalRecHitTask, _phase2_timing_ecalRecHitTask )
from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitPhase2_cff import *
phase2_ecal_devel.toReplaceWith(ecalUncalibRecHitTask, ecalUncalibRecHitPhase2Task)
phase2_ecal_devel.toReplaceWith(ecalRecHitNoTPTask, ecalRecHitNoTPTask.copyAndExclude([ecalPreshowerRecHit]))

# FastSim modifications
_fastSim_ecalRecHitTask = ecalRecHitTask.copyAndExclude([ecalCompactTrigPrim,ecalTPSkim])
Expand Down
274 changes: 125 additions & 149 deletions RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducer.cc

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Utilities/interface/ESGetToken.h"

//#include "RecoLocalCalo/EcalRecAlgos/interface/EcalRecHitAbsAlgo.h"
#include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h"
#include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
#include "RecoLocalCalo/EcalRecProducers/interface/EcalRecHitWorkerBaseClass.h"
Expand All @@ -33,16 +32,15 @@ class EcalRecHitProducer : public edm::stream::EDProducer<> {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
std::string ebRechitCollection_; // secondary name to be given to EB collection of hits
std::string eeRechitCollection_; // secondary name to be given to EE collection of hits

bool recoverEBIsolatedChannels_;
bool recoverEEIsolatedChannels_;
bool recoverEBVFE_;
bool recoverEEVFE_;
bool recoverEBFE_;
bool recoverEEFE_;
bool killDeadChannels_;
const bool doEB_; // consume and use the EB uncalibrated RecHits. An EB collection is produced even if this is false
const bool doEE_; // consume and use the EE uncalibrated RecHits. An EE collection is produced even if this is false
const bool recoverEBIsolatedChannels_;
const bool recoverEEIsolatedChannels_;
const bool recoverEBVFE_;
const bool recoverEEVFE_;
const bool recoverEBFE_;
const bool recoverEEFE_;
const bool killDeadChannels_;

std::unique_ptr<EcalRecHitWorkerBaseClass> worker_;
std::unique_ptr<EcalRecHitWorkerBaseClass> workerRecover_;
Expand All @@ -56,6 +54,8 @@ class EcalRecHitProducer : public edm::stream::EDProducer<> {
edm::EDGetTokenT<std::set<EcalTrigTowerDetId> > ebFEToBeRecoveredToken_;
edm::EDGetTokenT<std::set<EcalScDetId> > eeFEToBeRecoveredToken_;
edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> ecalChannelStatusToken_;
const edm::EDPutTokenT<EBRecHitCollection> ebRecHitToken_;
const edm::EDPutTokenT<EERecHitCollection> eeRecHitToken_;
};

#endif
15 changes: 14 additions & 1 deletion RecoLocalCalo/EcalRecProducers/python/ecalRecHit_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,17 @@
recoverEBFE = False,
recoverEEFE = False,
recoverEBIsolatedChannels = False
)
)

# Phase 2 modifications
from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toModify(ecalRecHit,
EBuncalibRecHitCollection = cms.InputTag("ecalUncalibRecHitPhase2", "EcalUncalibRecHitsEB"),
EEuncalibRecHitCollection = cms.InputTag(""), # No EE input since there is no ECAL endcap in Phase 2
killDeadChannels = cms.bool(False),
recoverEBFE = cms.bool(False),
recoverEEFE = cms.bool(False),
recoverEBIsolatedChannels = cms.bool(False),
recoverEEIsolatedChannels = cms.bool(False)
thomreis marked this conversation as resolved.
Show resolved Hide resolved
)

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
run2_common.toModify( SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*') )
run2_common.toModify( SimCalorimetryRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*') )

from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toModify(SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_ecal*_*_*') )
Copy link
Contributor

Choose a reason for hiding this comment

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

Wild cards in the output commands should better get avoided, in order to avoid the proliferation of unwanted collections in the output files.

On the other hand I understand from #36748 (comment) that this is exactly what you want for it. Still, is the list of collections to be saved really unknown a priori? Cannot you add them one by one, even if you get a long list with it? Please check, and update with the explicit products if you think that you can also satisfy your needs as such.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sine this is a development modifier that should not be running in production it seemed to make the development process easier if all products from ECAL related modules (at least those having ecal in the name) are kept by default. It shows what is produced (and eventually should not be because it is e.g. for Phase 1) and what is missing. Since this WF is for ongoing development we do not know a priori what collections will be produced.


from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
phase2_hcal.toModify(SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_DMHcalDigis_*_*') )

Expand Down
2 changes: 2 additions & 0 deletions Validation/Configuration/python/globalValidation_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
+ ecalRecHitsValidationSequence
+ pfClusterCaloOnlyValidationSequence
)
from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toReplaceWith(ecalRecHitsValidationSequence, ecalRecHitsValidationSequencePhase2)

# HCAL local reconstruction
globalPrevalidationHCAL = cms.Sequence()
Expand Down