]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ACORDE/AliGenACORDE.cxx
Warnings fixed
[u/mrichter/AliRoot.git] / ACORDE / AliGenACORDE.cxx
index 9ac2ea1797b7f74ed9c9ddaf66f740cde537c45b..42b31444bb50e39d16cd50fd0f850433e183b163 100644 (file)
@@ -69,7 +69,8 @@ AliGenACORDE::AliGenACORDE()
     fMomentumDist(0),
     fUnfoldedMomentumDist(0),
     fZenithDist(0),
-    fPDist(0)
+    fPDist(0),
+    fNParticles(0)
 {
   //
   // Default ctor.
@@ -97,7 +98,8 @@ AliGenACORDE::AliGenACORDE(Int_t npart)
     fMomentumDist(0),
     fUnfoldedMomentumDist(0),
     fZenithDist(0),
-    fPDist(0)
+    fPDist(0),
+    fNParticles(0)
 {
   //
   // Standard ctor.
@@ -111,26 +113,6 @@ AliGenACORDE::AliGenACORDE(Int_t npart)
   fOrigin[2] = 0.;
 }
 
-//_____________________________________________________________________________
-AliGenACORDE::AliGenACORDE(const AliGenACORDE& gen)
-  : AliGenerator(gen)
-{
-  //
-  // Copy constructor
-  //
-  gen.Copy(*this);
-}
-
-//_____________________________________________________________________________
-AliGenACORDE& AliGenACORDE::operator=(const AliGenACORDE& gen)
-{
-  //
-  // Asingment operator
-  //
-  gen.Copy(*this);
-  return *this;
-}
-
 //_____________________________________________________________________________
 AliGenACORDE::~AliGenACORDE()
 {
@@ -152,7 +134,7 @@ void AliGenACORDE::Generate()
   // Call the respective method inside the loop for the number
   // of tracks per trigger.
 
-  for (Int_t i = 0; i < fNpart; i++ ) {
+  for (Int_t i = 0; i < fNParticles; i++ ) {
 
     if ( fCRMode == kMuonBundle ) {
       this->GenerateOneMuonBundle();
@@ -177,6 +159,12 @@ void AliGenACORDE::Init()
   // Initialize some internal methods.
   //
 
+
+   printf("**************************************************************\n");
+   printf("<<< *** Starting the AliGenACORDE cosmic generator ******** >>>\n");
+   printf("<<< *** No. of muons generated at the surface of P2: %d,  * >>>\n",fNParticles);
+   printf("**************************************************************\n");
+
   // Determine some specific data members.
   fPRange = TMath::Abs(fPMax-fPMin);
 
@@ -436,17 +424,17 @@ void AliGenACORDE::InitMomentumGeneration()
       char buffer6[1024];
       char buffer7[1024];
 
-      sprintf(buffer1, h1Coef, y, y, y, y, y, y);
-      sprintf(buffer2, h2Coef, y, y, y, y, y, y);
-      sprintf(buffer3, h3Coef, y, y, y, y, y, y);
-      sprintf(buffer4, s2Coef, y, y, y, y, y, y);
+      //sprintf(buffer1, h1Coef, y, y, y, y, y, y);
+      //sprintf(buffer2, h2Coef, y, y, y, y, y, y);
+      //sprintf(buffer3, h3Coef, y, y, y, y, y, y);
+      //sprintf(buffer4, s2Coef, y, y, y, y, y, y);
       
-      sprintf(buffer5, h, buffer1, buffer2, buffer3, buffer4);
+      //sprintf(buffer5, h, buffer1, buffer2, buffer3, buffer4);
       
-      sprintf(buffer6, flux, buffer5);
+      //sprintf(buffer6, flux, buffer5);
       
       fMomentumDist = new TF1("fMomentumDist", buffer6, fPMin, fPMax);
-      sprintf(buffer7, normalizedFlux, buffer5);
+      //sprintf(buffer7, normalizedFlux, buffer5);
       fUnfoldedMomentumDist = new TF1("fUnfoldedMomentumDist", buffer7, fPMin, fPMax);
       for (Int_t i = 0; i < 4; i++ ) {
        fMomentumDist->SetParName(i, paramNames[i]);
@@ -495,8 +483,8 @@ void AliGenACORDE::InitZenithalAngleGeneration()
       Float_t weight = 0;
       for ( Int_t i = 0; i < pEnd; i++ ) {
        // Fill the distribution
-       sprintf(name, "zenith%d", i+1);
-       sprintf(title, "Zenith distribution, p=%f", fPMin+(Float_t)i);
+       //sprintf(name, "zenith%d", i+1);
+       //sprintf(title, "Zenith distribution, p=%f", fPMin+(Float_t)i);
        zenith = new(mom[i]) TH1F(name, title, TMath::Abs(TMath::Nint(fZenithMax-fZenithMin)), TMath::Cos(fZenithMax*TMath::Pi()/180), TMath::Cos(fZenithMin*TMath::Pi()/180));
 
        // Make a loop for the angle and fill the histogram for the weight