Skip to content
Snippets Groups Projects

Resolve creation of many instances of config files for electron Ringer tunes and LH tunes

Merged Debottam Bakshi Gupta requested to merge dbakshig/athena:resolveLH_ringer into master

As mentioned in ATR-22476 this MR will call Ringertool from TrigEgammaFastCaloHypoAlgMT instead of TrigEgammaFastCaloHypoTool. Similarly, LHTool will be called from TrigEgammaPrecisionElectronHypoAlg instead of TrigEgammaPrecisionElectronHypoTool. Adding @fernando , @cjmeyer , @jodafons , @tamartin , @fwinkl

Edited by Debottam Bakshi Gupta

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 2a5db9fc - Remodelling LH selector tools to resolve many instances of config file

    Compare with previous version

  • 34 52 TrigCompositeUtils::Decision* decision;
    35 53 const TrigRoiDescriptor* roi;
    36 54 const xAOD::Electron_v1* electron;
    55 bool accept_vl;
  • 100
    101 SG::ReadDecorHandle<xAOD::EventInfo,float> eventInfoDecor(m_avgMuKey, context);
    102 if(eventInfoDecor.isPresent()) {
    103 avg_mu = eventInfoDecor(0);
    104 ATH_MSG_DEBUG("Average mu " << avg_mu);
    105 asg::AcceptData accept_vloose = m_egammaElectronLHTool_vloose->accept(context, electronHandle.cptr()->at(cl),avg_mu);
    106 asg::AcceptData accept_loose = m_egammaElectronLHTool_loose->accept(context, electronHandle.cptr()->at(cl),avg_mu);
    107 asg::AcceptData accept_medium = m_egammaElectronLHTool_medium->accept(context, electronHandle.cptr()->at(cl),avg_mu);
    108 asg::AcceptData accept_tight = m_egammaElectronLHTool_tight->accept(context, electronHandle.cptr()->at(cl),avg_mu);
    109 pass_vloose = (bool) accept_vloose;
    110 pass_loose = (bool) accept_loose;
    111 pass_medium = (bool) accept_medium;
    112 pass_tight = (bool) accept_tight;
    113
    114 // Monitor the LH value
    115 lhval_vloose = m_egammaElectronLHTool_vloose->calculate(context, electronHandle.cptr()->at(cl),avg_mu);
    • Follow the map strategy in each "info struct" you can just do:

      PS: the order matter here: usually [Tight,Medium,Loose and VLoose]

      int idx=0;
      for (auto& pidname : m_lhPidNames){
         lhvalue = m_lhtools[idx]->calculate(context, ... );
         info.values[pidname] = lhvalue;
         bool accept = bool(m_lhtools[idx]->accept( lhvalue, ... ) );
         info.accept[pidname] = accept;
         idx++;
      }
      
      int idx=0;
      for (auto& pidname : m_isEMPidNames){
         bool accept = bool(m_isEmTools[idx]->accept(  ... ) );
         info.accept[pidname] = accept;
         idx++;
      }
      
      // the same thing for DNN for future...
      int idx=0;
      for (auto& pidname : m_dnnPidNames){
         bool accept = bool(m_dnnTools[idx]->accept( ... ) );
         info.accept[pidname] = accept;
         idx++;
      }         
      Edited by Joao Victor Da Fonseca Pinto
    • Hi @jodafons will do in upcoming MR since this MR affects nominal chains needs to go through first.

      Thanks, Debo.

    • Please register or sign in to reply
  • 266 246 ATH_MSG_DEBUG("relptcone20 = " <<relptcone20 );
    267 247 mon_relptcone20 = relptcone20;
    268 248 ATH_MSG_DEBUG("m_RelPtConeCut = " << m_RelPtConeCut );
    249
  • 37 37 Gaudi::Property< float > m_detacluster { this, "dETACLUSTERthr", 0. , "" };
    38 38 Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" };
    39 39 Gaudi::Property< float > m_RelPtConeCut { this, "RelPtConeCut", -999., "Track isolation cut" };
    40 Gaudi::Property<bool> m_loose{this,"Loose", false, "Decision for Loose tune"};
  • 41 41 (electronPrecisionAthSequence, precisionElectronViewsMaker, sequenceOut) = RecoFragmentsPool.retrieve(precisionElectronSequence_GSF, ConfigFlags)
    42 42
    43 43 # make the Hypo
    44 from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigElectronSelectors
    45 SelectorTool_vloose, SelectorTool_loose, SelectorTool_medium, SelectorTool_tight = TrigElectronSelectors()
    44 46 from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaPrecisionElectronHypoAlgMT
    45 47 thePrecisionElectronHypo = TrigEgammaPrecisionElectronHypoAlgMT("TrigEgammaPrecisionElectronHypoAlgMT_GSF")
    46 48 thePrecisionElectronHypo.Electrons = sequenceOut
    47 49 thePrecisionElectronHypo.RunInView = True
    50 thePrecisionElectronHypo.ElectronLHSelector_vLoose = SelectorTool_vloose
  • 111 else:
    112 self.nominal()
    113
    114 self.addMonitoring()
    115
    116 def __setupLHConfiguration(self):
    117
    118 possibleSel = { 'tight':'Tight', 'medium':'Medium', 'loose':'Loose', 'vloose':'vLoose',
    119 'lhtight':'Tight', 'lhmedium':'Medium', 'lhloose':'Loose', 'lhvloose':'vLoose'}
    120
    121 possibleTune = { 'Tight':False, 'Medium':False, 'Loose':False, 'vLoose':False}
    122 if not self.pidname() in possibleSel.keys():
    123 raise RuntimeError( "Bad selection name: %s" % self.pidname() )
    124 possibleTune[possibleSel[self.pidname()]] = True
    125
    126 self.tool().vLoose = possibleTune['vLoose']
  • added 1 commit

    • 0be2e401 - Removing eventcontext from the arguments of PrecisionElectronHypoTool because remains unused

    Compare with previous version

  • Debottam Bakshi Gupta marked this merge request as ready

    marked this merge request as ready

  • This merge request affects 3 packages:

    • Trigger/TrigHypothesis/TrigEgammaHypo
    • Trigger/TrigHypothesis/TrigMultiVarHypo
    • Trigger/TriggerCommon/TriggerMenuMT

    Affected files list will not be printed in this case

    Adding @sutt ,@hrussell ,@dbakshig ,@bernius ,@cjmeyer ,@fernando ,@dzanzi as watchers

  • :white_check_mark: CI Result SUCCESS (hash 0be2e401)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 30921]

  • Debottam Bakshi Gupta resolved all threads

    resolved all threads

  • Dear experts,

    Can it be merged?

    thanks, Debo.

  • Dear shifters,

    Can it be merged?

    thanks, Debo.

    Edited by Debottam Bakshi Gupta
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading