LCOV - code coverage report
Current view: top level - EVGEN - AliGenMC.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 19 5.3 %
Date: 2016-06-14 17:26:59 Functions: 1 23 4.3 %

          Line data    Source code
       1             : #ifndef ALIGENMC_H
       2             : #define ALIGENMC_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             : // Base class for generators using external MC generators.
      10             : // For example AliGenPythia using Pythia.
      11             : // Provides basic functionality: setting of kinematic cuts on 
      12             : // decay products and particle selection.
      13             : // andreas.morsch@cern.ch
      14             : 
      15             : #include<TClonesArray.h>
      16             : #include <TArrayI.h>   
      17             : #include <TString.h>
      18             : class TParticle;
      19             : 
      20             : class AliGeometry;
      21             : class AliGenEventHeader;
      22             : #include "AliGenerator.h"
      23             : #include "AliDecayer.h"
      24             : 
      25             : class AliGenMC : public AliGenerator
      26             : {
      27             :  public:
      28             :     AliGenMC();
      29             :     AliGenMC(Int_t npart);
      30             :     virtual ~AliGenMC();
      31             :     virtual void Init();
      32           0 :     virtual void SetForceDecay(Decay_t decay = kAll) {fForceDecay = decay;}
      33           0 :     virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
      34             :     virtual void SetChildMomentumRange(Float_t pmin = 0, Float_t pmax = 1.e10)
      35           0 :         {fChildPMin = pmin; fChildPMax = pmax;}
      36             :     virtual void SetChildPtRange(Float_t ptmin = 0, Float_t ptmax = 20.)
      37           0 :         {fChildPtMin = ptmin; fChildPtMax = ptmax;}
      38             :     virtual void SetChildPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
      39           0 :         {fChildPhiMin = TMath::Pi()*phimin/180;
      40           0 :         fChildPhiMax  = TMath::Pi()*phimax/180;}
      41             :     virtual void SetChildThetaRange(Float_t thetamin = 0, Float_t thetamax = 180)
      42           0 :         {fChildThetaMin = TMath::Pi()*thetamin/180;
      43           0 :         fChildThetaMax  = TMath::Pi()*thetamax/180;}
      44             :     virtual void SetChildYRange(Float_t ymin = -12, Float_t ymax = 12)
      45           0 :         {fChildYMin = ymin;
      46           0 :         fChildYMax  = ymax;}
      47           0 :     virtual void SetMaximumLifetime(Float_t time = 1.e-15) {fMaxLifeTime = time;}
      48             :    
      49           0 :     virtual void SetGeometryAcceptance(AliGeometry * GeometryAcceptance=0) {fGeometryAcceptance = GeometryAcceptance;}
      50             : 
      51           0 :     virtual void SetPdgCodeParticleforAcceptanceCut(Int_t PdgCodeParticleforAcceptanceCut=0) {fPdgCodeParticleforAcceptanceCut = PdgCodeParticleforAcceptanceCut;}
      52             : 
      53           0 :     virtual void SetNumberOfAcceptedParticles(Int_t NumberOfAcceptedParticles=2) {fNumberOfAcceptedParticles = NumberOfAcceptedParticles;}
      54             :     
      55             :     virtual Bool_t CheckAcceptanceGeometry(Int_t np, TClonesArray* particles);
      56             :     virtual void   SetProjectile(TString proj="P", Int_t a = 1, Int_t z = 1)
      57           0 :         {fProjectile = proj; fAProjectile = a; fZProjectile = z;}    
      58             :     virtual void   SetTarget(TString tar="P", Int_t a = 1, Int_t z = 1)
      59           0 :         {fTarget = tar; fATarget = a; fZTarget = z;}
      60           0 :     virtual void   SetCrossingAngle(Float_t phiX, Float_t phiY) {fXingAngleX = phiX; fXingAngleY = phiY;}
      61             :     virtual void Boost();
      62           0 :     virtual void SetDyBoost(Double_t dyBoost = 0.) {fDyBoost = dyBoost;}
      63             :     virtual void BeamCrossAngle();
      64             :     virtual void AddHeader(AliGenEventHeader* header);
      65             : 
      66             :  protected:
      67             :     // check if particle is selected as parent particle
      68             :     Bool_t ParentSelected(Int_t ip) const;
      69             :     // check if particle is selected as child particle
      70             :     Bool_t ChildSelected(Int_t ip) const;
      71             :     // all kinematic selection cuts go here 
      72             :     Bool_t KinematicSelection(const TParticle *particle, Int_t flag) const;
      73             :     Int_t  CheckPDGCode(Int_t pdgcode) const;
      74             : 
      75             :  protected:
      76             :     TClonesArray fParticles;     //!Particle  List
      77             :     TArrayI      fParentSelect;  //!Parent particles to be selected 
      78             :     TArrayI      fChildSelect;   //!Decay products to be selected
      79             :     Int_t        fCutOnChild;    // Cuts on decay products (children)  are enabled/disabled
      80             :     Float_t      fChildPtMin;    // Children minimum pT
      81             :     Float_t      fChildPtMax;    // Children maximum pT
      82             :     Float_t      fChildPMin;     // Children minimum p
      83             :     Float_t      fChildPMax;     // Children maximum p
      84             :     Float_t      fChildPhiMin;   // Children minimum phi
      85             :     Float_t      fChildPhiMax;   // Children maximum phi
      86             :     Float_t      fChildThetaMin; // Children minimum theta
      87             :     Float_t      fChildThetaMax; // Children maximum theta
      88             :     Float_t      fChildYMin;     // Children minimum y
      89             :     Float_t      fChildYMax;     // Children maximum y
      90             :     Float_t      fXingAngleX;    // Crossing angle X
      91             :     Float_t      fXingAngleY;    // Crossing angle Y    
      92             :     Decay_t      fForceDecay;    // Decay channel forced
      93             :     Float_t      fMaxLifeTime;   // Maximum lifetime for unstable particles
      94             :     Double_t     fDyBoost;       // dy for boost into lab frame
      95             :     AliGeometry* fGeometryAcceptance; // Geometry to which particles must be simulated
      96             :     Int_t        fPdgCodeParticleforAcceptanceCut;  // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied
      97             :     Int_t        fNumberOfAcceptedParticles;  // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode) 
      98             :     Int_t        fNprimaries;                 // Number of produced and stored particles
      99             :  
     100             :  private:
     101             :     AliGenMC(const AliGenMC &MC);
     102             :     AliGenMC & operator=(const AliGenMC & rhs);
     103             :     
     104           6 :     ClassDef(AliGenMC,7)       // AliGenerator implementation for generators using MC methods
     105             : };
     106             : #endif
     107             : 
     108             : 
     109             : 
     110             : 
     111             : 

Generated by: LCOV version 1.11