]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSIhepAnalyze.cxx
Coverity fix
[u/mrichter/AliRoot.git] / PHOS / AliPHOSIhepAnalyze.cxx
index f2d0cf5a626a3520fc9604b115c561f86067b1a1..83e7bc654a815ba5712d404841bc71de1e4a5d81 100644 (file)
@@ -43,6 +43,7 @@
 #include "AliHeader.h"
 
 // --- PHOS header files ---
+#include "AliLog.h"
 #include "AliPHOSIhepAnalyze.h"
 #include "AliPHOSDigit.h"
 #include "AliPHOSRecParticle.h"
 ClassImp(AliPHOSIhepAnalyze)
 
 //____________________________________________________________________________
-
-AliPHOSIhepAnalyze::AliPHOSIhepAnalyze() 
- {
-   fRunLoader = 0x0;
- }
+AliPHOSIhepAnalyze::AliPHOSIhepAnalyze():
+  fRunLoader(0),
+  fFileName()
+{
+}
 
 //____________________________________________________________________________
-
-AliPHOSIhepAnalyze::AliPHOSIhepAnalyze(Text_t * name) : fFileName(name) {
+AliPHOSIhepAnalyze::AliPHOSIhepAnalyze(Text_t * name) : 
+  fRunLoader(0),
+  fFileName(name)
+{
   // Constructor: open a header file
   fRunLoader = AliRunLoader::Open(fFileName);
   if (fRunLoader == 0x0)
    {
-     Fatal("AliPHOSIhepAnalyze","Can not load event from file %s",name);
+     AliFatal(Form("Can not load event from file %s",name));
    }
- }
+}
 
 //____________________________________________________________________________
 void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
@@ -106,39 +109,39 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("AnalyzeCPV1","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
 
-  const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance() ;
 
-  Info("AnalyzeCPV1", "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths") ;
+  AliInfo(Form("Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths")) ;
   for ( Int_t ievent=0; ievent<Nevents; ievent++) {  
     
     Int_t nTotalGen = 0;
     Int_t nChargedGen = 0;
 
     Int_t ntracks = gAlice->GetEvent(ievent);
-    Info("AnalyzeCPV1", ">>>>>>>Event %d .<<<<<<<", ievent) ;
+    AliInfo(Form(">>>>>>>Event %d .<<<<<<<", ievent)) ;
     
   /******************************************************************/
       TTree* treeH = please->TreeH();
       if (treeH == 0x0)
        {
-         Error("AnalyzeCPV1","Can not get TreeH");
+        AliError(Form("Can not get TreeH"));
          return;
        }
 /******************************************************************/     
 
     // Get branch of CPV impacts
     if (! (branchCPVimpacts =treeH->GetBranch("PHOSCpvImpacts")) ) {
-      Info("AnalyzeCPV1", "Couldn't find branch PHOSCpvImpacts. Exit.") ;
+      AliWarning(Form("Couldn't find branch PHOSCpvImpacts. Exit.")) ;
       return;
     }
  
     // Create and fill arrays of hits for each CPV module
       
-    Int_t nOfModules = fGeom->GetNModules();
+    Int_t nOfModules = phosgeom->GetNModules();
     TClonesArray **hitsPerModule = new TClonesArray *[nOfModules];
     Int_t iModule = 0;         
     for (iModule=0; iModule < nOfModules; iModule++)
@@ -155,7 +158,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
       branchCPVimpacts ->SetAddress(&fCpvImpacts);
       branchCPVimpacts ->GetEntry(itrack,0);
 
-      for (Int_t iModule=0; iModule < nOfModules; iModule++) {
+      for (iModule=0; iModule < nOfModules; iModule++) {
        impacts = (TClonesArray *)fCpvImpacts->At(iModule);
        // Do loop over impacts in the module
        for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
@@ -212,14 +215,12 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
        ygen   = impact->Y();
        
        //Transform to the local ref.frame
-       const AliPHOSGeometry* geom = please->PHOSGeometry();
-       Float_t phig = geom->GetPHOSAngle(phosModule);
+       Float_t phig = phosgeom->GetPHOSAngle(phosModule);
        Float_t phi = TMath::Pi()/180*phig;
-       Float_t distanceIPtoCPV = geom->GetIPtoOuterCoverDistance() -
-                         (geom->GetFTPosition(1)+
-                          geom->GetFTPosition(2)+
-                          geom->GetCPVTextoliteThickness()
-                         )/2;
+       Float_t distanceIPtoCPV = phosgeom->GetIPtoOuterCoverDistance() -
+         (phosgeom->GetFTPosition(1)+
+          phosgeom->GetFTPosition(2)+
+          phosgeom->GetCPVTextoliteThickness())/2;
        Float_t xoL,yoL,zoL ;
 //     xoL = xgen*TMath::Cos(phig)+ygen*TMath::Sin(phig) ;
 //     yoL = -xgen*TMath::Sin(phig)+ygen*TMath::Cos(phig) + distanceIPtoCPV;
@@ -239,10 +240,10 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
          gImpY = ygen;
        }
       }
-      Info("AnalyzeCPV1", "Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
-      Info("AnalyzeCPV1", "Impact local (X,Z) = %f %f", locImpX, locImpZ);
-      Info("AnalyzeCPV1", "Reconstructed (X,Z) = %f %f", xrec, zrec);
-      Info("AnalyzeCPV1", "dxmin %f dzmin %f", dxmin, dzmin);
+      AliInfo(Form("Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY));
+      AliInfo(Form("Impact local (X,Z) = %f %f", locImpX, locImpZ));
+      AliInfo(Form("Reconstructed (X,Z) = %f %f", xrec, zrec));
+      AliInfo(Form("dxmin %f dzmin %f", dxmin, dzmin));
       hDx  ->Fill(dxmin);
       hDz  ->Fill(dzmin);
 //        hDr  ->Fill(TMath::Sqrt(r2min));
@@ -252,13 +253,13 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
     }
     delete [] hitsPerModule;
 
-    Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d charged impacts and %d  rec. points.", 
-          ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries()) ;
+    AliInfo(Form("++++ Event %d : total %d impacts, %d charged impacts and %d  rec. points.", 
+          ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries())) ;
   }
   // Save histograms
 
   Text_t outputname[80] ;
-  sprintf(outputname,"%s.analyzed",GetFileName().Data());
+  snprintf(outputname,80,"%s.analyzed",GetFileName().Data());
   TFile output(outputname,"RECREATE");
   output.cd();
   
@@ -340,38 +341,38 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("AnalyzeEMC1","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
 
-  const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance() ;
 
-  Info("AnalyzeCPV1", "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths");
+  AliInfo(Form("Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths"));
   for ( Int_t ievent=0; ievent<Nevents; ievent++) {  
     
     Int_t nTotalGen = 0;
 
     Int_t ntracks = gAlice->GetEvent(ievent);
 
-    Info("AnalyzeCPV1", " >>>>>>>Event %d .<<<<<<<", ievent) ;
+    AliInfo(Form(" >>>>>>>Event %d .<<<<<<<", ievent)) ;
 
     TTree* treeH = please->TreeH();
     if (treeH == 0x0)
      {
-       Error("AnalyzeEMC1","Can not get TreeH");
+      AliError(Form("Can not get TreeH"));
        return;
      }
 
     
     // Get branch of EMC impacts
     if (! (branchEMCimpacts =treeH->GetBranch("PHOSEmcImpacts")) ) {
-      Info("AnalyzeCPV1", " Couldn't find branch PHOSEmcImpacts. Exit.");
+      AliWarning(Form(" Couldn't find branch PHOSEmcImpacts. Exit."));
       return;
     }
  
     // Create and fill arrays of hits for each EMC module
       
-    Int_t nOfModules = fGeom->GetNModules();
+    Int_t nOfModules = phosgeom->GetNModules();
     TClonesArray **hitsPerModule = new TClonesArray *[nOfModules];
     Int_t iModule = 0;         
     for (iModule=0; iModule < nOfModules; iModule++)
@@ -388,7 +389,7 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
       branchEMCimpacts ->SetAddress(&fEmcImpacts);
       branchEMCimpacts ->GetEntry(itrack,0);
 
-      for (Int_t iModule=0; iModule < nOfModules; iModule++) {
+      for (iModule=0; iModule < nOfModules; iModule++) {
        impacts = (TClonesArray *)fEmcImpacts->At(iModule);
        // Do loop over impacts in the module
        for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
@@ -443,10 +444,9 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
       
        
        //Transform to the local ref.frame
-       const AliPHOSGeometry* geom = please->PHOSGeometry();
-       Float_t phig = geom->GetPHOSAngle(phosModule);
+       Float_t phig = phosgeom->GetPHOSAngle(phosModule);
        Float_t phi = TMath::Pi()/180*phig;
-       Float_t distanceIPtoEMC = geom->GetIPtoCrystalSurface();
+       Float_t distanceIPtoEMC = phosgeom->GetIPtoCrystalSurface();
        Float_t xoL,yoL,zoL ;
 //     xoL = xgen*TMath::Cos(phig)+ygen*TMath::Sin(phig) ;
 //     yoL = -xgen*TMath::Sin(phig)+ygen*TMath::Cos(phig) + distanceIPtoEMC;
@@ -466,10 +466,10 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
          gImpY = ygen;
        }
       }
-      Info("AnalyzeCPV1", " Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
-      Info("AnalyzeCPV1", " Impact local (X,Z) = %f %f", locImpX, locImpZ);
-      Info("AnalyzeCPV1", " Reconstructed (X,Z) = %f %f", xrec, zrec);
-      Info("AnalyzeCPV1", " dxmin %f dzmin %f", dxmin, dzmin) ;
+      AliInfo(Form(" Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY));
+      AliInfo(Form(" Impact local (X,Z) = %f %f", locImpX, locImpZ));
+      AliInfo(Form(" Reconstructed (X,Z) = %f %f", xrec, zrec));
+      AliInfo(Form(" dxmin %f dzmin %f", dxmin, dzmin)) ;
       hDx  ->Fill(dxmin);
       hDz  ->Fill(dzmin);
 //        hDr  ->Fill(TMath::Sqrt(r2min));
@@ -479,14 +479,14 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
     }
     delete [] hitsPerModule;
 
-    Info("AnalyzeCPV1", "++++ Event %d : total  %d impacts,  %d Emc rec. points.", 
-        ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast()) ; 
+    AliInfo(Form("++++ Event %d : total  %d impacts,  %d Emc rec. points.", 
+        ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast())) ; 
 
   }
   // Save histograms
 
   Text_t outputname[80] ;
-  sprintf(outputname,"%s.analyzed",GetFileName().Data());
+  snprintf(outputname,80,"%s.analyzed",GetFileName().Data());
   TFile output(outputname,"update");
   output.cd();
   
@@ -559,10 +559,10 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("AnalyzeCPV2","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
-  const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance() ;
   fRunLoader->LoadHeader();
 
   for (Int_t nev=0; nev<Nevents; nev++) 
@@ -578,14 +578,14 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
       TTree* treeH = please->TreeH();
       if (treeH == 0x0)
        {
-        Error("AnalyzeCPV2","Can not get TreeH");
+        AliError(Form("Can not get TreeH"));
         return;
        }
 
       if (! (branchCPVimpacts =treeH->GetBranch("PHOSCpvImpacts")) )  return;
       
       // Create and fill arrays of hits for each CPV module
-      Int_t nOfModules = fGeom->GetNModules();
+      Int_t nOfModules = phosgeom->GetNModules();
       TClonesArray **hitsPerModule = new TClonesArray *[nOfModules];
       Int_t iModule = 0;       
       for (iModule=0; iModule < nOfModules; iModule++)
@@ -596,10 +596,10 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
           
       for (Int_t itrack=0; itrack<ntracks; itrack++) {
        branchCPVimpacts ->SetAddress(&fCpvImpacts);
-       Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
+       AliInfo(Form(" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."));
        branchCPVimpacts ->GetEntry(itrack,0);
 
-       for (Int_t iModule=0; iModule < nOfModules; iModule++) {
+       for (iModule=0; iModule < nOfModules; iModule++) {
          impacts = (TClonesArray *)fCpvImpacts->At(iModule);
          // Do loop over impacts in the module
          for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
@@ -629,7 +629,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
                Float_t dz = genHit1->Z() - genHit2->Z();
                Float_t dr = TMath::Sqrt(dx*dx + dz*dz);
                hDrijCPVg->Fill(dr);
-//                     Info("AnalyzeCPV1", "(dx dz dr): %f %f", dx, dz);
+//                     AliInfo(Form("(dx dz dr): %f %f", dx, dz));
              }
          }
       }
@@ -668,8 +668,8 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
            }   
        }
       
-      Info("AnalyzeCPV1", " Event %d . Total of %d hits, %d rec.points.", 
-          nev, nGenCPV, nRecCPV) ; 
+      AliInfo(Form(" Event %d . Total of %d hits, %d rec.points.", 
+          nev, nGenCPV, nRecCPV)) ; 
     
       delete [] hitsPerModule;
 
@@ -702,7 +702,7 @@ void AliPHOSIhepAnalyze::CpvSingle(Int_t nevents)
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 )
    {
-     Error("CpvSingle","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
   
@@ -725,15 +725,15 @@ void AliPHOSIhepAnalyze::CpvSingle(Int_t nevents)
        hNrpX->Fill(rpMultX);
        hNrpZ->Fill(rpMultZ);
        hChi2->Fill(((AliPHOSEvalRecPoint*)pt)->Chi2Dof());
-       Info("AnalyzeCPV1", "+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++", 
-            ievent, rpMult, rpMultX, rpMultZ) ;
+       AliInfo(Form("+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++", 
+            ievent, rpMult, rpMultX, rpMultZ)) ;
 
       }
 
     }
        
   Text_t outputname[80] ;
-  sprintf(outputname,"%s.analyzed.single",GetFileName().Data());
+  snprintf(outputname,80,"%s.analyzed.single",GetFileName().Data());
   TFile output(outputname,"RECREATE");
   output.cd();
     
@@ -782,19 +782,23 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 {
   // Cumulative list of charged CPV impacts in event nev.
 
-  TList * fCpvImpacts ;
-  TBranch * branchCPVimpacts;
-
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("HitsCPV","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
-  const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
 
      
   printf("\n=================== Event %10d ===================\n",nev);
+  //16.03.2011: DP. Code below seems to be obsollete
+  //Comment it to sutisfy Coverity
+/* 
+  TList * fCpvImpacts ;
+  TBranch * branchCPVimpacts;
+
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance() ;
+
   fRunLoader->GetEvent(nev);
   Int_t ntracks = fRunLoader->GetHeader()->GetNtrack();
     
@@ -805,14 +809,14 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
    TTree* treeH = please->TreeH();
    if (treeH == 0x0)
     {
-      Error("CPVSingle","Can not get TreeH");
+      AliError(Form("Can not get TreeH"));
       return;
     }
 
   if (! (branchCPVimpacts =treeH->GetBranch("PHOSCpvImpacts")) )  return;
       
   // Create and fill arrays of hits for each CPV module
-  Int_t nOfModules = fGeom->GetNModules();
+  Int_t nOfModules = phosgeom->GetNModules();
   TClonesArray **hitsPerModule = new TClonesArray *[nOfModules];
   Int_t iModule = 0;   
   for (iModule=0; iModule < nOfModules; iModule++)
@@ -823,10 +827,10 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
           
   for (Int_t itrack=0; itrack<ntracks; itrack++) {
     branchCPVimpacts ->SetAddress(&fCpvImpacts);
-    Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
+    AliInfo(Form(" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."));
     branchCPVimpacts ->GetEntry(itrack,0);
 
-    for (Int_t iModule=0; iModule < nOfModules; iModule++) {
+    for (iModule=0; iModule < nOfModules; iModule++) {
       impacts = (TClonesArray *)fCpvImpacts->At(iModule);
       // Do loop over impacts in the module
       for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
@@ -843,6 +847,9 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
     printf("CPV module %d has %d hits\n",iModule,nsum);
   }
 
+*/
+
+
 //    TList * fCpvImpacts ;
 //    TBranch * branchCPVimpacts;
 //    AliPHOSImpact* impact;
@@ -853,7 +860,7 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 
 //    Int_t ntracks = gAlice->GetEvent(ievent);
 //    Int_t nOfModules = fGeom->GetNModules();
-//    Info("AnalyzeCPV1", " Tracks: "<<ntracks<<"  Modules: "<<nOfModules);
+//    AliInfo(Form(" Tracks: "<<ntracks<<"  Modules: "<<nOfModules));
 
 //    if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) )  return;
 
@@ -861,27 +868,27 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 //      branchCPVimpacts ->SetAddress(&fCpvImpacts);
 //      Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
 //      branchCPVimpacts ->GetEntry(itrack,0);
-//      Info("AnalyzeCPV1", " branchCPVimpacts ->GetEntry(itrack,0) OK.");
+//      Info(Form(" branchCPVimpacts ->GetEntry(itrack,0) OK."));
     
 //      for (Int_t iModule=0; iModule < nOfModules; iModule++) {
 //        impacts = (TClonesArray *)fCpvImpacts->At(iModule);
-//        Info("AnalyzeCPV1", " fCpvImpacts->At(iModule) OK.");
+//        Info(Form(" fCpvImpacts->At(iModule) OK."));
 //        // Do loop over impacts in the module
 //        for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
 //     impact=(AliPHOSImpact*)impacts->At(iImpact);
 //     impact->Print();
 //     if(IsCharged(impact->GetPid()))
 //       {
-//         Info("AnalyzeCPV1", " Add charged hit..";
+//         Info(Form(" Add charged hit.."));
 //         new(hits[hits.GetEntriesFast()]) AliPHOSImpact(*impact);
-//         Info("AnalyzeCPV1", "done.");
+//         Info(Form("done."));
 //       }
 //        }
 //      }
 //      fCpvImpacts->Clear();
 //    }
 
-//    Info("AnalyzeCPV1", " PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits.");
+//    Info(Form(" PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits."));
 
 }
 
@@ -904,13 +911,13 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 //     }
 //      }
 
-//    Info("AnalyzeCPV1", " PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits.");
+//    Info(Form(" PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits."));
 //  }
 
 Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdgCode)
 {
   // For HIJING
-  Info("AnalyzeCPV1", "pdgCode %d", pdgCode);
+  AliInfo(Form("pdgCode %d", pdgCode));
   if(pdgCode==211 || pdgCode==-211 || pdgCode==321 || pdgCode==-321 || pdgCode==11 || pdgCode==-11 || pdgCode==2212 || pdgCode==-2212) return kTRUE;
   else
     return kFALSE;