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<>()} {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 19 of file SiStripPositionCorrectionsTableProducer.cc.

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  }

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

◆ 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.

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 }

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

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().

SiStripPositionCorrectionsTableProducer::m_tkGeomToken
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > m_tkGeomToken
Definition: SiStripPositionCorrectionsTableProducer.cc:35
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
DDAxes::x
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
SiStripOnTrackClusterTableProducerBase::SiStripOnTrackClusterTableProducerBase
SiStripOnTrackClusterTableProducerBase(const edm::ParameterSet &params)
Definition: SiStripOnTrackClusterTableProducerBase.h:12
SiStripClusterInfo::variance
float variance() const
Definition: SiStripClusterInfo.cc:27
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
SiStripPositionCorrectionsTableProducer::m_clusterInfo
SiStripClusterInfo m_clusterInfo
Definition: SiStripPositionCorrectionsTableProducer.cc:34
SiStripOnTrackClusterTableProducerBase::addColumn
static void addColumn(nanoaod::FlatTable *table, const std::string &name, VALUES &&values, const std::string &doc)
Definition: SiStripOnTrackClusterTableProducerBase.h:44
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
SiStripClusterInfo::setCluster
void setCluster(const SiStripCluster &cluster, int detId)
Definition: SiStripClusterInfo.cc:16
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TableParser.table
table
Definition: TableParser.py:111
edm::InputTag
Definition: InputTag.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88