Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:08

0001 #ifndef RandomtXiGunProducer_H
0002 #define RandomtXiGunProducer_H
0003 
0004 #include "IOMC/ParticleGuns/interface/BaseRandomtXiGunProducer.h"
0005 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0006 
0007 namespace edm {
0008 
0009   class RandomtXiGunProducer : public BaseRandomtXiGunProducer {
0010   public:
0011     RandomtXiGunProducer(const ParameterSet&);
0012     ~RandomtXiGunProducer() override;
0013 
0014   private:
0015     void produce(Event& e, const EventSetup& es) override;
0016 
0017     HepMC::FourVector make_particle(double t, double Xi, double phi, int PartID, int direction);
0018     double Minimum_t(double xi) {
0019       double partE = fpEnergy * (1. - xi);
0020       double massSQ = pow(PData->mass().value(), 2);
0021       double partP = sqrt(partE * partE - massSQ);
0022       return -2. * (sqrt(fpEnergy * fpEnergy - massSQ) * partP - fpEnergy * partE + massSQ);
0023     };
0024 
0025   protected:
0026     // data members
0027 
0028     double fMint;
0029     double fMaxt;
0030     double fMinXi;
0031     double fMaxXi;
0032   };
0033 }  // namespace edm
0034 #endif