]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTrackLight.cxx
- adding time information in NbyN clusterizer
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackLight.cxx
index 7582223d4a5b7769c302d45a73241f62bc1dece1..805ae824e5eb17b613a3800212668a1243fa9b26 100644 (file)
@@ -50,6 +50,8 @@
 #include "TParticle.h"
 #include "TString.h"
 
+#include <cstdio>
+
 ClassImp(AliMUONTrackLight) 
 
 //===================================================================
@@ -328,22 +330,22 @@ void AliMUONTrackLight::PrintInfo(const Option_t* opt){
     TString pdg = "", line = "";
     for(int i = 3; i >= 0; i--){
       if(this->GetQuarkPythiaLine(i)>= 0){
-       sprintf(name, "%4d --> ", this->GetQuarkPythiaLine(i));
+       snprintf(name, 100, "%4d --> ", this->GetQuarkPythiaLine(i));
        line += name;
-       sprintf(name, "%4d --> ", this->GetQuarkPDGCode(i));
+       snprintf(name, 100, "%4d --> ", this->GetQuarkPDGCode(i));
        pdg += name;
       }
     }
     for(int i = 0; i < fNParents; i++){ 
       if(this->GetParentPythiaLine(i)>= 0){
-       sprintf(name, "%7d --> ", this->GetParentPythiaLine(i));
+       snprintf(name, 100, "%7d --> ", this->GetParentPythiaLine(i));
        line += name;
-       sprintf(name, "%7d --> ", this->GetParentPDGCode(i));
+       snprintf(name, 100, "%7d --> ", this->GetParentPDGCode(i));
        pdg += name;
       }
     }
-    sprintf(name, "%4d", this->GetTrackPythiaLine()); line += name;
-    sprintf(name, "%4d", this->GetTrackPDGCode()); pdg += name;
+    snprintf(name, 100, "%4d", this->GetTrackPythiaLine()); line += name;
+    snprintf(name, 100, "%4d", this->GetTrackPDGCode()); pdg += name;
 
     printf("\nmuon's decay history:\n");
     printf(" PDG: %s\n", pdg.Data());
@@ -380,7 +382,7 @@ Bool_t AliMUONTrackLight::IsParentPionOrKaon(Int_t idparent){
   else return kFALSE;
 }
 //====================================
-Bool_t AliMUONTrackLight::IsDiquark(Int_t pdg){
+Bool_t AliMUONTrackLight::IsDiquark(Int_t pdg) const{
   /// check if the provided pdg code corresponds to a diquark 
   pdg = TMath::Abs(pdg);
   if((pdg > 1000) && (pdg%100 < 10)) return kTRUE;