|
|
Go to the documentation of this file.
22 class ConvertHitTraits {
24 ConvertHitTraits(
float minCharge) : minGoodStripCharge_(minCharge) {}
26 static constexpr
bool applyCCC() {
return true; }
30 bool passCCC(
float charge)
const {
return charge > minGoodStripCharge_; }
36 const float minGoodStripCharge_;
63 stripStereoRecHitToken_{consumes<SiStripRecHit2DCollection>(iConfig.getParameter<
edm::InputTag>(
"stereoHits"))},
64 ttrhBuilderToken_{esConsumes<TransientTrackingRecHitBuilder, TransientRecHitRecord>(
66 ttopoToken_{esConsumes<TrackerTopology, TrackerTopologyRcd>()},
67 mkFitGeomToken_{esConsumes<MkFitGeometry, TrackerRecoGeometryRecord>()},
68 wrapperPutToken_{produces<MkFitHitWrapper>()},
69 clusterIndexPutToken_{produces<MkFitClusterIndexToHit>()},
70 clusterChargePutToken_{produces<std::vector<float>>()},
71 convertTraits_{static_cast<float>(
82 descCCC.
add<
double>(
"value");
83 desc.add(
"minGoodStripCharge", descCCC);
85 descriptions.
add(
"mkFitSiStripHitConverterDefault",
desc);
95 std::vector<float> clusterCharge;
105 if (not stripRphiHits.empty()) {
106 stripClusterID =
convert(stripRphiHits);
108 if (not stripStereoHits.empty()) {
109 auto stripStereoClusterID =
convert(stripStereoHits);
110 if (stripRphiHits.empty()) {
111 stripClusterID = stripStereoClusterID;
112 }
else if (stripClusterID != stripStereoClusterID) {
113 throw cms::Exception(
"LogicError") <<
"Encountered different cluster ProductIDs for strip RPhi hits ("
114 << stripClusterID <<
") and stereo (" << stripStereoClusterID <<
")";
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > mkFitGeomToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setClustersID(edm::ProductID id)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
~MkFitSiStripHitConverter() override=default
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
edm::ProductID convertHits(const Traits &traits, const HitCollection &hits, mkfit::HitVec &mkFitHits, std::vector< TrackingRecHit const * > &clusterIndexToHit, std::vector< float > &clusterChargeVec, const TrackerTopology &ttopo, const TransientTrackingRecHitBuilder &ttrhBuilder, const MkFitGeometry &mkFitGeom)
def convert(infile, ofile)
const edm::EDGetTokenT< SiStripRecHit2DCollection > stripRphiRecHitToken_
std::vector< TrackingRecHit const * > & hits()
SiStripCluster const & amplitudes() const
bool getData(T &iHolder) const
const ConvertHitTraits convertTraits_
T getParameter(std::string const &) const
const edm::EDPutTokenT< std::vector< float > > clusterChargePutToken_
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhBuilderToken_
const edm::EDPutTokenT< MkFitClusterIndexToHit > clusterIndexPutToken_
const edm::EDGetTokenT< SiStripRecHit2DCollection > stripStereoRecHitToken_
SeedingHitSet::ConstRecHitPointer Hit
const edm::EDPutTokenT< MkFitHitWrapper > wrapperPutToken_
MkFitSiStripHitConverter(edm::ParameterSet const &iConfig)