35 std::cout <<
"FP420RecoMain constructor::" << std::endl;
36 std::cout <<
"m_rpp420_f=" << m_rpp420_f <<
" m_rpp420_b=" << m_rpp420_b << std::endl;
37 std::cout <<
"m_zreff=" << m_zreff <<
" m_zrefb=" << m_zrefb << std::endl;
46 std::cout <<
"FP420RecoMain constructor::" << std::endl;
47 std::cout <<
" eee1=" << eee1 <<
" eee2=" << eee2 <<
" zinibeg =" <<
zinibeg_ << std::endl;
65 std::vector<TrackFP420> rhits;
67 rhits.reserve(restracks);
71 for (
int number_detunits = 1; number_detunits <
dn0; number_detunits++) {
72 unsigned int StID = number_detunits;
73 std::vector<RecoFP420> rcollector;
75 rcollector.reserve(restracks);
79 std::vector<TrackFP420> collector;
82 unsigned int StIDTrack = 1111;
86 double VtxXcur = VtxX;
87 double VtxYcur = VtxY;
88 double VtxZcur = VtxZ;
98 double z1 = z420 + zinibeg - VtxZcur;
99 double z2 = z420 + zinibeg + zref1 - VtxZcur;
101 std::cout <<
"FP420RecoMain: StIDTrack=" << StIDTrack << std::endl;
103 outputRange = input->get(StIDTrack);
110 for (; sort_begin != sort_end; ++sort_begin) {
111 collector.push_back(*sort_begin);
114 std::cout <<
"FP420RecoMain: track collector.size=" << collector.size() << std::endl;
116 std::vector<TrackFP420>::const_iterator simHitIter = collector.begin();
117 std::vector<TrackFP420>::const_iterator simHitIterEnd = collector.end();
118 for (; simHitIter != simHitIterEnd; ++simHitIter) {
120 double x1 = (itrack.
bx() * z1 + (itrack.
ax() - VtxXcur)) * 1000.;
121 double y1 = (itrack.
by() * z1 + (itrack.
ay() - VtxYcur)) * 1000.;
122 double x2 = (itrack.
bx() * z2 + (itrack.
ax() - VtxXcur)) * 1000.;
123 double y2 = (itrack.
by() * z2 + (itrack.
ay() - VtxYcur)) * 1000.;
126 std::cout <<
"==================================================================== " << std::endl;
127 std::cout <<
"FP420RecoMain: StID= " << StID << std::endl;
128 std::cout <<
"input coord. in mm: z1= " << z1 << std::endl;
129 std::cout <<
"input coord. in mm: z2= " << z2 << std::endl;
130 std::cout <<
"input: itrack.bx()= " << itrack.
bx() << std::endl;
131 std::cout <<
"input: itrack.ax()= " << itrack.
ax() << std::endl;
132 std::cout <<
"input: itrack.by()= " << itrack.
by() << std::endl;
133 std::cout <<
"input: itrack.ay()= " << itrack.
ay() << std::endl;
135 std::cout <<
"input: in um X1noVtx= " << (itrack.
bx() * (z420 + zinibeg) + itrack.
ax()) * 1000. << std::endl;
136 std::cout <<
"input: in um Y1noVtx= " << (itrack.
by() * (z420 + zinibeg) + itrack.
ay()) * 1000. << std::endl;
137 std::cout <<
"input: in um X2noVtx= " << (itrack.
bx() * (z420 + zinibeg + zref1) + itrack.
ax()) * 1000.
139 std::cout <<
"input: in um Y2noVtx= " << (itrack.
by() * (z420 + zinibeg + zref1) + itrack.
ay()) * 1000.
142 std::cout <<
"input: in mm VtxXcur= " << VtxXcur << std::endl;
143 std::cout <<
"input: in mm VtxYcur= " << VtxYcur << std::endl;
144 std::cout <<
"input: in mm VtxZcur= " << VtxZcur << std::endl;
145 std::cout <<
"input coord. in um: x1= " << x1 << std::endl;
146 std::cout <<
"input coord. in um: y1= " << y1 << std::endl;
147 std::cout <<
"input coord. in um: x2= " << x2 << std::endl;
148 std::cout <<
"input coord. in um: y2= " << y2 << std::endl;
150 double zz1 = fabs(z1);
151 double zz2 = fabs(z2);
153 StID, x1, y1, x2, y2, zz1, zz2);
158 std::cout <<
"FP420RecoMain: track rcollector.size=" << rcollector.size() << std::endl;
160 if (!rcollector.empty()) {
162 rinputRange.first = rcollector.begin();
163 rinputRange.second = rcollector.end();
168 unsigned int StID0 = 0;
169 toutput->
put(rinputRange, StID0);
171 std::cout <<
"FP420RecoMain: put(rinputRange,StID0)" << std::endl;
176 toutput->
put(rinputRange, StID);
178 std::cout <<
"FP420RecoMain: put(rinputRange,StID)" << std::endl;
187 for (
int number_detunits = 1; number_detunits <
dn0; number_detunits++) {
188 int StID = number_detunits;
192 std::cout <<
"FP420RecoMain: re-new StID= " << StID << std::endl;
194 std::vector<RecoFP420> zcollector;
197 zoutputRange = toutput->
get(StID);
201 for (; sort_begin != sort_end; ++sort_begin) {
202 zcollector.push_back(*sort_begin);
204 std::cout <<
"=======FP420RecoMain:check of re-new zcollector size = " << zcollector.size() << std::endl;
207 std::vector<RecoFP420>::const_iterator simHitIter = zcollector.begin();
208 std::vector<RecoFP420>::const_iterator simHitIterEnd = zcollector.end();
210 for (; simHitIter != simHitIterEnd; ++simHitIter) {
214 std::cout <<
" e0 = " << itrack.
e0() <<
" q20 = " << itrack.
q20() << std::endl;
215 std::cout <<
" tx0 = " << itrack.
tx0() <<
" ty0 = " << itrack.
ty0() << std::endl;
216 std::cout <<
" x0= " << itrack.
x0() <<
" y0= " << itrack.
y0() << std::endl;
219 std::cout <<
" =======================" << std::endl;
226 std::cout <<
"======= FP420RecoMain: end of check " << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
std::pair< ContainerIterator, ContainerIterator > Range
FP420RecoMain(const edm::ParameterSet &conf)
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
std::vector< RecoFP420 >::const_iterator ContainerIterator
std::vector< TrackFP420 >::const_iterator ContainerIterator
RecoProducerFP420 * finderParameters_
const Range get(unsigned int stationID) const
void run(edm::Handle< TrackCollectionFP420 > &input, RecoCollectionFP420 *toutput, double VtxX, double VtxY, double VtxZ)
Runs the algorithm.
void put(Range input, unsigned int stationID)
std::vector< RecoFP420 > reconstruct(int, double, double, double, double, double, double)
T getParameter(std::string const &) const