36 std::cout <<
"FP420RecoMain constructor::" << std::endl;
47 std::cout <<
"FP420RecoMain constructor::" << std::endl;
48 std::cout <<
" eee1=" << eee1 <<
" eee2=" << eee2 <<
" zinibeg =" <<
zinibeg_ << std::endl;
66 std::vector<TrackFP420> rhits;
68 rhits.reserve(restracks);
72 for (
int number_detunits = 1; number_detunits <
dn0; number_detunits++) {
73 unsigned int StID = number_detunits;
74 std::vector<RecoFP420> rcollector;
76 rcollector.reserve(restracks);
80 std::vector<TrackFP420> collector;
83 unsigned int StIDTrack = 1111;
87 double VtxXcur = VtxX;
88 double VtxYcur = VtxY;
89 double VtxZcur = VtxZ;
99 double z1 =
z420 + zinibeg - VtxZcur;
100 double z2 =
z420 + zinibeg + zref1 - VtxZcur;
102 std::cout <<
"FP420RecoMain: StIDTrack=" << StIDTrack << std::endl;
104 outputRange =
input->get(StIDTrack);
111 for (; sort_begin != sort_end; ++sort_begin) {
112 collector.push_back(*sort_begin);
115 std::cout <<
"FP420RecoMain: track collector.size=" << collector.size() << std::endl;
117 std::vector<TrackFP420>::const_iterator simHitIter = collector.begin();
118 std::vector<TrackFP420>::const_iterator simHitIterEnd = collector.end();
119 for (; simHitIter != simHitIterEnd; ++simHitIter) {
121 double x1 = (itrack.
bx() * z1 + (itrack.
ax() - VtxXcur)) * 1000.;
122 double y1 = (itrack.
by() * z1 + (itrack.
ay() - VtxYcur)) * 1000.;
123 double x2 = (itrack.
bx() *
z2 + (itrack.
ax() - VtxXcur)) * 1000.;
124 double y2 = (itrack.
by() *
z2 + (itrack.
ay() - VtxYcur)) * 1000.;
127 std::cout <<
"==================================================================== " << std::endl;
128 std::cout <<
"FP420RecoMain: StID= " << StID << std::endl;
129 std::cout <<
"input coord. in mm: z1= " << z1 << std::endl;
130 std::cout <<
"input coord. in mm: z2= " <<
z2 << std::endl;
131 std::cout <<
"input: itrack.bx()= " << itrack.
bx() << std::endl;
132 std::cout <<
"input: itrack.ax()= " << itrack.
ax() << std::endl;
133 std::cout <<
"input: itrack.by()= " << itrack.
by() << std::endl;
134 std::cout <<
"input: itrack.ay()= " << itrack.
ay() << std::endl;
136 std::cout <<
"input: in um X1noVtx= " << (itrack.
bx() * (
z420 + zinibeg) + itrack.
ax()) * 1000. << std::endl;
137 std::cout <<
"input: in um Y1noVtx= " << (itrack.
by() * (
z420 + zinibeg) + itrack.
ay()) * 1000. << std::endl;
138 std::cout <<
"input: in um X2noVtx= " << (itrack.
bx() * (
z420 + zinibeg + zref1) + itrack.
ax()) * 1000.
140 std::cout <<
"input: in um Y2noVtx= " << (itrack.
by() * (
z420 + zinibeg + zref1) + itrack.
ay()) * 1000.
143 std::cout <<
"input: in mm VtxXcur= " << VtxXcur << std::endl;
144 std::cout <<
"input: in mm VtxYcur= " << VtxYcur << std::endl;
145 std::cout <<
"input: in mm VtxZcur= " << VtxZcur << std::endl;
146 std::cout <<
"input coord. in um: x1= " <<
x1 << std::endl;
147 std::cout <<
"input coord. in um: y1= " <<
y1 << std::endl;
148 std::cout <<
"input coord. in um: x2= " <<
x2 << std::endl;
149 std::cout <<
"input coord. in um: y2= " <<
y2 << std::endl;
151 double zz1 = fabs(z1);
152 double zz2 = fabs(
z2);
159 std::cout <<
"FP420RecoMain: track rcollector.size=" << rcollector.size() << std::endl;
161 if (!rcollector.empty()) {
163 rinputRange.first = rcollector.begin();
164 rinputRange.second = rcollector.end();
169 unsigned int StID0 = 0;
170 toutput->
put(rinputRange, StID0);
172 std::cout <<
"FP420RecoMain: put(rinputRange,StID0)" << std::endl;
177 toutput->
put(rinputRange, StID);
179 std::cout <<
"FP420RecoMain: put(rinputRange,StID)" << std::endl;
188 for (
int number_detunits = 1; number_detunits <
dn0; number_detunits++) {
189 int StID = number_detunits;
193 std::cout <<
"FP420RecoMain: re-new StID= " << StID << std::endl;
195 std::vector<RecoFP420> zcollector;
198 zoutputRange = toutput->
get(StID);
202 for (; sort_begin != sort_end; ++sort_begin) {
203 zcollector.push_back(*sort_begin);
205 std::cout <<
"=======FP420RecoMain:check of re-new zcollector size = " << zcollector.size() << std::endl;
208 std::vector<RecoFP420>::const_iterator simHitIter = zcollector.begin();
209 std::vector<RecoFP420>::const_iterator simHitIterEnd = zcollector.end();
211 for (; simHitIter != simHitIterEnd; ++simHitIter) {
215 std::cout <<
" e0 = " << itrack.
e0() <<
" q20 = " << itrack.
q20() << std::endl;
216 std::cout <<
" tx0 = " << itrack.
tx0() <<
" ty0 = " << itrack.
ty0() << std::endl;
217 std::cout <<
" x0= " << itrack.
x0() <<
" y0= " << itrack.
y0() << std::endl;
220 std::cout <<
" =======================" << std::endl;
227 std::cout <<
"======= FP420RecoMain: end of check " << std::endl;
std::pair< ContainerIterator, ContainerIterator > Range
T getParameter(std::string const &) const
FP420RecoMain(const edm::ParameterSet &conf)
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
T getUntrackedParameter(std::string const &, T const &) const
std::vector< RecoFP420 >::const_iterator ContainerIterator
std::vector< TrackFP420 >::const_iterator ContainerIterator
RecoProducerFP420 * finderParameters_
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)
const Range get(unsigned int stationID) const