TrigMultiTrkHypoMT.h 4.53 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/

/**************************************************************************
 **
 **   File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkHypoMT.h
 **
 **   Description: multi-track hypothesis algorithm 
 **
 **   Author: H. Russell
 **
 **************************************************************************/ 

#ifndef TRIG_TrigMultiTrkHypoMT_H 
#define TRIG_TrigMultiTrkHypoMT_H

// standard stuff
#include <string>
// general athena stuff
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/IToolSvc.h"
#include "GaudiKernel/StatusCode.h"
24
25
#include "xAODMuon/MuonContainer.h"

26
27
28
29
30
31
32
33
34
35
36
37
38
39

#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "AthViews/View.h"
#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
#include "StoreGate/ReadHandleKey.h"
#include "StoreGate/WriteHandleKey.h"

#include "DecisionHandling/TrigCompositeUtils.h"

#include "TrigMultiTrkHypoToolMT.h"
#include "TrigBphysHelperUtilsTool.h"

#include "DecisionHandling/HypoBase.h"

40
#include "Constants.h"
41

Charles Burton's avatar
Charles Burton committed
42
43
#include "AthenaMonitoringKernel/Monitored.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
44
45
46
47
48
49
50
51
52
53
54
55


class TrigMultiTrkHypoMT: public ::HypoBase  {
  enum { MaxNumberTools = 20 };
  public:
    TrigMultiTrkHypoMT(const std::string & name, ISvcLocator* pSvcLocator);
    ~TrigMultiTrkHypoMT();

    virtual StatusCode  initialize() override;
   virtual StatusCode  execute( const EventContext& context ) const override;
   virtual StatusCode  finalize() override;

56
57
58
59
  protected:
   //The vertexing tool is not reentrant so this algorithm cannot be used reentrantly
   bool isReEntrant() const override { return false; }

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  private:

    TrigMultiTrkHypoMT();
    ToolHandleArray< TrigMultiTrkHypoToolMT > m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"};

	bool passNTracks(int nObjMin,
                 const std::vector<float> & ptObjMin,
  				 const std::vector<ElementLink<xAOD::TrackParticleContainer> > & inputTrkVec,
                 std::vector<ElementLink<xAOD::TrackParticleContainer> > & outputTrkVec,
                 float mindR) const;
                 
    SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey{ this,
        "trackCollectionKey",         // property name
        "Tracks",                     // default value of StoreGate key
        "input TrackParticle container name"};

76
77
78
79
80
    SG::ReadHandleKey<xAOD::MuonContainer> m_muonContainerKey{ this,
        "MuonCollectionKey",         // property name
        "CBCombinedMuon",                     // default value of StoreGate key
        "input EF Muon container name"};

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
    SG::WriteHandleKey<xAOD::TrigBphysContainer> m_bphysObjContKey{ this,
        "bphysCollectionKey",         // property name
        "TrigBphysContainer",         // default value of StoreGate key
        "Output TrigBphysContainer name"};

  static bool sortTracks(ElementLink<xAOD::TrackParticleContainer> &l1, ElementLink<xAOD::TrackParticleContainer> &l2)
  {	
    return (*l1)->pt() > (*l2)->pt();
  }

  ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool { this, 
    "TrigBphysHelperUtilsTool","TrigBphysHelperUtilsTool","Select bphys helper utils tool you want to use"};
    
  //need to implement a timer still!
  //TrigTimer* m_BmmHypTot;

  Gaudi::Property<int> m_nTrk { this, "nTrk",2,"Number of tracks in the vertex"};
  Gaudi::Property<int> m_nTrkQ { this, "nTrkCharge",-1,"sum of track charges"}; // if negative - no cut
  Gaudi::Property<std::vector<double>> m_trkMasses {this, "trackMasses", {105.6583745,105.6583745}, "track masses for vertex reco (one per track!)"};
  Gaudi::Property<std::vector<float>> m_ptTrkMin { this, "trkPtThresholds", {3650, 3650} ,"minimum track pTs (one per track, sorted descending!)"};

  Gaudi::Property<std::vector<float>> m_nTrkMassMin { this, "nTrackMassMin", {0},"list of mins for nTrk mass windows"}; // both min+max need to be defined
  Gaudi::Property<std::vector<float>> m_nTrkMassMax { this, "nTrackMassMax", {100000},"list of maxes for nTrk mass windows"};

  Gaudi::Property<float> m_mindR { this, "overlapdR",0.01 ,"Minimum dR between tracks (overlap removal)"};
    
107
  Gaudi::Property<int> m_particleType { this, "particleType", 0, "Types of particles to use. 0 = tracks, 1 = EF Muons, 2 = tbd..."}; 
108
109
  
  Gaudi::Property<std::string> m_trigLevelString { this, "trigLevelString", "", "Trigger Level to set for created TrigBphys objects."}; 
110
    
111
  ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
112
113
  
  xAOD::TrigBphys::levelType m_trigLevel;
114
115
116
117

};

#endif