]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenPHOSlib.cxx
Coding violations...
[u/mrichter/AliRoot.git] / EVGEN / AliGenPHOSlib.cxx
index 86bb75d58423126bcb6bae58a4ab8906defe62b0..359bb647106177ec6eafb1674f02a92cb5018259 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.7  2001/03/09 13:01:41  morsch
-- enum constants for paramterisation type (particle family) moved to AliGen*lib.h
-- use AliGenGSIlib::kUpsilon, AliGenPHOSlib::kEtaPrime to access the constants
-
-Revision 1.6  2000/11/30 07:12:50  alibrary
-Introducing new Rndm and QA classes
-
-Revision 1.5  2000/06/29 21:08:27  morsch
-All paramatrisation libraries derive from the pure virtual base class AliGenLib.
-This allows to pass a pointer to a library directly to AliGenParam and avoids the
-use of function pointers in Config.C.
-
-Revision 1.4  2000/06/14 15:21:05  morsch
-Include clean-up (IH)
-
-Revision 1.3  2000/06/09 20:32:54  morsch
-All coding rule violations except RS3 corrected
-
-Revision 1.2  1999/11/04 11:30:48  fca
-Improve comments
-
-Revision 1.1  1999/11/03 17:43:20  fca
-New version from G.Martinez & A.Morsch
-
-*/
+/* $Id$ */
 
 //======================================================================
 //  AliGenPHOSlib class contains parameterizations of the
@@ -124,25 +99,57 @@ ClassImp(AliGenPHOSlib)
 //                 particle composition pi+, pi0, pi-
 //
 
-    Float_t random = ran->Rndm();
-
-    if ( (3.*random)  < 1. ) 
-    {
-          return 211 ;
-    } 
-    else
-    {  
-      if ( (3.*random) >= 2.)
-      {
-         return -211 ;
-      }
-      else 
-      {
+     Float_t random = ran->Rndm();
+
+     if ( (3.*random)  < 1. ) 
+     {
+           return 211 ;
+     
+     else
+     {  
+       if ( (3.*random) >= 2.)
+       {
+          return -211 ;
+       }
+       else 
+       {
         return 111  ;
       }
     }
 }
-// End Pions
+
+//End Pions
+//======================================================================
+//    Pi 0 Flat Distribution
+//    Transverse momentum distribution PtPi0Flat
+//    Rapidity distribution YPi0Flat
+//    Particle distribution IdPi0Flat  111 (pi0)
+//
+
+Double_t AliGenPHOSlib::PtPi0Flat(Double_t */*px*/, Double_t *)
+{
+//     Pion transverse momentum flat distribution 
+
+return 1;
+
+}
+
+Double_t AliGenPHOSlib::YPi0Flat( Double_t */*py*/, Double_t *)
+{
+
+// pion y-distribution
+//
+  return 1.;
+}
+
+ Int_t AliGenPHOSlib::IpPi0Flat(TRandom *)
+{
+
+//                 particle composition pi0
+//
+        return 111 ;
+}
+// End Pi0Flat
 //============================================================= 
 //
  Double_t AliGenPHOSlib::PtScal(Double_t pt, Int_t np)
@@ -170,6 +177,7 @@ ClassImp(AliGenPHOSlib)
   Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
                                  (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ kfmax2;
   return fmtscal*ptpion;
+
 }
 // End Scaling
 //============================================================================
@@ -258,6 +266,38 @@ ClassImp(AliGenPHOSlib)
         return  221;   //   eta
 }
 // End Etas
+
+//======================================================================
+//    Eta Flat Distribution
+//    Transverse momentum distribution PtEtaFlat
+//    Rapidity distribution YEtaFlat
+//    Particle distribution IdEtaFlat  111 (pi0)
+//
+
+Double_t AliGenPHOSlib::PtEtaFlat(Double_t */*px*/, Double_t *)
+{
+//     Eta transverse momentum flat distribution 
+
+  return 1;
+
+}
+
+Double_t AliGenPHOSlib::YEtaFlat( Double_t */*py*/, Double_t *)
+{
+//
+// pion y-distribution
+//
+  return 1.;
+}
+
+ Int_t AliGenPHOSlib::IpEtaFlat(TRandom *)
+{
+//
+//                 particle composition eta
+//
+        return 221 ;
+}
+// End Pi0Flat
 //============================================================================
 //============================================================================
 //    O  M  E  G  A  S
@@ -418,8 +458,8 @@ ClassImp(AliGenPHOSlib)
 //===================================================================
 
 
-typedef Double_t (*GenFunc) (Double_t*,  Double_t*); 
- GenFunc AliGenPHOSlib::GetPt(Int_t param, const char* tname) const
+typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
+GenFunc AliGenPHOSlib::GetPt(Int_t param, const char* /*tname*/) const
 {
 // Return pinter to pT parameterisation
     GenFunc func;
@@ -429,12 +469,18 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     case kPion:     
         func=PtPion;
         break;
+    case kPi0Flat:     
+        func=PtPi0Flat;
+        break;
     case kKaon:
         func=PtKaon;
         break;
     case kEta:
         func=PtEta;
         break;
+    case kEtaFlat:
+        func=PtEtaFlat;
+        break;
     case kOmega:
         func=PtOmega;
         break;
@@ -451,7 +497,7 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     return func;
 }
 
- GenFunc AliGenPHOSlib::GetY(Int_t param, const char* tname) const
+GenFunc AliGenPHOSlib::GetY(Int_t param, const char* /*tname*/) const
 {
 // Return pointer to Y parameterisation
     GenFunc func;
@@ -460,12 +506,18 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     case kPion:
         func=YPion;
         break;
+    case kPi0Flat:
+        func=YPi0Flat;
+        break;
     case kKaon:
         func=YKaon;
         break;
     case kEta:
         func=YEta;
         break;
+   case kEtaFlat:
+        func=YEtaFlat;
+        break;
     case kOmega:
         func=YOmega;
         break;
@@ -485,22 +537,28 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     return func;
 }
 typedef Int_t (*GenFuncIp) (TRandom *);
- GenFuncIp AliGenPHOSlib::GetIp(Int_t param,  const char* tname) const
+GenFuncIp AliGenPHOSlib::GetIp(Int_t param,  const char* /*tname*/) const
 {
 // Return pointer to particle composition
     GenFuncIp func;
     switch (param)
     {
-    case kPion:
-        
+    case kPion:       
         func=IpPion;
         break;
+    case kPi0Flat:       
+        func=IpPi0Flat;
+        break;
     case kKaon:
         func=IpKaon;
         break;
     case kEta:
         func=IpEta;
         break;
+    case kEtaFlat:
+        func=IpEtaFlat;
+        break;
+       
     case kOmega:
         func=IpOmega;
         break;