37 std::cout <<
"FP420RecoMain constructor::" << std::endl;
38 std::cout <<
"m_rpp420_f=" << m_rpp420_f <<
" m_rpp420_b=" << m_rpp420_b << std::endl;
39 std::cout <<
"m_zreff=" << m_zreff <<
" m_zrefb=" << m_zrefb<< std::endl;
48 std::cout <<
"FP420RecoMain constructor::" << std::endl;
49 std::cout <<
" eee1=" << eee1 <<
" eee2=" << eee2 <<
" zinibeg =" <<
zinibeg_ << std::endl;
69 std::vector<TrackFP420> rhits;
71 rhits.reserve(restracks);
75 for (
int number_detunits=1; number_detunits<
dn0; number_detunits++) {
76 unsigned int StID = number_detunits;
77 std::vector<RecoFP420> rcollector;
79 rcollector.reserve(restracks);
83 std::vector<TrackFP420> collector;
86 unsigned int StIDTrack = 1111;
90 double VtxXcur = VtxX;
91 double VtxYcur = VtxY;
92 double VtxZcur = VtxZ;
102 double z1 = z420+zinibeg-VtxZcur;
103 double z2 = z420+zinibeg+zref1-VtxZcur;
105 std::cout <<
"FP420RecoMain: StIDTrack=" << StIDTrack << std::endl;
107 outputRange = input->get(StIDTrack);
114 for ( ;sort_begin != sort_end; ++sort_begin ) {
115 collector.push_back(*sort_begin);
118 std::cout <<
"FP420RecoMain: track collector.size=" << collector.size() << std::endl;
120 std::vector<TrackFP420>::const_iterator simHitIter = collector.begin();
121 std::vector<TrackFP420>::const_iterator simHitIterEnd = collector.end();
122 for (;simHitIter != simHitIterEnd; ++simHitIter) {
124 double x1 = ( itrack.
bx()*z1 + (itrack.
ax()-VtxXcur) )*1000.;
125 double y1 = ( itrack.
by()*z1 + (itrack.
ay()-VtxYcur) )*1000.;
126 double x2 = ( itrack.
bx()*z2 + (itrack.
ax()-VtxXcur) )*1000.;
127 double y2 = ( itrack.
by()*z2 + (itrack.
ay()-VtxYcur) )*1000.;
130 std::cout <<
"==================================================================== " << std::endl;
131 std::cout <<
"FP420RecoMain: StID= " << StID << std::endl;
132 std::cout <<
"input coord. in mm: z1= " << z1 << std::endl;
133 std::cout <<
"input coord. in mm: z2= " << z2 << std::endl;
134 std::cout <<
"input: itrack.bx()= " << itrack.
bx() << std::endl;
135 std::cout <<
"input: itrack.ax()= " << itrack.
ax() << std::endl;
136 std::cout <<
"input: itrack.by()= " << itrack.
by() << std::endl;
137 std::cout <<
"input: itrack.ay()= " << itrack.
ay() << std::endl;
139 std::cout <<
"input: in um X1noVtx= " << (itrack.
bx()*(z420+zinibeg)+itrack.
ax())*1000. << std::endl;
140 std::cout <<
"input: in um Y1noVtx= " << (itrack.
by()*(z420+zinibeg)+itrack.
ay())*1000. << std::endl;
141 std::cout <<
"input: in um X2noVtx= " << (itrack.
bx()*(z420+zinibeg+zref1)+itrack.
ax())*1000. << std::endl;
142 std::cout <<
"input: in um Y2noVtx= " << (itrack.
by()*(z420+zinibeg+zref1)+itrack.
ay())*1000. << std::endl;
145 std::cout <<
"input: in mm VtxXcur= " << VtxXcur << std::endl;
146 std::cout <<
"input: in mm VtxYcur= " << VtxYcur << std::endl;
147 std::cout <<
"input: in mm VtxZcur= " << VtxZcur << std::endl;
148 std::cout <<
"input coord. in um: x1= " << x1 << std::endl;
149 std::cout <<
"input coord. in um: y1= " << y1 << std::endl;
150 std::cout <<
"input coord. in um: x2= " << x2 << std::endl;
151 std::cout <<
"input coord. in um: y2= " << y2 << std::endl;
162 std::cout <<
"FP420RecoMain: track rcollector.size=" << rcollector.size() << std::endl;
164 if (rcollector.size()>0){
166 rinputRange.first = rcollector.begin();
167 rinputRange.second = rcollector.end();
172 unsigned int StID0 = 0;
173 toutput->put(rinputRange,StID0);
175 std::cout <<
"FP420RecoMain: put(rinputRange,StID0)" << std::endl;
180 toutput->put(rinputRange,StID);
182 std::cout <<
"FP420RecoMain: put(rinputRange,StID)" << std::endl;
196 for (
int number_detunits=1; number_detunits<
dn0; number_detunits++) {
197 int StID = number_detunits;
201 std::cout <<
"FP420RecoMain: re-new StID= " << StID << std::endl;
203 std::vector<RecoFP420> zcollector;
206 zoutputRange = toutput->get(StID);
210 for ( ;sort_begin != sort_end; ++sort_begin ) {
211 zcollector.push_back(*sort_begin);
213 std::cout <<
"=======FP420RecoMain:check of re-new zcollector size = " << zcollector.size() << std::endl;
216 std::vector<RecoFP420>::const_iterator simHitIter = zcollector.begin();
217 std::vector<RecoFP420>::const_iterator simHitIterEnd = zcollector.end();
219 for (;simHitIter != simHitIterEnd; ++simHitIter) {
223 std::cout <<
" e0 = " << itrack.
e0() <<
" q20 = " << itrack.
q20() << std::endl;
224 std::cout <<
" tx0 = " << itrack.
tx0() <<
" ty0 = " << itrack.
ty0() << std::endl;
225 std::cout <<
" x0= " << itrack.
x0() <<
" y0= " << itrack.
y0() << std::endl;
228 std::cout <<
" =======================" << std::endl;
235 std::cout <<
"======= FP420RecoMain: end of check " << std::endl;
T getParameter(std::string const &) const
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_
void run(edm::Handle< TrackCollectionFP420 > &input, std::auto_ptr< RecoCollectionFP420 > &toutput, double VtxX, double VtxY, double VtxZ)
Runs the algorithm.
std::vector< RecoFP420 > reconstruct(int, double, double, double, double, double, double)