CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
SiStripPositionCorrectionsTableProducer Class Reference
Inheritance diagram for SiStripPositionCorrectionsTableProducer:
SiStripOnTrackClusterTableProducerBase edm::stream::EDProducer<>

Public Member Functions

void fillTable (const std::vector< OnTrackCluster > &clusters, const edm::View< reco::Track > &tracks, nanoaod::FlatTable *table, const edm::EventSetup &iSetup) final
 
 SiStripPositionCorrectionsTableProducer (const edm::ParameterSet &params)
 
- Public Member Functions inherited from SiStripOnTrackClusterTableProducerBase
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) final
 
 SiStripOnTrackClusterTableProducerBase (const edm::ParameterSet &params)
 
 ~SiStripOnTrackClusterTableProducerBase () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from SiStripOnTrackClusterTableProducerBase
template<typename VALUES >
static void addColumn (nanoaod::FlatTable *table, const std::string &name, VALUES &&values, const std::string &doc)
 

Private Attributes

SiStripClusterInfo m_clusterInfo
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordm_tkGeomToken
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 12 of file SiStripPositionCorrectionsTableProducer.cc.

Constructor & Destructor Documentation

◆ SiStripPositionCorrectionsTableProducer()

SiStripPositionCorrectionsTableProducer::SiStripPositionCorrectionsTableProducer ( const edm::ParameterSet params)
inlineexplicit

Definition at line 14 of file SiStripPositionCorrectionsTableProducer.cc.

16  m_clusterInfo(consumesCollector()),
17  m_tkGeomToken{esConsumes<>()} {}
SiStripOnTrackClusterTableProducerBase(const edm::ParameterSet &params)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > m_tkGeomToken

Member Function Documentation

◆ fillDescriptions()

static void SiStripPositionCorrectionsTableProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 19 of file SiStripPositionCorrectionsTableProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

19  {
21  desc.add<std::string>("name", "cluster");
22  desc.add<std::string>("doc", "On-track cluster properties for Lorentz angle and backplane correction measurement");
23  desc.add<bool>("extension", false);
24  desc.add<edm::InputTag>("Tracks", edm::InputTag{"generalTracks"});
25  descriptions.add("siStripPositionCorrectionsTable", desc);
26  }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillTable()

void SiStripPositionCorrectionsTableProducer::fillTable ( const std::vector< OnTrackCluster > &  clusters,
const edm::View< reco::Track > &  tracks,
nanoaod::FlatTable table,
const edm::EventSetup iSetup 
)
finalvirtual

Implements SiStripOnTrackClusterTableProducerBase.

Definition at line 38 of file SiStripPositionCorrectionsTableProducer.cc.

References SiStripOnTrackClusterTableProducerBase::addColumn(), bsc_activity_cfg::clusters, edm::EventSetup::getData(), m_clusterInfo, m_tkGeomToken, SiStripClusterInfo::setCluster(), TableParser::table, SiStripClusterInfo::variance(), x, and hit::x.

41  {
42  const auto& tkGeom = iSetup.getData(m_tkGeomToken);
43  std::vector<uint32_t> c_nstrips;
44  std::vector<float> c_barycenter, c_variance, c_localdirx, c_localdiry, c_localdirz, c_localx, c_rhlocalx,
45  c_rhlocalxerr;
46  for (const auto clus : clusters) {
47  c_nstrips.push_back(clus.cluster->amplitudes().size());
48  m_clusterInfo.setCluster(*clus.cluster, clus.det);
49  c_variance.push_back(m_clusterInfo.variance());
50  const auto& trajState = clus.measurement.updatedState();
51  const auto trackDir = trajState.localDirection();
52  c_localdirx.push_back(trackDir.x());
53  c_localdiry.push_back(trackDir.y());
54  c_localdirz.push_back(trackDir.z());
55  const auto hit = clus.measurement.recHit()->hit();
56  const auto stripDet = dynamic_cast<const StripGeomDetUnit*>(tkGeom.idToDet(hit->geographicalId()));
57  c_barycenter.push_back(stripDet->specificTopology().localPosition(clus.cluster->barycenter()).x());
58  c_localx.push_back(stripDet->toLocal(trajState.globalPosition()).x());
59  c_rhlocalx.push_back(hit->localPosition().x());
60  c_rhlocalxerr.push_back(hit->localPositionError().xx());
61  }
62  addColumn(table, "nstrips", c_nstrips, "cluster width");
63  addColumn(table, "variance", c_variance, "Cluster variance");
64  addColumn(table, "localdirx", c_localdirx, "x component of the local track direction");
65  addColumn(table, "localdiry", c_localdiry, "y component of the local track direction");
66  addColumn(table, "localdirz", c_localdirz, "z component of the local track direction");
67  addColumn(table, "barycenter", c_barycenter, "Cluster barycenter (local x without corrections)");
68  addColumn(table, "localx", c_localx, "Track local x");
69  addColumn(table, "rhlocalx", c_rhlocalx, "RecHit local x");
70  addColumn(table, "rhlocalxerr", c_rhlocalxerr, "RecHit local x uncertainty");
71 }
void setCluster(const SiStripCluster &cluster, int detId)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
static void addColumn(nanoaod::FlatTable *table, const std::string &name, VALUES &&values, const std::string &doc)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > m_tkGeomToken

Member Data Documentation

◆ m_clusterInfo

SiStripClusterInfo SiStripPositionCorrectionsTableProducer::m_clusterInfo
private

Definition at line 34 of file SiStripPositionCorrectionsTableProducer.cc.

Referenced by fillTable().

◆ m_tkGeomToken

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripPositionCorrectionsTableProducer::m_tkGeomToken
private

Definition at line 35 of file SiStripPositionCorrectionsTableProducer.cc.

Referenced by fillTable().