LCOV - code coverage report
Current view: top level - EVGEN - AliGenParam.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 13 7.7 %
Date: 2016-06-14 17:26:59 Functions: 1 20 5.0 %

          Line data    Source code
       1             : #ifndef ALIGENPARAM_H
       2             : #define ALIGENPARAM_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : //
       9             : // Class to generate particles from using parametrized pT and y distributions.
      10             : // Distributions are obtained from pointer to object of type AliGenLib.
      11             : // (For example AliGenMUONlib)
      12             : //
      13             : // andreas.morsch@cern.ch
      14             : //
      15             : 
      16             : #include "AliGenMC.h"
      17             : 
      18             : class AliPythia;
      19             : class TParticle;
      20             : class AliGenLib;
      21             : class TF1;
      22             : 
      23             : typedef enum { kAnalog, kNonAnalog} Weighting_t;
      24             : //-------------------------------------------------------------
      25             : class AliGenParam : public AliGenMC
      26             : {
      27             : public:
      28             :   AliGenParam();
      29             :   AliGenParam(Int_t npart, const AliGenLib * Library, Int_t param,   const char*  tname = 0);
      30             :   AliGenParam(Int_t npart, Int_t param, const char* tname = 0, const char*  name  = 0);
      31             :   AliGenParam(Int_t npart, Int_t param,
      32             :               Double_t (*PtPara)(const Double_t*, const Double_t*),
      33             :               Double_t (*YPara )(const Double_t*, const Double_t*),
      34             :               Double_t (*V2Para)(const Double_t*, const Double_t*),
      35             :               Int_t    (*IpPara)(TRandom*)           );
      36             :      
      37             :   virtual ~AliGenParam();
      38             :   virtual void GenerateN(Int_t ntimes);
      39             :   virtual void Generate();
      40             :   virtual void Init();
      41             :   // select particle type
      42           0 :   virtual void SetParam(Int_t param) {fParam = param;}
      43             :   //Setting the flag for Background transportation while using SetForceDecay()
      44           0 :   void SetSelectAll(Bool_t selectall) {fSelectAll = selectall;}
      45             :   // force decay type
      46           0 :   virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;}       
      47           0 :   virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;}
      48           0 :   virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;}
      49           0 :   virtual void SetForceGammaConversion(Bool_t force=kTRUE) {fForceConv = force;}
      50           0 :   virtual void SetKeepParent(Bool_t keep=kTRUE){fKeepParent= keep;} //Store parent even if it does not have childs within cuts
      51           0 :   virtual void SetKeepIfOneChildSelected(Bool_t keep=kTRUE){fKeepIfOneChildSelected = keep;} //Accept parent and child even if other children are not within cut.
      52           0 :   virtual void SetPreserveFullDecayChain(Int_t preserve = kFALSE) {fPreserveFullDecayChain = preserve;} //Prevent flagging(/skipping) of decay daughter particles; preserves complete forced decay chain
      53             :  
      54             :   virtual void Draw(const char * opt);
      55           0 :   TF1 *  GetPt() { return fPtPara;}
      56           0 :   TF1 *  GetY() {return fYPara;}
      57             :   Float_t GetRelativeArea(Float_t ptMin, Float_t ptMax, Float_t yMin, Float_t yMax, Float_t phiMin, Float_t phiMax);
      58             : 
      59             :   static TVector3 OrthogonalVector(TVector3 &inVec);
      60             :   static void RotateVector(Double_t *pin, Double_t *pout, Double_t costheta, Double_t sintheta,
      61             :                            Double_t cosphi, Double_t sinphi);
      62             :   static double ScreenFunction1(double d);
      63             :   static double ScreenFunction2(double d);
      64             :   double RandomEnergyFraction(double Z, double E);
      65             :   double RandomPolarAngle();
      66             :   double RandomMass(Double_t mh);
      67             :   Int_t VirtualGammaPairProduction(TClonesArray *particles, Int_t nPart);
      68             :   Int_t ForceGammaConversion(TClonesArray *particles, Int_t nPart);
      69           0 :   virtual void SetSeed(UInt_t /*seed*/) {;}
      70             :   
      71             : protected:
      72             :   Double_t (*fPtParaFunc)(const Double_t*, const Double_t*); //! Pointer to Pt parametrisation function
      73             :   Double_t (*fYParaFunc )(const Double_t*, const Double_t*); //! Pointer to Y parametrisation function
      74             :   Int_t    (*fIpParaFunc )(TRandom*);    //! Pointer to particle type parametrisation function
      75             :   Double_t (*fV2ParaFunc )(const Double_t*, const Double_t*);//! Pointer to V2 parametrisation function
      76             :   TF1* fPtPara;              // Transverse momentum parameterisation
      77             :   TF1* fYPara;               // Rapidity parameterisation
      78             :   TF1*        fV2Para;       // v2 parametrization
      79             :   TF1*        fdNdPhi;       // Phi distribution depending on v2
      80             :   Int_t       fParam;        // Parameterisation type 
      81             :   Float_t     fdNdy0;        // central multiplicity per event
      82             :   Float_t     fYWgt;         // Y-weight
      83             :   Float_t     fPtWgt;        // Pt-weight
      84             :   Float_t     fBias;         // Biasing factor
      85             :   Int_t       fTrials;       // Number of trials
      86             :   Float_t     fDeltaPt;      // pT sampling in steps of fDeltaPt
      87             :   Bool_t      fSelectAll;    // Flag for transportation of Background while using SetForceDecay()
      88             :   AliDecayer  *fDecayer;     // ! Pointer to pythia object for decays
      89             :   Bool_t      fForceConv;    //
      90             :   Bool_t      fKeepParent;   //  Store parent even if it does not have childs within cuts
      91             :   Bool_t      fKeepIfOneChildSelected; //Accept parent and child even if other children are not within cut.
      92             :   Bool_t      fPreserveFullDecayChain; //Prevent flagging(/skipping) of decay daughter particles; preserves complete forced decay chain
      93             :         
      94             : private:
      95             :   AliGenParam(const AliGenParam &Param);
      96             :   AliGenParam & operator=(const AliGenParam & rhs);
      97             : 
      98           6 :   ClassDef(AliGenParam, 4) // Generator using parameterised pt- and y-distribution
      99             : };
     100             : #endif
     101             : 
     102             : 
     103             : 
     104             : 
     105             : 
     106             : 
     107             : 
     108             : 
     109             : 
     110             : 

Generated by: LCOV version 1.11