Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-02 23:15:11

0001 #ifndef SimTransport_Hector_h
0002 #define SimTransport_Hector_h
0003 
0004 // user include files
0005 #include "FWCore/Framework/interface/ESHandle.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 
0008 // HepMC headers
0009 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0010 
0011 #include "HepMC/GenEvent.h"
0012 #include "HepMC/GenParticle.h"
0013 #include "HepMC/GenVertex.h"
0014 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0015 
0016 #include "SimDataFormats/Forward/interface/LHCTransportLink.h"
0017 #include <vector>
0018 
0019 // SimpleConfigurable replacement
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 
0022 // Hector headers
0023 #include "H_BeamLine.h"
0024 #include "H_BeamParticle.h"
0025 #include "H_RecRPObject.h"
0026 #include <map>
0027 #include <string>
0028 
0029 class TRandom3;
0030 
0031 class Hector {
0032 public:
0033   //  Hector(const edm::ParameterSet & ps);
0034   Hector(const edm::ParameterSet &ps,
0035          const edm::ESGetToken<HepPDT::ParticleDataTable, PDTRecord> &,
0036          bool verbosity,
0037          bool FP420Transport,
0038          bool ZDCTransport);
0039   //  Hector();
0040   virtual ~Hector();
0041 
0042   /*!Clears ApertureFlags, prepares Hector for a next event*/
0043   void clearApertureFlags();
0044   /*!Clears BeamParticle, prepares Hector for a next Aperture check or/and a
0045    * next event*/
0046   void clear();
0047   /*!Adds the stable protons from the event \a ev to a beamline*/
0048   void add(const HepMC::GenEvent *ev, const edm::EventSetup &es);
0049   /*!propagate the particles through a beamline to FP420*/
0050   void filterFP420(TRandom3 *);
0051   /*!propagate the particles through a beamline to ZDC*/
0052   void filterZDC(TRandom3 *);
0053   /*!propagate the particles through a beamline to ZDC*/
0054   void filterD1(TRandom3 *);
0055 
0056   int getDirect(unsigned int part_n) const;
0057 
0058   /*!Prints properties of all particles in a beamline*/
0059   void print() const;
0060   /*!Return vector of the particle lines (HepMC::GenParticle::barcode()) in a
0061    * beamline*/
0062   // std::vector<unsigned int> part_list() const;
0063 
0064   //    bool isCharged(const HepMC::GenParticle * p);
0065 
0066   HepMC::GenEvent *addPartToHepMC(HepMC::GenEvent *event);
0067 
0068   std::vector<LHCTransportLink> &getCorrespondenceMap() { return theCorrespondenceMap; }
0069 
0070   /*
0071       private:
0072       //  edm::ParameterSet m_pBeamLine;
0073       */
0074 private:
0075   const edm::ESGetToken<HepPDT::ParticleDataTable, PDTRecord> tok_pdt_;
0076   // Defaults
0077   double lengthfp420;
0078   double lengthzdc;
0079   double lengthd1;
0080 
0081   double etacut;
0082   bool m_smearAng;
0083   double m_sig_e;
0084   bool m_smearE;
0085   double m_sigmaSTX;
0086   double m_sigmaSTY;
0087 
0088   float m_rpp420_f;
0089   float m_rpp420_b;
0090   float m_rppzdc;
0091   float m_rppd1;
0092 
0093   edm::ESHandle<ParticleDataTable> pdt;
0094 
0095   // Hector
0096   H_BeamLine *m_beamlineFP4201;
0097   H_BeamLine *m_beamlineFP4202;
0098   H_BeamLine *m_beamlineZDC1;
0099   H_BeamLine *m_beamlineZDC2;
0100   H_BeamLine *m_beamlineD11;
0101   H_BeamLine *m_beamlineD12;
0102   //
0103 
0104   H_RecRPObject *m_rp420_f;
0105   H_RecRPObject *m_rp420_b;
0106 
0107   std::map<unsigned int, H_BeamParticle *> m_beamPart;
0108   std::map<unsigned int, int> m_direct;
0109   std::map<unsigned int, bool> m_isStoppedfp420;
0110   std::map<unsigned int, bool> m_isStoppedzdc;
0111   std::map<unsigned int, bool> m_isStoppedd1;
0112   std::map<unsigned int, double> m_xAtTrPoint;
0113   std::map<unsigned int, double> m_yAtTrPoint;
0114   std::map<unsigned int, double> m_TxAtTrPoint;
0115   std::map<unsigned int, double> m_TyAtTrPoint;
0116   std::map<unsigned int, double> m_eAtTrPoint;
0117 
0118   std::map<unsigned int, double> m_eta;
0119   std::map<unsigned int, int> m_pdg;
0120   std::map<unsigned int, double> m_pz;
0121   std::map<unsigned int, bool> m_isCharged;
0122 
0123   string beam1filename;
0124   string beam2filename;
0125 
0126   bool m_verbosity;
0127   bool m_FP420Transport;
0128   bool m_ZDCTransport;
0129 
0130   std::vector<LHCTransportLink> theCorrespondenceMap;
0131 };
0132 #endif