InDetTrackSummaryHelperTool.h 4.19 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

#ifndef INDETTRACKSUMMARYHELPERTOOL_H
#define INDETTRACKSUMMARYHELPERTOOL_H

#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "TrkTrackSummary/TrackSummary.h" // defines the Trk::numberOfDetectorTypes enum
#include "TrkEventPrimitives/ParticleHypothesis.h"
#include "GaudiKernel/ToolHandle.h"
#include <vector>
#include <bitset>
#include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h"

class ITRT_StrawSummarySvc;
class PixelID;
class SCT_ID;
class TRT_ID;

namespace Trk
{
   class TrackStateOnSurface;
   class Track;
   class RIO_OnTrack;
   class CompetingRIOsOnTrack;
   class IPRD_AssociationTool;
   class ITrackHoleSearchTool;
   class IPixelToTPIDTool;
}
namespace InDet{
   class IInDetTestBLayerTool;
}

namespace InDet {

  class InDetTrackSummaryHelperTool :  virtual public Trk::ITrackSummaryHelperTool, public AthAlgTool   {
  public:
    
    /** constructor */
    InDetTrackSummaryHelperTool(const std::string&,const std::string&,const IInterface*);
	
    /** destructor */
    virtual ~InDetTrackSummaryHelperTool ();
	
    /** standard AlgTool methods: initialise retrieves Tools, finalize does nothing */
    virtual StatusCode initialize();
    virtual StatusCode finalize();
	

    /** Input : rot, tsos
	Output: Changes in information and hitPattern
	Input quantities rot, tsos are used to increment the counts for hits and outliers in information and to set the proper bits in hitPattern.
    */
    virtual void analyse(const Trk::Track& track,
			 const Trk::RIO_OnTrack* rot,
			 const Trk::TrackStateOnSurface* tsos,
			 std::vector<int>& information, 
			 std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const ;

    virtual void analyse(const Trk::Track& track,
			 const Trk::CompetingRIOsOnTrack* crot,
			 const Trk::TrackStateOnSurface* tsos,
			 std::vector<int>& information, 
			 std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const;

    /** Input : track, partHyp
	Output: Changes in information
	This method first calls the method getListOfHits to isolate the relevant hits on the track before calling the method
	performHoleSearchStepWise which then performs the actual hole search.
	Additionally the Layers of the Pixel Detector which contribute measurements to the track are counted  
	If problems occur, the information counters for Holes and PixelLayers are reset to -1 flagging them as not set.
    */
    void searchForHoles(const Trk::Track& track, 
			std::vector<int>& information ,
			const Trk::ParticleHypothesis partHyp = Trk::pion) const ;

    /** this method simply updaes the shared hit content - it is designed/optimised for track collection merging */
    void updateSharedHitCount(const Trk::Track& track, Trk::TrackSummary& summary) const;
81
82
83
84
 /** this method simply updaes the electron PID content - it is designed/optimised for track collection merging */
    void updateAdditionalInfo(Trk::TrackSummary& summary,std::vector<float>& eprob,float& dedx, int& nclus, int& noverflowclus) const;
    /** This method updates the expect... hit info*/
    void updateExpectedHitInfo(const Trk::Track& track, Trk::TrackSummary& summary) const;
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

    /** @copydoc Trk::ITrackSummaryHelperTool::addDetailedTrackSummary(const Trk::Track&, Trk::TrackSummary&)*/

    virtual void addDetailedTrackSummary(const Trk::Track&, Trk::TrackSummary&) const;
 

  private:
    /**ID pixel helper*/
    bool m_usePixel;
    const PixelID* m_pixelId;
    
    /**ID SCT helper*/
    bool m_useSCT;
    const SCT_ID* m_sctId;
    
    /**ID TRT helper*/
    bool m_useTRT;
    const TRT_ID* m_trtId;

    /**Association tool - used to work out which (if any) PRDs are shared between 
       tracks*/
    ToolHandle< Trk::IPRD_AssociationTool >  m_assoTool;
    ToolHandle< Trk::IPixelToTPIDTool >      m_pixeldedxtool; // why in Trk namespace ?
    ToolHandle< Trk::ITrackHoleSearchTool >  m_holeSearchTool;
    ToolHandle< InDet::IInDetTestBLayerTool > m_testBLayerTool;
    ServiceHandle<ITRT_StrawStatusSummarySvc> m_TRTStrawSummarySvc; //!< The ConditionsSummaryTool


    bool m_doSharedHits;
    bool m_doSplitPixelHits;
    bool m_overwriteidsummary;
116
    bool m_runningTIDE_Ambi;
117
118
119
120
121
};

}
#endif