From fd73f7bcb1d7f99e2aaf10a81702343044800ae4 Mon Sep 17 00:00:00 2001 From: Patrick Koppenburg <patrick.koppenburg@cern.ch> Date: Thu, 3 Sep 2020 10:06:48 +0200 Subject: [PATCH] Remove L0 --- Phys/DisplVerticesMC/src/MCDisplVertices.cpp | 44 +------- Phys/DisplVerticesMC/src/MCDisplVertices.h | 105 +++++++++---------- 2 files changed, 52 insertions(+), 97 deletions(-) diff --git a/Phys/DisplVerticesMC/src/MCDisplVertices.cpp b/Phys/DisplVerticesMC/src/MCDisplVertices.cpp index c571e7fd6..6c498c7d7 100644 --- a/Phys/DisplVerticesMC/src/MCDisplVertices.cpp +++ b/Phys/DisplVerticesMC/src/MCDisplVertices.cpp @@ -15,7 +15,6 @@ // Trigger decisions #include "Event/HltDecReports.h" -#include "Event/L0DUReport.h" // get the Header of the event #include "Event/RecHeader.h" @@ -124,10 +123,7 @@ StatusCode MCDisplVertices::initialize() { if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize the MCDisplVertices algorithm" << endmsg; - if ( m_SaveTrigInfos ) { - m_tisTos = tool<ITriggerTisTos>( "TriggerTisTos", this ); - m_l0BankDecoder = tool<IL0DUFromRawTool>( "L0DUFromRawTool" ); - } + if ( m_SaveTrigInfos ) { m_tisTos = tool<ITriggerTisTos>( "TriggerTisTos", this ); } // Initialize Vertex Fitter // NOTE : BlindVertex fitter is temp. not available in v19r11 ! @@ -1930,8 +1926,7 @@ void MCDisplVertices::GetMCStable( const MCVertex* V ) { // plot( IsRec, "IsPreyRcnstrctble", 0, 2); // debug()<<" Is Particle " << V->mother()->particleID().abspid() // << " reconstructible in VELO ? " << IsRec << endmsg; - - //*********Study of data linked daughters******* + //*********Study of data linked daughters*******/ // Loop on stable daughter particles MCTrackInfo info = make_MCTrackInfo( evtSvc(), msgSvc() ); const Particle::ConstVector preys = this->i_particles(); @@ -3425,17 +3420,6 @@ StatusCode MCDisplVertices::SaveTrigInfinTuple( Tuple& tuple ) { tuple->column( "Reco", cand ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); if ( msgLevel( MSG::DEBUG ) && cand ) debug() << "Event has a reconstructed prey !" << endmsg; - // Get L0 info and save decision in tuple - if ( !exist<L0DUReport>( L0DUReportLocation::Default ) ) { - err() << "You requested the trigger, make sure you run it." << endmsg; - err() << "No LODU report at " << L0DUReportLocation::Default << endmsg; - return StatusCode::FAILURE; - } - L0DUReport* l0 = get<L0DUReport>( L0DUReportLocation::Default ); - int L0dec = l0->decision(); - if ( msgLevel( MSG::DEBUG ) ) debug() << "L0 decision : " << L0dec << endmsg; - tuple->column( "L0", L0dec ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); - // fill the HLT global : Hlt2 : 77,Hlt1 : 46 vector<unsigned int> m_routingBits; m_routingBits.push_back( 46 ); @@ -3507,30 +3491,6 @@ StatusCode MCDisplVertices::SaveTrigInfinTuple( Tuple& tuple ) { // To print entire report container : // vector<string> allConfiguredTrgLines = decReports->decisionNames(); // debug() << *decReports << endmsg; - - return SaveL0RawInfos( tuple ); -} - -//============================================================================ -// Save the SPD multiplicity applied in the hadron and electron triggers. -//============================================================================ -StatusCode MCDisplVertices::SaveL0RawInfos( Tuple& tuple ) { - // TupleToolRecoStats.cpp - - int nSpd = -1; - if ( !m_l0BankDecoder ) { - Error( "unable to get the L0DUFromRawTool" ).ignore(); - } else { - m_l0BankDecoder->fillDataMap(); - bool l0BankDecoderOK = m_l0BankDecoder->decodeBank(); - if ( !l0BankDecoderOK ) { - Error( "Readout error : unable to monitor the L0DU rawBank", StatusCode::SUCCESS, 1 ).ignore(); - } else { - nSpd = m_l0BankDecoder->data( "Spd(Mult)" ); - } - } - tuple->column( "SPDMult", nSpd ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); - return StatusCode::SUCCESS; } diff --git a/Phys/DisplVerticesMC/src/MCDisplVertices.h b/Phys/DisplVerticesMC/src/MCDisplVertices.h index 8d15c9198..8c7c5f878 100644 --- a/Phys/DisplVerticesMC/src/MCDisplVertices.h +++ b/Phys/DisplVerticesMC/src/MCDisplVertices.h @@ -25,9 +25,6 @@ // To use Wouter's vertex tool #include "TrackInterfaces/ITrackVertexer.h" -// To decode L0DU raw infos -#include "L0Interfaces/IL0DUFromRawTool.h" - // Hlt tools #include "Kernel/ITriggerTisTos.h" @@ -69,7 +66,6 @@ private: IMeasurementProvider* m_measProvider; ITrackVertexer* m_tFit; // Wouter's tool ITriggerTisTos* m_tisTos; - IL0DUFromRawTool* m_l0BankDecoder; ITransportSvc* m_transSvc; IGeometryInfo* m_lhcbGeo; @@ -182,30 +178,29 @@ private: StatusCode GetCaloInfos( std::string, double&, double& ); StatusCode GetCaloClusterInfos( std::string, Tuple&, double&, double& ); StatusCode SaveTrigInfinTuple( Tuple& ); - StatusCode SaveL0RawInfos( Tuple& ); StatusCode fillHeader( Tuple& ); StatusCode BackToBack( LHCb::Particle::ConstVector& ); - /***************************************************************/ /** - * the type of radial (R) cut to be applied - * "" : cut with respect to - *(0,0,z) "FromUpstreamPV" : cut with respect to - *the upstream PV (PV3D) "FromBeamLine" : cut - *with respect to given beam line - ******************************************************************/ + /*************************************************************** + * the type of radial (R) cut to be applied + * "" : cut with respect to + *(0,0,z) "FromUpstreamPV" : cut with respect to + *the upstream PV (PV3D) "FromBeamLine" : cut + *with respect to given beam line + ******************************************************************/ std::string m_RCut; std::string m_BLLoc; ///< Location in TES of Beam line LHCb::Particle* m_BeamLine; - bool m_SaveTuple; ///< Save prey properties in a tuple - bool m_SaveTrigInfos; ///< Save trigger infos in a tuple - bool m_SaveonTES; ///< Save Event on TES if fires - /***************************************************************/ /** - * World volume simulated with Air in MC Data - * Therefore vacuum in beam pipe simulated with air - *at p atm. Set m_RemVtxFromAir=True to remove vtx - *generated by collision of flying particles with - *air of beam pipe. - ******************************************************************/ + bool m_SaveTuple; ///< Save prey properties in a tuple + bool m_SaveTrigInfos; ///< Save trigger infos in a tuple + bool m_SaveonTES; ///< Save Event on TES if fires + /***************************************************************** + * World volume simulated with Air in MC Data + * Therefore vacuum in beam pipe simulated with air + *at p atm. Set m_RemVtxFromAir=True to remove vtx + *generated by collision of flying particles with + *air of beam pipe. + ******************************************************************/ bool m_RemVtxFromAir; const double pi; /// Proportion of preys in different purity areas @@ -214,39 +209,39 @@ private: double m_minmixed; double m_maxmixed; // cuts - double m_PreyMinMass; ///< Minimum reconstructed mass - double m_PreyMaxMass; ///< Maximum reconstructed mass - double m_SumPt; ///< Sumpt of all daughters tracks - double m_DistMax; ///< Max distance of the vertices - double m_RMin; ///< Min dist to the z axis - double m_RMax; ///< Max dist to the z axis - double m_MaxChi2OvNDoF; ///< Max chi2 of a vertex - double m_PurityMin; ///< Min purity requested, MC set on - double m_MuonpT; ///< Muon with a pT of min m_MuonpT - double m_DocaMax; ///< Max distance of closest approach - unsigned int m_NbCands; ///< Min nb of desired candidates - unsigned int m_PVnbtrks; ///< Min nb of trks for upstream PV candidate - int m_nTracks; ///< Min # of tracks at reconstructed vertex - double m_SigmaZ; ///< Max on error Z - double m_SigmaR; ///< Max on error R - double m_MinX; ///< Min X position - double m_MaxX; ///< Max X position - double m_MinY; ///< Min Y position - double m_MaxY; ///< Max Y position - double m_MinZ; ///< Min Z position - double m_MaxZ; ///< Max Z position - /***************************************************************/ /** - * Remove vtx if in detector material ? - * if = 0 : disabled - * if = 1 : remove reco vtx if in detector material - * if = 2 : remove reco vtx if rad length from - *decay pos - DetDist to decay pos + DetDist along - *momentum is > threshold if = 3 : remove reco vtx - *if rad length along - * +- DetDist * - *PositionCovMatrix if = 4 : 3 but range+3 if in RF - *foil. - ******************************************************************/ + double m_PreyMinMass; ///< Minimum reconstructed mass + double m_PreyMaxMass; ///< Maximum reconstructed mass + double m_SumPt; ///< Sumpt of all daughters tracks + double m_DistMax; ///< Max distance of the vertices + double m_RMin; ///< Min dist to the z axis + double m_RMax; ///< Max dist to the z axis + double m_MaxChi2OvNDoF; ///< Max chi2 of a vertex + double m_PurityMin; ///< Min purity requested, MC set on + double m_MuonpT; ///< Muon with a pT of min m_MuonpT + double m_DocaMax; ///< Max distance of closest approach + unsigned int m_NbCands; ///< Min nb of desired candidates + unsigned int m_PVnbtrks; ///< Min nb of trks for upstream PV candidate + int m_nTracks; ///< Min # of tracks at reconstructed vertex + double m_SigmaZ; ///< Max on error Z + double m_SigmaR; ///< Max on error R + double m_MinX; ///< Min X position + double m_MaxX; ///< Max X position + double m_MinY; ///< Min Y position + double m_MaxY; ///< Max Y position + double m_MinZ; ///< Min Z position + double m_MaxZ; ///< Max Z position + /*************************************************************** + * Remove vtx if in detector material ? + * if = 0 : disabled + * if = 1 : remove reco vtx if in detector material + * if = 2 : remove reco vtx if rad length from + *decay pos - DetDist to decay pos + DetDist along + *momentum is > threshold if = 3 : remove reco vtx + *if rad length along + * +- DetDist * + *PositionCovMatrix if = 4 : 3 but range+3 if in RF + *foil. + ******************************************************************/ int m_RemVtxFromDet; double m_DetDist; ///< Min distance to det material ///< Remove vtx if found in RF-Foil area, based on geometric cuts -- GitLab