+// -*- Mode: C++ -*-
#ifndef ALIHLTMUONDECISION_H
#define ALIHLTMUONDECISION_H
/* This file is property of and copyright by the ALICE HLT Project *
* ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-/* $Id: $ */
+// $Id$
///
/// @file AliHLTMUONDecision.h
#include "TObject.h"
#include "TClonesArray.h"
+class AliHLTMUONTrack;
class AliHLTMUONMansoTrack;
/**
Float_t pt = -1,
Bool_t passedLowCut = kFALSE,
Bool_t passedHighCut = kFALSE,
- const AliHLTMUONMansoTrack* track = NULL
+ const TObject* track = NULL
) :
TObject(), fTrack(track), fPt(pt),
fPassedLowCut(passedLowCut), fPassedHighCut(passedHighCut)
* do not take ownership of the track object.
*/
AliTrackDecision(const AliTrackDecision& obj) :
- TObject(), fTrack(obj.fTrack), fPt(obj.fPt),
+ TObject(obj), fTrack(obj.fTrack), fPt(obj.fPt),
fPassedLowCut(obj.fPassedLowCut), fPassedHighCut(obj.fPassedHighCut)
{}
* Asignment operators performs shallow copy of object since we
* do not take ownership of the track object.
*/
- const AliTrackDecision& operator = (const AliTrackDecision& obj)
+ AliTrackDecision& operator = (const AliTrackDecision& obj)
{
- memcpy(this, &obj, sizeof(AliTrackDecision));
+ if (this==&obj) return *this;
+ TObject::operator = (obj);
+ fTrack = obj.fTrack; fPt = obj.fPt;
+ fPassedLowCut = obj.fPassedLowCut; fPassedHighCut = obj.fPassedHighCut;
return *this;
}
/**
* Returns the track associated with the trigger decision or NULL if none found.
*/
- const AliHLTMUONMansoTrack* Track() const { return fTrack; }
+ const TObject* Track() const { return fTrack; }
+
+ /**
+ * Returns the track associated with the trigger decision as a Manso track object.
+ * NULL is returned if no track is found or the track object is not a Manso track.
+ */
+ const AliHLTMUONMansoTrack* MansoTrack() const;
+
+ /**
+ * Returns the track associated with the trigger decision as a full track object.
+ * NULL is returned if no track is found or the track object is not a full track.
+ */
+ const AliHLTMUONTrack* FullTrack() const;
/**
* Returns the calculated pT value used for the trigger decision.
private:
- const AliHLTMUONMansoTrack* fTrack; ///< Track associated with this decision.
+ const TObject* fTrack; ///< Track associated with this decision.
Float_t fPt; ///< Calculated pT value used for decision (GeV/c).
Bool_t fPassedLowCut; ///< Indicates if the track passed the low pT cut.
Bool_t fPassedHighCut; ///< Indicates if the track passed the high pT cut.
- ClassDef(AliHLTMUONDecision::AliTrackDecision, 2); // A single track dHLT trigger decision object.
+ ClassDef(AliHLTMUONDecision::AliTrackDecision, 4); // A single track dHLT trigger decision object.
};
/**
Float_t mass = -1, Bool_t passedLowCut = kFALSE,
Bool_t passedHighCut = kFALSE, Bool_t unlike = kFALSE,
UChar_t lowPtCount = 0, UChar_t highPtCount = 0,
- const AliHLTMUONMansoTrack* trackA = NULL,
- const AliHLTMUONMansoTrack* trackB = NULL
+ const TObject* trackA = NULL,
+ const TObject* trackB = NULL
) :
TObject(), fTrackA(trackA), fTrackB(trackB), fMass(mass),
fPassedLowCut(passedLowCut), fPassedHighCut(passedHighCut),
* do not take ownership of the track objects.
*/
AliPairDecision(const AliPairDecision& obj) :
- TObject(), fTrackA(obj.fTrackA), fTrackB(obj.fTrackB), fMass(obj.fMass),
+ TObject(obj), fTrackA(obj.fTrackA), fTrackB(obj.fTrackB), fMass(obj.fMass),
fPassedLowCut(obj.fPassedLowCut), fPassedHighCut(obj.fPassedHighCut),
fUnlike(obj.fUnlike), fLowPtCount(obj.fLowPtCount), fHighPtCount(obj.fHighPtCount)
{}
* Asignment operators performs shallow copy of object since we
* do not take ownership of the track objects.
*/
- const AliPairDecision& operator = (const AliPairDecision& obj)
+ AliPairDecision& operator = (const AliPairDecision& obj)
{
- memcpy(this, &obj, sizeof(AliPairDecision));
+ if (this==&obj) return *this;
+ TObject::operator = (obj);
+ fTrackA = obj.fTrackA; fTrackB = obj.fTrackB; fMass = obj.fMass; fPassedLowCut = obj.fPassedLowCut;
+ fPassedHighCut = obj.fPassedHighCut; fUnlike = obj.fUnlike; fLowPtCount = obj.fLowPtCount; fHighPtCount = obj.fHighPtCount;
return *this;
}
* Returns the first track associated with the track pair trigger decision
* or NULL if none found.
*/
- const AliHLTMUONMansoTrack* TrackA() const { return fTrackA; }
+ const TObject* TrackA() const { return fTrackA; }
+
+ /**
+ * Returns the first track associated with the pair decision as a Manso track object.
+ * NULL is returned if no track is found or the track object is not a Manso track.
+ */
+ const AliHLTMUONMansoTrack* MansoTrackA() const;
+
+ /**
+ * Returns the first track associated with the pair decision as a full track object.
+ * NULL is returned if no track is found or the track object is not a full track.
+ */
+ const AliHLTMUONTrack* FullTrackA() const;
/**
* Returns the second track associated with the track pair trigger decision
* or NULL if none found.
*/
- const AliHLTMUONMansoTrack* TrackB() const { return fTrackB; }
+ const TObject* TrackB() const { return fTrackB; }
+
+ /**
+ * Returns the second track associated with the pair decision as a Manso track object.
+ * NULL is returned if no track is found or the track object is not a Manso track.
+ */
+ const AliHLTMUONMansoTrack* MansoTrackB() const;
+
+ /**
+ * Returns the second track associated with the pair decision as a full track object.
+ * NULL is returned if no track is found or the track object is not a full track.
+ */
+ const AliHLTMUONTrack* FullTrackB() const;
/**
* Returns the calculated invariant mass value used for the trigger decision.
private:
- const AliHLTMUONMansoTrack* fTrackA; ///< The first track associated with this pair decision.
- const AliHLTMUONMansoTrack* fTrackB; ///< The second track associated with this pair decision.
+ const TObject* fTrackA; ///< The first track associated with this pair decision.
+ const TObject* fTrackB; ///< The second track associated with this pair decision.
Float_t fMass; ///< The invariant mass used for the trigger decision. (GeV/c^2)
Bool_t fPassedLowCut; ///< Indicates if the track passed the low mass cut.
Bool_t fPassedHighCut; ///< Indicates if the track passed the high mass cut.
UChar_t fLowPtCount; ///< The number of tracks in the pair that passed the low pT cut.
UChar_t fHighPtCount; ///< The number of tracks in the pair that passed the high pT cut.
- ClassDef(AliHLTMUONDecision::AliPairDecision, 2); // A track pair dHLT trigger decision object.
+ ClassDef(AliHLTMUONDecision::AliPairDecision, 4); // A track pair dHLT trigger decision object.
};
/**
/// Add a single track decision to the dHLT trigger.
void AddDecision(
Float_t pt, Bool_t passedLowCut, Bool_t passedHighCut,
- const AliHLTMUONMansoTrack* track
+ const TObject* track
);
/// Add a track pair decision to the dHLT trigger.
Float_t mass, Bool_t passedLowCut,
Bool_t passedHighCut, Bool_t unlike,
UChar_t lowPtCount, UChar_t highPtCount,
- const AliHLTMUONMansoTrack* trackA,
- const AliHLTMUONMansoTrack* trackB
+ const TObject* trackA, const TObject* trackB
);
/**
TClonesArray fTrackDecisions; ///< Array of single track decision objects.
TClonesArray fPairDecisions; ///< Array of track pair decision objects.
- ClassDef(AliHLTMUONDecision, 2); // Decision object containing data converted from raw internal dHLT data structures.
+ ClassDef(AliHLTMUONDecision, 4); // Decision object containing data converted from raw internal dHLT data structures.
};
#endif // ALIHLTMUONDECISION_H