#include <RecoRomanPot/RecoFP420/interface/RecoProducerFP420.h>
Public Member Functions | |
std::vector< RecoFP420 > | reconstruct (int, double, double, double, double) |
RecoProducerFP420 (const edm::ParameterSet &conf) | |
virtual | ~RecoProducerFP420 () |
Private Attributes | |
string | beam1filename |
string | beam2filename |
edm::ParameterSet | conf_ |
double | length |
H_BeamLine * | m_beamline1 |
H_BeamLine * | m_beamline2 |
double | m_e |
double | m_q2 |
H_RecRPObject * | m_rp420_b |
H_RecRPObject * | m_rp420_f |
double | m_rpp420_b |
double | m_rpp420_f |
double | m_tx0 |
double | m_ty0 |
double | m_x0 |
double | m_y0 |
double | m_zrefb |
double | m_zreff |
std::vector< RecoFP420 > | rhits |
int | verbosity |
Definition at line 15 of file RecoProducerFP420.h.
RecoProducerFP420::RecoProducerFP420 | ( | const edm::ParameterSet & | conf | ) |
Definition at line 14 of file RecoProducerFP420.cc.
References b1, b2, beam1filename, beam2filename, conf_, GenMuonPlsPt100GeV_cfg::cout, e, lat::endl(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), length, m_beamline1, m_beamline2, m_rp420_b, m_rp420_f, m_rpp420_b, m_rpp420_f, m_zrefb, m_zreff, alivecheck_mergeAndRegister::msg, verbosity, and cms::Exception::what().
00014 :conf_(conf) { 00015 00016 // Create LHC beam line 00017 // double length = param.getParameter<double>("BeamLineLength"); 00018 // std::cout << " BeamLineLength = " << length << std::endl; 00019 00020 length = conf_.getParameter<double>("BeamLineLength" );//m 00021 verbosity = conf_.getUntrackedParameter<int>("VerbosityLevel"); 00022 m_rpp420_f = conf_.getParameter<double>("RP420f");//mm 00023 m_rpp420_b = conf_.getParameter<double>("RP420b");//mm 00024 m_zreff = conf_.getParameter<double>("zreff");//mm 00025 m_zrefb = conf_.getParameter<double>("zrefb");//mm 00026 beam1filename = conf_.getParameter<string>("Beam1"); 00027 beam2filename = conf_.getParameter<string>("Beam2"); 00028 00029 edm::LogInfo ("RecoProducerFP420") << "RecoProducerFP420 parameters: \n" 00030 << " Verbosity: " << verbosity << "\n" 00031 << " RP420f: " << m_rpp420_f << "\n" 00032 << " RP420b: " << m_rpp420_b << "\n"; 00033 if (verbosity > 1) { 00034 std::cout << " RecoProducerFP420: constructor " << std::endl; 00035 std::cout << " BeamLineLength: " << length << std::endl; 00036 std::cout << " RP420f: " << m_rpp420_f << std::endl; 00037 std::cout << " RP420b: " << m_rpp420_b << std::endl; 00038 std::cout << " zreff: " <<m_zreff << std::endl; 00039 std::cout << " zrefb: " <<m_zrefb << std::endl; 00040 } 00041 00042 // edm::FileInPath b1("SimTransport/HectorData/twiss_ip5_b1_v6.5.txt"); 00043 // edm::FileInPath b2("SimTransport/HectorData/twiss_ip5_b2_v6.5.txt"); 00044 00045 edm::FileInPath b1(beam1filename.c_str()); 00046 edm::FileInPath b2(beam2filename.c_str()); 00047 00048 00049 m_beamline1 = new H_BeamLine( 1, length + 0.1 ); // (direction, length) 00050 m_beamline2 = new H_BeamLine( -1, length + 0.1 ); // 00051 00052 try { 00053 m_beamline1->fill( b1.fullPath(), 1, "IP5" ); 00054 m_beamline2->fill( b2.fullPath(), -1, "IP5" ); 00055 } catch ( const edm::Exception& e ) { 00056 std::string msg = e.what(); 00057 msg += " caught in RecoProducerFP420... \nERROR: Could not locate SimTransport/HectorData data files."; 00058 edm::LogError ("DataNotFound") << msg; 00059 } 00060 00061 m_rp420_f = new H_RecRPObject( m_rpp420_f*0.001, (m_rpp420_f + m_zreff)*0.001, *m_beamline1 );// m 00062 m_rp420_b = new H_RecRPObject( m_rpp420_b*0.001, (m_rpp420_b + m_zrefb)*0.001, *m_beamline2 );// m 00063 00064 m_beamline1->offsetElements( 120, -0.097 ); 00065 m_beamline2->offsetElements( 120, +0.097 ); 00066 00067 m_beamline1->calcMatrix(); 00068 m_beamline2->calcMatrix(); 00069 00070 edm::LogInfo ("RecoProducerFP420") << "==============================\n"; 00071 00072 }
RecoProducerFP420::~RecoProducerFP420 | ( | ) | [virtual] |
std::vector< RecoFP420 > RecoProducerFP420::reconstruct | ( | int | direction, | |
double | x1_420, | |||
double | y1_420, | |||
double | x2_420, | |||
double | y2_420 | |||
) |
Definition at line 76 of file RecoProducerFP420.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), m_e, m_q2, m_rp420_b, m_rp420_f, m_tx0, m_ty0, m_x0, m_y0, rhits, and verbosity.
Referenced by FP420RecoMain::run().
00076 { 00077 // ================================================================================== 00078 std::vector<RecoFP420> rhits; 00079 int restracks = 10;// max # tracks 00080 rhits.reserve(restracks); 00081 rhits.clear(); 00082 // ================================================================================== 00083 // trivial (TM), angle compensation (AM) and position compensation (PM) methods 00084 // #define TM 1 #define AM 2 #define PM 3 00085 m_tx0=-100., m_ty0=-100., m_x0=-100., m_y0=-100.; 00086 if ( direction == 1 ) { 00087 if ( m_rp420_f ) { 00088 if (verbosity >1) { 00089 std::cout << " RecoProducerFP420: input coord. in um " << std::endl; 00090 std::cout << " x1_420: " << x1_420 << " y1_420: " << y1_420 << std::endl; 00091 std::cout << " x2_420: " << x2_420 << " y2_420: " << y2_420 << std::endl; 00092 } 00093 m_rp420_f->setPositions( x1_420, y1_420, x2_420 ,y2_420 );//input coord. in um 00094 m_e = m_rp420_f->getE( AM );// GeV 00095 // std::cout << " m_e1: " << m_rp420_f->getE( TM ) << std::endl; 00096 // std::cout << " m_e2: " << m_rp420_f->getE( AM ) << std::endl; 00097 m_tx0 = m_rp420_f->getTXIP();// urad 00098 m_ty0 = m_rp420_f->getTYIP();// urad 00099 m_x0 = m_rp420_f->getX0();// um 00100 m_y0 = m_rp420_f->getY0();// um 00101 m_q2 = m_rp420_f->getQ2();// GeV^2 00102 }// if ( m_rp420_f 00103 }// if ( dire 00104 else if ( direction == 2 ) { 00105 if ( m_rp420_b ) { 00106 m_rp420_b->setPositions( x1_420, y1_420, x2_420 ,y2_420 );// input coord. in um 00107 m_e = m_rp420_b->getE( AM );// GeV 00108 m_tx0 = m_rp420_b->getTXIP();// urad 00109 m_ty0 = m_rp420_b->getTYIP();// urad 00110 m_x0 = m_rp420_b->getX0();// um 00111 m_y0 = m_rp420_b->getY0();// um 00112 m_q2 = m_rp420_b->getQ2();// GeV^2 00113 }// if ( m_rp420_b 00114 } 00115 else{ 00116 return rhits; 00117 } 00118 00119 // ============================== 00120 if (verbosity > 1) { 00121 std::cout << " RecoProducerFP420: rhits.push_back " << std::endl; 00122 std::cout << " m_e: " << m_e << std::endl; 00123 std::cout << " m_x0: " << m_x0 << std::endl; 00124 std::cout << " m_y0: " << m_y0 << std::endl; 00125 std::cout << " m_tx0: " << m_tx0 << std::endl; 00126 std::cout << " m_ty0: " << m_ty0 << std::endl; 00127 std::cout << " m_q2: " << m_q2 << std::endl; 00128 std::cout << " direction: " << direction << std::endl; 00129 } 00130 rhits.push_back( RecoFP420(m_e,m_x0,m_y0,m_tx0,m_ty0,m_q2,direction) ); 00131 // ============================== 00133 return rhits; 00134 //============ 00135 }
string RecoProducerFP420::beam1filename [private] |
string RecoProducerFP420::beam2filename [private] |
edm::ParameterSet RecoProducerFP420::conf_ [private] |
double RecoProducerFP420::length [private] |
H_BeamLine* RecoProducerFP420::m_beamline1 [private] |
H_BeamLine* RecoProducerFP420::m_beamline2 [private] |
double RecoProducerFP420::m_e [private] |
double RecoProducerFP420::m_q2 [private] |
H_RecRPObject* RecoProducerFP420::m_rp420_b [private] |
Definition at line 42 of file RecoProducerFP420.h.
Referenced by reconstruct(), and RecoProducerFP420().
H_RecRPObject* RecoProducerFP420::m_rp420_f [private] |
Definition at line 41 of file RecoProducerFP420.h.
Referenced by reconstruct(), and RecoProducerFP420().
double RecoProducerFP420::m_rpp420_b [private] |
double RecoProducerFP420::m_rpp420_f [private] |
double RecoProducerFP420::m_tx0 [private] |
double RecoProducerFP420::m_ty0 [private] |
double RecoProducerFP420::m_x0 [private] |
double RecoProducerFP420::m_y0 [private] |
double RecoProducerFP420::m_zrefb [private] |
double RecoProducerFP420::m_zreff [private] |
std::vector<RecoFP420> RecoProducerFP420::rhits [private] |
int RecoProducerFP420::verbosity [private] |
Definition at line 28 of file RecoProducerFP420.h.
Referenced by reconstruct(), and RecoProducerFP420().