X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSTrackSegment.cxx;h=fa359cd08212868b176e62d3ec3b62b4e8223bfc;hb=2bfd0c8f078717ff70f8c69743b13a4d2020c145;hp=e00d52a5d0b4d457ef2300115bce56e3f6f72deb;hpb=2731cd1e25d597f63ec4341cc5b3c4b90ef1d012;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSTrackSegment.cxx b/PHOS/AliPHOSTrackSegment.cxx index e00d52a5d0b..fa359cd0821 100644 --- a/PHOS/AliPHOSTrackSegment.cxx +++ b/PHOS/AliPHOSTrackSegment.cxx @@ -13,11 +13,17 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ + +/* History of cvs commits: + * + * $Log$ + */ + //_________________________________________________________________________ // Track segment in PHOS // Can be : 1 EmcRecPoint -// 1 EmcRecPoint + 1 PPSD -// 1 EmcRecPoint + 1 PPSD + 1 PPSD +// 1 EmcRecPoint + 1 CPV +// 1 EmcRecPoint + 1 CPV + 1 charged track // //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH) @@ -26,18 +32,16 @@ // --- Standard library --- -#include - // --- AliRoot header files --- - +#include "AliPHOSEmcRecPoint.h" #include "AliPHOSTrackSegment.h" +#include "AliESDtrack.h" ClassImp(AliPHOSTrackSegment) //____________________________________________________________________________ AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , - AliPHOSRecPoint * ppsdrp1, - AliPHOSRecPoint * ppsdrp2 ) + AliPHOSRecPoint * cpvrp1) { // ctor @@ -46,21 +50,41 @@ AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , else fEmcRecPoint = -1 ; - if( ppsdrp1 ) - fPpsdUpRecPoint = ppsdrp1->GetIndexInList() ; + if( cpvrp1 ) + fCpvRecPoint = cpvrp1->GetIndexInList() ; else - fPpsdUpRecPoint = -1 ; + fCpvRecPoint = -1 ; + + fTrack = -1 ; + + fIndexInList = -1 ; +} + +//____________________________________________________________________________ +AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , + AliPHOSRecPoint * cpvrp1, + Int_t track) +{ + // ctor - if( ppsdrp2 ) - fPpsdLowRecPoint = ppsdrp2->GetIndexInList() ; + if( emc ) + fEmcRecPoint = emc->GetIndexInList() ; else - fPpsdLowRecPoint = -1 ; + fEmcRecPoint = -1 ; + + if( cpvrp1 ) + fCpvRecPoint = cpvrp1->GetIndexInList() ; + else + fCpvRecPoint = -1 ; + + fTrack = track ; fIndexInList = -1 ; } //____________________________________________________________________________ AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts) + : TObject(ts) { // Copy ctor @@ -69,46 +93,44 @@ AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts) //____________________________________________________________________________ -void AliPHOSTrackSegment::Copy(TObject & obj) +void AliPHOSTrackSegment::Copy(TObject & obj) const { // Copy of a track segment into another track segment TObject::Copy(obj) ; ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ; - ( (AliPHOSTrackSegment &)obj ).fPpsdLowRecPoint = fPpsdLowRecPoint ; - ( (AliPHOSTrackSegment &)obj ).fPpsdUpRecPoint = fPpsdUpRecPoint ; + ( (AliPHOSTrackSegment &)obj ).fCpvRecPoint = fCpvRecPoint ; ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ; -} + ( (AliPHOSTrackSegment &)obj ).fTrack = fTrack ; +} + //____________________________________________________________________________ -void AliPHOSTrackSegment::Print(Option_t * opt) +void AliPHOSTrackSegment::Print(const Option_t *) const { // Print all information on this track Segment - cout << "--------AliPHOSTrackSegment-------- "<= 0) - cout << "CPV RecPoint # " << fPpsdUpRecPoint << endl ; + Info("Print", ""); + printf("Stored at position %d\n", fIndexInList) ; + printf(" Emc RecPoint # %d\n", fEmcRecPoint) ; + if(fCpvRecPoint >= 0) + printf(" CPV RecPoint # %d\n", fCpvRecPoint) ; else - cout << "No CPV RecPoint " << endl ; - - if(fPpsdLowRecPoint >= 0) - cout << "PPSD RecPoint # " << fPpsdLowRecPoint << endl ; + printf(" No CPV RecPoint\n"); + if (fTrack >= 0) + printf(" Charged track # %d\n", fTrack) ; else - cout << "No PPSD RecPoint " << endl ; - - cout << "------------------------------------ " << endl ; - + printf(" No Charged track\n"); } + //____________________________________________________________________________ -void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * PpsdUpRecPoint) +void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * cpvRecPoint) { // gives an id from its position in the list - if( PpsdUpRecPoint ) - fPpsdUpRecPoint = PpsdUpRecPoint->GetIndexInList() ; + if( cpvRecPoint ) + fCpvRecPoint = cpvRecPoint->GetIndexInList() ; else - fPpsdUpRecPoint = -1 ; + fCpvRecPoint = -1 ; }