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

MTD geometry/reconstruction: define new ETL reco layer geometry, update LGAD pixel structure, activate workflows for scenarios D72 and D73 #31765

Merged
merged 28 commits into from Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0028b02
Move disk sector classes into DataFormats
fabiocos Jun 3, 2020
62adc84
Update include guard definition according to CMSSW standard
fabiocos Jun 3, 2020
666b141
Add double sector layer, sector layer and sector definitions
fabiocos Jun 19, 2020
c4fcb5c
Add mtdTopologyMode dependent build of ETL DetLayers
fabiocos Jun 19, 2020
dc94cf2
Use constants for old ETL layers
fabiocos Jun 22, 2020
0ac6aa7
Combined development of MTDDetSector and use for alternative ETL DetL…
fabiocos Jul 29, 2020
f0b36aa
Update MTDRecoGeometryAnalyzer for new ETL
fabiocos Jul 30, 2020
fc97408
Test debugging development
fabiocos Aug 3, 2020
07d9155
Additional debugging printouts
fabiocos Aug 4, 2020
ef841df
Update of the messages for debugging purpose
fabiocos Aug 5, 2020
a297212
Fix for compatible dets and verbosity, the standalone test looks to work
fabiocos Aug 6, 2020
feccfc0
Comment most debugging statements, fix verbosity for next step in val…
fabiocos Aug 7, 2020
e995f98
Fix incorrect use of topology mode for BTL
fabiocos Sep 15, 2020
ab6602d
Minor fixes after rebase onto 11_2_0_pre7
fabiocos Oct 6, 2020
bf03cf3
Enable ETL V5 in ETLDetLayerGeometryBuilder
fabiocos Oct 8, 2020
a55986c
change compatibleDets search strategy to avoid per exptrapolation sor…
fabiocos Oct 8, 2020
f10e061
sort range of values around idetMin
fabiocos Oct 11, 2020
cbd0c43
remove debugging printouts, minor adjustment
fabiocos Oct 11, 2020
a64ce53
Update MTD parameters for TDR/post TDR ETL topology definition, with …
fabiocos Oct 12, 2020
d697010
Fix clang warning
fabiocos Oct 13, 2020
7f8a35c
Technical code cleaning, based on comments by K. Pedro
fabiocos Oct 14, 2020
e411157
Additional technical cleaning starting from comments of K. Pedro
fabiocos Oct 16, 2020
0539622
Adjust selfTest adapting to the specific geometry
fabiocos Oct 19, 2020
a1eeff4
Address comments by J. Pata
fabiocos Oct 20, 2020
f0a9735
Adding a new Era and modifier to provide energy threshold and calibra…
fabiocos Oct 21, 2020
80eba55
Move scenarios D72 and D73 to Phase2C11_etlV4 era
fabiocos Oct 21, 2020
e9614a9
Minor aesthetic comments by S. Krutelyov
fabiocos Oct 22, 2020
a3c185c
Restore addition of test wfs for D72, D73
fabiocos Oct 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions Configuration/Eras/python/Era_Phase2C11_etlV4_cff.py
@@ -0,0 +1,6 @@
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
from Configuration.Eras.Modifier_phase2_etlV4_cff import phase2_etlV4

Phase2C11_etlV4 = cms.ModifierChain(Phase2C11, phase2_etlV4)
3 changes: 3 additions & 0 deletions Configuration/Eras/python/Modifier_phase2_etlV4_cff.py
@@ -0,0 +1,3 @@
import FWCore.ParameterSet.Config as cms

phase2_etlV4 = cms.Modifier()
4 changes: 2 additions & 2 deletions Configuration/Geometry/python/dict2026Geometry.py
Expand Up @@ -1186,7 +1186,7 @@
'from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *',
'mtdGeometry.applyAlignment = cms.bool(False)'
],
"era" : "phase2_timing, phase2_timing_layer",
"era" : "phase2_timing, phase2_timing_layer, phase2_etlV4",
},
"I13" : {
1 : [
Expand Down Expand Up @@ -1214,7 +1214,7 @@
'from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *',
'mtdGeometry.applyAlignment = cms.bool(False)'
],
"era" : "phase2_timing, phase2_timing_layer",
"era" : "phase2_timing, phase2_timing_layer, phase2_etlV4",
},
}

Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_2026.py
Expand Up @@ -29,6 +29,8 @@
numWFIB.extend([31834.0]) #2026D69
numWFIB.extend([32234.0]) #2026D70
numWFIB.extend([32634.0]) #2026D71
numWFIB.extend([33034.0]) #2026D72
numWFIB.extend([33434.0]) #2026D73
numWFIB.extend([33834.0]) #2026D74

for numWF in numWFIB:
Expand Down
Expand Up @@ -1020,14 +1020,14 @@ def condition(self, fragment, stepList, key, hasHarvest):
'Geom' : 'Extended2026D72',
'HLTmenu': '@fake2',
'GT' : 'auto:phase2_realistic_T21',
'Era' : 'Phase2C11',
'Era' : 'Phase2C11_etlV4',
'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
},
'2026D73' : {
'Geom' : 'Extended2026D73',
'HLTmenu': '@fake2',
'GT' : 'auto:phase2_realistic_T21',
'Era' : 'Phase2C11',
'Era' : 'Phase2C11_etlV4',
'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
},
'2026D74' : {
Expand Down
1 change: 1 addition & 0 deletions Configuration/StandardSequences/python/Eras.py
Expand Up @@ -42,6 +42,7 @@ def __init__(self):
'Phase2C9_dd4hep',
'Phase2C10_dd4hep',
'Phase2C11_dd4hep',
'Phase2C11_etlV4',
'Phase2C12_dd4hep',
'Phase2C11M9',
]
Expand Down
@@ -1,10 +1,9 @@
#ifndef RecoTracker_TkDetLayers_BoundDiskSector_h
#define RecoTracker_TkDetLayers_BoundDiskSector_h
#ifndef DataFormats_GeometrySurface_BoundDiskSector_h
#define DataFormats_GeometrySurface_BoundDiskSector_h

#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DiskSectorBounds.h"

#pragma GCC visibility push(hidden)
class BoundDiskSector final : public Plane {
public:
~BoundDiskSector() override {}
Expand All @@ -19,5 +18,4 @@ class BoundDiskSector final : public Plane {
DiskSectorBounds const& bounds() const { return static_cast<DiskSectorBounds const&>(Plane::bounds()); }
};

#pragma GCC visibility pop
#endif
@@ -1,5 +1,5 @@
#ifndef RecoTracker_TkDetLayers_DiskSectorBounds_h
#define RecoTracker_TkDetLayers_DiskSectorBounds_h
#ifndef DataFormats_GeometrySurface_DiskSectorBounds_h
#define DataFormats_GeometrySurface_DiskSectorBounds_h

#include "DataFormats/GeometryVector/interface/LocalPoint.h"
#include "DataFormats/GeometrySurface/interface/LocalError.h"
Expand All @@ -8,7 +8,6 @@
#include <cmath>
#include <cassert>

#pragma GCC visibility push(hidden)
class DiskSectorBounds final : public Bounds {
public:
DiskSectorBounds(float rmin, float rmax, float zmin, float zmax, float phiExt)
Expand Down Expand Up @@ -44,5 +43,4 @@ class DiskSectorBounds final : public Bounds {
float theOffset;
};

#pragma GCC visibility pop
#endif
@@ -1,4 +1,4 @@
#include "DiskSectorBounds.h"
#include "DataFormats/GeometrySurface/interface/DiskSectorBounds.h"

using namespace std;

Expand Down
Expand Up @@ -9,7 +9,7 @@
22, 24, 16, 10, 0x1, 0x3, 0x3F, 0x3F, 1, 16, 3, 1
</Vector>
<Vector name="ETL" type="numeric" nEntries="12">
22, 24, 16, 7, 0x1, 0x3, 0x3F, 0xFF, 24, 4, 2, 8
22, 24, 16, 7, 0x1, 0x3, 0x3F, 0xFF, 16, 16, 1, 2
</Vector>

</ConstantsSection>
Expand Down
17 changes: 17 additions & 0 deletions Geometry/MTDGeometryBuilder/src/MTDTopologyBuilder.cc
@@ -1,8 +1,12 @@
//#define EDM_ML_DEBUG

// Make the change for "big" pixels. 3/06 d.k.
#include "Geometry/MTDGeometryBuilder/interface/MTDTopologyBuilder.h"
#include "Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h"
#include "DataFormats/GeometrySurface/interface/Bounds.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"

MTDTopologyBuilder::MTDTopologyBuilder(void) {}

PixelTopology* MTDTopologyBuilder::build(const Bounds* bs,
Expand All @@ -26,6 +30,19 @@ PixelTopology* MTDTopologyBuilder::build(const Bounds* bs,
// 2 big pixels per ROC
float pitchY = length / (ncols + pixelROCsInY * BIG_PIX_PER_ROC_Y);

#ifdef EDM_ML_DEBUG
edm::LogInfo("MTDTopologyBuilder") << std::fixed << "Building topology for module of width(X) = " << std::setw(10)
<< width << " length(Y) = " << std::setw(10) << length
<< "\n Rows per ROC = " << std::setw(10) << pixelROCRows
<< " Cols per ROC = " << std::setw(10) << pixelROCCols
<< "\n ROCs in X = " << std::setw(10) << pixelROCsInX
<< " ROCs in Y = " << std::setw(10) << pixelROCsInY
<< "\n # pixel rows X = " << std::setw(10) << nrows
<< " # pixel cols Y = " << std::setw(10) << ncols
<< "\n pitch in X = " << std::setw(10) << pitchX
<< " # pitch in Y = " << std::setw(10) << pitchY;
#endif

return (new RectangularMTDTopology(nrows,
ncols,
pitchX,
Expand Down
2 changes: 2 additions & 0 deletions Geometry/MTDGeometryBuilder/test/MTDDigiGeometryAnalyzer.cc
Expand Up @@ -59,6 +59,8 @@ void MTDDigiGeometryAnalyzer::analyze(const edm::Event& iEvent, const edm::Event
<< "Geometry node for MTDGeom is " << &(*pDD) << "\n"
<< " # detectors = " << pDD->detUnits().size() << "\n"
<< " # types = " << pDD->detTypes().size() << "\n"
<< " # BTL dets = " << pDD->detsBTL().size() << "\n"
<< " # ETL dets = " << pDD->detsETL().size() << "\n"
<< " # layers " << pDD->geomDetSubDetector(1) << " = " << pDD->numberOfLayers(1) << "\n"
<< " # layers " << pDD->geomDetSubDetector(2) << " = " << pDD->numberOfLayers(2) << "\n";
sunitt << std::fixed << std::setw(7) << pDD->detUnits().size() << std::setw(7) << pDD->detTypes().size() << "\n";
Expand Down
Expand Up @@ -211,7 +211,7 @@ void MTDThresholdClusterizer::copy_to_buffer(RecHitIterator itr, const MTDGeomet
if (mtdId.mtdSubDetector() == MTDDetId::BTL) {
subDet = GeomDetEnumerators::barrel;
BTLDetId id = itr->id();
DetId geoId = id.geographicalId((BTLDetId::CrysLayout)topo->getMTDTopologyMode());
DetId geoId = id.geographicalId(MTDTopologyMode::crysLayoutFromTopoMode(topo->getMTDTopologyMode()));
const auto& det = geom->idToDet(geoId);
const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(det->topology());
const RectangularMTDTopology& topol = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
Expand Down
2 changes: 2 additions & 0 deletions RecoLocalFastTime/FTLRecProducers/python/mtdRecHits_cfi.py
Expand Up @@ -13,6 +13,8 @@
calibrationConstant = cms.double(0.085), # MeV/MIP
)

from Configuration.Eras.Modifier_phase2_etlV4_cff import phase2_etlV4
phase2_etlV4.toModify(_endcapAlgo, thresholdToKeep = 0.005, calibrationConstant = 0.001 )

mtdRecHits = cms.EDProducer(
"MTDRecHitProducer",
Expand Down
4 changes: 2 additions & 2 deletions RecoMTD/DetLayers/interface/MTDDetLayerGeometry.h
@@ -1,5 +1,5 @@
#ifndef DetLayers_MTDDetLayerGeometry_h
#define DetLayers_MTDDetLayerGeometry_h
#ifndef RecoMTD_DetLayers_MTDDetLayerGeometry_h
#define RecoMTD_DetLayers_MTDDetLayerGeometry_h

/** \class MTDDetLayerGeometry
*
Expand Down
4 changes: 2 additions & 2 deletions RecoMTD/DetLayers/interface/MTDDetRing.h
@@ -1,5 +1,5 @@
#ifndef DetLayers_MTDDetRing_H
#define DetLayers_MTDDetRing_H
#ifndef RecoMTD_DetLayers_MTDDetRing_H
#define RecoMTD_DetLayers_MTDDetRing_H

/** \class MTDDetRing
* A ring of periodic, possibly overlapping vertical detectors.
Expand Down
77 changes: 77 additions & 0 deletions RecoMTD/DetLayers/interface/MTDDetSector.h
@@ -0,0 +1,77 @@
#ifndef RecoMTD_DetLayers_MTDDetSector_H
#define RecoMTD_DetLayers_MTDDetSector_H

#include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
#include "DataFormats/GeometrySurface/interface/BoundDiskSector.h"

#include <ostream>

class GeomDet;

class MTDDetSector : public GeometricSearchDet {
public:
using GeometricSearchDet::GeometricSearchDet;

/// Construct from iterators on GeomDet*
MTDDetSector(std::vector<const GeomDet*>::const_iterator first, std::vector<const GeomDet*>::const_iterator last);

/// Construct from a vector of GeomDet*
MTDDetSector(const std::vector<const GeomDet*>& dets);

~MTDDetSector() override{};

// GeometricSearchDet structure

const std::vector<const GeomDet*>& basicComponents() const override { return theDets; }

const BoundSurface& surface() const final { return *theDiskS; }

const std::vector<const GeometricSearchDet*>& components() const override;

std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface& ts,
const Propagator& prop,
const MeasurementEstimator& est) const override;

std::vector<DetWithState> compatibleDets(const TrajectoryStateOnSurface& startingState,
const Propagator& prop,
const MeasurementEstimator& est) const override;

void compatibleDetsV(const TrajectoryStateOnSurface& startingState,
const Propagator& prop,
const MeasurementEstimator& est,
std::vector<DetWithState>& result) const override;

std::vector<DetGroup> groupedCompatibleDets(const TrajectoryStateOnSurface& startingState,
const Propagator& prop,
const MeasurementEstimator& est) const override;

// GeometricSearchDet extension

const BoundDiskSector& specificSurface() const { return *theDiskS; }

protected:
void setDisk(BoundDiskSector* diskS) { theDiskS = diskS; }

bool add(size_t idet,
std::vector<DetWithState>& result,
const TrajectoryStateOnSurface& tsos,
const Propagator& prop,
const MeasurementEstimator& est) const;

private:
ReferenceCountingPointer<BoundDiskSector> theDiskS;
std::vector<const GeomDet*> theDets;

// Window of detid ordered modules around that closest to the track extrapolation on the sector surface
// needed to limit the size of the vector of distances to sort
// value 50 based on the possible mismatch of module number between adjacent
// modules, due to left-right type imparity

static constexpr size_t detsRange = 50;

void init();
};

std::ostream& operator<<(std::ostream&, const MTDDetSector&);

#endif
4 changes: 2 additions & 2 deletions RecoMTD/DetLayers/interface/MTDDetTray.h
@@ -1,5 +1,5 @@
#ifndef DetLayers_MTDDetTray_H
#define DetLayers_MTDDetTray_H
#ifndef RecoMTD_DetLayers_MTDDetTray_H
#define RecoMTD_DetLayers_MTDDetTray_H

/** \class MTDDetTray
* A tray of aligned equal-sized non-overlapping detectors.
Expand Down
4 changes: 2 additions & 2 deletions RecoMTD/DetLayers/interface/MTDRingForwardDoubleLayer.h
@@ -1,5 +1,5 @@
#ifndef DetLayers_MTDRingForwardDoubleLayer_H
#define DetLayers_MTDRingForwardDoubleLayer_H
#ifndef RecoMTD_DetLayers_MTDRingForwardDoubleLayer_H
#define RecoMTD_DetLayers_MTDRingForwardDoubleLayer_H

/** \class MTDRingForwardDoubleLayer
* A plane composed two layers of disks. The Endcap Timing Layer.
Expand Down
4 changes: 2 additions & 2 deletions RecoMTD/DetLayers/interface/MTDRingForwardLayer.h
@@ -1,5 +1,5 @@
#ifndef DetLayers_MTDRingForwardLayer_H
#define DetLayers_MTDRingForwardLayer_H
#ifndef RecoMTD_DetLayers_MTDRingForwardLayer_H
#define RecoMTD_DetLayers_MTDRingForwardLayer_H

/** \class MTDRingForwardLayer
* A plane composed of disks (MTDRingForwardDisk). Represents ETL.
Expand Down
65 changes: 65 additions & 0 deletions RecoMTD/DetLayers/interface/MTDSectorForwardDoubleLayer.h
@@ -0,0 +1,65 @@
#ifndef RecoMTD_DetLayers_MTDSectorForwardDoubleLayer_H
#define RecoMTD_DetLayers_MTDSectorForwardDoubleLayer_H

#include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
#include "Utilities/BinningTools/interface/BaseBinFinder.h"
#include "RecoMTD/DetLayers/interface/MTDSectorForwardLayer.h"

class MTDDetSector;
class GeomDet;

class MTDSectorForwardDoubleLayer : public ForwardDetLayer {
public:
/// Constructor, takes ownership of pointers
MTDSectorForwardDoubleLayer(const std::vector<const MTDDetSector*>& frontSectors,
const std::vector<const MTDDetSector*>& backSectors);

~MTDSectorForwardDoubleLayer() override {}

// GeometricSearchDet interface

const std::vector<const GeomDet*>& basicComponents() const override { return theBasicComponents; }

const std::vector<const GeometricSearchDet*>& components() const override { return theComponents; }

bool isInsideOut(const TrajectoryStateOnSurface& tsos) const;

// tries closest layer first
std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface&,
const Propagator&,
const MeasurementEstimator&) const override;

std::vector<DetWithState> compatibleDets(const TrajectoryStateOnSurface& startingState,
const Propagator& prop,
const MeasurementEstimator& est) const override;

std::vector<DetGroup> groupedCompatibleDets(const TrajectoryStateOnSurface& startingState,
const Propagator& prop,
const MeasurementEstimator& est) const override;

// DetLayer interface
SubDetector subDetector() const override { return theBackLayer.subDetector(); }

// Extension of the interface

/// Return the vector of sectors.
virtual const std::vector<const MTDDetSector*>& sectors() const { return theSectors; }

bool isCrack(const GlobalPoint& gp) const;

const MTDSectorForwardLayer* frontLayer() const { return &theFrontLayer; }
const MTDSectorForwardLayer* backLayer() const { return &theBackLayer; }

void selfTest() const;

protected:
BoundDisk* computeSurface() override;

private:
MTDSectorForwardLayer theFrontLayer;
MTDSectorForwardLayer theBackLayer;
std::vector<const MTDDetSector*> theSectors;
std::vector<const GeometricSearchDet*> theComponents; // duplication of the above
std::vector<const GeomDet*> theBasicComponents; // All chambers
};
#endif