Skip to content

Commit

Permalink
a few obvious code review things
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray committed Oct 16, 2017
1 parent fee8513 commit 3537535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {

double * dz2_; // square of the error of z(pca)
double * dt2_; // square of the error of t(pca)
// double * errsum_; // sum of squares of the pca errors obsolete
double * Z_sum_; // Z[i] for DA clustering

std::vector<double> z; // z-coordinate at point of closest approach to the beamline
std::vector<double> t; // t-coordinate at point of closest approach to the beamline
std::vector<double> dz2; // square of the error of z(pca)
std::vector<double> dt2; // square of the error of t(pca)
//std::vector<double> errsum; // sum of squares of the pca errors
std::vector<double> Z_sum; // Z[i] for DA clustering
std::vector<double> pi; // track weight
std::vector< const reco::TransientTrack* > tt; // a pointer to the Transient Track
Expand All @@ -83,11 +81,9 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {

ei_cache.push_back( 0.0 );
ei.push_back( 0.0 );
//sw.push_back( 0.0 );
swz.push_back( 0.0);
swt.push_back( 0.0);
se.push_back( 0.0);
//swE.push_back( 0.0);
nuz.push_back(0.0);
nut.push_back(0.0);
szz.push_back(0.0);
Expand All @@ -110,11 +106,9 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {
pk_ = &pk.front();

ei_ = &ei.front();
//sw_ = &sw.front();
swz_ = &swz.front();
swt_ = &swt.front();
se_ = &se.front();
//swE_ = &swE.front();
nuz_ = &nuz.front();
nut_ = &nut.front();
szz_ = &szz.front();
Expand All @@ -133,11 +127,9 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {

ei_cache.insert(ei_cache.begin() + i, 0.0 );
ei.insert( ei.begin() + i, 0.0 );
//sw.insert( sw.begin() + i, 0.0 );
swz.insert(swz.begin() + i, 0.0 );
swt.insert(swt.begin() + i, 0.0 );
se.insert( se.begin() + i, 0.0 );
//swE.insert(swE.begin() + i, 0.0 );
nuz.insert(nuz.begin() +i, 0.0 );
nut.insert(nut.begin() +i, 0.0 );
szz.insert(szz.begin() + i, 0.0 );
Expand All @@ -154,11 +146,9 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {

ei_cache.erase( ei_cache.begin() + i);
ei.erase( ei.begin() + i);
//sw.erase( sw.begin() + i);
swz.erase( swz.begin() + i);
swt.erase( swt.begin() + i);
se.erase(se.begin() + i);
//swE.erase(swE.begin() + i);

extractRaw();
}
Expand All @@ -183,11 +173,9 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {

double * ei_cache_;
double * ei_;
//double * sw_;
double * swz_;
double * swt_;
double * se_;
// double * swE_;
double * szz_;
double * stt_;
double * szt_;
Expand All @@ -197,11 +185,9 @@ class DAClusterizerInZT_vect final : public TrackClusterizerInZ {
// --- temporary numbers, used during update
std::vector<double> ei_cache;
std::vector<double> ei;
//std::vector<double> sw; replaced by nuz, nut
std::vector<double> swz;
std::vector<double> swt;
std::vector<double> se;
// std::vector<double> swE; replaced by szz,stt,stz
std::vector<double> nuz;
std::vector<double> nut;
std::vector<double> szz;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,13 @@ double DAClusterizerInZT_vect::get_Tc(const vertex_t & y, int k)const{
double Tz = y.szz_[k]/y.nuz_[k]; // actually 0.5*Tc(z)
double Tt = y.stt_[k]/y.nut_[k];
double mx = y.szt_[k]/y.nuz_[k]*y.szt_[k]/y.nut_[k];
/*
#ifdef VI_DEBUG
cout << "get_Tc " << endl;
cout << "szz=" << scientific << y.szz[k] << " stt=" << y.stt_[k] << " szt=" << y.szt_[k] << endl;
cout << "nuz=" << scientific << y.nuz[k] << " nut=" << y.nut_[k] << endl;
cout << "Tz=" << scientific << 2*Tz << " Tt=" << 2*Tt << endl;
*/
return Tz + Tt + sqrt(pow(Tz - Tt, 2) + 4 * mx);
#endif
return Tz + Tt + std::sqrt(pow(Tz - Tt, 2) + 4 * mx);
}

bool
Expand Down

0 comments on commit 3537535

Please sign in to comment.