Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:00

0001 #ifndef IOMC_FlatEvtVtxGenerator_H
0002 #define IOMC_FlatEvtVtxGenerator_H
0003 
0004 /**
0005  * Generate event vertices according to a Flat distribution. 
0006  * Attention: All values are assumed to be cm!
0007  *
0008  * Important note: flat independent distributions in Z and T are not correct for physics production
0009  * In reality, if two flat beams interact the real distribution will not be flat with independent Z and T
0010  * but Z and T will be correlated, as example in GaussEvtVtxGenerator.
0011  * Can restore correlation in configuration via MinT += (MinZ - MaxZ)/2 and MaxT += (MaxZ - MinZ)/2
0012  * in [ns] units (recall c_light = 29.98cm/ns)
0013  *
0014  */
0015 
0016 #include "IOMC/EventVertexGenerators/interface/BaseEvtVtxGenerator.h"
0017 
0018 namespace CLHEP {
0019   class HepRandomEngine;
0020 }
0021 
0022 class FlatEvtVtxGenerator : public BaseEvtVtxGenerator {
0023 public:
0024   FlatEvtVtxGenerator(const edm::ParameterSet& p);
0025   /** Copy constructor */
0026   FlatEvtVtxGenerator(const FlatEvtVtxGenerator& p) = delete;
0027   /** Copy assignment operator */
0028   FlatEvtVtxGenerator& operator=(const FlatEvtVtxGenerator& rhs) = delete;
0029   ~FlatEvtVtxGenerator() override;
0030 
0031   /// return a new event vertex
0032   //virtual CLHEP::Hep3Vector* newVertex();
0033   HepMC::FourVector newVertex(CLHEP::HepRandomEngine*) const override;
0034 
0035   const TMatrixD* GetInvLorentzBoost() const override { return nullptr; }
0036 
0037   /// set min in X in cm
0038   void minX(double m = 0.0);
0039   /// set min in Y in cm
0040   void minY(double m = 0.0);
0041   /// set min in Z in cm
0042   void minZ(double m = 0.0);
0043 
0044   /// set max in X in cm
0045   void maxX(double m = 0);
0046   /// set max in Y in cm
0047   void maxY(double m = 0);
0048   /// set max in Z in cm
0049   void maxZ(double m = 0);
0050 
0051 private:
0052   double fMinX, fMinY, fMinZ, fMinT;
0053   double fMaxX, fMaxY, fMaxZ, fMaxT;
0054 };
0055 
0056 #endif