diff --git a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx index a643ab864696de13509b53d5ea200260aaf0cb13..9b46f8eada875911dfb726054c2091873a8b259d 100755 --- a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx @@ -268,7 +268,7 @@ int PixelCalibSvc::PixelType(const Identifier pix_id, const Identifier wafer_id, } col = columnsPerFE-1-eta_index%columnsPerFE; // check the col order in FEI4 ? row = 0; - circ = p_design->numberOfCircuits()==1 ? 0: 1-eta_index/columnsPerFE; + circ = p_design->numberOfCircuits()==1 ? 0: eta_index/columnsPerFE; } else { // FEI3 if (barrel_ec==2 || barrel_ec==-2) { @@ -337,7 +337,7 @@ int PixelCalibSvc::PixelCirc(const Identifier& pix_id, const Identifier& wafer_i else { int columnsPerFE = p_design->columnsPerCircuit(); if (p_design->getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI4) { - circ = p_design->numberOfCircuits()==1 ? 0: 1-eta_index/columnsPerFE; + circ = p_design->numberOfCircuits()==1 ? 0: eta_index/columnsPerFE; } else{ // FEI3 chips if (barrel_ec==2 || barrel_ec==-2) { diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py index 7e8cd6dbab2de4e2a20c1a5492dbade5e9b18618..35d2ae5ec9722347346d97774f287f721a20d56a 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py +++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py @@ -52,6 +52,8 @@ class PixelLorentzAngleSvcSetup: pixelSiliconConditionsSvc=PixelSiliconConditionsSvc() svcMgr+=pixelSiliconConditionsSvc + pixelSiliconConditionsSvc.DepletionVoltage=10.0 + # Pass the silicon conditions services to the Lorentz angle service # Also make sure UseMagFieldTool is True as AtlasGeoModel sets this to False # if loaded first. diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/InDetDxAODJobProperties.py b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/InDetDxAODJobProperties.py index a50d1f01cdad764175ee9087dba7967c66bfdab3..14fe90e39855ccb5962f0b669c59ac3ea046c9b9 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/InDetDxAODJobProperties.py +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/InDetDxAODJobProperties.py @@ -152,5 +152,12 @@ class TrtJpsiSelection(JobProperty): StoredValue = False jobproperties.InDetDxAODJobPropertyContainer.add_JobProperty(TrtJpsiSelection) +class DRAWZSelection(JobProperty): + """Z event selection based on DRAW ZMUMU""" + statusOn = True + allowedTypes = ["bool"] + StoredValue = False +jobproperties.InDetDxAODJobPropertyContainer.add_JobProperty(DRAWZSelection) + InDetDxAODFlags = jobproperties.InDetDxAODJobPropertyContainer diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py index 45d35002e408299c35098d0002bfe93d0627e125..3279bcc409ef958e3d6b68e1457d38b2370df158 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py @@ -16,6 +16,8 @@ dumpTrtInfo = InDetDxAODFlags.DumpTrtInfo() TrtZSel = InDetDxAODFlags.TrtZSelection() TrtJSel = InDetDxAODFlags.TrtJpsiSelection() +DRAWZSel = InDetDxAODFlags.DRAWZSelection() + # Thin hits to store only the ones on-track thinHitsOnTrack= InDetDxAODFlags.ThinHitsOnTrack() @@ -310,6 +312,27 @@ if TrtZSel or TrtJSel: +DRAW_ZMUMU_SkimmingTool=None +if DRAWZSel: + sel_muon1 = 'Muons.pt > 25*GeV && Muons.ptcone40/Muons.pt < 0.3 && Muons.passesIDCuts && (Muons.quality <= 2)' + sel_muon2 = 'Muons.pt > 20*GeV && Muons.ptcone40/Muons.pt < 0.3 && Muons.passesIDCuts && (Muons.quality <= 2)' + draw_zmumu = '( count ( DRZmumuMass > 70*GeV && DRZmumuMass < 110*GeV ) >= 1 )' + from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool + DRZmumuMassTool = DerivationFramework__InvariantMassTool(name = "DRZmumuMassTool", + ContainerName = "Muons", + ObjectRequirements = sel_muon1, + SecondObjectRequirements = sel_muon2, + MassHypothesis = 105.66, + SecondMassHypothesis = 105.66, + StoreGateEntryName = "DRZmumuMass") + ToolSvc += DRZmumuMassTool + from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool + DRAW_ZMUMU_SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "DRAW_ZMUMU_SkimmingTool", + expression = draw_zmumu) + ToolSvc += DRAW_ZMUMU_SkimmingTool + print DRAW_ZMUMU_SkimmingTool + + ################# ### Setup decorators tools ################# @@ -399,6 +422,10 @@ if TrtZSel: if TrtJSel: augmentationTools.append(JPSIeeMassTool, JPSImmMassTool) +if DRAWZSel: + augmentationTools.append(DRZmumuMassTool) + + from AthenaCommon import CfgMgr # Set up stream auditor @@ -522,6 +549,10 @@ if TrtZSel: if TrtJSel: skimmingTools.append(JPSI_SkimmingTool) +if DRAWZSel: + skimmingTools.append(DRAW_ZMUMU_SkimmingTool) + + #minimumbiasTrig = '(L1_RD0_FILLED)' # #if not IsMonteCarlo: @@ -619,6 +650,22 @@ IDTRKVALIDStream.AddItem("xAOD::ElectronAuxContainer#ElectronsAux.") IDTRKVALIDStream.AddItem("xAOD::TrackParticleContainer#GSFTrackParticles") IDTRKVALIDStream.AddItem("xAOD::TrackParticleAuxContainer#GSFTrackParticlesAux."+excludedAuxData) +if DRAWZSel: + IDTRKVALIDStream.AddItem("xAOD::TauJetContainer#TauJets") + IDTRKVALIDStream.AddItem("xAOD::TauJetAuxContainer#TauJetsAux.") + IDTRKVALIDStream.AddItem("xAOD::JetContainer#AntiKt4EMTopoJets") + IDTRKVALIDStream.AddItem("xAOD::JetAuxContainer#AntiKt4EMTopoJetsAux.") + IDTRKVALIDStream.AddItem("xAOD::JetContainer#AntiKt2PV0TrackJets") + IDTRKVALIDStream.AddItem("xAOD::JetAuxContainer#AntiKt2PV0TrackJetsAux.") + IDTRKVALIDStream.AddItem("xAOD::JetContainer#AntiKt3PV0TrackJets") + IDTRKVALIDStream.AddItem("xAOD::JetAuxContainer#AntiKt3PV0TrackJetsAux.") + IDTRKVALIDStream.AddItem("xAOD::BTaggingContainer#BTagging_AntiKt4EMTopo") + IDTRKVALIDStream.AddItem("xAOD::BTaggingAuxContainer#BTagging_AntiKt4EMTopoAux.") + IDTRKVALIDStream.AddItem("xAOD::BTaggingContainer#BTagging_AntiKt2Track") + IDTRKVALIDStream.AddItem("xAOD::BTaggingAuxContainer#BTagging_AntiKt2TrackAux.") + IDTRKVALIDStream.AddItem("xAOD::BTaggingContainer#BTagging_AntiKt3Track") + IDTRKVALIDStream.AddItem("xAOD::BTaggingAuxContainer#BTagging_AntiKt3TrackAux.") + # Add truth-related information if dumpTruthInfo: IDTRKVALIDStream.AddItem("xAOD::TruthParticleContainer#*") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx index c547cd562c374ec546f270ddbea7d7928cef5dc6..230714856b6f1af86b979fb528630a535e1787a2 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx @@ -310,6 +310,76 @@ namespace DerivationFramework { decoratorTRTusedHits_noHT_divByL (*track) = m_TRTdEdxTool->usedHits( trkTrack, true, false); } + // Track extrapolation + std::unique_ptr<const Trk::TrackParameters> perigee( m_extrapolator->extrapolate(*trkTrack,(trkTrack->perigeeParameters())->associatedSurface(),Trk::oppositeMomentum,true, Trk::pion, Trk::addNoise)); + + Trk::CylinderSurface cylSurfIBL(29.5,3000.0); + Trk::CylinderSurface cylSurfBL(50.5,3000.0); + Trk::CylinderSurface cylSurfL1(88.5,3000.0); + Trk::CylinderSurface cylSurfL2(122.5,3000.0); + std::unique_ptr<const Trk::TrackParameters> outputParamsIBL(m_extrapolator->extrapolate(*perigee,cylSurfIBL,Trk::alongMomentum,true,Trk::pion,Trk::removeNoise)); + std::unique_ptr<const Trk::TrackParameters> outputParamsBL(m_extrapolator->extrapolate(*perigee,cylSurfBL,Trk::alongMomentum,true,Trk::pion,Trk::removeNoise)); + std::unique_ptr<const Trk::TrackParameters> outputParamsL1(m_extrapolator->extrapolate(*perigee,cylSurfL1,Trk::alongMomentum,true,Trk::pion,Trk::removeNoise)); + std::unique_ptr<const Trk::TrackParameters> outputParamsL2(m_extrapolator->extrapolate(*perigee,cylSurfL2,Trk::alongMomentum,true,Trk::pion,Trk::removeNoise)); + + SG::AuxElement::Decorator<float> decoratorTrkIBLX("TrkIBLX"); + SG::AuxElement::Decorator<float> decoratorTrkIBLY("TrkIBLY"); + SG::AuxElement::Decorator<float> decoratorTrkIBLZ("TrkIBLZ"); + if (outputParamsIBL.get()) { + decoratorTrkIBLX(*track) = outputParamsIBL->position().x(); + decoratorTrkIBLY(*track) = outputParamsIBL->position().y(); + decoratorTrkIBLZ(*track) = outputParamsIBL->position().z(); + } + else { + decoratorTrkIBLX(*track) = 0.0; + decoratorTrkIBLY(*track) = 0.0; + decoratorTrkIBLZ(*track) = 0.0; + } + + SG::AuxElement::Decorator<float> decoratorTrkBLX("TrkBLX"); + SG::AuxElement::Decorator<float> decoratorTrkBLY("TrkBLY"); + SG::AuxElement::Decorator<float> decoratorTrkBLZ("TrkBLZ"); + if (outputParamsBL.get()) { + decoratorTrkBLX(*track) = outputParamsBL->position().x(); + decoratorTrkBLY(*track) = outputParamsBL->position().y(); + decoratorTrkBLZ(*track) = outputParamsBL->position().z(); + } + else { + decoratorTrkBLX(*track) = 0.0; + decoratorTrkBLY(*track) = 0.0; + decoratorTrkBLZ(*track) = 0.0; + } + + SG::AuxElement::Decorator<float> decoratorTrkL1X("TrkL1X"); + SG::AuxElement::Decorator<float> decoratorTrkL1Y("TrkL1Y"); + SG::AuxElement::Decorator<float> decoratorTrkL1Z("TrkL1Z"); + if (outputParamsL1.get()) { + decoratorTrkL1X(*track) = outputParamsL1->position().x(); + decoratorTrkL1Y(*track) = outputParamsL1->position().y(); + decoratorTrkL1Z(*track) = outputParamsL1->position().z(); + } + else { + decoratorTrkL1X(*track) = 0.0; + decoratorTrkL1Y(*track) = 0.0; + decoratorTrkL1Z(*track) = 0.0; + } + + SG::AuxElement::Decorator<float> decoratorTrkL2X("TrkL2X"); + SG::AuxElement::Decorator<float> decoratorTrkL2Y("TrkL2Y"); + SG::AuxElement::Decorator<float> decoratorTrkL2Z("TrkL2Z"); + if (outputParamsL2.get()) { + decoratorTrkL2X(*track) = outputParamsL2->position().x(); + decoratorTrkL2Y(*track) = outputParamsL2->position().y(); + decoratorTrkL2Z(*track) = outputParamsL2->position().z(); + } + else { + decoratorTrkL2X(*track) = 0.0; + decoratorTrkL2Y(*track) = 0.0; + decoratorTrkL2Z(*track) = 0.0; + } + + + if ( m_storeTRT && !m_TRTdEdxTool.empty() ) {