Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

AlMuon.cpp

Go to the documentation of this file.
00001 
00002 //
00003 // Implementation of
00004 // CLASS AlMuon:
00005 // Concrete class for AlMuon Objects, inherits from "QvecBase"
00006 //
00007 // Author : C. Delaere, V. Lemaitre, O. van der Aa
00008 //
00010 
00011 #include "AlMuon.h"
00012 #include "AlEflw.h"
00013 #include "AlTrack.h"
00014 #include "BankClasses.h"
00015 
00016 // default constructor : does nothing
00017 AlMuon::AlMuon()
00018 {  
00019   _theAssocEflw = NULL;
00020   _theAssocTrack = NULL;
00021 }
00022 
00023 // copy constructor :
00024 AlMuon::AlMuon(const AlMuon& oldMU):QvecBase(oldMU)
00025 { 
00026   _theAssocEflw = oldMU._theAssocEflw;
00027   _theAssocTrack = oldMU._theAssocTrack;
00028 }
00029 
00030 // *Normal QvecBase methods (overwritten here)
00031 
00032 void AlMuon::Lock(bool recurse)
00033 {
00034   if (recurse && (_theAssocEflw != NULL) )  _theAssocEflw->Lock(1);
00035   if (recurse && (_theAssocTrack != NULL) )  _theAssocTrack->Lock(1);
00036   _locked = 1;
00037 }
00038 void AlMuon::unLock(bool recurse)
00039 {
00040   if (recurse && (_theAssocEflw != NULL) )  _theAssocEflw->unLock(1);
00041   if (recurse && (_theAssocTrack != NULL) )  _theAssocTrack->unLock(1);
00042   _locked = 0;
00043 }
00044 
00045 // *Special methods for the AlMuon objects only
00046 
00047 // set the assoc. Eflw
00048 // Since there may be no associated Eflw,
00049 // it is beter to set the track before.
00050 void AlMuon::setEflw(AlEflw* theEflw)
00051 {
00052   _theAssocEflw = theEflw;
00053   if ( _theAssocEflw != NULL ) 
00054    {
00055      //_A4V    = _theAssocEflw->A4V();
00056      //_qch    = _theAssocEflw->QCH();
00057    }
00058 }
00059 
00060 // get the assoc. Eflw
00061 AlEflw* AlMuon::getEflw() const
00062 {
00063   return _theAssocEflw;
00064 }
00065 
00066 // set the assoc. Track
00067 // the associated track should always be != NULL
00068 void AlMuon::setTrack(AlTrack* theTrack)
00069 {
00070   _theAssocTrack = theTrack;
00071   if ( _theAssocTrack != NULL )
00072    {
00073      _A4V    = _theAssocTrack->A4V();
00074      _qch    = _theAssocTrack->QCH();
00075    }
00076 }
00077 
00078 // get the assoc. Track
00079 AlTrack* AlMuon::getTrack()const
00080 {
00081   return _theAssocTrack;
00082 }
00083 
00097 int   AlMuon::IF() const{ if ( _theAssocTrack != NULL && 
00098                           _theAssocTrack -> Qvec() -> QD != NULL && 
00099                           _theAssocTrack -> Qvec() -> QD -> MU != NULL )
00100                         return _theAssocTrack -> Qvec() -> QD -> MU -> IF;
00101                       else
00102                         return -1; }
00103 float AlMuon::SR() const{ if ( _theAssocTrack != NULL &&
00104                           _theAssocTrack -> Qvec() -> QD != NULL && 
00105                           _theAssocTrack -> Qvec() -> QD -> MU != NULL )
00106                         return _theAssocTrack -> Qvec() -> QD -> MU -> SR;
00107                       else
00108                         return -1; }
00109 float AlMuon::DM() const{ if ( _theAssocTrack != NULL &&
00110                           _theAssocTrack -> Qvec() -> QD != NULL &&
00111                           _theAssocTrack -> Qvec() -> QD -> MU != NULL )
00112                         return _theAssocTrack -> Qvec() -> QD -> MU -> DM;
00113                       else
00114                         return -1; }
00115 int   AlMuon::ST() const{ if ( _theAssocTrack != NULL &&
00116                           _theAssocTrack -> Qvec() -> QD != NULL && 
00117                           _theAssocTrack -> Qvec() -> QD -> MU != NULL )
00118                         return _theAssocTrack -> Qvec() -> QD -> MU -> ST;
00119                       else
00120                         return -1; }
00121 int   AlMuon::TN() const{ if ( _theAssocTrack != NULL &&
00122                           _theAssocTrack -> Qvec() -> QD != NULL && 
00123                           _theAssocTrack -> Qvec() -> QD -> MU != NULL )
00124                         return _theAssocTrack -> Qvec() -> QD -> MU -> TN;
00125                       else
00126                         return -1; }
00127 
00128 

Generated at Wed Jun 18 17:19:10 2003 for ALPHA++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001