25 #include "TVirtualGeoTrack.h"
28 : fTrackReps(NULL),fCardinal_rep(0), fNextHitToFit(0), fSmooth(
false)
36 : fTrackReps(NULL), fCardinal_rep(0), fNextHitToFit(0), fSmooth(
false)
48 for(
unsigned int i=0;i<
fHits.size();i++) {
66 for(
unsigned int i=0; i<_tr.
getNumReps();i++) {
87 for(
unsigned int i=0;i<
fHits.size();i++) {
102 for(
unsigned int i=0;i<_tr.
getNumHits();i++) {
130 for(
unsigned int i=0;i<
fHits.size();i++) {
141 for(
unsigned int i=0;i<nhits;++i){
156 std::vector< std::pair<unsigned int, GFAbsRecoHit*> > pv;
159 for (
unsigned int i=0; i<nHits; ++i) {
160 pv.push_back( std::pair<unsigned int, GFAbsRecoHit*>(i,
fHits[i]) ) ;
166 std::vector<unsigned int> indices;
167 indices.reserve(nHits);
168 for (
unsigned int i=0; i<nHits; ++i){
169 indices.push_back(pv[i].first);
175 std::vector<GFAbsRecoHit*> sortedHits;
176 sortedHits.reserve(nHits);
177 for (
unsigned int i=0; i<nHits; ++i){
178 sortedHits.push_back(
fHits[indices[i]]);
187 GFException exc(
"GFTrack::sortHits ==> Cannot sort GFTrackCand accordingly since it has not the same number of hits as the GFTrack.",__LINE__,__FILE__);
195 for (
unsigned int i=0; i<
fRepAtHit.size(); ++i){
196 fRepAtHit[i] = std::find(indices.begin(), indices.end(),
fRepAtHit[i]) - indices.begin();
223 for(
unsigned int i=0; i<
n; ++i){
226 std::cout<<pos.X()<<
","<<pos.Y()<<
","<<pos.Z()<<std::endl;
227 geotrk->AddPoint(pos.X(),pos.Y(),pos.Z(),0);
236 std::vector<double>& result)
243 for(
unsigned int ih=0; ih<nhits; ++ih){
251 TMatrixT<double> state(repDim,1);
252 TMatrixT<double>
cov(repDim,repDim);
260 TMatrixT<double>
m,V;
262 double res=(m-(H*state))[
dim][0];;
266 result.push_back(res);
273 std::cout <<
"GFTrack::printBookkeeping()" << std::endl;
275 std::cout <<
"trackRep " << i <<
":" << std::endl;
283 std::cout <<
"TrackRep " << i <<
" (defined at hit " <<
getRepAtHit(i) <<
"):\n";
287 std::cout <<
"GFTrack has " <<
getNumHits() <<
" detector hits. ";
289 else if (
fSmooth) std::cout <<
"Smoothing is enabled.";
290 else std::cout <<
"Smoothing is disabled.";
291 std::cout << std::endl;
296 std::map<GFAbsRecoHit*, unsigned int> hitMap;
299 for (
unsigned int i=0; i<nHits; ++i){
300 hitMap.insert(std::pair<GFAbsRecoHit*, unsigned int>(
fHits[i], i));
308 for(
int i=0;retVal.size();++i){
314 if(
fHits.size() <= 1)
return false;
315 unsigned int detId,hitId,planeId;
318 unsigned int lastPlane=planeId;
319 retVal.push_back(
new std::vector<int>);
320 retVal.at(0)->push_back(0);
324 if(lastPlane==planeId){
325 retVal.at(retVal.size()-1)->push_back(i);
329 retVal.push_back(
new std::vector<int>);
330 retVal.at(retVal.size()-1)->push_back(i);
340 for(
int irep=0; irep<nreps; ++irep){
346 for(
int i=0;i<cov.GetNrows();++i){
347 for(
int j=0;j<cov.GetNcols();++j){
352 cov[i][j] = cov[i][j] * blowUpFactor;