From 1383ada8e40cdf63388aea7dbae2010283d9e31f Mon Sep 17 00:00:00 2001 From: Lindsey Gray Date: Fri, 27 Nov 2015 17:55:34 +0100 Subject: [PATCH] quiet all the couts --- .../plugins/EcalBarrelClusterFastTimer.cc | 4 ++- .../plugins/TrackTimeValueMapProducer.cc | 6 ++--- .../python/customizeHGCalPandora_cff.py | 6 +++-- .../src/AdaptiveVertexFitter.cc | 26 +++++++++---------- .../plugins/PrimaryVertexProducer.cc | 12 +++++---- .../src/DAClusterizerInZT.cc | 2 +- 6 files changed, 31 insertions(+), 25 deletions(-) diff --git a/RecoParticleFlow/FastTiming/plugins/EcalBarrelClusterFastTimer.cc b/RecoParticleFlow/FastTiming/plugins/EcalBarrelClusterFastTimer.cc index 413be6377561e..b5bfd80c961c6 100644 --- a/RecoParticleFlow/FastTiming/plugins/EcalBarrelClusterFastTimer.cc +++ b/RecoParticleFlow/FastTiming/plugins/EcalBarrelClusterFastTimer.cc @@ -191,7 +191,7 @@ std::pair EcalBarrelClusterFastTimer::getTimeForECALPFCluster(const best_time_guess = timehits.find(best_hit)->time(); } - std::cout << "EcalBarrelFastTimer: " << best_time_guess << ' ' << best_energy << ' ' << best_hit << std::endl; + //std::cout << "EcalBarrelFastTimer: " << best_time_guess << ' ' << best_energy << ' ' << best_hit << std::endl; return std::make_pair(best_time_guess,DetId(best_hit)); } @@ -211,8 +211,10 @@ float EcalBarrelClusterFastTimer::correctTimeToVertex(const float intime, const const math::XYZVector to_center = layerPos_cm - math::XYZPoint(0.,0.,0.); const math::XYZVector to_vtx = layerPos_cm - vtx.position(); + /* std::cout << intime << ' ' << to_center.r()/cm_per_ns << ' ' << to_vtx.r()/cm_per_ns << ' ' << intime + to_center.r()/cm_per_ns - to_vtx.r()/cm_per_ns << std::endl; + */ return intime + to_center.r()/cm_per_ns - to_vtx.r()/cm_per_ns; } diff --git a/RecoParticleFlow/FastTiming/plugins/TrackTimeValueMapProducer.cc b/RecoParticleFlow/FastTiming/plugins/TrackTimeValueMapProducer.cc index 6dd2aa7980fe0..c4fa4f44adf40 100644 --- a/RecoParticleFlow/FastTiming/plugins/TrackTimeValueMapProducer.cc +++ b/RecoParticleFlow/FastTiming/plugins/TrackTimeValueMapProducer.cc @@ -224,9 +224,9 @@ void TrackTimeValueMapProducer::calculateTrackTimes( const edm::View time_info = extractTrackVertexTime(track_tps->val); - std::cout << "track z = " << tkref->vz() << " +/- " << tkref->dzError() << " cm ,"; - std::cout << " sim vertex z = " << time_info.second << " t = " << time_info.first; - std::cout << std::endl; + //std::cout << "track z = " << tkref->vz() << " +/- " << tkref->dzError() << " cm ,"; + //std::cout << " sim vertex z = " << time_info.second << " t = " << time_info.first; + //std::cout << std::endl; tvals.push_back(time_info.first); } } else { diff --git a/RecoParticleFlow/PandoraTranslator/python/customizeHGCalPandora_cff.py b/RecoParticleFlow/PandoraTranslator/python/customizeHGCalPandora_cff.py index 873b771c4bd92..5b3d8f1760b33 100644 --- a/RecoParticleFlow/PandoraTranslator/python/customizeHGCalPandora_cff.py +++ b/RecoParticleFlow/PandoraTranslator/python/customizeHGCalPandora_cff.py @@ -401,7 +401,8 @@ def cust_2023HGCalPandoraMuonFastTime(process): process.load("RecoParticleFlow.FastTiming.ecalBarrelClusterFastTimer_cfi") process.offlinePrimaryVertices1D = process.offlinePrimaryVertices.clone() process.offlinePrimaryVertices1D.TkFilterParameters.minPt = cms.double(1.0) - process.offlinePrimaryVertices4D = process.offlinePrimaryVertices.clone( verbose = cms.untracked.bool(True), TkClusParameters = process.DA2DParameters ) + process.offlinePrimaryVertices4D = process.offlinePrimaryVertices.clone( verbose = cms.untracked.bool(False), TkClusParameters = process.DA2DParameters ) + process.offlinePrimaryVertices4D.TkFilterParameters.minPt = cms.double(1.0) process.particleFlowReco = cms.Sequence(process.trackTimeValueMapProducer+process.offlinePrimaryVertices1D+process.offlinePrimaryVertices4D+process.particleFlowReco) process.RandomNumberGeneratorService.trackTimeValueMapProducer = cms.PSet( initialSeed = cms.untracked.uint32(1234), engineName = cms.untracked.string('TRandom3') @@ -454,7 +455,8 @@ def cust_2023HGCalPandoraMuonPerfectFastTime(process): process.load("RecoParticleFlow.FastTiming.ecalBarrelClusterFastTimer_cfi") process.offlinePrimaryVertices1D = process.offlinePrimaryVertices.clone() process.offlinePrimaryVertices1D.TkFilterParameters.minPt = cms.double(1.0) - process.offlinePrimaryVertices4D = process.offlinePrimaryVertices.clone( verbose = cms.untracked.bool(True), TkClusParameters = process.DA2DParameters ) + process.offlinePrimaryVertices4D = process.offlinePrimaryVertices.clone( verbose = cms.untracked.bool(False), TkClusParameters = process.DA2DParameters ) + process.offlinePrimaryVertices4D.TkFilterParameters.minPt = cms.double(1.0) process.particleFlowReco = cms.Sequence(process.trackTimeValueMapProducer+process.offlinePrimaryVertices1D+process.offlinePrimaryVertices4D+process.particleFlowReco) process.RandomNumberGeneratorService.trackTimeValueMapProducer = cms.PSet( initialSeed = cms.untracked.uint32(1234), engineName = cms.untracked.string('TRandom3') diff --git a/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc b/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc index e4a9532f55375..2ec4752ba4408 100644 --- a/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc +++ b/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc @@ -170,16 +170,16 @@ AdaptiveVertexFitter::vertex(const vector & unstracks) con sort ( tracks.begin(), tracks.end(), CompareTwoTracks() ); // Linearization Point GlobalPoint linP = theLinP->getLinearizationPoint(tracks); - std::cout << "linearized point: " << linP << std::endl; + //std::cout << "linearized point: " << linP << std::endl; // Initial vertex seed, with a very large error matrix - std::cout << "setup vertex seed state" << std::endl; + //std::cout << "setup vertex seed state" << std::endl; VertexState lseed (linP, linPointError() ); - std::cout << lseed.error4D().matrix4D() << std::endl; + //std::cout << lseed.error4D().matrix4D() << std::endl; vector vtContainer = linearizeTracks(tracks, lseed); - std::cout << "fit start" << std::endl; + //std::cout << "fit start" << std::endl; VertexState seed (linP, fitError() ); - std::cout << seed.error4D().matrix4D() << std::endl; + //std::cout << seed.error4D().matrix4D() << std::endl; return fit(vtContainer, seed, false); } @@ -528,7 +528,7 @@ AdaptiveVertexFitter::fit( const vector & tracks, const VertexState & priorSeed, bool withPrior) const { - std::cout << "[AdaptiveVertexFit] fit with " << tracks.size() << endl; + //std::cout << "[AdaptiveVertexFit] fit with " << tracks.size() << endl; theAssProbComputer->resetAnnealing(); vector initialTracks; @@ -561,29 +561,29 @@ AdaptiveVertexFitter::fit( const vector & tracks, int ns_trks=0; // number of significant tracks. // If we have only two significant tracks, we return an invalid vertex - std::cout << "[AdaptiveVertexFit] start " << tracks.size() << endl; + //std::cout << "[AdaptiveVertexFit] start " << tracks.size() << endl; for ( vector< RefCountedVertexTrack >::const_iterator i=globalVTracks.begin(); i!=globalVTracks.end() ; ++i ) { - std::cout << " mom=" << (**i).linearizedTrack()->track().initialFreeState().momentum() << endl; - std::cout << " pos=" << (**i).linearizedTrack()->track().initialFreeState().position() << endl; + //std::cout << " mom=" << (**i).linearizedTrack()->track().initialFreeState().momentum() << endl; + //std::cout << " pos=" << (**i).linearizedTrack()->track().initialFreeState().position() << endl; } do { ns_trks=0; CachingVertex<5> fVertex = initialVertex; - std::cout << "[AdaptiveVertexFit] step " << step << " at " << fVertex.position() << endl; + //std::cout << "[AdaptiveVertexFit] step " << step << " at " << fVertex.position() << endl; if ((previousPosition - newPosition).transverse() > theMaxLPShift) { // relinearize and reweight. // (reLinearizeTracks also reweights tracks) - std::cout << "[AdaptiveVertexFit] relinearize at " << returnVertex.position() << endl; + //std::cout << "[AdaptiveVertexFit] relinearize at " << returnVertex.position() << endl; if (gsfIntermediarySmoothing_) returnVertex = theSmoother->smooth(returnVertex); globalVTracks = reLinearizeTracks( globalVTracks, returnVertex ); lpStep++; } else if (step) { // reweight, if it is not the first step - std::cout << "[AdaptiveVertexFit] reweight at " << returnVertex.position() << endl; + //std::cout << "[AdaptiveVertexFit] reweight at " << returnVertex.position() << endl; if (gsfIntermediarySmoothing_) returnVertex = theSmoother->smooth(returnVertex); globalVTracks = reWeightTracks( globalVTracks, returnVertex ); } @@ -643,7 +643,7 @@ AdaptiveVertexFitter::fit( const vector & tracks, for ( vector< RefCountedVertexTrack >::const_iterator i=globalVTracks.begin(); i!=globalVTracks.end() ; ++i ) { - std::cout << " wgt=" << (**i).weight() << std::endl; + //std::cout << " wgt=" << (**i).weight() << std::endl; } edm::LogInfo("AdaptiveVertexFitter") << "fewer than two significant tracks (w>" << theWeightThreshold << ")." diff --git a/RecoVertex/PrimaryVertexProducer/plugins/PrimaryVertexProducer.cc b/RecoVertex/PrimaryVertexProducer/plugins/PrimaryVertexProducer.cc index 22abacc2dd875..42f81391e9991 100644 --- a/RecoVertex/PrimaryVertexProducer/plugins/PrimaryVertexProducer.cc +++ b/RecoVertex/PrimaryVertexProducer/plugins/PrimaryVertexProducer.cc @@ -184,13 +184,15 @@ PrimaryVertexProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup time = 0.0; timeReso = 1.0; } - std::cout << time << ' ' << timeReso << std::endl; + //std::cout << time << ' ' << timeReso << std::endl; reco::TransientTrack temptt(temp.castTo(),time,timeReso, theB->field(),theB->trackingGeometry()); seltk.swap(temptt); + /* std::cout << seltk.track().pt() << ' ' << seltk.timeExt() << ' ' << seltk.dtErrorExt() << std::endl; + */ } } @@ -232,9 +234,9 @@ PrimaryVertexProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup v = algorithm->fitter->vertex(*iclus, beamSpot); if( f4D ) { - std::cout << "beamspot constrained thingy" << std::endl; + //std::cout << "beamspot constrained thingy" << std::endl; auto err = v.positionError().matrix4D(); - std::cout << "got the error" << std::endl; + //std::cout << "got the error" << std::endl; err(3,3) = time_var/(double)iclus->size(); v = TransientVertex(v.position(),meantime,err,v.originalTracks(),v.totalChiSquared()); } @@ -244,9 +246,9 @@ PrimaryVertexProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup v = algorithm->fitter->vertex(*iclus); if( f4D ) { - std::cout << "beamspot constrained thingy" << std::endl; + //std::cout << "beamspot constrained thingy" << std::endl; auto err = v.positionError().matrix4D(); - std::cout << "got the error" << std::endl; + //std::cout << "got the error" << std::endl; err(3,3) = time_var/(double)iclus->size(); v = TransientVertex(v.position(),meantime,err,v.originalTracks(),v.totalChiSquared()); } diff --git a/RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZT.cc b/RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZT.cc index c0eb91b7a68e0..f0cfd8e924008 100644 --- a/RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZT.cc +++ b/RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZT.cc @@ -34,7 +34,7 @@ DAClusterizerInZT::fill( const vector & tracks )const{ + (std::pow(beamspot.BeamWidthX()*cos(phi),2.)+std::pow(beamspot.BeamWidthY()*sin(phi),2.))/std::pow(tantheta,2.) // beam-width induced + std::pow(vertexSize_,2); // intrinsic vertex size, safer for outliers and short lived decays - std::cout << "got transient track with time = " << it->timeExt() << " +/- " << it->dtErrorExt() << " ns"<< std::endl; + //std::cout << "got transient track with time = " << it->timeExt() << " +/- " << it->dtErrorExt() << " ns"<< std::endl; t.t = it->timeExt(); // the time t.dtz = 0.;