]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetCorrel/CorrelKFTrack.cxx
cd98febbb6c7ba97ec6e5db38cddafd065b4593b
[u/mrichter/AliRoot.git] / PWG4 / JetCorrel / CorrelKFTrack.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /* $Id: $ */
16
17 //__________________________________________________
18 // Container class for a track with AliKF parameters
19 //-- Author: Paul Constantin
20
21 #include "CorrelKFTrack.h"
22
23 using namespace std;
24
25 CorrelKFTrack_t::CorrelKFTrack_t() : CorrelParticle_t(), fParam(NULL), fCovar(NULL){
26   // default constructor:
27 }
28
29 CorrelKFTrack_t::CorrelKFTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, PartType_t i, 
30                                    Double_t* par, Double_t* cov) : 
31   CorrelParticle_t(pt,p,e,m,i), fParam(par), fCovar(cov){
32   // constructor:
33 }
34
35 CorrelKFTrack_t::CorrelKFTrack_t(const CorrelKFTrack_t &p) : 
36   CorrelParticle_t(p.fPt,p.fPhi,p.fEta,p.fMass,p.fID), fParam(p.fParam), fCovar(p.fCovar){
37   // copy constructor:
38 }
39
40 CorrelKFTrack_t& CorrelKFTrack_t::operator=(const CorrelKFTrack_t& rhs){
41   fPt      = rhs.Pt()*rhs.Q();
42   fPhi     = rhs.Phi();
43   fEta     = rhs.Eta();
44   fMass    = rhs.M();
45   fID      = rhs.ID();
46   fParam   = rhs.Param();
47   fCovar   = rhs.Covar();
48   return *this;
49 }
50
51 CorrelKFTrack_t* CorrelKFTrack_t::Copy(){
52   // creates and returns a copy object
53   CorrelKFTrack_t *copy = new CorrelKFTrack_t;
54   copy->fPt    = this->Pt()*this->Q();
55   copy->fPhi   = this->Phi();
56   copy->fEta   = this->Eta();
57   copy->fMass  = this->M();
58   copy->fID    = this->ID();
59   copy->fParam = this->Param();
60   copy->fCovar = this->Covar();
61   return copy;
62 }
63
64 void CorrelKFTrack_t::Show(){
65   // printout method
66   std::cout<<" Electron pT="<<Pt()<<" phi="<<Phi()<<" eta="<<Eta()<<" m="<<M()<<" id="<<ID()
67            <<" param="<<Param()<<" covar="<<Covar()<<std::endl;
68 }