CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
DAClusterizerInZ_vect Class Referencefinal

#include <DAClusterizerInZ_vect.h>

Inheritance diagram for DAClusterizerInZ_vect:
TrackClusterizerInZ

Classes

struct  track_t
 
struct  vertex_t
 

Public Member Functions

double beta0 (const double betamax, track_t const &tks, vertex_t const &y) const
 
void clear_vtx_range (track_t &gtracks, vertex_t &gvertices) const
 
std::vector< std::vector< reco::TransientTrack > > clusterize (const std::vector< reco::TransientTrack > &tracks) const override
 
 DAClusterizerInZ_vect (const edm::ParameterSet &conf)
 
void dump (const double beta, const vertex_t &y, const track_t &tks, const int verbosity=0) const
 
double evalF (const double beta, track_t const &tks, vertex_t const &v) const
 
track_t fill (const std::vector< reco::TransientTrack > &tracks) const
 
bool merge (vertex_t &y, track_t &tks, double &beta) const
 
bool purge (vertex_t &, track_t &, double &, const double) const
 
void set_vtx_range (double beta, track_t &gtracks, vertex_t &gvertices) const
 
bool split (const double beta, track_t &t, vertex_t &y, double threshold=1.) const
 
unsigned int thermalize (double beta, track_t &gtracks, vertex_t &gvertices, const double delta_max, const double rho0=0.) const
 
double update (double beta, track_t &gtracks, vertex_t &gvertices, const double rho0=0) const
 
double updateTc (double beta, track_t &gtracks, vertex_t &gvertices, const double rho0=0) const
 
void verify (const vertex_t &v, const track_t &tks, unsigned int nv=999999, unsigned int nt=999999) const
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &tracks, const int verbosity=0) const
 
- Public Member Functions inherited from TrackClusterizerInZ
 TrackClusterizerInZ ()
 
 TrackClusterizerInZ (const edm::ParameterSet &conf)
 
virtual ~TrackClusterizerInZ ()
 

Private Attributes

double betamax_
 
double betapurge_
 
double betastop_
 
unsigned int convergence_mode_
 
double coolingFactor_
 
double d0CutOff_
 
double delta_highT_
 
double delta_lowT_
 
double dzCutOff_
 
unsigned int maxIterations_
 
double mintrkweight_
 
double sel_zrange_
 
double uniquetrkweight_
 
bool verbose_
 
double vertexSize_
 
double zdumpcenter_
 
double zdumpwidth_
 
double zmerge_
 
const double zrange_min_ = 0.1
 

Detailed Description

Description: separates event tracks into clusters along the beam line

Version which auto-vectorizes with gcc 4.6 or newer

Definition at line 20 of file DAClusterizerInZ_vect.h.

Constructor & Destructor Documentation

◆ DAClusterizerInZ_vect()

DAClusterizerInZ_vect::DAClusterizerInZ_vect ( const edm::ParameterSet conf)

Definition at line 22 of file DAClusterizerInZ_vect.cc.

22  {
23  // hardcoded parameters
24  maxIterations_ = 1000;
25  mintrkweight_ = 0.5;
26 
27  // configurable debug outptut debug output
28  verbose_ = conf.getUntrackedParameter<bool>("verbose", false);
29  zdumpcenter_ = conf.getUntrackedParameter<double>("zdumpcenter", 0.);
30  zdumpwidth_ = conf.getUntrackedParameter<double>("zdumpwidth", 20.);
31 
32  // configurable parameters
33  double Tmin = conf.getParameter<double>("Tmin");
34  double Tpurge = conf.getParameter<double>("Tpurge");
35  double Tstop = conf.getParameter<double>("Tstop");
36  vertexSize_ = conf.getParameter<double>("vertexSize");
37  coolingFactor_ = conf.getParameter<double>("coolingFactor");
38  d0CutOff_ = conf.getParameter<double>("d0CutOff");
39  dzCutOff_ = conf.getParameter<double>("dzCutOff");
40  uniquetrkweight_ = conf.getParameter<double>("uniquetrkweight");
41  zmerge_ = conf.getParameter<double>("zmerge");
42  sel_zrange_ = conf.getParameter<double>("zrange");
43  convergence_mode_ = conf.getParameter<int>("convergence_mode");
44  delta_lowT_ = conf.getParameter<double>("delta_lowT");
45  delta_highT_ = conf.getParameter<double>("delta_highT");
46 
47  if (verbose_) {
48  std::cout << "DAClusterizerinZ_vect: mintrkweight = " << mintrkweight_ << std::endl;
49  std::cout << "DAClusterizerinZ_vect: uniquetrkweight = " << uniquetrkweight_ << std::endl;
50  std::cout << "DAClusterizerinZ_vect: zmerge = " << zmerge_ << std::endl;
51  std::cout << "DAClusterizerinZ_vect: Tmin = " << Tmin << std::endl;
52  std::cout << "DAClusterizerinZ_vect: Tpurge = " << Tpurge << std::endl;
53  std::cout << "DAClusterizerinZ_vect: Tstop = " << Tstop << std::endl;
54  std::cout << "DAClusterizerinZ_vect: vertexSize = " << vertexSize_ << std::endl;
55  std::cout << "DAClusterizerinZ_vect: coolingFactor = " << coolingFactor_ << std::endl;
56  std::cout << "DAClusterizerinZ_vect: d0CutOff = " << d0CutOff_ << std::endl;
57  std::cout << "DAClusterizerinZ_vect: dzCutOff = " << dzCutOff_ << std::endl;
58  std::cout << "DAClusterizerInZ_vect: zrange = " << sel_zrange_ << std::endl;
59  std::cout << "DAClusterizerinZ_vect: convergence mode = " << convergence_mode_ << std::endl;
60  std::cout << "DAClusterizerinZ_vect: delta_highT = " << delta_highT_ << std::endl;
61  std::cout << "DAClusterizerinZ_vect: delta_lowT = " << delta_lowT_ << std::endl;
62  }
63 #ifdef DEBUG
64  std::cout << "DAClusterizerinZ_vect: DEBUGLEVEL " << DEBUGLEVEL << std::endl;
65 #endif
66 
67  if (convergence_mode_ > 1) {
68  edm::LogWarning("DAClusterizerinZ_vect")
69  << "DAClusterizerInZ_vect: invalid convergence_mode" << convergence_mode_ << " reset to default " << 0;
71  }
72 
73  if (Tmin == 0) {
74  edm::LogWarning("DAClusterizerinZ_vect")
75  << "DAClusterizerInZ_vect: invalid Tmin" << Tmin << " reset to default " << 1. / betamax_;
76  } else {
77  betamax_ = 1. / Tmin;
78  }
79 
80  if ((Tpurge > Tmin) || (Tpurge == 0)) {
81  edm::LogWarning("DAClusterizerinZ_vect")
82  << "DAClusterizerInZ_vect: invalid Tpurge" << Tpurge << " set to " << Tmin;
83  Tpurge = Tmin;
84  }
85  betapurge_ = 1. / Tpurge;
86 
87  if ((Tstop > Tpurge) || (Tstop == 0)) {
88  edm::LogWarning("DAClusterizerinZ_vect")
89  << "DAClusterizerInZ_vect: invalid Tstop" << Tstop << " set to " << max(1., Tpurge);
90  Tstop = max(1., Tpurge);
91  }
92  betastop_ = 1. / Tstop;
93 }

References gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), SiStripPI::max, HLT_FULL_cff::Tmin, HLT_FULL_cff::Tpurge, and HLT_FULL_cff::Tstop.

Member Function Documentation

◆ beta0()

double DAClusterizerInZ_vect::beta0 ( const double  betamax,
track_t const &  tks,
vertex_t const &  y 
) const

Definition at line 713 of file DAClusterizerInZ_vect.cc.

713  {
714  double T0 = 0; // max Tc for beta=0
715  // estimate critical temperature from beta=0 (T=inf)
716  const unsigned int nt = tks.getSize();
717  const unsigned int nv = y.getSize();
718 
719  for (unsigned int k = 0; k < nv; k++) {
720  // vertex fit at T=inf
721  double sumwz = 0;
722  double sumw = 0;
723  for (unsigned int i = 0; i < nt; i++) {
724  double w = tks.pi_ptr[i] * tks.dz2_ptr[i];
725  sumwz += w * tks.z_ptr[i];
726  sumw += w;
727  }
728 
729  y.z_ptr[k] = sumwz / sumw;
730 
731  // estimate Tcrit
732  double a = 0, b = 0;
733  for (unsigned int i = 0; i < nt; i++) {
734  double dx = tks.z_ptr[i] - y.z_ptr[k];
735  double w = tks.pi_ptr[i] * tks.dz2_ptr[i];
736  a += w * std::pow(dx, 2) * tks.dz2_ptr[i];
737  b += w;
738  }
739  double Tc = 2. * a / b; // the critical temperature of this vertex
740 
741  if (Tc > T0)
742  T0 = Tc;
743 
744  } // vertex loop (normally there should be only one vertex at beta=0)
745 
746 #ifdef DEBUG
747  if (DEBUGLEVEL > 0) {
748  std::cout << "DAClusterizerInZ_vect.beta0: Tc = " << T0 << std::endl;
749  int coolingsteps = 1 - int(std::log(T0 * betamax) / std::log(coolingFactor_));
750  std::cout << "DAClusterizerInZ_vect.beta0: nstep = " << coolingsteps << std::endl;
751  }
752 #endif
753 
754  if (T0 > 1. / betamax) {
755  int coolingsteps = 1 - int(std::log(T0 * betamax) / std::log(coolingFactor_));
756 
757  return betamax * std::pow(coolingFactor_, coolingsteps);
758  } else {
759  // ensure at least one annealing step
760  return betamax * coolingFactor_;
761  }
762 }

References a, b, gather_cfg::cout, PVValHelper::dx, DAClusterizerInZ_vect::track_t::dz2_ptr, DAClusterizerInZ_vect::track_t::getSize(), mps_fire::i, createfilelist::int, dqmdumpme::k, dqm-mbProfile::log, nt, DAClusterizerInZ_vect::track_t::pi_ptr, funct::pow(), w, and DAClusterizerInZ_vect::track_t::z_ptr.

◆ clear_vtx_range()

void DAClusterizerInZ_vect::clear_vtx_range ( track_t gtracks,
vertex_t gvertices 
) const

Definition at line 272 of file DAClusterizerInZ_vect.cc.

272  {
273  const unsigned int nt = gtracks.getSize();
274  const unsigned int nv = gvertices.getSize();
275  for (auto itrack = 0U; itrack < nt; ++itrack) {
276  gtracks.kmin[itrack] = 0;
277  gtracks.kmax[itrack] = nv;
278  }
279 }

References DAClusterizerInZ_vect::track_t::getSize(), DAClusterizerInZ_vect::vertex_t::getSize(), DAClusterizerInZ_vect::track_t::kmax, DAClusterizerInZ_vect::track_t::kmin, nt, and mitigatedMETSequence_cff::U.

◆ clusterize()

vector< vector< reco::TransientTrack > > DAClusterizerInZ_vect::clusterize ( const std::vector< reco::TransientTrack > &  tracks) const
overridevirtual

Implements TrackClusterizerInZ.

Definition at line 1084 of file DAClusterizerInZ_vect.cc.

1085  {
1086  vector<vector<reco::TransientTrack> > clusters;
1087  vector<TransientVertex>&& pv = vertices(tracks);
1088 
1089 #ifdef DEBUG
1090  if (DEBUGLEVEL > 0) {
1091  std::cout << "###################################################" << endl;
1092  std::cout << "# vectorized DAClusterizerInZ_vect::clusterize nt=" << tracks.size() << endl;
1093  std::cout << "# DAClusterizerInZ_vect::clusterize pv.size=" << pv.size() << endl;
1094  std::cout << "###################################################" << endl;
1095  }
1096 #endif
1097 
1098  if (pv.empty()) {
1099  return clusters;
1100  }
1101 
1102  // fill into clusters and merge
1103  vector<reco::TransientTrack> aCluster = pv.begin()->originalTracks();
1104 
1105  for (auto k = pv.begin() + 1; k != pv.end(); k++) {
1106  if (std::abs(k->position().z() - (k - 1)->position().z()) > (2 * vertexSize_)) {
1107  // close a cluster
1108  if (aCluster.size() > 1) {
1109  clusters.push_back(aCluster);
1110  }
1111 #ifdef DEBUG
1112  else {
1113  std::cout << " one track cluster at " << k->position().z() << " suppressed" << std::endl;
1114  }
1115 #endif
1116  aCluster.clear();
1117  }
1118  for (unsigned int i = 0; i < k->originalTracks().size(); i++) {
1119  aCluster.push_back(k->originalTracks()[i]);
1120  }
1121  }
1122  clusters.emplace_back(std::move(aCluster));
1123 
1124  return clusters;
1125 }

References funct::abs(), bsc_activity_cfg::clusters, gather_cfg::cout, mps_fire::i, dqmdumpme::k, eostools::move(), position, MetAnalyzer::pv(), PDWG_EXOHSCP_cff::tracks, and pwdgSkimBPark_cfi::vertices.

◆ dump()

void DAClusterizerInZ_vect::dump ( const double  beta,
const vertex_t y,
const track_t tks,
const int  verbosity = 0 
) const

Definition at line 1127 of file DAClusterizerInZ_vect.cc.

1127  {
1128 #ifdef DEBUG
1129  const unsigned int nv = y.getSize();
1130  const unsigned int nt = tks.getSize();
1131 
1132  std::vector<unsigned int> iz;
1133  for (unsigned int j = 0; j < nt; j++) {
1134  iz.push_back(j);
1135  }
1136  std::sort(iz.begin(), iz.end(), [tks](unsigned int a, unsigned int b) { return tks.z_ptr[a] < tks.z_ptr[b]; });
1137  std::cout << std::endl;
1138  std::cout << "-----DAClusterizerInZ::dump ----" << nv << " clusters " << std::endl;
1139  std::cout << " ";
1140  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1141  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) < zdumpwidth_) {
1142  std::cout << " " << setw(3) << ivertex << " ";
1143  }
1144  }
1145  std::cout << endl;
1146  std::cout << " z= ";
1147  std::cout << setprecision(4);
1148  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1149  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) < zdumpwidth_) {
1150  std::cout << setw(8) << fixed << y.z_ptr[ivertex];
1151  }
1152  }
1153  std::cout << endl
1154  << "T=" << setw(15) << 1. / beta << " Tmin =" << setw(10) << 1. / betamax_
1155  << " Tc= ";
1156  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1157  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) < zdumpwidth_) {
1158  double Tc = 2 * y.swE_ptr[ivertex] / y.sw_ptr[ivertex];
1159  std::cout << setw(8) << fixed << setprecision(1) << Tc;
1160  }
1161  }
1162  std::cout << endl;
1163 
1164  std::cout << " pk= ";
1165  double sumpk = 0;
1166  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1167  sumpk += y.pk_ptr[ivertex];
1168  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) > zdumpwidth_)
1169  continue;
1170  std::cout << setw(8) << setprecision(4) << fixed << y.pk_ptr[ivertex];
1171  }
1172  std::cout << endl;
1173 
1174  std::cout << " nt= ";
1175  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1176  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) > zdumpwidth_)
1177  continue;
1178  std::cout << setw(8) << setprecision(1) << fixed << y.pk_ptr[ivertex] * nt;
1179  }
1180  std::cout << endl;
1181 
1182  if (verbosity > 0) {
1183  double E = 0, F = 0;
1184  std::cout << endl;
1185  std::cout << "---- z +/- dz ip +/-dip pt phi eta weights ----" << endl;
1186  std::cout << setprecision(4);
1187  for (unsigned int i0 = 0; i0 < nt; i0++) {
1188  unsigned int i = iz[i0];
1189  if (tks.Z_sum_ptr[i] > 0) {
1190  F -= std::log(tks.Z_sum_ptr[i]) / beta;
1191  }
1192  double tz = tks.z_ptr[i];
1193 
1194  if (std::fabs(tz - zdumpcenter_) > zdumpwidth_)
1195  continue;
1196  std::cout << setw(4) << i << ")" << setw(8) << fixed << setprecision(4) << tz << " +/-" << setw(6)
1197  << sqrt(1. / tks.dz2_ptr[i]);
1198  if ((tks.tt[i] == nullptr)) {
1199  std::cout << " effective track ";
1200  } else {
1201  if (tks.tt[i]->track().quality(reco::TrackBase::highPurity)) {
1202  std::cout << " *";
1203  } else {
1204  std::cout << " ";
1205  }
1206  if (tks.tt[i]->track().hitPattern().hasValidHitInPixelLayer(PixelSubdetector::SubDetector::PixelBarrel, 1)) {
1207  std::cout << "+";
1208  } else {
1209  std::cout << "-";
1210  }
1211  std::cout << setw(1)
1212  << tks.tt[i]
1213  ->track()
1214  .hitPattern()
1215  .pixelBarrelLayersWithMeasurement(); // see DataFormats/TrackReco/interface/HitPattern.h
1216  std::cout << setw(1) << tks.tt[i]->track().hitPattern().pixelEndcapLayersWithMeasurement();
1217  std::cout << setw(1) << hex
1218  << tks.tt[i]->track().hitPattern().trackerLayersWithMeasurement() -
1219  tks.tt[i]->track().hitPattern().pixelLayersWithMeasurement()
1220  << dec;
1221  std::cout << "=" << setw(1) << hex
1222  << tks.tt[i]->track().hitPattern().numberOfLostHits(reco::HitPattern::MISSING_OUTER_HITS) << dec;
1223 
1224  Measurement1D IP = tks.tt[i]->stateAtBeamLine().transverseImpactParameter();
1225  std::cout << setw(8) << IP.value() << "+/-" << setw(6) << IP.error();
1226  std::cout << " " << setw(6) << setprecision(2) << tks.tt[i]->track().pt() * tks.tt[i]->track().charge();
1227  std::cout << " " << setw(5) << setprecision(2) << tks.tt[i]->track().phi() << " " << setw(5) << setprecision(2)
1228  << tks.tt[i]->track().eta();
1229  } // not a dummy track
1230 
1231  double sump = 0.;
1232  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1233  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) > zdumpwidth_)
1234  continue;
1235 
1236  if ((tks.pi_ptr[i] > 0) && (tks.Z_sum_ptr[i] > 0)) {
1237  //double p=pik(beta,tks[i],*k);
1238  double p = y.pk_ptr[ivertex] * local_exp(-beta * Eik(tks.z_ptr[i], y.z_ptr[ivertex], tks.dz2_ptr[i])) /
1239  tks.Z_sum_ptr[i];
1240  if (p > 0.0001) {
1241  std::cout << setw(8) << setprecision(3) << p;
1242  } else {
1243  std::cout << " . ";
1244  }
1245  E += p * Eik(tks.z_ptr[i], y.z_ptr[ivertex], tks.dz2_ptr[i]);
1246  sump += p;
1247  } else {
1248  std::cout << " ";
1249  }
1250  }
1251  std::cout << " ( " << std::setw(3) << tks.kmin[i] << "," << std::setw(3) << tks.kmax[i] - 1 << " ) ";
1252  std::cout << endl;
1253  }
1254  std::cout << " ";
1255  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1256  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) < zdumpwidth_) {
1257  std::cout << " " << setw(3) << ivertex << " ";
1258  }
1259  }
1260  std::cout << endl;
1261  std::cout << " z= ";
1262  std::cout << setprecision(4);
1263  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
1264  if (std::fabs(y.z_ptr[ivertex] - zdumpcenter_) < zdumpwidth_) {
1265  std::cout << setw(8) << fixed << y.z_ptr[ivertex];
1266  }
1267  }
1268  std::cout << endl;
1269  std::cout << endl
1270  << "T=" << 1 / beta << " E=" << E << " n=" << y.getSize() << " F= " << F << endl
1271  << "----------" << endl;
1272  }
1273 #endif
1274 }

References a, b, zMuMuMuonUserData::beta, gather_cfg::cout, TauDecayModes::dec, DAClusterizerInZ_vect::track_t::dz2_ptr, F(), alignBH_cfg::fixed, DAClusterizerInZ_vect::track_t::getSize(), reco::TrackBase::highPurity, mps_fire::i, listHistos::IP, dqmiolumiharvest::j, DAClusterizerInZ_vect::track_t::kmax, DAClusterizerInZ_vect::track_t::kmin, dqm-mbProfile::log, reco::HitPattern::MISSING_OUTER_HITS, nt, AlCaHLTBitMon_ParallelJobs::p, DAClusterizerInZ_vect::track_t::pi_ptr, GeomDetEnumerators::PixelBarrel, mathSSE::sqrt(), DAClusterizerInZ_vect::track_t::tt, HIPAlignmentAlgorithm_cfi::verbosity, DAClusterizerInZ_vect::track_t::z_ptr, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

◆ evalF()

double DAClusterizerInZ_vect::evalF ( const double  beta,
track_t const &  tks,
vertex_t const &  v 
) const

Definition at line 519 of file DAClusterizerInZ_vect.cc.

519  {
520  // temporary : evaluate the original F
521  auto nt = tks.getSize();
522  auto nv = v.getSize();
523  double F = 0;
524  for (auto i = 0U; i < nt; i++) {
525  double Z = 0;
526  for (auto k = 0u; k < nv; k++) {
527  double Eik = (tks.z[k] - v.z[i]) * (tks.z[k] - v.z[i]) * tks.dz2[i];
528  if ((beta * Eik) < 30) {
529  Z += v.pk[k] * local_exp(-beta * Eik);
530  }
531  }
532  if (Z > 0) {
533  F += tks.pi[i] * log(Z);
534  }
535  }
536  std::cout << "F(full) = " << -F / beta << std::endl;
537  return -F / beta;
538 }

References zMuMuMuonUserData::beta, gather_cfg::cout, DAClusterizerInZ_vect::track_t::dz2, F(), DAClusterizerInZ_vect::track_t::getSize(), mps_fire::i, dqmdumpme::k, dqm-mbProfile::log, nt, DAClusterizerInZ_vect::track_t::pi, mitigatedMETSequence_cff::U, findQualityFiles::v, BeamSpotPI::Z, and DAClusterizerInZ_vect::track_t::z.

◆ fill()

DAClusterizerInZ_vect::track_t DAClusterizerInZ_vect::fill ( const std::vector< reco::TransientTrack > &  tracks) const

Definition at line 178 of file DAClusterizerInZ_vect.cc.

178  {
179  // prepare track data for clustering
180  track_t tks;
181  for (auto it = tracks.begin(); it != tracks.end(); it++) {
182  if (!(*it).isValid())
183  continue;
184  double t_pi = 1.;
185  double t_z = ((*it).stateAtBeamLine().trackStateAtPCA()).position().z();
186  if (std::fabs(t_z) > 1000.)
187  continue;
188  auto const& t_mom = (*it).stateAtBeamLine().trackStateAtPCA().momentum();
189  // get the beam-spot
190  reco::BeamSpot beamspot = (it->stateAtBeamLine()).beamSpot();
191  double t_dz2 = std::pow((*it).track().dzError(), 2) // track errror
192  + (std::pow(beamspot.BeamWidthX() * t_mom.x(), 2) + std::pow(beamspot.BeamWidthY() * t_mom.y(), 2)) *
193  std::pow(t_mom.z(), 2) / std::pow(t_mom.perp2(), 2) // beam spot width
194  + std::pow(vertexSize_, 2); // intrinsic vertex size, safer for outliers and short lived decays
195  t_dz2 = 1. / t_dz2;
196  if (edm::isNotFinite(t_dz2) || t_dz2 < std::numeric_limits<double>::min())
197  continue;
198  if (d0CutOff_ > 0) {
199  Measurement1D atIP = (*it).stateAtBeamLine().transverseImpactParameter(); // error contains beamspot
200  t_pi = 1. / (1. + local_exp(std::pow(atIP.value() / atIP.error(), 2) -
201  std::pow(d0CutOff_, 2))); // reduce weight for high ip tracks
203  continue; // usually is > 0.99
204  }
205  LogTrace("DAClusterizerinZ_vect") << t_z << ' ' << t_dz2 << ' ' << t_pi;
206  tks.addItemSorted(t_z, t_dz2, &(*it), t_pi);
207  }
208 
209  tks.extractRaw();
210 #ifdef DEBUG
211  if (DEBUGLEVEL > 0) {
212  std::cout << "Track count (Z) " << tks.getSize() << std::endl;
213  }
214 #endif
215 
216  return tks;
217 }

References DAClusterizerInZ_vect::track_t::addItemSorted(), HLT_FULL_cff::atIP, pwdgSkimBPark_cfi::beamSpot, gather_cfg::cout, geometryDiff::epsilon, DAClusterizerInZ_vect::track_t::extractRaw(), DAClusterizerInZ_vect::track_t::getSize(), edm::isNotFinite(), LogTrace, min(), position, funct::pow(), AlignmentPI::t_z, and PDWG_EXOHSCP_cff::tracks.

◆ merge()

bool DAClusterizerInZ_vect::merge ( vertex_t y,
track_t tks,
double &  beta 
) const

Definition at line 588 of file DAClusterizerInZ_vect.cc.

588  {
589  // merge clusters that collapsed or never separated,
590  // only merge if the estimated critical temperature of the merged vertex is below the current temperature
591  // return true if vertices were merged, false otherwise
592  const unsigned int nv = y.getSize();
593 
594  if (nv < 2)
595  return false;
596 
597  // merge the smallest distance clusters first
598  std::vector<std::pair<double, unsigned int> > critical;
599  for (unsigned int k = 0; (k + 1) < nv; k++) {
600  if (std::fabs(y.z_ptr[k + 1] - y.z_ptr[k]) < zmerge_) {
601  critical.push_back(make_pair(std::fabs(y.z_ptr[k + 1] - y.z_ptr[k]), k));
602  }
603  }
604  if (critical.empty())
605  return false;
606 
607  std::stable_sort(critical.begin(), critical.end(), std::less<std::pair<double, unsigned int> >());
608 
609  for (unsigned int ik = 0; ik < critical.size(); ik++) {
610  unsigned int k = critical[ik].second;
611  double rho = y.pk_ptr[k] + y.pk_ptr[k + 1];
612  double swE = y.swE_ptr[k] + y.swE_ptr[k + 1] -
613  y.pk_ptr[k] * y.pk_ptr[k + 1] / rho * std::pow(y.z_ptr[k + 1] - y.z_ptr[k], 2);
614  double Tc = 2 * swE / (y.sw_ptr[k] + y.sw_ptr[k + 1]);
615 
616  if (Tc * beta < 1) {
617 #ifdef DEBUG
618  assert((k + 1) < nv);
619  if (DEBUGLEVEL > 1) {
620  std::cout << "merging " << fixed << setprecision(4) << y.z_ptr[k + 1] << " and " << y.z_ptr[k]
621  << " Tc = " << Tc << " sw = " << y.sw_ptr[k] + y.sw_ptr[k + 1] << std::endl;
622  }
623 #endif
624 
625  if (rho > 0) {
626  y.z_ptr[k] = (y.pk_ptr[k] * y.z_ptr[k] + y.pk_ptr[k + 1] * y.z_ptr[k + 1]) / rho;
627  } else {
628  y.z_ptr[k] = 0.5 * (y.z_ptr[k] + y.z_ptr[k + 1]);
629  }
630  y.pk_ptr[k] = rho;
631  y.sw_ptr[k] += y.sw_ptr[k + 1];
632  y.swE_ptr[k] = swE;
633  y.removeItem(k + 1, tks);
634  set_vtx_range(beta, tks, y);
635  y.extractRaw();
636  return true;
637  }
638  }
639 
640  return false;
641 }

References cms::cuda::assert(), zMuMuMuonUserData::beta, gather_cfg::cout, hlt_jetmet_dqm_QT_fromfile_cfg::critical, alignBH_cfg::fixed, dqmdumpme::k, and funct::pow().

◆ purge()

bool DAClusterizerInZ_vect::purge ( vertex_t y,
track_t tks,
double &  rho0,
const double  beta 
) const

Definition at line 643 of file DAClusterizerInZ_vect.cc.

643  {
644  constexpr double eps = 1.e-100;
645  // eliminate clusters with only one significant/unique track
646  const unsigned int nv = y.getSize();
647  const unsigned int nt = tks.getSize();
648 
649  if (nv < 2)
650  return false;
651 
652  double sumpmin = nt;
653  unsigned int k0 = nv;
654 
655  std::vector<double> inverse_zsums(nt), arg_cache(nt), eik_cache(nt), pcut_cache(nv);
656  double* __restrict__ pinverse_zsums;
657  double* __restrict__ parg_cache;
658  double* __restrict__ peik_cache;
659  double* __restrict__ ppcut_cache;
660  pinverse_zsums = inverse_zsums.data();
661  parg_cache = arg_cache.data();
662  peik_cache = eik_cache.data();
663  ppcut_cache = pcut_cache.data();
664  for (unsigned i = 0; i < nt; ++i) {
665  inverse_zsums[i] = tks.Z_sum_ptr[i] > eps ? 1. / tks.Z_sum_ptr[i] : 0.0;
666  }
667  const auto rhoconst = rho0 * local_exp(-beta * dzCutOff_ * dzCutOff_);
668  for (unsigned int k = 0; k < nv; k++) {
669  const double pmax = y.pk_ptr[k] / (y.pk_ptr[k] + rhoconst);
670  ppcut_cache[k] = uniquetrkweight_ * pmax;
671  }
672 
673  for (unsigned int k = 0; k < nv; k++) {
674  for (unsigned int i = 0; i < nt; ++i) {
675  const auto track_z = tks.z_ptr[i];
676  const auto botrack_dz2 = -beta * tks.dz2_ptr[i];
677  const auto mult_resz = track_z - y.z_ptr[k];
678  parg_cache[i] = botrack_dz2 * (mult_resz * mult_resz);
679  }
680  local_exp_list(parg_cache, peik_cache, nt);
681 
682  int nUnique = 0;
683  double sump = 0;
684  for (unsigned int i = 0; i < nt; ++i) {
685  const auto p = y.pk_ptr[k] * peik_cache[i] * pinverse_zsums[i];
686  sump += p;
687  nUnique += ((p > ppcut_cache[k]) & (tks.pi_ptr[i] > 0)) ? 1 : 0;
688  }
689 
690  if ((nUnique < 2) && (sump < sumpmin)) {
691  sumpmin = sump;
692  k0 = k;
693  }
694  }
695 
696  if (k0 != nv) {
697 #ifdef DEBUG
698  assert(k0 < y.getSize());
699  if (DEBUGLEVEL > 1) {
700  std::cout << "eliminating prototype at " << std::setw(10) << std::setprecision(4) << y.z_ptr[k0]
701  << " with sump=" << sumpmin << " rho*nt =" << y.pk_ptr[k0] * nt << endl;
702  }
703 #endif
704 
705  y.removeItem(k0, tks);
706  set_vtx_range(beta, tks, y);
707  return true;
708  } else {
709  return false;
710  }
711 }

References cms::cuda::assert(), zMuMuMuonUserData::beta, gather_cfg::cout, DAClusterizerInZ_vect::track_t::dz2_ptr, DAClusterizerInZ_vect::track_t::getSize(), mps_fire::i, dqmdumpme::k, reco::ParticleMasses::k0, nt, AlCaHLTBitMon_ParallelJobs::p, DAClusterizerInZ_vect::track_t::pi_ptr, DAClusterizerInZ_vect::track_t::z_ptr, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

◆ set_vtx_range()

void DAClusterizerInZ_vect::set_vtx_range ( double  beta,
track_t gtracks,
vertex_t gvertices 
) const

Definition at line 223 of file DAClusterizerInZ_vect.cc.

223  {
224  const unsigned int nv = gvertices.getSize();
225  const unsigned int nt = gtracks.getSize();
226 
227  if (nv == 0) {
228  edm::LogWarning("DAClusterizerinZ_vect") << "empty cluster list in set_vtx_range";
229  return;
230  }
231 
232  for (auto itrack = 0U; itrack < nt; ++itrack) {
233  double zrange = max(sel_zrange_ / sqrt(beta * gtracks.dz2[itrack]), zrange_min_);
234 
235  double zmin = gtracks.z[itrack] - zrange;
236  unsigned int kmin = min(nv - 1, gtracks.kmin[itrack]);
237  // find the smallest vertex_z that is larger than zmin
238  if (gvertices.z_ptr[kmin] > zmin) {
239  while ((kmin > 0) && (gvertices.z_ptr[kmin - 1] > zmin)) {
240  kmin--;
241  }
242  } else {
243  while ((kmin < (nv - 1)) && (gvertices.z_ptr[kmin] < zmin)) {
244  kmin++;
245  }
246  }
247 
248  double zmax = gtracks.z[itrack] + zrange;
249  unsigned int kmax = min(nv - 1, gtracks.kmax[itrack] - 1);
250  // note: kmax points to the last vertex in the range, while gtracks.kmax points to the entry BEHIND the last vertex
251  // find the largest vertex_z that is smaller than zmax
252  if (gvertices.z_ptr[kmax] < zmax) {
253  while ((kmax < (nv - 1)) && (gvertices.z_ptr[kmax + 1] < zmax)) {
254  kmax++;
255  }
256  } else {
257  while ((kmax > 0) && (gvertices.z_ptr[kmax] > zmax)) {
258  kmax--;
259  }
260  }
261 
262  if (kmin <= kmax) {
263  gtracks.kmin[itrack] = kmin;
264  gtracks.kmax[itrack] = kmax + 1;
265  } else {
266  gtracks.kmin[itrack] = max(0U, min(kmin, kmax));
267  gtracks.kmax[itrack] = min(nv, max(kmin, kmax) + 1);
268  }
269  }
270 }

References zMuMuMuonUserData::beta, DAClusterizerInZ_vect::track_t::dz2, DAClusterizerInZ_vect::track_t::getSize(), DAClusterizerInZ_vect::vertex_t::getSize(), DAClusterizerInZ_vect::track_t::kmax, DAClusterizerInZ_vect::track_t::kmin, SiStripPI::max, min(), nt, mathSSE::sqrt(), mitigatedMETSequence_cff::U, DAClusterizerInZ_vect::track_t::z, DAClusterizerInZ_vect::vertex_t::z_ptr, SiStripMonitorCluster_cfi::zmax, SiStripMonitorCluster_cfi::zmin, and TkClusParameters_cff::zrange.

◆ split()

bool DAClusterizerInZ_vect::split ( const double  beta,
track_t t,
vertex_t y,
double  threshold = 1. 
) const

Definition at line 764 of file DAClusterizerInZ_vect.cc.

764  {
765  // split only critical vertices (Tc >~ T=1/beta <==> beta*Tc>~1)
766  // an update must have been made just before doing this (same beta, no merging)
767  // returns true if at least one cluster was split
768 
769  constexpr double epsilon = 1e-3; // minimum split size
770  unsigned int nv = y.getSize();
771 
772  // avoid left-right biases by splitting highest Tc first
773 
774  std::vector<std::pair<double, unsigned int> > critical;
775  for (unsigned int k = 0; k < nv; k++) {
776  double Tc = 2 * y.swE_ptr[k] / y.sw_ptr[k];
777  if (beta * Tc > threshold) {
778  critical.push_back(make_pair(Tc, k));
779  }
780  }
781  if (critical.empty())
782  return false;
783 
784  std::stable_sort(critical.begin(), critical.end(), std::greater<std::pair<double, unsigned int> >());
785 
786  bool split = false;
787  const unsigned int nt = tks.getSize();
788 
789  for (unsigned int ic = 0; ic < critical.size(); ic++) {
790  unsigned int k = critical[ic].second;
791 
792  // estimate subcluster positions and weight
793  double p1 = 0, z1 = 0, w1 = 0;
794  double p2 = 0, z2 = 0, w2 = 0;
795  for (unsigned int i = 0; i < nt; i++) {
796  if (tks.Z_sum_ptr[i] > 1.e-100) {
797  // winner-takes-all, usually overestimates splitting
798  double tl = tks.z_ptr[i] < y.z_ptr[k] ? 1. : 0.;
799  double tr = 1. - tl;
800 
801  // soften it, especially at low T
802  double arg = (tks.z_ptr[i] - y.z_ptr[k]) * sqrt(beta * tks.dz2_ptr[i]);
803  if (std::fabs(arg) < 20) {
804  double t = local_exp(-arg);
805  tl = t / (t + 1.);
806  tr = 1 / (t + 1.);
807  }
808 
809  double p = y.pk_ptr[k] * tks.pi_ptr[i] * local_exp(-beta * Eik(tks.z_ptr[i], y.z_ptr[k], tks.dz2_ptr[i])) /
810  tks.Z_sum_ptr[i];
811  double w = p * tks.dz2_ptr[i];
812  p1 += p * tl;
813  z1 += w * tl * tks.z_ptr[i];
814  w1 += w * tl;
815  p2 += p * tr;
816  z2 += w * tr * tks.z_ptr[i];
817  w2 += w * tr;
818  }
819  }
820 
821  if (w1 > 0) {
822  z1 = z1 / w1;
823  } else {
824  z1 = y.z_ptr[k] - epsilon;
825  }
826  if (w2 > 0) {
827  z2 = z2 / w2;
828  } else {
829  z2 = y.z_ptr[k] + epsilon;
830  }
831 
832  // reduce split size if there is not enough room
833  if ((k > 0) && (z1 < (0.6 * y.z_ptr[k] + 0.4 * y.z_ptr[k - 1]))) {
834  z1 = 0.6 * y.z_ptr[k] + 0.4 * y.z_ptr[k - 1];
835  }
836  if ((k + 1 < nv) && (z2 > (0.6 * y.z_ptr[k] + 0.4 * y.z_ptr[k + 1]))) {
837  z2 = 0.6 * y.z_ptr[k] + 0.4 * y.z_ptr[k + 1];
838  }
839 
840 #ifdef DEBUG
841  assert(k < nv);
842  if (DEBUGLEVEL > 1) {
843  if (std::fabs(y.z_ptr[k] - zdumpcenter_) < zdumpwidth_) {
844  std::cout << " T= " << std::setw(8) << 1. / beta << " Tc= " << critical[ic].first << " splitting "
845  << std::fixed << std::setprecision(4) << y.z_ptr[k] << " --> " << z1 << "," << z2 << " [" << p1
846  << "," << p2 << "]";
847  if (std::fabs(z2 - z1) > epsilon) {
848  std::cout << std::endl;
849  } else {
850  std::cout << " rejected " << std::endl;
851  }
852  }
853  }
854 #endif
855 
856  // split if the new subclusters are significantly separated
857  if ((z2 - z1) > epsilon) {
858  split = true;
859  double pk1 = p1 * y.pk_ptr[k] / (p1 + p2);
860  double pk2 = p2 * y.pk_ptr[k] / (p1 + p2);
861  y.z_ptr[k] = z2;
862  y.pk_ptr[k] = pk2;
863  y.insertItem(k, z1, pk1, tks);
864  if (k == 0)
865  y.extractRaw();
866 
867  nv++;
868 
869  // adjust remaining pointers
870  for (unsigned int jc = ic; jc < critical.size(); jc++) {
871  if (critical[jc].second >= k) {
872  critical[jc].second++;
873  }
874  }
875  }
876  }
877 
878  return split;
879 }

References cms::cuda::assert(), zMuMuMuonUserData::beta, gather_cfg::cout, hlt_jetmet_dqm_QT_fromfile_cfg::critical, DAClusterizerInZ_vect::track_t::dz2_ptr, MillePedeFileConverter_cfg::e, geometryDiff::epsilon, alignBH_cfg::fixed, DAClusterizerInZ_vect::track_t::getSize(), mps_fire::i, dqmdumpme::k, nt, AlCaHLTBitMon_ParallelJobs::p, p1, p2, DAClusterizerInZ_vect::track_t::pi_ptr, edm::second(), submitPVValidationJobs::split(), mathSSE::sqrt(), submitPVValidationJobs::t, remoteMonitoring_LED_IterMethod_cfg::threshold, w, w2, testProducerWithPsetDescEmpty_cfi::z2, DAClusterizerInZ_vect::track_t::z_ptr, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

◆ thermalize()

unsigned int DAClusterizerInZ_vect::thermalize ( double  beta,
track_t gtracks,
vertex_t gvertices,
const double  delta_max,
const double  rho0 = 0. 
) const

Definition at line 540 of file DAClusterizerInZ_vect.cc.

541  {
542  unsigned int niter = 0;
543  double delta = 0;
544  double delta_max = delta_lowT_;
545 
546  if (convergence_mode_ == 0) {
547  delta_max = delta_max0;
548  } else if (convergence_mode_ == 1) {
549  delta_max = delta_lowT_ / sqrt(std::max(beta, 1.0));
550  }
551 
552  set_vtx_range(beta, tks, v);
553  double delta_sum_range = 0; // accumulate max(|delta-z|) as a lower bound
554  std::vector<double> z0 = v.z;
555 
556  while (niter++ < maxIterations_) {
557  delta = update(beta, tks, v, rho0);
558  delta_sum_range += delta;
559 
560  if (delta_sum_range > zrange_min_) {
561  for (unsigned int k = 0; k < v.getSize(); k++) {
562  if (std::abs(v.z[k] - z0[k]) > zrange_min_) {
563  set_vtx_range(beta, tks, v);
564  delta_sum_range = 0;
565  z0 = v.z;
566  break;
567  }
568  }
569  }
570 
571  if (delta < delta_max) {
572  break;
573  }
574  }
575 
576 #ifdef DEBUG
577  if (DEBUGLEVEL > 0) {
578  std::cout << "DAClusterizerInZ_vect.thermalize niter = " << niter << " at T = " << 1 / beta
579  << " nv = " << v.getSize() << std::endl;
580  if (DEBUGLEVEL > 2)
581  dump(beta, v, tks, 0);
582  }
583 #endif
584 
585  return niter;
586 }

References funct::abs(), zMuMuMuonUserData::beta, gather_cfg::cout, dumpMFGeometry_cfg::delta, FrontierConditions_GlobalTag_cff::dump, dqmdumpme::k, SiStripPI::max, mathSSE::sqrt(), update, findQualityFiles::v, and HLTMuonOfflineAnalyzer_cfi::z0.

◆ update()

double DAClusterizerInZ_vect::update ( double  beta,
track_t gtracks,
vertex_t gvertices,
const double  rho0 = 0 
) const

Definition at line 281 of file DAClusterizerInZ_vect.cc.

281  {
282  //update weights and vertex positions
283  // mass constrained annealing without noise
284  // returns the maximum of changes of vertex positions
285  // identical to updateTC but without updating swE needed for Tc
286 
287  const unsigned int nt = gtracks.getSize();
288  const unsigned int nv = gvertices.getSize();
289 
290  //initialize sums
291  double sumpi = 0;
292 
293  // to return how much the prototype moved
294  double delta = 0;
295 
296  // intial value of a sum
297  double Z_init = 0;
298  // independpent of loop
299  if (rho0 > 0) {
300  Z_init = rho0 * local_exp(-beta * dzCutOff_ * dzCutOff_);
301  }
302 
303  // define kernels
304  auto kernel_calc_exp_arg_range = [beta](const unsigned int itrack,
305  track_t const& tracks,
306  vertex_t const& vertices,
307  const unsigned int kmin,
308  const unsigned int kmax) {
309  const double track_z = tracks.z_ptr[itrack];
310  const double botrack_dz2 = -beta * tracks.dz2_ptr[itrack];
311 
312  // auto-vectorized
313  for (unsigned int ivertex = kmin; ivertex < kmax; ++ivertex) {
314  auto mult_res = track_z - vertices.z_ptr[ivertex];
315  vertices.ei_cache_ptr[ivertex] = botrack_dz2 * (mult_res * mult_res);
316  }
317  };
318 
319  auto kernel_add_Z_range = [Z_init](
320  vertex_t const& vertices, const unsigned int kmin, const unsigned int kmax) -> double {
321  double ZTemp = Z_init;
322  for (unsigned int ivertex = kmin; ivertex < kmax; ++ivertex) {
323  ZTemp += vertices.pk_ptr[ivertex] * vertices.ei_ptr[ivertex];
324  }
325  return ZTemp;
326  };
327 
328  auto kernel_calc_normalization_range = [](const unsigned int track_num,
329  track_t& tks_vec,
330  vertex_t& y_vec,
331  const unsigned int kmin,
332  const unsigned int kmax) {
333  auto tmp_trk_pi = tks_vec.pi_ptr[track_num];
334  auto o_trk_Z_sum = 1. / tks_vec.Z_sum_ptr[track_num];
335  auto o_trk_dz2 = tks_vec.dz2_ptr[track_num];
336  auto tmp_trk_z = tks_vec.z_ptr[track_num];
337 
338  // auto-vectorized
339  for (unsigned int k = kmin; k < kmax; ++k) {
340  y_vec.se_ptr[k] += y_vec.ei_ptr[k] * (tmp_trk_pi * o_trk_Z_sum);
341  auto w = y_vec.pk_ptr[k] * y_vec.ei_ptr[k] * (tmp_trk_pi * o_trk_Z_sum * o_trk_dz2);
342  y_vec.sw_ptr[k] += w;
343  y_vec.swz_ptr[k] += w * tmp_trk_z;
344  }
345  };
346 
347  for (auto ivertex = 0U; ivertex < nv; ++ivertex) {
348  gvertices.se_ptr[ivertex] = 0.0;
349  gvertices.sw_ptr[ivertex] = 0.0;
350  gvertices.swz_ptr[ivertex] = 0.0;
351  }
352 
353  // loop over tracks
354  for (auto itrack = 0U; itrack < nt; ++itrack) {
355  unsigned int kmin = gtracks.kmin[itrack];
356  unsigned int kmax = gtracks.kmax[itrack];
357 
358 #ifdef DEBUG
359  assert((kmin < kmax) && (kmax <= nv));
360  assert(itrack < gtracks.Z_sum.size());
361 #endif
362 
363  kernel_calc_exp_arg_range(itrack, gtracks, gvertices, kmin, kmax);
364  local_exp_list_range(gvertices.ei_cache_ptr, gvertices.ei_ptr, kmin, kmax);
365  gtracks.Z_sum_ptr[itrack] = kernel_add_Z_range(gvertices, kmin, kmax);
366 
367  if (edm::isNotFinite(gtracks.Z_sum_ptr[itrack]))
368  gtracks.Z_sum_ptr[itrack] = 0.0;
369  // used in the next major loop to follow
370  sumpi += gtracks.pi_ptr[itrack];
371 
372  if (gtracks.Z_sum_ptr[itrack] > 1.e-100) {
373  kernel_calc_normalization_range(itrack, gtracks, gvertices, kmin, kmax);
374  }
375  }
376 
377  // now update z and pk
378  auto kernel_calc_z = [sumpi, nv](vertex_t& vertices) -> double {
379  double delta = 0;
380  // does not vectorize(?)
381  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
382  if (vertices.sw_ptr[ivertex] > 0) {
383  auto znew = vertices.swz_ptr[ivertex] / vertices.sw_ptr[ivertex];
384  delta = max(std::abs(vertices.z_ptr[ivertex] - znew), delta);
385  vertices.z_ptr[ivertex] = znew;
386  }
387  }
388 
389  auto osumpi = 1. / sumpi;
390  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex)
391  vertices.pk_ptr[ivertex] = vertices.pk_ptr[ivertex] * vertices.se_ptr[ivertex] * osumpi;
392 
393  return delta;
394  };
395 
396  delta = kernel_calc_z(gvertices);
397 
398  // return how much the prototypes moved
399  return delta;
400 }

References funct::abs(), cms::cuda::assert(), zMuMuMuonUserData::beta, dumpMFGeometry_cfg::delta, DAClusterizerInZ_vect::vertex_t::ei_cache_ptr, DAClusterizerInZ_vect::vertex_t::ei_ptr, DAClusterizerInZ_vect::track_t::getSize(), DAClusterizerInZ_vect::vertex_t::getSize(), edm::isNotFinite(), dqmdumpme::k, DAClusterizerInZ_vect::track_t::kmax, DAClusterizerInZ_vect::track_t::kmin, SiStripPI::max, nt, DAClusterizerInZ_vect::track_t::pi_ptr, DAClusterizerInZ_vect::vertex_t::se_ptr, DAClusterizerInZ_vect::vertex_t::sw_ptr, DAClusterizerInZ_vect::vertex_t::swz_ptr, PDWG_EXOHSCP_cff::tracks, mitigatedMETSequence_cff::U, pwdgSkimBPark_cfi::vertices, w, DAClusterizerInZ_vect::track_t::Z_sum, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

◆ updateTc()

double DAClusterizerInZ_vect::updateTc ( double  beta,
track_t gtracks,
vertex_t gvertices,
const double  rho0 = 0 
) const

Definition at line 402 of file DAClusterizerInZ_vect.cc.

402  {
403  // update weights and vertex positions and Tc input
404  // returns the squared sum of changes of vertex positions
405 
406  const unsigned int nt = gtracks.getSize();
407  const unsigned int nv = gvertices.getSize();
408 
409  //initialize sums
410  double sumpi = 0;
411 
412  // to return how much the prototype moved
413  double delta = 0;
414 
415  // independpent of loop
416  double Z_init = 0;
417  if (rho0 > 0) {
418  Z_init = rho0 * local_exp(-beta * dzCutOff_ * dzCutOff_); // cut-off
419  }
420 
421  // define kernels
422  auto kernel_calc_exp_arg_range = [beta](const unsigned int itrack,
423  track_t const& tracks,
424  vertex_t const& vertices,
425  const unsigned int kmin,
426  const unsigned int kmax) {
427  const double track_z = tracks.z_ptr[itrack];
428  const double botrack_dz2 = -beta * tracks.dz2_ptr[itrack];
429 
430  // auto-vectorized
431  for (unsigned int ivertex = kmin; ivertex < kmax; ++ivertex) {
432  auto mult_res = track_z - vertices.z_ptr[ivertex];
433  vertices.ei_cache_ptr[ivertex] = botrack_dz2 * (mult_res * mult_res);
434  }
435  };
436 
437  auto kernel_add_Z_range = [Z_init](
438  vertex_t const& vertices, const unsigned int kmin, const unsigned int kmax) -> double {
439  double ZTemp = Z_init;
440  for (unsigned int ivertex = kmin; ivertex < kmax; ++ivertex) {
441  ZTemp += vertices.pk_ptr[ivertex] * vertices.ei_ptr[ivertex];
442  }
443  return ZTemp;
444  };
445 
446  auto kernel_calc_normalization_range = [beta](const unsigned int track_num,
447  track_t& tks_vec,
448  vertex_t& y_vec,
449  const unsigned int kmin,
450  const unsigned int kmax) {
451  auto tmp_trk_pi = tks_vec.pi_ptr[track_num];
452  auto o_trk_Z_sum = 1. / tks_vec.Z_sum_ptr[track_num];
453  auto o_trk_dz2 = tks_vec.dz2_ptr[track_num];
454  auto tmp_trk_z = tks_vec.z_ptr[track_num];
455  auto obeta = -1. / beta;
456 
457  // auto-vectorized
458  for (unsigned int k = kmin; k < kmax; ++k) {
459  y_vec.se_ptr[k] += y_vec.ei_ptr[k] * (tmp_trk_pi * o_trk_Z_sum);
460  auto w = y_vec.pk_ptr[k] * y_vec.ei_ptr[k] * (tmp_trk_pi * o_trk_Z_sum * o_trk_dz2);
461  y_vec.sw_ptr[k] += w;
462  y_vec.swz_ptr[k] += w * tmp_trk_z;
463  y_vec.swE_ptr[k] += w * y_vec.ei_cache_ptr[k] * obeta;
464  }
465  };
466 
467  for (auto ivertex = 0U; ivertex < nv; ++ivertex) {
468  gvertices.se_ptr[ivertex] = 0.0;
469  gvertices.sw_ptr[ivertex] = 0.0;
470  gvertices.swz_ptr[ivertex] = 0.0;
471  gvertices.swE_ptr[ivertex] = 0.0;
472  }
473 
474  // loop over tracks
475  for (auto itrack = 0U; itrack < nt; ++itrack) {
476  unsigned int kmin = gtracks.kmin[itrack];
477  unsigned int kmax = gtracks.kmax[itrack];
478 
479  kernel_calc_exp_arg_range(itrack, gtracks, gvertices, kmin, kmax);
480  local_exp_list_range(gvertices.ei_cache_ptr, gvertices.ei_ptr, kmin, kmax);
481  gtracks.Z_sum_ptr[itrack] = kernel_add_Z_range(gvertices, kmin, kmax);
482 
483  if (edm::isNotFinite(gtracks.Z_sum_ptr[itrack]))
484  gtracks.Z_sum_ptr[itrack] = 0.0;
485  // used in the next major loop to follow
486  sumpi += gtracks.pi_ptr[itrack];
487 
488  if (gtracks.Z_sum_ptr[itrack] > 1.e-100) {
489  kernel_calc_normalization_range(itrack, gtracks, gvertices, kmin, kmax);
490  }
491  }
492 
493  // now update z and pk
494  auto kernel_calc_z = [sumpi, nv](vertex_t& vertices) -> double {
495  double delta = 0;
496  // does not vectorizes
497  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex) {
498  if (vertices.sw_ptr[ivertex] > 0) {
499  auto znew = vertices.swz_ptr[ivertex] / vertices.sw_ptr[ivertex];
500  // prevents from vectorizing if
501  delta = max(std::abs(vertices.z_ptr[ivertex] - znew), delta);
502  vertices.z_ptr[ivertex] = znew;
503  }
504  }
505 
506  auto osumpi = 1. / sumpi;
507  for (unsigned int ivertex = 0; ivertex < nv; ++ivertex)
508  vertices.pk_ptr[ivertex] = vertices.pk_ptr[ivertex] * vertices.se_ptr[ivertex] * osumpi;
509 
510  return delta;
511  };
512 
513  delta = kernel_calc_z(gvertices);
514 
515  // return how much the prototypes moved
516  return delta;
517 }

References funct::abs(), zMuMuMuonUserData::beta, dumpMFGeometry_cfg::delta, DAClusterizerInZ_vect::vertex_t::ei_cache_ptr, DAClusterizerInZ_vect::vertex_t::ei_ptr, DAClusterizerInZ_vect::track_t::getSize(), DAClusterizerInZ_vect::vertex_t::getSize(), edm::isNotFinite(), dqmdumpme::k, DAClusterizerInZ_vect::track_t::kmax, DAClusterizerInZ_vect::track_t::kmin, SiStripPI::max, nt, DAClusterizerInZ_vect::track_t::pi_ptr, DAClusterizerInZ_vect::vertex_t::se_ptr, DAClusterizerInZ_vect::vertex_t::sw_ptr, DAClusterizerInZ_vect::vertex_t::swE_ptr, DAClusterizerInZ_vect::vertex_t::swz_ptr, PDWG_EXOHSCP_cff::tracks, mitigatedMETSequence_cff::U, pwdgSkimBPark_cfi::vertices, w, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

◆ verify()

void DAClusterizerInZ_vect::verify ( const vertex_t v,
const track_t tks,
unsigned int  nv = 999999,
unsigned int  nt = 999999 
) const

Definition at line 113 of file DAClusterizerInZ_vect.cc.

113  {
114  if (!(nv == 999999)) {
115  assert(nv == v.getSize());
116  } else {
117  nv = v.getSize();
118  }
119 
120  if (!(nt == 999999)) {
121  assert(nt == tks.getSize());
122  } else {
123  nt = tks.getSize();
124  }
125 
126  assert(v.z.size() == nv);
127  assert(v.pk.size() == nv);
128  assert(v.swz.size() == nv);
129  assert(v.ei_cache.size() == nv);
130  assert(v.ei.size() == nv);
131  assert(v.se.size() == nv);
132  assert(v.swz.size() == nv);
133  assert(v.swE.size() == nv);
134 
135  assert(v.z_ptr == &v.z.front());
136  assert(v.pk_ptr == &v.pk.front());
137  assert(v.ei_cache_ptr == &v.ei_cache.front());
138  assert(v.swz_ptr == &v.swz.front());
139  assert(v.se_ptr == &v.se.front());
140  assert(v.swE_ptr == &v.swE.front());
141 
142  for (unsigned int k = 0; k < nv - 1; k++) {
143  if (v.z[k] <= v.z[k + 1])
144  continue;
145  cout << " Z, cluster z-ordering assertion failure z[" << k << "] =" << v.z[k] << " z[" << k + 1
146  << "] =" << v.z[k + 1] << endl;
147  }
148  //for(unsigned int k=0; k< nv-1; k++){
149  // assert( v.z[k] <= v.z[k+1]);
150  //}
151 
152  assert(nt == tks.z.size());
153  assert(nt == tks.dz2.size());
154  assert(nt == tks.tt.size());
155  assert(nt == tks.pi.size());
156  assert(nt == tks.Z_sum.size());
157  assert(nt == tks.kmin.size());
158  assert(nt == tks.kmax.size());
159 
160  assert(tks.z_ptr == &tks.z.front());
161  assert(tks.dz2_ptr == &tks.dz2.front());
162  assert(tks.pi_ptr == &tks.pi.front());
163  assert(tks.Z_sum_ptr == &tks.Z_sum.front());
164 
165  for (unsigned int i = 0; i < nt; i++) {
166  if ((tks.kmin[i] < tks.kmax[i]) && (tks.kmax[i] <= nv))
167  continue;
168  cout << "track vertex range assertion failure" << i << "/" << nt << " kmin,kmax=" << tks.kmin[i] << ", "
169  << tks.kmax[i] << " nv=" << nv << endl;
170  }
171 
172  for (unsigned int i = 0; i < nt; i++) {
173  assert((tks.kmin[i] < tks.kmax[i]) && (tks.kmax[i] <= nv));
174  }
175 }

References cms::cuda::assert(), gather_cfg::cout, DAClusterizerInZ_vect::track_t::dz2, DAClusterizerInZ_vect::track_t::dz2_ptr, DAClusterizerInZ_vect::track_t::getSize(), mps_fire::i, dqmdumpme::k, DAClusterizerInZ_vect::track_t::kmax, DAClusterizerInZ_vect::track_t::kmin, nt, DAClusterizerInZ_vect::track_t::pi, DAClusterizerInZ_vect::track_t::pi_ptr, DAClusterizerInZ_vect::track_t::tt, findQualityFiles::v, DAClusterizerInZ_vect::track_t::z, DAClusterizerInZ_vect::track_t::z_ptr, DAClusterizerInZ_vect::track_t::Z_sum, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

◆ vertices()

vector< TransientVertex > DAClusterizerInZ_vect::vertices ( const std::vector< reco::TransientTrack > &  tracks,
const int  verbosity = 0 
) const

Definition at line 881 of file DAClusterizerInZ_vect.cc.

882  {
883  track_t&& tks = fill(tracks);
884  tks.extractRaw();
885 
886  unsigned int nt = tks.getSize();
887  double rho0 = 0.0; // start with no outlier rejection
888 
889  vector<TransientVertex> clusters;
890  if (tks.getSize() == 0)
891  return clusters;
892 
893  vertex_t y; // the vertex prototypes
894 
895  // initialize:single vertex at infinite temperature
896  y.addItem(0, 1.0);
897  clear_vtx_range(tks, y);
898 
899  // estimate first critical temperature
900  double beta = beta0(betamax_, tks, y);
901 #ifdef DEBUG
902  if (DEBUGLEVEL > 0)
903  std::cout << "Beta0 is " << beta << std::endl;
904 #endif
905 
906  thermalize(beta, tks, y, delta_highT_);
907 
908  // annealing loop, stop when T<Tmin (i.e. beta>1/Tmin)
909 
910  double betafreeze = betamax_ * sqrt(coolingFactor_);
911 
912  while (beta < betafreeze) {
913  updateTc(beta, tks, y, rho0);
914  while (merge(y, tks, beta)) {
915  updateTc(beta, tks, y, rho0);
916  }
917  split(beta, tks, y);
918 
920  set_vtx_range(beta, tks, y);
921  thermalize(beta, tks, y, delta_highT_);
922  }
923 
924 #ifdef DEBUG
925  verify(y, tks);
926 
927  if (DEBUGLEVEL > 0) {
928  std::cout << "DAClusterizerInZ_vect::vertices :"
929  << "last round of splitting" << std::endl;
930  }
931 #endif
932 
933  set_vtx_range(beta, tks, y);
934  updateTc(beta, tks, y, rho0); // make sure Tc is up-to-date
935 
936  while (merge(y, tks, beta)) {
937  set_vtx_range(beta, tks, y);
938  updateTc(beta, tks, y, rho0);
939  }
940 
941  unsigned int ntry = 0;
942  double threshold = 1.0;
943  while (split(beta, tks, y, threshold) && (ntry++ < 10)) {
944  set_vtx_range(beta, tks, y);
945  thermalize(beta, tks, y, delta_highT_, 0.);
946  updateTc(beta, tks, y, rho0);
947  while (merge(y, tks, beta)) {
948  updateTc(beta, tks, y, rho0);
949  }
950 
951  // relax splitting a bit to reduce multiple split-merge cycles of the same cluster
952  threshold *= 1.1;
953  }
954 
955 #ifdef DEBUG
956  verify(y, tks);
957  if (DEBUGLEVEL > 0) {
958  std::cout << "DAClusterizerInZ_vect::vertices :"
959  << "turning on outlier rejection at T=" << 1 / beta << std::endl;
960  }
961 #endif
962 
963  // switch on outlier rejection at T=Tmin, doesn't do much at high PU
964  if (dzCutOff_ > 0) {
965  rho0 = 1. / nt; //1. / y.getSize();??
966  for (unsigned int a = 0; a < 5; a++) {
967  update(beta, tks, y, a * rho0 / 5.); // adiabatic turn-on
968  }
969  }
970 
971  thermalize(beta, tks, y, delta_lowT_, rho0);
972 
973 #ifdef DEBUG
974  verify(y, tks);
975  if (DEBUGLEVEL > 0) {
976  std::cout << "DAClusterizerInZ_vect::vertices :"
977  << "merging with outlier rejection at T=" << 1 / beta << std::endl;
978  }
979  if (DEBUGLEVEL > 2)
980  dump(beta, y, tks, 2);
981 #endif
982 
983  // merge again (some cluster split by outliers collapse here)
984  while (merge(y, tks, beta)) {
985  set_vtx_range(beta, tks, y);
986  update(beta, tks, y, rho0);
987  }
988 
989 #ifdef DEBUG
990  verify(y, tks);
991  if (DEBUGLEVEL > 0) {
992  std::cout << "DAClusterizerInZ_vect::vertices :"
993  << "after merging with outlier rejection at T=" << 1 / beta << std::endl;
994  }
995  if (DEBUGLEVEL > 2)
996  dump(beta, y, tks, 2);
997 #endif
998 
999  // go down to the purging temperature (if it is lower than tmin)
1000  while (beta < betapurge_) {
1002  set_vtx_range(beta, tks, y);
1003  thermalize(beta, tks, y, delta_lowT_, rho0);
1004  }
1005 
1006 #ifdef DEBUG
1007  verify(y, tks);
1008  if (DEBUGLEVEL > 0) {
1009  std::cout << "DAClusterizerInZ_vect::vertices :"
1010  << "purging at T=" << 1 / beta << std::endl;
1011  }
1012 #endif
1013 
1014  // eliminate insigificant vertices, this is more restrictive at higher T
1015  while (purge(y, tks, rho0, beta)) {
1016  thermalize(beta, tks, y, delta_lowT_, rho0);
1017  }
1018 
1019 #ifdef DEBUG
1020  verify(y, tks);
1021  if (DEBUGLEVEL > 0) {
1022  std::cout << "DAClusterizerInZ_vect::vertices :"
1023  << "last cooling T=" << 1 / beta << std::endl;
1024  }
1025 #endif
1026 
1027  // optionally cool some more without doing anything, to make the assignment harder
1028  while (beta < betastop_) {
1030  thermalize(beta, tks, y, delta_lowT_, rho0);
1031  }
1032 
1033 #ifdef DEBUG
1034  verify(y, tks);
1035  if (DEBUGLEVEL > 0) {
1036  std::cout << "DAClusterizerInZ_vect::vertices :"
1037  << "stop cooling at T=" << 1 / beta << std::endl;
1038  }
1039  if (DEBUGLEVEL > 2)
1040  dump(beta, y, tks, 2);
1041 #endif
1042 
1043  // select significant tracks and use a TransientVertex as a container
1044  GlobalError dummyError(0.01, 0, 0.01, 0., 0., 0.01);
1045 
1046  // ensure correct normalization of probabilities, should makes double assignment reasonably impossible
1047  const unsigned int nv = y.getSize();
1048  for (unsigned int k = 0; k < nv; k++)
1049  if (edm::isNotFinite(y.pk_ptr[k]) || edm::isNotFinite(y.z_ptr[k])) {
1050  y.pk_ptr[k] = 0;
1051  y.z_ptr[k] = 0;
1052  }
1053 
1054  const auto z_sum_init = rho0 * local_exp(-beta * dzCutOff_ * dzCutOff_);
1055  for (unsigned int i = 0; i < nt; i++) // initialize
1056  tks.Z_sum_ptr[i] = z_sum_init;
1057 
1058  // improve vectorization (does not require reduction ....)
1059  for (unsigned int k = 0; k < nv; k++) {
1060  for (unsigned int i = 0; i < nt; i++)
1061  tks.Z_sum_ptr[i] += y.pk_ptr[k] * local_exp(-beta * Eik(tks.z_ptr[i], y.z_ptr[k], tks.dz2_ptr[i]));
1062  }
1063 
1064  for (unsigned int k = 0; k < nv; k++) {
1065  GlobalPoint pos(0, 0, y.z_ptr[k]);
1066 
1067  vector<reco::TransientTrack> vertexTracks;
1068  for (unsigned int i = 0; i < nt; i++) {
1069  if (tks.Z_sum_ptr[i] > 1e-100) {
1070  double p = y.pk_ptr[k] * local_exp(-beta * Eik(tks.z_ptr[i], y.z_ptr[k], tks.dz2_ptr[i])) / tks.Z_sum_ptr[i];
1071  if ((tks.pi_ptr[i] > 0) && (p > mintrkweight_)) {
1072  vertexTracks.push_back(*(tks.tt[i]));
1073  tks.Z_sum_ptr[i] = 0; // setting Z=0 excludes double assignment
1074  }
1075  }
1076  }
1077  TransientVertex v(pos, dummyError, vertexTracks, 0);
1078  clusters.push_back(v);
1079  }
1080 
1081  return clusters;
1082 }

References a, zMuMuMuonUserData::beta, bsc_activity_cfg::clusters, gather_cfg::cout, FrontierConditions_GlobalTag_cff::dump, DAClusterizerInZ_vect::track_t::dz2_ptr, MillePedeFileConverter_cfg::e, DAClusterizerInZ_vect::track_t::extractRaw(), ntuplemaker::fill, cms::cuda::for(), DAClusterizerInZ_vect::track_t::getSize(), mps_fire::i, edm::isNotFinite(), dqmdumpme::k, MatrixUtil::merge(), min(), nt, AlCaHLTBitMon_ParallelJobs::p, DAClusterizerInZ_vect::track_t::pi_ptr, submitPVValidationJobs::split(), mathSSE::sqrt(), remoteMonitoring_LED_IterMethod_cfg::threshold, PDWG_EXOHSCP_cff::tracks, DAClusterizerInZ_vect::track_t::tt, update, findQualityFiles::v, DAClusterizerInZ_vect::track_t::z_ptr, and DAClusterizerInZ_vect::track_t::Z_sum_ptr.

Member Data Documentation

◆ betamax_

double DAClusterizerInZ_vect::betamax_
private

Definition at line 240 of file DAClusterizerInZ_vect.h.

◆ betapurge_

double DAClusterizerInZ_vect::betapurge_
private

Definition at line 248 of file DAClusterizerInZ_vect.h.

◆ betastop_

double DAClusterizerInZ_vect::betastop_
private

Definition at line 241 of file DAClusterizerInZ_vect.h.

◆ convergence_mode_

unsigned int DAClusterizerInZ_vect::convergence_mode_
private

Definition at line 250 of file DAClusterizerInZ_vect.h.

◆ coolingFactor_

double DAClusterizerInZ_vect::coolingFactor_
private

Definition at line 239 of file DAClusterizerInZ_vect.h.

◆ d0CutOff_

double DAClusterizerInZ_vect::d0CutOff_
private

Definition at line 243 of file DAClusterizerInZ_vect.h.

◆ delta_highT_

double DAClusterizerInZ_vect::delta_highT_
private

Definition at line 251 of file DAClusterizerInZ_vect.h.

◆ delta_lowT_

double DAClusterizerInZ_vect::delta_lowT_
private

Definition at line 252 of file DAClusterizerInZ_vect.h.

◆ dzCutOff_

double DAClusterizerInZ_vect::dzCutOff_
private

Definition at line 242 of file DAClusterizerInZ_vect.h.

◆ maxIterations_

unsigned int DAClusterizerInZ_vect::maxIterations_
private

Definition at line 238 of file DAClusterizerInZ_vect.h.

◆ mintrkweight_

double DAClusterizerInZ_vect::mintrkweight_
private

Definition at line 245 of file DAClusterizerInZ_vect.h.

◆ sel_zrange_

double DAClusterizerInZ_vect::sel_zrange_
private

Definition at line 254 of file DAClusterizerInZ_vect.h.

◆ uniquetrkweight_

double DAClusterizerInZ_vect::uniquetrkweight_
private

Definition at line 246 of file DAClusterizerInZ_vect.h.

◆ verbose_

bool DAClusterizerInZ_vect::verbose_
private

Definition at line 233 of file DAClusterizerInZ_vect.h.

◆ vertexSize_

double DAClusterizerInZ_vect::vertexSize_
private

Definition at line 237 of file DAClusterizerInZ_vect.h.

◆ zdumpcenter_

double DAClusterizerInZ_vect::zdumpcenter_
private

Definition at line 234 of file DAClusterizerInZ_vect.h.

◆ zdumpwidth_

double DAClusterizerInZ_vect::zdumpwidth_
private

Definition at line 235 of file DAClusterizerInZ_vect.h.

◆ zmerge_

double DAClusterizerInZ_vect::zmerge_
private

Definition at line 247 of file DAClusterizerInZ_vect.h.

◆ zrange_min_

const double DAClusterizerInZ_vect::zrange_min_ = 0.1
private

Definition at line 255 of file DAClusterizerInZ_vect.h.

HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
reco::HitPattern::MISSING_OUTER_HITS
Definition: HitPattern.h:155
DDAxes::y
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
DAClusterizerInZ_vect::fill
track_t fill(const std::vector< reco::TransientTrack > &tracks) const
Definition: DAClusterizerInZ_vect.cc:178
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
Measurement1D
Definition: Measurement1D.h:11
w2
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.atIP
atIP
Definition: HLT_FULL_cff.py:46202
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
DAClusterizerInZ_vect::vertices
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &tracks, const int verbosity=0) const
Definition: DAClusterizerInZ_vect.cc:881
TkClusParameters_cff.zrange
zrange
Definition: TkClusParameters_cff.py:7
reco::ParticleMasses::k0
const double k0
Definition: ParticleMasses.h:7
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
nt
int nt
Definition: AMPTWrapper.h:42
min
T min(T a, T b)
Definition: MathUtil.h:58
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
DAClusterizerInZ_vect::thermalize
unsigned int thermalize(double beta, track_t &gtracks, vertex_t &gvertices, const double delta_max, const double rho0=0.) const
Definition: DAClusterizerInZ_vect.cc:540
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HLT_FULL_cff.Tmin
Tmin
Definition: HLT_FULL_cff.py:34902
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
AlignmentPI::t_z
Definition: AlignmentPayloadInspectorHelper.h:36
cms::cuda::assert
assert(be >=bs)
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DAClusterizerInZ_vect::convergence_mode_
unsigned int convergence_mode_
Definition: DAClusterizerInZ_vect.h:250
HLT_FULL_cff.Tstop
Tstop
Definition: HLT_FULL_cff.py:34896
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DAClusterizerInZ_vect::set_vtx_range
void set_vtx_range(double beta, track_t &gtracks, vertex_t &gvertices) const
Definition: DAClusterizerInZ_vect.cc:223
DAClusterizerInZ_vect::coolingFactor_
double coolingFactor_
Definition: DAClusterizerInZ_vect.h:239
findQualityFiles.v
v
Definition: findQualityFiles.py:179
DAClusterizerInZ_vect::verify
void verify(const vertex_t &v, const track_t &tks, unsigned int nv=999999, unsigned int nt=999999) const
Definition: DAClusterizerInZ_vect.cc:113
DAClusterizerInZ_vect::maxIterations_
unsigned int maxIterations_
Definition: DAClusterizerInZ_vect.h:238
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
DAClusterizerInZ_vect::split
bool split(const double beta, track_t &t, vertex_t &y, double threshold=1.) const
Definition: DAClusterizerInZ_vect.cc:764
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
DAClusterizerInZ_vect::update
double update(double beta, track_t &gtracks, vertex_t &gvertices, const double rho0=0) const
Definition: DAClusterizerInZ_vect.cc:281
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
w
const double w
Definition: UKUtility.cc:23
DAClusterizerInZ_vect::dzCutOff_
double dzCutOff_
Definition: DAClusterizerInZ_vect.h:242
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DAClusterizerInZ_vect::zmerge_
double zmerge_
Definition: DAClusterizerInZ_vect.h:247
DAClusterizerInZ_vect::betamax_
double betamax_
Definition: DAClusterizerInZ_vect.h:240
reco::BeamSpot
Definition: BeamSpot.h:21
p2
double p2[4]
Definition: TauolaWrapper.h:90
beamspot
Definition: BeamSpotWrite2Txt.h:8
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
dqmdumpme.k
k
Definition: dqmdumpme.py:60
DAClusterizerInZ_vect::mintrkweight_
double mintrkweight_
Definition: DAClusterizerInZ_vect.h:245
DAClusterizerInZ_vect::dump
void dump(const double beta, const vertex_t &y, const track_t &tks, const int verbosity=0) const
Definition: DAClusterizerInZ_vect.cc:1127
Point3DBase< float, GlobalTag >
b
double b
Definition: hdecay.h:118
DAClusterizerInZ_vect::updateTc
double updateTc(double beta, track_t &gtracks, vertex_t &gvertices, const double rho0=0) const
Definition: DAClusterizerInZ_vect.cc:402
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
DAClusterizerInZ_vect::beta0
double beta0(const double betamax, track_t const &tks, vertex_t const &y) const
Definition: DAClusterizerInZ_vect.cc:713
DDAxes::rho
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
DAClusterizerInZ_vect::merge
bool merge(vertex_t &y, track_t &tks, double &beta) const
Definition: DAClusterizerInZ_vect.cc:588
listHistos.IP
IP
Definition: listHistos.py:76
a
double a
Definition: hdecay.h:119
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HLT_FULL_cff.Tpurge
Tpurge
Definition: HLT_FULL_cff.py:34901
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
DAClusterizerInZ_vect::zdumpwidth_
double zdumpwidth_
Definition: DAClusterizerInZ_vect.h:235
hlt_jetmet_dqm_QT_fromfile_cfg.critical
critical
Definition: hlt_jetmet_dqm_QT_fromfile_cfg.py:109
DAClusterizerInZ_vect::sel_zrange_
double sel_zrange_
Definition: DAClusterizerInZ_vect.h:254
p1
double p1[4]
Definition: TauolaWrapper.h:89
GlobalErrorBase< double, ErrorMatrixTag >
DAClusterizerInZ_vect::clear_vtx_range
void clear_vtx_range(track_t &gtracks, vertex_t &gvertices) const
Definition: DAClusterizerInZ_vect.cc:272
TransientVertex
Definition: TransientVertex.h:18
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:27
DAClusterizerInZ_vect::delta_highT_
double delta_highT_
Definition: DAClusterizerInZ_vect.h:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
DAClusterizerInZ_vect::d0CutOff_
double d0CutOff_
Definition: DAClusterizerInZ_vect.h:243
DAClusterizerInZ_vect::purge
bool purge(vertex_t &, track_t &, double &, const double) const
Definition: DAClusterizerInZ_vect.cc:643
DAClusterizerInZ_vect::uniquetrkweight_
double uniquetrkweight_
Definition: DAClusterizerInZ_vect.h:246
DAClusterizerInZ_vect::verbose_
bool verbose_
Definition: DAClusterizerInZ_vect.h:233
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
funct::arg
A arg
Definition: Factorize.h:31
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
DAClusterizerInZ_vect::vertexSize_
double vertexSize_
Definition: DAClusterizerInZ_vect.h:237
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
BeamSpotPI::Z
Definition: BeamSpotPayloadInspectorHelper.h:32
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
PVValHelper::dx
Definition: PVValidationHelpers.h:48
DAClusterizerInZ_vect::zdumpcenter_
double zdumpcenter_
Definition: DAClusterizerInZ_vect.h:234
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DAClusterizerInZ_vect::delta_lowT_
double delta_lowT_
Definition: DAClusterizerInZ_vect.h:252
reco::TrackBase::highPurity
Definition: TrackBase.h:154
DAClusterizerInZ_vect::betapurge_
double betapurge_
Definition: DAClusterizerInZ_vect.h:248
DAClusterizerInZ_vect::zrange_min_
const double zrange_min_
Definition: DAClusterizerInZ_vect.h:255
DAClusterizerInZ_vect::betastop_
double betastop_
Definition: DAClusterizerInZ_vect.h:241