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