Commit 78fa87b7 authored by Nicholas Styles's avatar Nicholas Styles Committed by Graeme Stewart
Browse files

add overflow hits (TrkTrackSummary-00-23-07)

	* Adding overflow hits
	* Tagged as TrkTrackSummary-00-23-07

2014-11-14 Nick Styles
	* Adding method to return hit pattern
	* Tagged as TrkTrackSummary-00-23-06

2014-10-23 Nick Styles
	* Synchronising with xAOD::TrackSummary
	* Tagged as TrkTrackSummary-00-23-05

2013-10-09 Nick Styles
	* New enums in summary for innermost/next-to-inner most pixel layers (to replace blayer hits)
	* tagged as TrkTrackSummary-00-23-04
parent c1de1256
......@@ -41,7 +41,17 @@ enum SummaryType {
numberOfBLayerOutliers =31, //!< number of blayer outliers
numberOfBLayerSharedHits =16, //!< number of Pixel b-layer hits shared by several tracks.
numberOfBLayerSplitHits =43, //!< number of Pixel b-layer hits split by cluster splitting
expectBLayerHit =42, //!< Do we expect a b-layer hit for this track?
expectBLayerHit =42, //!< Do we expect a b-layer hit for this track?
expectInnermostPixelLayerHit =52, //!< Do we expect a 0th-layer hit for this track?
numberOfInnermostPixelLayerHits =53, //!< these are the hits in the 0th pixel layer?
numberOfInnermostPixelLayerOutliers =54, //!< number of 0th layer outliers
numberOfInnermostPixelLayerSharedHits =55, //!< number of Pixel 0th layer hits shared by several tracks.
numberOfInnermostLayerSplitHits =56, //!< number of Pixel 0th layer hits split by cluster splitting
expectNextToInnermostPixelLayerHit =57, //!< Do we expect a 1st-layer hit for this track?
numberOfNextToInnermostPixelLayerHits = 58, //!< these are the hits in the 1st pixel layer
numberOfNextToInnermostPixelLayerOutliers =59, //!< number of 1st pixel layer outliers
numberOfNextToInnermostPixelLayerSharedHits =60, //!< number of Pixel 1st layer hits shared by several tracks.
numberOfNextToInnermostLayerSplitHits =61, //!< number of Pixel 1st layer hits split by cluster splitting
numberOfPixelHits = 2, //!< these are the pixel hits, including the b-layer
numberOfPixelOutliers =41, //!< these are the pixel outliers, including the b-layer
numberOfPixelHoles = 1, //!< number of pixel layers on track with absence of hits
......@@ -86,8 +96,17 @@ enum SummaryType {
// --- all
numberOfOutliersOnTrack =15, //!< number of measurements flaged as outliers in TSOS
standardDeviationOfChi2OS = 30, //!< 100 times the standard deviation of the chi2 from the surfaces
// -- numbers...
numberOfTrackSummaryTypes = 47
//reserved: added to keep synchronisation with xAOD::TrackSummary in anticipation of the two being merged
eProbabilityComb_res = 47, //!< Electron probability from combining the below probabilities [float].
eProbabilityHT_res = 48, //!< Electron probability from High Threshold (HT) information [float].
eProbabilityToT_res = 49, //!< Electron probability from Time-Over-Threshold (ToT) information [float].
eProbabilityBrem_res = 50, //!< Electron probability from Brem fitting (DNA) [float].
pixeldEdx_res = 51, //!< the dE/dx estimate, calculated using the pixel clusters [?]
// -- numbers...
numberOfTrackSummaryTypes = 62
};
// Troels.Petersen@cern.ch:
......@@ -102,7 +121,7 @@ enum SummaryType {
/** enumerates the various detector types currently accessible from the isHit() method.
\todo work out how to add muons to this*/
enum DetectorType {
pixelBarrel0 = 0, //!< there are three pixel barrel layers
pixelBarrel0 = 0, //!< there are three or four pixel barrel layers (R1/R2)
pixelBarrel1 = 1,
pixelBarrel2 = 2,
pixelBarrel3 = 3,
......@@ -170,7 +189,8 @@ public:
const std::vector<float>& eProbability,
std::bitset<numberOfDetectorTypes>& hitPattern,
float dedx=-1,
int nhitsuseddedx=-1
int nhitsuseddedx=-1,
int nhitsoverflowdedx=-1
);
/** copy ctor*/
......@@ -196,6 +216,10 @@ public:
int numberOfUsedHitsdEdx() const;
int numberOfOverflowHitsdEdx() const;
unsigned long getHitPattern() const;
/** returns true if the detector type 'type' is hit.
@param type Please use the DetectorType enum to access the information (the internal
positions may change!)
......@@ -233,6 +257,8 @@ private: // data members
int m_nhitsdedx;
int m_nhitsoverflowdedx;
/**contains the 'hit pattern'*/
unsigned long m_idHitPattern;
......@@ -267,6 +293,11 @@ inline int Trk::TrackSummary::numberOfUsedHitsdEdx() const
return m_nhitsdedx;
}
inline int Trk::TrackSummary::numberOfOverflowHitsdEdx() const
{
return m_nhitsoverflowdedx;
}
inline bool Trk::TrackSummary::isHit(const Trk::DetectorType& type) const
{
// no range checking because people should be using enums
......@@ -289,5 +320,10 @@ std::ostream& operator<<(std::ostream& out, const TrackSummary& trackSum);
}
inline unsigned long Trk::TrackSummary::getHitPattern() const
{
return m_idHitPattern;
}
#endif
......@@ -20,6 +20,7 @@ Trk::TrackSummary::TrackSummary()
m_eProbability(numberOfeProbabilityTypes, 0.5),
m_dedx(-1),
m_nhitsdedx(-1),
m_nhitsoverflowdedx(-1),
m_idHitPattern(0),m_indetTrackSummary(0),m_muonTrackSummary(0)
{
#ifndef NDEBUG
......@@ -27,12 +28,13 @@ Trk::TrackSummary::TrackSummary()
#endif
}
Trk::TrackSummary::TrackSummary( const std::vector<int>& information, const std::vector<float>& eProbability, std::bitset<numberOfDetectorTypes>& hitPattern, float dedx, int nhitsdedx)
Trk::TrackSummary::TrackSummary( const std::vector<int>& information, const std::vector<float>& eProbability, std::bitset<numberOfDetectorTypes>& hitPattern, float dedx, int nhitsdedx, int noverflowdedx)
:
m_information( information ),
m_eProbability( eProbability ),
m_dedx(dedx),
m_nhitsdedx(nhitsdedx),
m_nhitsoverflowdedx(noverflowdedx),
m_idHitPattern( hitPattern.to_ulong() ),m_indetTrackSummary(0),m_muonTrackSummary(0)
{
#ifndef NDEBUG
......@@ -46,6 +48,7 @@ Trk::TrackSummary::TrackSummary( const TrackSummary& rhs )
m_eProbability(rhs.m_eProbability),
m_dedx(rhs.m_dedx),
m_nhitsdedx(rhs.m_nhitsdedx),
m_nhitsoverflowdedx(rhs.m_nhitsoverflowdedx),
m_idHitPattern(rhs.m_idHitPattern)
{
#ifndef NDEBUG
......@@ -65,6 +68,7 @@ Trk::TrackSummary& Trk::TrackSummary::operator=(const TrackSummary& rhs) {
m_eProbability = rhs.m_eProbability;
m_dedx = rhs.m_dedx;
m_nhitsdedx = rhs.m_nhitsdedx;
m_nhitsoverflowdedx = rhs.m_nhitsoverflowdedx;
m_idHitPattern = rhs.m_idHitPattern;
delete m_indetTrackSummary;
m_indetTrackSummary = rhs.m_indetTrackSummary ? new InDetTrackSummary(*rhs.m_indetTrackSummary) : 0;
......@@ -99,6 +103,7 @@ Trk::TrackSummary& Trk::TrackSummary::operator+=(const TrackSummary& ts)
if (m_dedx<0 && ts.m_dedx>=0) {
m_dedx=ts.m_dedx;
m_nhitsdedx=ts.m_nhitsdedx;
m_nhitsoverflowdedx = ts.m_nhitsoverflowdedx;
}
if (!m_muonTrackSummary) m_muonTrackSummary = ts.m_muonTrackSummary ? new MuonTrackSummary(*ts.m_muonTrackSummary) : 0;
if (!m_indetTrackSummary) m_indetTrackSummary = ts.m_indetTrackSummary ? new InDetTrackSummary(*ts.m_indetTrackSummary) :0;
......@@ -112,10 +117,14 @@ std::ostream& Trk::operator<<( std::ostream& out, const TrackSummary& trackSum )
{
out << "Persistant track summary information:"<<std::endl;
out << " * Number of contrib. Pixel Layer: "<<trackSum.get(numberOfContribPixelLayers)<<std::endl;
out << " * Number of B layer hits : "<<trackSum.get(numberOfBLayerHits)<<std::endl;
out << " * Number of B layer shared hits : "<<trackSum.get(numberOfBLayerSharedHits)<<std::endl;
out << " * Number of B layer outliers : "<<trackSum.get(numberOfBLayerOutliers)<<std::endl;
out << " * Expect B layer hits (0/1) : "<<trackSum.get(expectBLayerHit)<<endreq;
out << " * Number of Innermost Pixel layer hits : "<<trackSum.get(numberOfInnermostPixelLayerHits)<<std::endl;
out << " * Number of Innermost Pixel layer shared hits : "<<trackSum.get(numberOfInnermostPixelLayerSharedHits)<<std::endl;
out << " * Number of Innermost Pixel layer outliers : "<<trackSum.get(numberOfInnermostPixelLayerOutliers)<<std::endl;
out << " * Expect Innermost Pixel layer hits (0/1) : "<<trackSum.get(expectInnermostPixelLayerHit)<<endreq;
out << " * Number of Next-To-Innermost Pixel layer hits : "<<trackSum.get(numberOfNextToInnermostPixelLayerHits)<<std::endl;
out << " * Number of Next-To-Innermost Pixel layer shared hits : "<<trackSum.get(numberOfNextToInnermostPixelLayerSharedHits)<<std::endl;
out << " * Number of Next-To-Innermost Pixel layer outliers : "<<trackSum.get(numberOfNextToInnermostPixelLayerOutliers)<<std::endl;
out << " * Expect Next-To-Innermost Pixel layer hits (0/1) : "<<trackSum.get(expectNextToInnermostPixelLayerHit)<<endreq;
out << " * Number of pixel hits : "<<trackSum.get(numberOfPixelHits)<<std::endl;
out << " * Number of pixel outliers : "<<trackSum.get(numberOfPixelOutliers)<<std::endl;
out << " * Number of spoilt pixel hits : "<<trackSum.get(numberOfPixelSpoiltHits)<<std::endl;
......@@ -167,7 +176,7 @@ std::ostream& Trk::operator<<( std::ostream& out, const TrackSummary& trackSum )
out << " dE/dx from pixels : " << trackSum.getPixeldEdx() << " MeV g^-1 cm^2" << std::endl;
out << " number of hits used for dE/dx : " << trackSum.numberOfUsedHitsdEdx() << std::endl;
out << " number of overflow hits used for dE/dx : " << trackSum.numberOfOverflowHitsdEdx() << std::endl;
//this is a bit nasty, but I don't have access to internal data members
out << " Hit pattern (see DetectorType enum for meaning) : ";
for (int i=0; i<Trk::numberOfDetectorTypes; ++i)
......@@ -247,7 +256,7 @@ MsgStream& Trk::operator<<( MsgStream& out, const TrackSummary& trackSum )
out << " dE/dx from pixels : " << trackSum.getPixeldEdx() << " MeV g^-1 cm^2" << endreq;
out << " number of hits used for dE/dx : " << trackSum.numberOfUsedHitsdEdx() << endreq;
out << " number of overflow hits used for dE/dx : " << trackSum.numberOfOverflowHitsdEdx() << std::endl;
//this is a bit nasty, but I don't have access to internal data members
out << " Hit pattern (see DetectorType enum for meaning) : ";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment