Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup after merging with CMSSW 10.2.2 #134

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@
striptrackerlocalreco = cms.Sequence(siStripZeroSuppression*siStripClusters*siStripMatchedRecHits)
trackerlocalreco = cms.Sequence(pixeltrackerlocalreco*striptrackerlocalreco*clusterSummaryProducer)


from RecoLocalTracker.SiPixelClusterizer.siPixelClustersHeterogeneous_cfi import *
from RecoLocalTracker.SiPixelClusterizer.siPixelFedCablingMapGPUWrapper_cfi import *
from CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi import *

from Configuration.ProcessModifiers.gpu_cff import gpu
from RecoLocalTracker.SiPixelRecHits.siPixelRecHitHeterogeneous_cfi import *
from RecoLocalTracker.SiPixelRecHits.siPixelRecHitHeterogeneousConverter_cfi import siPixelRecHitHeterogeneousConverter as _siPixelRecHitHeterogeneousConverter
gpu.toReplaceWith(siPixelRecHitsPreSplitting, _siPixelRecHitHeterogeneousConverter.clone())



from Configuration.ProcessModifiers.gpu_cff import gpu
_pixeltrackerlocalreco_gpu = pixeltrackerlocalreco.copy()
_pixeltrackerlocalreco_gpu.replace(siPixelClustersPreSplitting, siPixelClustersHeterogeneous+siPixelClustersPreSplitting)
_pixeltrackerlocalreco_gpu.replace(siPixelRecHitsPreSplitting, siPixelRecHitHeterogeneous+siPixelRecHitsPreSplitting)
Expand Down
3 changes: 1 addition & 2 deletions RecoLocalTracker/SiPixelRecHits/python/SiPixelRecHits_cfi.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import FWCore.ParameterSet.Config as cms
from Configuration.ProcessModifiers.gpu_cff import gpu

siPixelRecHits = cms.EDProducer("SiPixelRecHitConverter",
src = cms.InputTag("siPixelClusters"),
CPE = cms.string('PixelCPEGeneric'),
VerboseLevel = cms.untracked.int32(0),
VerboseLevel = cms.untracked.int32(0)
)

siPixelRecHitsPreSplitting = siPixelRecHits.clone(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def customizePixelTracksForProfiling(process):
),
verbosity = cms.untracked.uint32(0),
)

process.outPath = cms.EndPath(process.out)

process.schedule = cms.Schedule(process.raw2digi_step, process.reconstruction_step, process.outPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
/** Computes the curvature (1/radius) and, if possible, the center
* of the circle passing through three points.
* The input points are three dimensional for convenience, but the
* calculation is done in the transverse (x,y) plane.
* calculation is done in the transverse (x,y) plane.
* No verification of the reasonableness of the z coordinate is done.
* If the three points lie on a line the curvature is zero and the center
* position is undefined. The 3 points are assumed to make sense:
* if the distance between two of them is very small compared to
* if the distance between two of them is very small compared to
* the ditance to the third the result will be numerically unstable.
*/
*/

class CircleFromThreePoints {
public:
Expand All @@ -26,19 +26,19 @@ class CircleFromThreePoints {
/** Construct from three points (see class description).
* The order of points is not essential, but accuracy should be better if
* the second point lies between the other two on the circle.
* The optional argument "precision" specifies how accurately the
* The optional argument "precision" specifies how accurately the
* straight line check has to be satisfied for setting the curvature
* to zero and the center position to "undefined".
* to zero and the center position to "undefined".
*/
CircleFromThreePoints( const GlobalPoint& inner,
CircleFromThreePoints( const GlobalPoint& inner,
const GlobalPoint& mid,
const GlobalPoint& outer,
double precision = 1.e-7);


/** Returns the curvature (1/radius), in cm^(-1).
* The curvature is precomputed, this is just access method (takes no time).
* If curvature is zero the center is undefined
* If curvature is zero the center is undefined
* (see description of presicion above).
*/
float curvature() const { return theCurvature;}
Expand All @@ -49,14 +49,14 @@ class CircleFromThreePoints {
* If the curvature is very small the position of the center will
* be very inaccurate.
*/
Vector2D center() const { return theCenter; }
Vector2D center() const { return theCenter; }

private:

float theCurvature;
Vector2D theCenter;

void init( const Vector2D& b, const Vector2D& c,
void init( const Vector2D& b, const Vector2D& c,
const Vector2D& offset, double precision);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h"
#include <vector>

#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackExtra.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

#include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h"

#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h"

#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h"

#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleaner.h"
#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackCleanerWrapper.h"

#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackReco/interface/TrackExtra.h"

#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h"
#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h"
#include "RecoTracker/TkHitPairs/interface/RegionsSeedingHitSets.h"

#include <vector>
#include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h"

using namespace pixeltrackfitting;
using edm::ParameterSet;
Expand All @@ -34,7 +27,7 @@ PixelTrackReconstruction::PixelTrackReconstruction(const ParameterSet& cfg,
theCleanerName(cfg.getParameter<std::string>("Cleaner"))
{
edm::InputTag filterTag = cfg.getParameter<edm::InputTag>("Filter");
if(filterTag.label() != "") {
if (not filterTag.label().empty()) {
theFilterToken = iC.consumes<PixelTrackFilter>(filterTag);
}
}
Expand Down Expand Up @@ -68,10 +61,9 @@ void PixelTrackReconstruction::run(TracksWithTTRHs& tracks, edm::Event& ev, cons
}

std::vector<const TrackingRecHit *> hits;hits.reserve(4);
int counter = -1;
for(const auto& regionHitSets: hitSets) {
const TrackingRegion& region = regionHitSets.region();
counter++;

for(const SeedingHitSet& tuplet: regionHitSets) {
/// FIXME at some point we need to migrate the fitter...
auto nHits = tuplet.size(); hits.resize(nHits);
Expand Down
23 changes: 11 additions & 12 deletions RecoPixelVertexing/PixelTriplets/plugins/RecHitsMap.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#ifndef RecHitsMap_H
#define RecHitsMap_H
// store T for each cluster...
//FIXME move it to a better place...

#ifndef RecoPixelVertexing_PixelTriplets_plugins_RecHitsMap_h
#define RecoPixelVertexing_PixelTriplets_plugins_RecHitsMap_h


#include "DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h"
#include <cstdint>
#include <unordered_map>

#include "DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"


//FIXME move it to a better place...
// store T for each cluster
template<typename T>
class RecHitsMap {
public:

public:
explicit RecHitsMap(T const & d=T()) : dummy(d){}

void clear() {m_map.clear();}
Expand All @@ -26,7 +26,7 @@ class RecHitsMap {
auto const & thit = static_cast<BaseTrackerRecHit const&>(hit);
auto const & clus = thit.firstClusterRef();

if (clus.isPixel())
if (clus.isPixel())
add(clus.pixelCluster(), *thit.detUnit(),v);
else
add(clus.stripCluster(), *thit.detUnit(),v);
Expand All @@ -51,7 +51,7 @@ class RecHitsMap {
}

static uint64_t encode(uint32_t ind, uint16_t mr, uint16_t mc) {
uint64_t u1 = ind;
uint64_t u1 = ind;
uint64_t u2 = mr;
uint64_t u3 = mc;
return (u1<<32) | (u2<<16) | u3;
Expand All @@ -69,9 +69,8 @@ class RecHitsMap {
return (u1<<32) | u2;
}


std::unordered_map<uint64_t, T > m_map;
T dummy;
};

#endif
#endif // RecoPixelVertexing_PixelTriplets_plugins_RecHitsMap_h
13 changes: 8 additions & 5 deletions RecoPixelVertexing/PixelTriplets/src/CAGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#include <string>
#include <vector>

struct CALayer {
struct CALayer
{
CALayer(const std::string &layerName, std::size_t numberOfHits)
: theName(layerName) {
: theName(layerName)
{
isOuterHitOfCell.resize(numberOfHits);
}

Expand All @@ -28,8 +30,8 @@ struct CALayer {
std::string theName;
};

struct CALayerPair {

struct CALayerPair
{
CALayerPair(int a, int b)

{
Expand All @@ -46,7 +48,8 @@ struct CALayerPair {
std::array<unsigned int, 2> theFoundCells = {{0, 0}};
};

struct CAGraph {
struct CAGraph
{
std::vector<CALayer> theLayers;
std::vector<CALayerPair> theLayerPairs;
std::vector<int> theRootLayers;
Expand Down
Loading