#ifndef __GenGamma_H #define __GenGamma_H // c/c++ includes #include // ROOT includes #include "TF1.h" #include "TRandom.h" extern TRandom *gRandom; // this is a class that generates photons hitting the exit window // it containes all the parameters needed to set-up // the splitting and the radiation is included as well // Author: Miroslav Helbich // Date: Oct. 1 2001 // // Modified 0ct.19.01 // radiation in the exit window added class GenGamma { //data members private: // event variables float fEnergy; // photon energy float fXPos; // photon x-position float fYPos; // photon y-position float fZ; // z = Eelec/Egamma float fx1; // fractional energy loss 1 float fx2; // fractional energy loss 2 // setup variables float fEnergyMin; //minimum energy for generated photons float fXTilt; // x position tilt float fYTilt; // y position tilt float fXWidth; // x distribution width float fYWidth; // y distribution width float fEproton; // Proton beam energy float fEelectron; // Electron beam energy // parameters for the radiation in the window float fRadXmean; // mean energy loss float fRadXmin; // minimum energy loss for MC generation // generic distribution function TF1 *fEdist; // Energy distribution of photons: Bethe-Heitler formula TF1 *fydist; // y hit distribution TF1 *fxdist; // x hit distribution TF1 *fzdist; // zdistribution // default distribution functions TF1 *fBethe; // Bethe-Heitler TF1 *fydistgaus; TF1 *fxdistgaus; // methods protected: float EnergyFracLoss(); //fractional energy loss of electrons in the window public: // constructors GenGamma(); GenGamma(); // destructor ~GenGamma(); // getters float GetEnergyMin() {return fEnergyMin;}; float GetXTilt() {return fXTilt;}; float GetYTilt() {return fYTilt;}; float GetEProton() {return fEproton;}; float GetEElectron() {return fEelectron;}; // advanced getters TF1* GetEDist() {return fEdist;}; TF1* GetYDist() {return fydist;}; TF1* GetXDist() {return fxdist;}; TF1* GetZDist() {return fzdist;}; //setters void SetEnergyMin(float Emin); void SetXTilt(float xtilt); void SetYTilt(float ytilt); void SetXWidth(float xwidth); void SetYWidth(float ywidth); void SetEProton(float eproton); void SetEElectron(float Eelectron); void SetRadXMean (float newmean) {fRadXmean = newmean;}; void SetRadXMin (float newmin) {fRadXmin = newmin;}; // advanced setters void SetEdist(TF1 *newf) {fEdist = newf;}; void SetYDist(TF1 *newf) {fydist = newf;}; void SetXDist(TF1 *newf) {fxdist = newf;}; void SetZDist(TF1 *newf) {fzdist = newf;}; //derived getters float GetXsec(); // get cross-section float GetEnergy() {return fEnergy;}; float GetXPos() {return fXPos;}; float GetYPos() {return fYPos;}; float GetZ() {return fZ;}; float GetX1() {return fx1;}; float GetX2() {return fx2;}; // executive stuff void MakeEvent(); //generate event void Show(); //display event }; #endif