LCOV - code coverage report
Current view: top level - EVGEN - AliGenFixed.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 9 66.7 %
Date: 2016-06-14 17:26:59 Functions: 7 19 36.8 %

          Line data    Source code
       1             : #ifndef ALIGENFIXED_H
       2             : #define ALIGENFIXED_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             : // Simple particle gun. 
       9             : // Momentum, phi and theta of the particle as well as the particle type can be set.
      10             : // andreas.morsch@cern.ch
      11             : 
      12             : 
      13             : #include "AliGenerator.h"
      14             : 
      15             : class AliGenFixed : public AliGenerator
      16             : {
      17             :  public:
      18             :   AliGenFixed();
      19             :   AliGenFixed(Int_t npart);
      20           0 :   virtual ~AliGenFixed() {}
      21             :   virtual void Generate();
      22          48 :   virtual void Init() {}
      23          48 :   virtual void SetMomentum(Float_t pmom) {fPMin=pmom; fPMax=pmom; SetBit(kMomentumRange);}
      24          48 :   virtual void SetPhi(Float_t phi) {fPhiMin=phi*TMath::Pi()/180; fPhiMax=phi*TMath::Pi()/180; SetBit(kPhiRange);}
      25          48 :   virtual void SetTheta(Float_t theta) {fThetaMin=theta*TMath::Pi()/180; fThetaMax=theta*TMath::Pi()/180; SetBit(kThetaRange);}
      26          48 :   virtual void SetPart(Int_t part) {fIpart=part;}
      27             :   virtual void SetGun(Double_t px, Double_t py, Double_t pz, Double_t x, 
      28           0 :   Double_t y, Double_t z) {fP[0]=px;fP[1]=py;fP[2]=pz;fOrigin[0]=x;fOrigin[1]=y;
      29           0 :   fOrigin[2]=z;fExplicit=kTRUE;}
      30             :  
      31             : protected:
      32             : 
      33             :   Int_t fIpart;    // Particle type
      34             :   Int_t fExplicit; // True if momentum vector has been set by user. 
      35             :   Float_t fP[3];   // Momentum vector
      36             : 
      37         778 :   ClassDef(AliGenFixed,1) // Single particle generator
      38             : };
      39             : #endif

Generated by: LCOV version 1.11