]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Purity check is corrected
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Mar 2003 08:22:58 +0000 (08:22 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Mar 2003 08:22:58 +0000 (08:22 +0000)
PHOS/AliPHOSFastRecParticle.cxx

index a88c883810d3254eeb6f09335094d98ab95b249b..61cbe85d7c04cbc689fc78c01f2b1f43a7271a89 100644 (file)
@@ -173,10 +173,10 @@ Bool_t AliPHOSFastRecParticle::IsPhoton(const char* purity) const
   // photon-like shape is defined with a purity "low", "medium" or "high"
 
   Bool_t photonLike = kFALSE;
-  if      (purity == "low"   ) photonLike = TestPIDBit(6);
-  else if (purity == "medium") photonLike = TestPIDBit(7);
-  else if (purity == "high"  ) photonLike = TestPIDBit(8);
-  else Error("IsPhoton","Wrong purity type: %s",purity);
+  if      (strcmp(purity,"low")   ==0) photonLike = TestPIDBit(6);
+  else if (strcmp(purity,"medium")==0) photonLike = TestPIDBit(7);
+  else if (strcmp(purity,"high")  ==0) photonLike = TestPIDBit(8);
+  else Error("IsPhoton","Wrong purity type: \'%s\'",purity);
   if (photonLike                                   && //  photon by PCA
       (TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& //  fast by TOF
       (TestPIDBit(2)||TestPIDBit(1)||TestPIDBit(0)))  //  neutral by CPV
@@ -192,9 +192,9 @@ Bool_t AliPHOSFastRecParticle::IsPi0(const char* purity) const
   // pi0-like shape is defined with a purity "low", "medium" or "high"
 
   Bool_t pi0Like = kFALSE;
-  if      (purity == "low"   ) pi0Like = TestPIDBit(9);
-  else if (purity == "medium") pi0Like = TestPIDBit(10);
-  else if (purity == "high"  ) pi0Like = TestPIDBit(11);
+  if      (strcmp(purity,"low")   ==0) pi0Like = TestPIDBit(9);
+  else if (strcmp(purity,"medium")==0) pi0Like = TestPIDBit(10);
+  else if (strcmp(purity,"high")  ==0) pi0Like = TestPIDBit(11);
   else Error("IsPi0","Wrong purity type: %s",purity);
   if (pi0Like                                      && //  pi0 by PCA
       (TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& //  fast by TOF
@@ -211,9 +211,9 @@ Bool_t AliPHOSFastRecParticle::IsElectron(const char* purity) const
   // photon-like shape is defined with a purity "low", "medium" or "high"
 
   Bool_t photonLike = kFALSE;
-  if      (purity == "low"   ) photonLike = TestPIDBit(6);
-  else if (purity == "medium") photonLike = TestPIDBit(7);
-  else if (purity == "high"  ) photonLike = TestPIDBit(8);
+  if      (strcmp(purity,"low")   ==0) photonLike = TestPIDBit(6);
+  else if (strcmp(purity,"medium")==0) photonLike = TestPIDBit(7);
+  else if (strcmp(purity,"high")  ==0) photonLike = TestPIDBit(8);
   else Error("IsElectron","Wrong purity type: %s",purity);
   if (photonLike                                   && //  photon by PCA
       (TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& //  fast by TOF