CMS 3D CMS Logo

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 analyze (edm::Event const &e, edm::EventSetup const &eSetup)=0
 
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 & itemsToGetFrom (BranchType iType) 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

bool ApplyVertexCut_
 
edm::EDGetTokenT< reco::VertexCollectionofflinePrimaryVerticesToken_
 
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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
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::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (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 SiPixelPhase1Base
bool checktrigger (const edm::Event &iEvent, const edm::EventSetup &iSetup, const unsigned trgidx) const
 
- 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 21 of file SiPixelPhase1TrackResiduals.cc.

References ApplyVertexCut_, edm::ParameterSet::getParameter(), offlinePrimaryVerticesToken_, and AlCaHLTBitMon_QueryRunRegistry::string.

21  :
22  SiPixelPhase1Base(iConfig),
23  validator(iConfig, consumesCollector())
24 {
25  offlinePrimaryVerticesToken_ = consumes<reco::VertexCollection>(std::string("offlinePrimaryVertices"));
26  ApplyVertexCut_=iConfig.getParameter<bool>("VertexCut");
27 }
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 
)

Definition at line 29 of file SiPixelPhase1TrackResiduals.cc.

References funct::abs(), ApplyVertexCut_, cuy::col, DEFINE_FWK_MODULE, reco::TrackBase::dxy(), reco::TrackBase::dxyError(), TrackerValidationVariables::fillTrackQuantities(), edm::EventSetup::get(), edm::Event::getByToken(), HistogramManagerHolder::histo, TrackerGeometry::idToDet(), createfilelist::int, fastTrackerRecHitType::isPixel(), edm::ESHandleBase::isValid(), PixelTopology::localX(), Topology::measurementPosition(), offlinePrimaryVerticesToken_, reco::TrackBase::pt(), RESIDUAL_X, RESIDUAL_Y, PixelGeomDetUnit::specificTopology(), HiIsolationCommonParameters_cff::track, mixOne_simraw_on_sim_cfi::tracker, validator, ecalDrivenElectronSeedsParameters_cff::vertices, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

29  {
30 
32  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
33  assert(tracker.isValid());
34 
36  iEvent.getByToken(offlinePrimaryVerticesToken_, vertices);
37 
38  if (ApplyVertexCut_ && (!vertices.isValid() || vertices->size() == 0)) return;
39 
40  std::vector<TrackerValidationVariables::AVTrackStruct> vtracks;
41 
42  validator.fillTrackQuantities(iEvent, iSetup,
43  // tell the validator to only look at good tracks
44  [&](const reco::Track& track) -> bool {
45  return (!ApplyVertexCut_ || (track.pt() > 0.75
46  && std::abs( track.dxy(vertices->at(0).position()) ) < 5*track.dxyError())) ;
47  }, vtracks);
48 
49  for (auto& track : vtracks) {
50  for (auto& it : track.hits) {
51  auto id = DetId(it.rawDetId);
52  auto isPixel = id.subdetId() == 1 || id.subdetId() == 2;
53  if (!isPixel) continue;
54 
55  //TO BE UPDATED WITH VINCENZO STUFF
56  const PixelGeomDetUnit* geomdetunit = dynamic_cast<const PixelGeomDetUnit*> ( tracker->idToDet(id) );
57  const PixelTopology& topol = geomdetunit->specificTopology();
58 
59  float lpx=it.localX;
60  float lpy=it.localY;
61  LocalPoint lp(lpx,lpy);
62 
64  int row = (int) mp.x();
65  int col = (int) mp.y();
66 
67  histo[RESIDUAL_X].fill(it.resXprime, id, &iEvent, col, row);
68  histo[RESIDUAL_Y].fill(it.resYprime, id, &iEvent, col, row);
69  }
70  }
71 
72 }
T y() const
Definition: PV2DBase.h:46
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
double dxyError() const
error on dxy
Definition: TrackBase.h:791
virtual float localX(const float mpX) const =0
double pt() const
track transverse momentum
Definition: TrackBase.h:616
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrackerValidationVariables validator
Definition: DetId.h:18
void fillTrackQuantities(const edm::Event &, const edm::EventSetup &, std::vector< AVTrackStruct > &v_avtrackout)
edm::EDGetTokenT< reco::VertexCollection > offlinePrimaryVerticesToken_
const T & get() const
Definition: EventSetup.h:56
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::vector< HistogramManager > histo
col
Definition: cuy.py:1008
bool isPixel(HitType hitType)
bool isValid() const
Definition: ESHandle.h:47
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
T x() const
Definition: PV2DBase.h:45
const TrackerGeomDet * idToDet(DetId) const

Member Data Documentation

bool SiPixelPhase1TrackResiduals::ApplyVertexCut_
private

Definition at line 21 of file SiPixelPhase1TrackResiduals.h.

Referenced by analyze(), and SiPixelPhase1TrackResiduals().

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

Definition at line 29 of file SiPixelPhase1TrackResiduals.h.

Referenced by analyze(), and SiPixelPhase1TrackResiduals().

TrackerValidationVariables SiPixelPhase1TrackResiduals::validator
private

Definition at line 28 of file SiPixelPhase1TrackResiduals.h.

Referenced by analyze().