X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PHOS%2FAliPHOSFastRecParticle.cxx;h=6c39d45aff83a1a9ba0dc61ec73e13d4ed0ea4d6;hp=367fc68c018d564edadcce3c00f011d9ea6e1389;hb=1d2a91c902e1cde1856e52d9c653bfc9c7cd7777;hpb=43dc52706a5e6f5148428a99131d09f64c4e0877 diff --git a/PHOS/AliPHOSFastRecParticle.cxx b/PHOS/AliPHOSFastRecParticle.cxx index 367fc68c018..6c39d45aff8 100644 --- a/PHOS/AliPHOSFastRecParticle.cxx +++ b/PHOS/AliPHOSFastRecParticle.cxx @@ -15,6 +15,14 @@ /* $Id$ */ +/* History of cvs commits: + * + * $Log$ + * Revision 1.39 2005/05/28 14:19:04 schutz + * Compilation warnings fixed by T.P. + * + */ + //_________________________________________________________________________ // A Particle modified by PHOS response and produced by AliPHOSvFast // To become a general class of AliRoot ? @@ -29,27 +37,30 @@ // --- Standard library --- // --- AliRoot header files --- - +#include "AliLog.h" #include "AliPHOSFastRecParticle.h" #include "TPad.h" #include "TPaveText.h" -ClassImp(AliPHOSFastRecParticle) ; +ClassImp(AliPHOSFastRecParticle) //____________________________________________________________________________ -AliPHOSFastRecParticle::AliPHOSFastRecParticle() : TParticle() +AliPHOSFastRecParticle::AliPHOSFastRecParticle() : + fIndexInList(0), + fTof(0.f), + fType(0) { // ctor - fType = 0 ; } //____________________________________________________________________________ AliPHOSFastRecParticle::AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) - : TParticle(rp) + : TParticle(rp), + fIndexInList(rp.fIndexInList),//? + fTof(rp.fTof),//? + fType(rp.fType) { // copy ctor - - fType = rp.fType ; fPdgCode = rp.fPdgCode; fStatusCode = rp.fStatusCode; fMother[0] = rp.fMother[0]; @@ -72,13 +83,14 @@ AliPHOSFastRecParticle::AliPHOSFastRecParticle() : TParticle() } //____________________________________________________________________________ - AliPHOSFastRecParticle::AliPHOSFastRecParticle(const TParticle & pp) + AliPHOSFastRecParticle::AliPHOSFastRecParticle(const TParticle & pp) : + fIndexInList(0), + fTof(0.f), + fType(0) { // ctor from a TParticle (crummy?!) - TParticle & pnoconst = (TParticle &)(pp) ; AliPHOSFastRecParticle & p = (AliPHOSFastRecParticle &)(pnoconst) ; - fType = 0 ; fPdgCode = p.fPdgCode; fStatusCode = p.fStatusCode; fMother[0] = p.fMother[0]; @@ -198,7 +210,8 @@ Bool_t AliPHOSFastRecParticle::IsPi0(TString purity) const if (purity == "low" ) pi0Like = TestPIDBit(9); else if (purity == "medium") pi0Like = TestPIDBit(10); else if (purity == "high" ) pi0Like = TestPIDBit(11); - else Error("IsPi0","Wrong purity type: %s",purity.Data()); + else + AliError(Form("Wrong purity type: %s",purity.Data())); if (pi0Like && // pi0 by PCA (TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& // fast by TOF (TestPIDBit(2)||TestPIDBit(1)||TestPIDBit(0))&& // neutral by CPV @@ -219,7 +232,8 @@ Bool_t AliPHOSFastRecParticle::IsElectron(TString purity) const if (purity == "low" ) photonLike = TestPIDBit(6); else if (purity == "medium") photonLike = TestPIDBit(7); else if (purity == "high" ) photonLike = TestPIDBit(8); - else Error("IsElectron","Wrong purity type: %s",purity.Data()); + else + AliError(Form("Wrong purity type: %s",purity.Data())); if (photonLike && // photon by PCA (TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& // fast by TOF @@ -241,7 +255,8 @@ Bool_t AliPHOSFastRecParticle::IsEleCon(TString purity) const if (purity == "low" ) photonLike = TestPIDBit(6); else if (purity == "medium") photonLike = TestPIDBit(7); else if (purity == "high" ) photonLike = TestPIDBit(8); - else Error("IsElectron","Wrong purity type: %s",purity.Data()); + else + AliError(Form("Wrong purity type: %s",purity.Data())); if (photonLike && // photon by PCA (TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& // fast by TOF @@ -486,24 +501,35 @@ void AliPHOSFastRecParticle::Paint(Option_t *) } //____________________________________________________________________________ -void AliPHOSFastRecParticle::Print()const +void AliPHOSFastRecParticle::Print(const Option_t *)const { // Print the type, energy and momentum of the reconstructed particle - TString message ; - message = "\n PID bits are %d%d%d %d%d%d %d%d%d %d%d%d" ; - message += ", type is \"%s\"\n" ; - message += " (E,Px,Py,Pz) = (% .3e, % .3e, % .3e, % .3e) GeV\n" ; - Info("Print", message.Data(), - TestPIDBit(0),TestPIDBit(1), - TestPIDBit(2),TestPIDBit(3), - TestPIDBit(4),TestPIDBit(5), - TestPIDBit(6),TestPIDBit(7), - TestPIDBit(8),TestPIDBit(9), - TestPIDBit(10),TestPIDBit(11), - Name().Data(), - Energy(), - Px(), - Py(), - Pz() ); + AliInfo(Form("Print", "-----------------------------")) ; + printf("PID bits are %d%d%d %d%d%d %d%d%d %d%d%d", + TestPIDBit(0),TestPIDBit(1), + TestPIDBit(2),TestPIDBit(3), + TestPIDBit(4),TestPIDBit(5), + TestPIDBit(6),TestPIDBit(7), + TestPIDBit(8),TestPIDBit(9), + TestPIDBit(10),TestPIDBit(11)) ; + printf(", type is \"%s\"\n", Name().Data()) ; + printf(" (E,Px,Py,Pz) = (% .3e, % .3e, % .3e, % .3e) GeV\n", + Energy(), + Px(), + Py(), + Pz() ) ; + printf(" TOF = %.3e ns\n", ToF() ) ; + printf(" PID weight: \n" ) ; + printf(" photon -> %f\n", fPID[AliPID::kPhoton] ) ; + printf(" electron -> %f\n", fPID[AliPID::kElectron] ) ; + printf(" Conversion electron -> %f\n", fPID[AliPID::kEleCon] ) ; + printf(" muon -> %f\n", fPID[AliPID::kMuon] ) ; + printf(" neutral pion -> %f\n", fPID[AliPID::kPi0] ) ; + printf(" charged pion -> %f\n", fPID[AliPID::kPion] ) ; + printf(" charged kaon -> %f\n", fPID[AliPID::kKaon] ) ; + printf(" neutral kaon -> %f\n", fPID[AliPID::kKaon0] ) ; + printf(" proton -> %f\n", fPID[AliPID::kProton] ) ; + printf(" neutron -> %f\n", fPID[AliPID::kNeutron] ) ; + }