Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]

001 /***************************************************************************
002                           TrackParticle.h  -  Description
003                              -------------------
004     begin   : 27-02-2004
005     authors : Andreas Wildauer (CERN PH-ATC), Fredrik Akesson (CERN PH-ATC)
006     email   : andreas.wildauer@cern.ch, fredrik.akesson@cern.ch
007     changes :
008     
009  ***************************************************************************/
010 #ifndef RECPARTICLE_TRACKPARTICLE_H
011 #define RECPARTICLE_TRACKPARTICLE_H
012 
013 // includes for inheritance
014 #include "FourMom/P4PxPyPzE.h"
015 #include "Navigation/Navigable.h"
016 #include "EventKernel/INavigable4Momentum.h"
017 
018 // includes for datamembers
019 #include "DataModel/ElementLink.h"
020 #include "TrkTrack/TrackCollection.h"
021 #include "VxVertex/VxContainer.h"
022 
023 #include "VxVertex/RecVertex.h"
024 #include "TrkTrack/Track.h"
025 #include "TrkParameters/MeasuredPerigee.h"
026 #include "TrkParametersBase/ParametersBase.h"
027 #include "TrkTrackSummary/TrackSummary.h"
028 #include "TrkTrack/TrackCollection.h"
029 #include "TrkEventPrimitives/FitQuality.h"
030 
031 #include "TrkParticleBase/TrackParticleBase.h"
032 #include "SGTools/BaseInfo.h"
033 
034 class MsgStream;
035 
036 namespace Rec
037 {
038   class TrackParticle :
039       virtual public INavigable4Momentum,
040       public Trk::TrackParticleBase, 
041       public P4PxPyPzE ,  
042       public NavigableTerminalNode
043 
044   {
045   public:
046 
047     /** Constructor 0
048     standard constructor which sets everything to 0, needed for persistency */
049     TrackParticle();
050     
051     /** 'Beautiful' TrackParticle Constructor. 
052     @param  trk Track used to create this object. Since an ElementLink is used to store the object, 
053                 setStorableObject(const TrackCollection* trackColl) must be called to set persistency.
054     @param  trkPrtOrigin See TrackParticleOrigin for definitions, but should be set to NoVtx if no Trk::VxCandidate pointer is passed.
055     @param  vxCandidate Pointer to the Trk::VxCandidate used to create this TrackParticle.
056     @param  trkSummary Summary object of this TrackParticle (should be created with Trk::TrackSummaryTool). Will be owned by this TrackParticle.
057     @param  parameters std::vector of Trk::ParametersBase which describe this Trk::TrackParticle. Ownership of these Trk::ParametersBase objects passes to TrackParticle 
058             (so if you copied them from a Trk::Track, make sure you didn't just copy the pointers but actually created new objects, for example, by using clone() )
059     @param  definingParameter The Trk::ParametersBase which defines the charge and 4-momentum of this TrackParticle. 
060             This will be appended to the vector of parameters passed before, so please make sure that it is *NOT* already contained in that!
061     @param fitQuality Trk::FitQuality which describes this Trk::TrackParticle. Will be owned by this TrackParticle. 
062 
063 @warning You MUST pass in a valid 'definingParameter' and this 'definingParameter' must NOT be part of the std::vector<const Trk::ParametersBase*> passed.
064     */  
065     TrackParticle(  const Trk::Track*                                       trk, 
066                     const Trk::TrackParticleOrigin                          trkPrtOrigin, 
067                     const Trk::VxCandidate*                                 vxCandidate, 
068                     const Trk::TrackSummary*                                trkSummary, 
069                     std::vector<const Trk::ParametersBase*>&                parameters,
070                     const Trk::ParametersBase*                              definingParameter,
071                     const Trk::FitQuality*                                  fitQuality);   
072  
073     /** Copy constructor */
074     TrackParticle(const TrackParticle &);
075 
076     /** Assignment operator */
077     TrackParticle &operator= (const TrackParticle &);
078     
079     /** Destructor */
080     virtual ~TrackParticle();  
081     
082     /** Accessor method for MeasuredPerigee.
083     @return MeasuredPerigee used to make this object
084     @warning A TrackParticle is REQUIRED to have a Trk::MeasuredPerigee and so this pointer should never be zero, however internally it 
085     is cached using a dynamic_cast and so in principle this cast could fail if the object is constructed improperly. 
086     There is an assert to test this in debug.
087     @warning This method should properly return the MeasuredPerigee by reference,
088     but it is a bit late to make interface changes this close to 13.0.0*/
089     const Trk::MeasuredPerigee* measuredPerigee() const; 
090 
091     /** Slimming methods used to reduce the TrackParticle content and size that may be called 
092        by users when making DPDs */
093 
094     /** removeSummary to delete and set summary to null */ 
095     void removeSummary();
096 
097     /** removeFitQuality to delete the fit quality object */
098     void removeFitQuality();
099 
100     /** removeErrorMatrix to delete the error matrix. This uses the cloneWithoutError() method of
101        measuredPerigee() to create a Perigee() and replace the existing MeasuredPerigee with a Perigee */
102     void removeErrorMatrix();
103     
104     /** Dump methods to be used by the overloaded stream operator (inheritance!) */
105     virtual MsgStream&    dump( MsgStream& out ) const ;
106     virtual std::ostream& dump( std::ostream& out ) const ;
107     
108 private:
109     /**Cached pointer to the MeasuredPerigee (if one was used to create this class).
110     It is required that Trk::TrackParticleBase::definingParameters() is actually a MeasuredPerigee. If not then
111     this call just returns a 0 pointer.*/
112     mutable const Trk::MeasuredPerigee*       m_cachedMeasuredPerigee;
113     };
114 }
115 
116 
117 SG_BASES2 (Rec::TrackParticle,
118            SG_VIRTUAL(INavigable4Momentum),
119            Trk::TrackParticleBase);
120 
121 inline const Trk::MeasuredPerigee* Rec::TrackParticle::measuredPerigee() const
122 {
123     if (0==m_cachedMeasuredPerigee){
124         m_cachedMeasuredPerigee = dynamic_cast<const Trk::MeasuredPerigee*>( &definingParameters() );
125     }
126     return m_cachedMeasuredPerigee;
127 }
128   
129   /**
130   * Overload of << operator for MsgStream for debug output
131   */ 
132   MsgStream& operator << ( MsgStream& sl, const Rec::TrackParticle& trackParticle);
133 
134   /**
135   * Overload of << operator for std::ostream for debug output
136   */ 
137   std::ostream& operator << ( std::ostream& sl, const Rec::TrackParticle& trackParticle);
138 
139 #endif

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!