From 0f7aa4ffc855100b079a98f914503a5d4e64abc0 Mon Sep 17 00:00:00 2001 From: Roberval Walsh Date: Mon, 28 Sep 2020 17:42:23 +0200 Subject: [PATCH 1/4] additional variables for backplane corrections studies --- .../plugins/ShallowGainCalibration.cc | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc b/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc index fa1aaeb0a670b..a4952809331ac 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc @@ -32,6 +32,10 @@ ShallowGainCalibration::ShallowGainCalibration(const edm::ParameterSet& iConfig) produces > ( Prefix + "gainused" + Suffix ); produces > ( Prefix + "gainusedTick" + Suffix ); produces > ( Prefix + "variance" + Suffix ); +// for backplane corrections + produces > ( Prefix + "localx" + Suffix ); + produces > ( Prefix + "rhlocalx" + Suffix ); + produces > ( Prefix + "rhlocalxerr" + Suffix ); } void ShallowGainCalibration:: @@ -55,6 +59,10 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { auto gainused = std::make_unique> (); auto gainusedTick = std::make_unique> (); auto variance = std::make_unique> (); +// for backplane corrections + auto localx = std::make_unique> (); + auto rhlocalx = std::make_unique> (); + auto rhlocalxerr = std::make_unique> (); edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); m_tracker=&(* theTrackerGeometry ); @@ -76,6 +84,8 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { const SiStripRecHit2D* sistripsimplehit = dynamic_cast(hit); const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast(hit); const SiPixelRecHit* sipixelhit = dynamic_cast(hit); + // for the backplane corrections + const StripGeomDetUnit* theStripDet = dynamic_cast( theTrackerGeometry->idToDet( hit->geographicalId() ) ); const SiPixelCluster* PixelCluster = nullptr; const SiStripCluster* StripCluster = nullptr; @@ -114,6 +124,9 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { int FirstStrip = 0; int NStrips = 0; float Variance = -1; + float locx = -10; + float rhlocx = -10; + float rhlocxerr = -10; if(StripCluster){ const auto & Ampls = StripCluster->amplitudes(); @@ -156,6 +169,10 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { const SiStripClusterInfo info(*StripCluster, iSetup, DetId); Variance = info.variance(); + locx = (theStripDet->toLocal(trajState.globalPosition())).x(); + rhlocx = hit->localPosition().x(); + rhlocxerr = sqrt(hit->localPositionError().xx()); + }else if(PixelCluster){ const auto& Ampls = PixelCluster->pixelADC(); int FirstRow = PixelCluster->minPixelRow(); @@ -192,6 +209,11 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { gainused ->push_back( PrevGain ); gainusedTick ->push_back( PrevGainTick ); variance ->push_back( Variance ); + // for the backplane corrections + localx->push_back(locx); + rhlocalx->push_back(rhlocx); + rhlocalxerr->push_back(rhlocxerr); + } } } @@ -215,6 +237,11 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { iEvent.put(std::move(gainused), Prefix + "gainused" + Suffix ); iEvent.put(std::move(gainusedTick), Prefix + "gainusedTick" + Suffix ); iEvent.put(std::move(variance), Prefix + "variance" + Suffix ); + // for the backplane corrections + iEvent.put(std::move(localx), Prefix + "localx" + Suffix ); + iEvent.put(std::move(rhlocalx), Prefix + "rhlocalx" + Suffix ); + iEvent.put(std::move(rhlocalxerr), Prefix + "rhlocalxerr" + Suffix ); + } /* From 4bfd9c18d219cdd0662017228dd89759e7f4012b Mon Sep 17 00:00:00 2001 From: Roberval Walsh Date: Mon, 28 Sep 2020 17:42:57 +0200 Subject: [PATCH 2/4] fix reading the lorentz angles from the database --- CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc b/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc index 49f1cae39c469..f68b68dee0a0e 100644 --- a/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc +++ b/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc @@ -57,7 +57,7 @@ void LorentzAngleRunInfo::beginRun(const edm::Run & irun, const edm::EventSetup run = irun.run(); edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); edm::ESHandle magfield; iSetup.get().get(magfield); - edm::ESHandle SiStripLorentzAngle; iSetup.get().get(SiStripLorentzAngle); + edm::ESHandle SiStripLorentzAngle; iSetup.get().get("deconvolution",SiStripLorentzAngle); auto dets = theTrackerGeometry -> detsTIB(); dets.insert(dets.end(),(theTrackerGeometry -> detsTOB()).begin(),(theTrackerGeometry -> detsTOB()).end()); From b8eb4f22ae8e5e25a39ffc1b0c2c1d094b57a581 Mon Sep 17 00:00:00 2001 From: Roberval Walsh Date: Mon, 28 Sep 2020 18:16:06 +0200 Subject: [PATCH 3/4] new option for cosmicTriggers --- .../produceCalibrationTree_template_cfg.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CalibTracker/SiStripCommon/test/MakeCalibrationTrees/produceCalibrationTree_template_cfg.py b/CalibTracker/SiStripCommon/test/MakeCalibrationTrees/produceCalibrationTree_template_cfg.py index 611ff5e1262c6..a0a64a9fa4150 100644 --- a/CalibTracker/SiStripCommon/test/MakeCalibrationTrees/produceCalibrationTree_template_cfg.py +++ b/CalibTracker/SiStripCommon/test/MakeCalibrationTrees/produceCalibrationTree_template_cfg.py @@ -56,6 +56,10 @@ VarParsing.VarParsing.varType.int, "run number to process (\"-1\" for all)") +options.register('cosmicTriggers','', + VarParsing.VarParsing.multiplicity.list, + VarParsing.VarParsing.varType.string, + 'cosmic triggers') @@ -154,6 +158,9 @@ ) ) +if len(options.cosmicTriggers)>0: + print("cosmicTriggers : ", options.cosmicTriggers) + process.IsolatedMuonFilter.triggerConditions = cms.vstring(options.cosmicTriggers) process.TkCalPath_StdBunch = cms.Path(process.TkCalSeq_StdBunch *process.shallowEventRun*process.eventInfo) From 8344fdea08d93f09dd8f8bf7f5d484f5070684a0 Mon Sep 17 00:00:00 2001 From: Roberval Walsh Date: Wed, 30 Sep 2020 17:35:20 +0200 Subject: [PATCH 4/4] Revert "fix reading the lorentz angles from the database" This reverts commit 4bfd9c18d219cdd0662017228dd89759e7f4012b. --- CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc b/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc index f68b68dee0a0e..49f1cae39c469 100644 --- a/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc +++ b/CalibTracker/SiStripLorentzAngle/plugins/LorentzAngleRunInfo.cc @@ -57,7 +57,7 @@ void LorentzAngleRunInfo::beginRun(const edm::Run & irun, const edm::EventSetup run = irun.run(); edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); edm::ESHandle magfield; iSetup.get().get(magfield); - edm::ESHandle SiStripLorentzAngle; iSetup.get().get("deconvolution",SiStripLorentzAngle); + edm::ESHandle SiStripLorentzAngle; iSetup.get().get(SiStripLorentzAngle); auto dets = theTrackerGeometry -> detsTIB(); dets.insert(dets.end(),(theTrackerGeometry -> detsTOB()).begin(),(theTrackerGeometry -> detsTOB()).end());