CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes
SiPixelPhase1TrackResiduals Class Reference

#include <SiPixelPhase1TrackResiduals.h>

Inheritance diagram for SiPixelPhase1TrackResiduals:
SiPixelPhase1Base DQMEDAnalyzer HistogramManagerHolder edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
 SiPixelPhase1TrackResiduals (const edm::ParameterSet &conf)
 
- Public Member Functions inherited from SiPixelPhase1Base
void bookHistograms (DQMStore::IBooker &iBooker, edm::Run const &run, edm::EventSetup const &iSetup)
 
 SiPixelPhase1Base (const edm::ParameterSet &iConfig)
 
virtual ~SiPixelPhase1Base ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 
- Public Member Functions inherited from HistogramManagerHolder
 HistogramManagerHolder (const edm::ParameterSet &iConfig)
 

Private Types

enum  { RESIDUAL_X, RESIDUAL_Y }
 

Private Attributes

edm::EDGetTokenT
< reco::VertexCollection
offlinePrimaryVerticesToken_
 
TrackerValidationVariables validator
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from HistogramManagerHolder
GeometryInterface geometryInterface
 
std::vector< HistogramManagerhisto
 

Detailed Description

Definition at line 15 of file SiPixelPhase1TrackResiduals.h.

Member Enumeration Documentation

anonymous enum
private

Constructor & Destructor Documentation

SiPixelPhase1TrackResiduals::SiPixelPhase1TrackResiduals ( const edm::ParameterSet conf)
explicit

Definition at line 16 of file SiPixelPhase1TrackResiduals.cc.

References offlinePrimaryVerticesToken_, and AlCaHLTBitMon_QueryRunRegistry::string.

16  :
17  SiPixelPhase1Base(iConfig),
18  validator(iConfig, consumesCollector())
19 {
20  offlinePrimaryVerticesToken_ = consumes<reco::VertexCollection>(std::string("offlinePrimaryVertices"));
21 }
SiPixelPhase1Base(const edm::ParameterSet &iConfig)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
TrackerValidationVariables validator
edm::EDGetTokenT< reco::VertexCollection > offlinePrimaryVerticesToken_

Member Function Documentation

void SiPixelPhase1TrackResiduals::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 23 of file SiPixelPhase1TrackResiduals.cc.

References funct::abs(), reco::TrackBase::dxy(), reco::TrackBase::dxyError(), TrackerValidationVariables::fillTrackQuantities(), edm::Event::getByToken(), HistogramManagerHolder::histo, fastTrackerRecHitType::isPixel(), edm::HandleBase::isValid(), offlinePrimaryVerticesToken_, HLT_FULL_cff::primaryVertex, reco::TrackBase::pt(), RESIDUAL_X, RESIDUAL_Y, validator, and HLT_FULL_cff::vertices.

23  {
24 
26  iEvent.getByToken(offlinePrimaryVerticesToken_, vertices);
27  if (!vertices.isValid() || vertices->size() == 0) return;
28  const auto primaryVertex = vertices->at(0);
29 
30  std::vector<TrackerValidationVariables::AVTrackStruct> vtracks;
31  validator.fillTrackQuantities(iEvent, iSetup,
32  // tell the validator to only look at good tracks
33  [&](const reco::Track& track) -> bool {
34  return track.pt() > 0.75
35  && std::abs( track.dxy(primaryVertex.position()) ) < 5*track.dxyError();
36  }, vtracks);
37 
38  for (auto& track : vtracks) {
39  for (auto& it : track.hits) {
40  auto id = DetId(it.rawDetId);
41  auto isPixel = id.subdetId() == 1 || id.subdetId() == 2;
42  if (!isPixel) continue;
43 
44  histo[RESIDUAL_X].fill(it.resXprime, id, &iEvent);
45  histo[RESIDUAL_Y].fill(it.resYprime, id, &iEvent);
46  }
47  }
48 
49 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
double dxyError() const
error on dxy
Definition: TrackBase.h:791
double pt() const
track transverse momentum
Definition: TrackBase.h:616
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:75
TrackerValidationVariables validator
Definition: DetId.h:18
void fillTrackQuantities(const edm::Event &, const edm::EventSetup &, std::vector< AVTrackStruct > &v_avtrackout)
edm::EDGetTokenT< reco::VertexCollection > offlinePrimaryVerticesToken_
std::vector< HistogramManager > histo
bool isPixel(HitType hitType)
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:586

Member Data Documentation

edm::EDGetTokenT<reco::VertexCollection> SiPixelPhase1TrackResiduals::offlinePrimaryVerticesToken_
private

Definition at line 27 of file SiPixelPhase1TrackResiduals.h.

Referenced by analyze(), and SiPixelPhase1TrackResiduals().

TrackerValidationVariables SiPixelPhase1TrackResiduals::validator
private

Definition at line 26 of file SiPixelPhase1TrackResiduals.h.

Referenced by analyze().