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

Phase 2 tracker: template CPE #28448

Merged
merged 10 commits into from Dec 6, 2019
20 changes: 11 additions & 9 deletions CondFormats/SiPixelTransient/interface/SiPixelGenError.h
Expand Up @@ -17,6 +17,8 @@
#ifndef SiPixelGenError_h
#define SiPixelGenError_h 1

#include "SiPixelTemplateDefs.h"

#include <vector>
#include <cassert>
#include "boost/multi_array.hpp"
Expand Down Expand Up @@ -76,19 +78,19 @@ struct SiPixelGenErrorHeader { //!< template header structure
struct SiPixelGenErrorStore { //!< template storage structure
SiPixelGenErrorHeader head;
#ifndef SI_PIXEL_TEMPLATE_USE_BOOST
float cotbetaY[60];
float cotbetaX[5];
float cotalphaX[29];
//!< 60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fpix]
SiPixelGenErrorEntry enty[60];
//!< 29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5 slices [3x29 for fpix]
SiPixelGenErrorEntry entx[5][29];
float cotbetaY[TEMP_ENTRY_SIZEY];
float cotbetaX[TEMP_ENTRY_SIZEX_B];
float cotalphaX[TEMP_ENTRY_SIZEX_A];
//!< 60 y templates spanning cluster lengths from 0px to +18px
SiPixelGenErrorEntry enty[TEMP_ENTRY_SIZEY];
//!< 60 x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 60 slices
SiPixelGenErrorEntry entx[TEMP_ENTRY_SIZEX_B][TEMP_ENTRY_SIZEX_A];
#else
float* cotbetaY;
float* cotbetaX;
float* cotalphaX;
boost::multi_array<SiPixelGenErrorEntry, 1> enty; //!< use 1d entry to store [60] barrel entries or [28] fpix entries
//!< use 2d entry to store [5][29] barrel entries or [3][29] fpix entries
boost::multi_array<SiPixelGenErrorEntry, 1> enty; //!< use 1d entry to store [60] entries
//!< use 2d entry to store [60][60] entries
boost::multi_array<SiPixelGenErrorEntry, 2> entx;
#endif
};
Expand Down
18 changes: 9 additions & 9 deletions CondFormats/SiPixelTransient/interface/SiPixelTemplate.h
Expand Up @@ -206,20 +206,20 @@ struct SiPixelTemplateHeader { //!< template header structure
struct SiPixelTemplateStore { //!< template storage structure
SiPixelTemplateHeader head;
#ifndef SI_PIXEL_TEMPLATE_USE_BOOST
float cotbetaY[60];
float cotbetaX[5];
float cotalphaX[29];
//!< 60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fpix]
SiPixelTemplateEntry enty[60];
//!< 29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5 slices [3x29 for fpix]
SiPixelTemplateEntry entx[5][29];
float cotbetaY[TEMP_ENTRY_SIZEY];
float cotbetaX[TEMP_ENTRY_SIZEX_B];
float cotalphaX[TEMP_ENTRY_SIZEX_A];
//!< 60 y templates spanning cluster lengths from 0px to +18px
SiPixelTemplateEntry enty[TEMP_ENTRY_SIZEY];
//!< 60 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 60 slices
SiPixelTemplateEntry entx[TEMP_ENTRY_SIZEX_B][TEMP_ENTRY_SIZEX_A];
void destroy(){};
#else
float* cotbetaY = nullptr;
float* cotbetaX = nullptr;
float* cotalphaX = nullptr;
boost::multi_array<SiPixelTemplateEntry, 1> enty; //!< use 1d entry to store [60] barrel entries or [28] fpix entries
//!< use 2d entry to store [5][29] barrel entries or [3][29] fpix entries
boost::multi_array<SiPixelTemplateEntry, 1> enty; //!< use 1d entry to store [60] entries
//!< use 2d entry to store [60][60] entries
boost::multi_array<SiPixelTemplateEntry, 2> entx;
void destroy() { // deletes arrays created by pushfile method of SiPixelTemplate
if (cotbetaY != nullptr)
Expand Down
4 changes: 3 additions & 1 deletion CondFormats/SiPixelTransient/interface/SiPixelTemplateDefs.h
Expand Up @@ -40,5 +40,7 @@
#define T2HY 10 // = T2YSIZE/2
#define T2HYP1 T2HY + 1 // = T2YSIZE/2+1
#define T2HX 3 // = T2XSIZE/2

#define TEMP_ENTRY_SIZEX_A 60
#define TEMP_ENTRY_SIZEX_B 60
#define TEMP_ENTRY_SIZEY 60
#endif
48 changes: 27 additions & 21 deletions Configuration/AlCa/python/autoCondPhase2.py
Expand Up @@ -13,39 +13,45 @@


allTags["LA"] = {
'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T6_v0_mc' ,SiPixelLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T14_v0_mc' ,SiPixelLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T15_v0_mc' ,SiPixelLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T6_v2_mc' ,SiPixelLARecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), #uH = 0.106/T (TBPX), uH=0.0/T (TEPX+TFPX)
'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T14_v2_mc' ,SiPixelLARecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), #uH = 0.106/T (TBPX), uH=0.0/T (TEPX+TFPX)
'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T15_v2_mc' ,SiPixelLARecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), #uH = 0.053/T (TBPX), uH=0.0/T (TEPX+TFPX)
}

allTags["LAWidth"] = {
'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_forWidth_T6_v0_mc' ,SiPixelLARecord,connectionString, "forWidth", "2019-07-15 12:00:00.000"] ), ),
'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_forWidth_T14_v0_mc' ,SiPixelLARecord,connectionString, "forWidth", "2019-07-15 12:00:00.000"] ), ),
'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_forWidth_T15_v0_mc' ,SiPixelLARecord,connectionString, "forWidth", "2019-07-15 12:00:00.000"] ), ),
'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T6_mc_forWidthEmpty' ,SiPixelLARecord,connectionString, "forWidth", "2019-11-05 20:00:00.000"] ), ), # uH=0.0/T (fall-back to offset)
'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T14_mc_forWidthEmpty' ,SiPixelLARecord,connectionString, "forWidth", "2019-11-05 20:00:00.000"] ), ), # uH=0.0/T (fall-back to offset)
'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T15_mc_forWidthEmpty' ,SiPixelLARecord,connectionString, "forWidth", "2019-11-05 20:00:00.000"] ), ), # uH=0.0/T (fall-back to offset)
}

allTags["SimLA"] = {
'T6' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T6_v0_mc' ,SiPixelSimLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T14' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T14_v0_mc' ,SiPixelSimLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T15' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T15_v0_mc' ,SiPixelSimLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
allTags["LAfromAlignment"] = {
'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T6_mc_forWidthEmpty' ,SiPixelLARecord,connectionString, "fromAlignment", "2019-11-05 20:00:00.000"] ), ), # uH=0.0/T (not in use)
'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T14_mc_forWidthEmpty' ,SiPixelLARecord,connectionString, "fromAlignment", "2019-11-05 20:00:00.000"] ), ), # uH=0.0/T (not in use)
'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T15_mc_forWidthEmpty' ,SiPixelLARecord,connectionString, "fromAlignment", "2019-11-05 20:00:00.000"] ), ), # uH=0.0/T (not in use)
}

##
## All of the following conditions are not yet in active use, but will be activated in GT along the way
##
allTags["SimLA"] = {
'T6' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T6_v2_mc' ,SiPixelSimLARecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), #uH = 0.0431/T (TBPX), uH=0.0/T (TEPX+TFPX)
'T14' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T14_v2_mc' ,SiPixelSimLARecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), #uH = 0.0431/T (TBPX), uH=0.0/T (TEPX+TFPX)
'T15' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T15_v2_mc' ,SiPixelSimLARecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), #uH = 0.0431/T (TBPX), uH=0.0/T (TEPX+TFPX)
}

allTags["GenError"] = {
'T6' : ( ','.join( [ 'SiPixelGenErrorDBOject_phase2_T6_v0_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T14' : ( ','.join( [ 'SiPixelGenErrorDBOject_phase2_T14_v0_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T15' : ( ','.join( [ 'SiPixelGenErrorDBOject_phase2_T15_v0_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T6' : ( ','.join( [ 'SiPixelGenErrorDBObject_phase2_T6_v2_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), # cell is 25um (local-x) x 100um (local-y) , VBias=350V
'T14' : ( ','.join( [ 'SiPixelGenErrorDBObject_phase2_T14_v2_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), # cell is 25um (local-x) x 100um (local-y) , VBias=350V
'T15' : ( ','.join( [ 'SiPixelGenErrorDBObject_phase2_T15_v2_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), # cell is 25um (local-x) x 100um (local-y) , VBias=350V
}

allTags["Template"] = {
'T6' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T6_v0_mc' ,SiPixelTemplatesRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T14' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T14_v0_mc' ,SiPixelTemplatesRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
'T15' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T15_v0_mc' ,SiPixelTemplatesRecord,connectionString, "" , "2019-07-15 12:00:00.000"] ), ),
'T6' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T6_v2_mc' ,SiPixelTemplatesRecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), # cell is 25um (local-x) x 100um (local-y) , VBias=350V
'T14' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T14_v2_mc' ,SiPixelTemplatesRecord,connectionString, "", "2019-11-05 20:00:00.000"] ), ), # cell is 25um (local-x) x 100um (local-y) , VBias=350V
'T15' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T15_v2_mc' ,SiPixelTemplatesRecord,connectionString, "" , "2019-11-05 20:00:00.000"] ), ), # cell is 25um (local-x) x 100um (local-y) , VBias=350V
}

##
## All of the following conditions are not yet in active use, but will be activated in GT along the way
##

allTags["Template2Dnum"] = {
'T6' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T6_v0_num' ,SiPixel2DTemplatesRecord,connectionString, "numerator", "2019-07-15 12:00:00.000"] ), ),
'T14' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T14_v0_num' ,SiPixel2DTemplatesRecord,connectionString, "numerator", "2019-07-15 12:00:00.000"] ), ),
Expand All @@ -59,7 +65,7 @@
}

# list of active tags to be replaced
activeKeys = ["LA","LAWidth","SimLA"]
activeKeys = ["LA","LAWidth","SimLA","LAfromAlignment","GenError","Template"]

# list of geometries supported
activeDets = ["T6","T14","T15"]
Expand All @@ -70,7 +76,7 @@
appendedTags += allTags[key][det]
phase2GTs["phase2_realistic_"+det] = ('phase2_realistic', appendedTags)

# method called in autoAlCa
# method called in autoCond
def autoCondPhase2(autoCond):
for key,val in six.iteritems(phase2GTs):
if len(val)==1 :
Expand Down
Expand Up @@ -20,9 +20,6 @@
PropagatorOpposite = cms.string("RungeKuttaTrackerPropagatorOpposite")
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(materialDumperAnalyzer, TrackerRecHitBuilder='WithTrackAngle')

materialDumper = cms.Sequence(materialDumperAnalyzer)
materialDumper_step = cms.Path(materialDumper)

Expand Up @@ -43,10 +43,6 @@ def thresholds( wp ) :
_fastSim_lowPtGsfElectronSeeds.PreGsfLabel = cms.string("")
fastSim.toReplaceWith(lowPtGsfElectronSeeds,_fastSim_lowPtGsfElectronSeeds)

# Modifiers for Phase2
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(lowPtGsfElectronSeeds, TTRHBuilder = 'WithTrackAngle')

# Modifiers for BParking
from Configuration.Eras.Modifier_bParking_cff import bParking
bParking.toModify(lowPtGsfElectronSeeds, ModelThresholds = thresholds("VL") )
Expand Down
Expand Up @@ -3,10 +3,3 @@
from RecoLocalTracker.SiPixelRecHits._templates2_default_cfi import _templates2_default
templates2 = _templates2_default.clone()

# This customization will be removed once we get the templates for phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(templates2,
LoadTemplatesFromDB = False,
DoLorentz = False,
)

11 changes: 0 additions & 11 deletions RecoLocalTracker/SiPixelRecHits/python/PixelCPEGeneric_cfi.py
Expand Up @@ -8,14 +8,3 @@
from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify(PixelCPEGenericESProducer, IrradiationBiasCorrection = True)

# This customization will be removed once we get the templates for phase2 pixel
# FIXME::Is the Upgrade variable actually used?
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(PixelCPEGenericESProducer,
UseErrorsFromTemplates = False,
LoadTemplatesFromDB = False,
TruncatePixelCharge = False,
IrradiationBiasCorrection = False,
DoCosmics = False,
Upgrade = cms.bool(True)
)
Expand Up @@ -3,10 +3,3 @@
from RecoLocalTracker.SiPixelRecHits._templates_default_cfi import _templates_default
templates = _templates_default.clone()

# This customization will be removed once we get the templates for phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(templates,
LoadTemplatesFromDB = False,
DoLorentz = False,
)

Expand Up @@ -55,7 +55,3 @@
)
displacedTracksSequence = cms.Sequence(displacedTracksTask)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(duplicateDisplacedTrackCandidates, ttrhBuilderName = "WithTrackAngle") # FIXME
5 changes: 0 additions & 5 deletions RecoMuon/GlobalTrackingTools/python/GlobalMuonRefitter_cff.py
Expand Up @@ -53,11 +53,6 @@
RefitFlag = cms.bool( True )
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(GlobalMuonRefitter, TrackerRecHitBuilder = 'WithTrackAngle') # FIXME

from Configuration.Eras.Modifier_fastSim_cff import fastSim
# FastSim doesn't use Runge Kute for propagation
fastSim.toModify(GlobalMuonRefitter, Propagator = "SmartPropagatorAny")
Expand Up @@ -79,11 +79,3 @@
),
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(GlobalTrajectoryBuilderCommon, # FIXME
TrackerRecHitBuilder = 'WithTrackAngle',
TrackTransformer = dict(TrackerRecHitBuilder = 'WithTrackAngle'),
GlbRefitterParameters = dict(TrackerRecHitBuilder = 'WithTrackAngle'),
)
5 changes: 0 additions & 5 deletions RecoMuon/MuonIdentification/python/TrackerKinkFinder_cfi.py
Expand Up @@ -19,8 +19,3 @@
)
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(TrackerKinkFinderParametersBlock, TrackerKinkFinderParameters = dict(TrackerRecHitBuilder = 'WithTrackAngle')) # FIXME

5 changes: 0 additions & 5 deletions RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py
Expand Up @@ -88,8 +88,3 @@
)
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(MuonTrackLoaderForGLB, TrackLoaderParameters = dict(TTRHBuilder = 'WithTrackAngle')) # FIXME

Expand Up @@ -49,11 +49,6 @@
Min_dr = cms.double(0.2)
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(trackerDrivenElectronSeeds, TTRHBuilder = 'WithTrackAngle') # FIXME

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
for e in [pp_on_XeXe_2017, pp_on_AA_2018]:
Expand Down
Expand Up @@ -30,10 +30,6 @@
duplicateTrackClassifier.mva.minLayers = [0,0,0]
duplicateTrackClassifier.mva.min3DLayers = [0,0,0]
duplicateTrackClassifier.mva.maxLostLayers = [99,99,99]
# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(duplicateTrackCandidates, ttrhBuilderName = "WithTrackAngle") # FIXME

generalTracks = DuplicateListMerger.clone()
generalTracks.originalSource = cms.InputTag("preDuplicateMergingGeneralTracks")
Expand Down
Expand Up @@ -21,9 +21,3 @@
RefitRPCHits = cms.bool(True),
Propagator = cms.string('SmartPropagatorAnyRKOpposite'),
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(inOutSeedsFromTrackerMuons, TrackerRecHitBuilder = 'WithTrackAngle') # FIXME

6 changes: 0 additions & 6 deletions RecoTracker/TrackProducer/python/TrackProducer_cfi.py
Expand Up @@ -26,9 +26,3 @@
MeasurementTracker = cms.string(''),
MeasurementTrackerEvent = cms.InputTag('MeasurementTrackerEvent'),
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(TrackProducer, TTRHBuilder = 'WithTrackAngle') # FIXME