TrigMultiTrkHypoMT.h 3.94 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
  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"

#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"

#include "TrigBphysHypo/Constants.h"

#include "AthenaMonitoring/Monitored.h"
#include "AthenaMonitoring/GenericMonitoringTool.h"


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;

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

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
  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"};

    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)"};
    
  ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };

};

#endif