CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTRecHitQuality Class Reference

#include <DTRecHitQuality.h>

Inheritance diagram for DTRecHitQuality:
DQMGlobalEDAnalyzer< Histograms > edm::global::EDAnalyzer< edm::RunCache< Histograms > > edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DTRecHitQuality (const edm::ParameterSet &pset)
 Constructor. More...
 
- Public Member Functions inherited from edm::global::EDAnalyzer< edm::RunCache< Histograms > >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void bookHistograms (DQMStore::ConcurrentBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
 Book the DQM plots. More...
 
template<typename type >
void compute (const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit >> &simHitsPerWire, const std::map< DTWireId, std::vector< type >> &recHitsPerWire, Histograms const &histograms, int step) const
 
void dqmAnalyze (edm::Event const &, edm::EventSetup const &, Histograms const &) const override
 Perform the real analysis. More...
 
template<typename type >
const typefindBestRecHit (const DTLayer *layer, const DTWireId &wireId, const std::vector< type > &recHits, float simHitDist) const
 
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire (const DTRecHitCollection *dt1DRecHitPairs) const
 
std::map< DTWireId, std::vector< DTRecHit1D > > map1DRecHitsPerWire (const DTRecSegment2DCollection *segment2Ds) const
 
std::map< DTWireId, std::vector< DTRecHit1D > > map1DRecHitsPerWire (const DTRecSegment4DCollection *segment4Ds) const
 
float recHitDistFromWire (const DTRecHit1DPair &hitPair, const DTLayer *layer) const
 
float recHitDistFromWire (const DTRecHit1D &recHit, const DTLayer *layer) const
 
float recHitPositionError (const DTRecHit1DPair &recHit) const
 
float recHitPositionError (const DTRecHit1D &recHit) const
 
float simHitDistFromFE (const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
 
float simHitDistFromWire (const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
 
float simHitImpactAngle (const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
 

Private Attributes

bool debug_
 
bool doall_
 
bool doStep1_
 
bool doStep2_
 
bool doStep3_
 
bool local_
 
edm::InputTag recHitLabel_
 
edm::EDGetTokenT< DTRecHitCollectionrecHitToken_
 
edm::InputTag segment2DLabel_
 
edm::EDGetTokenT< DTRecSegment2DCollectionsegment2DToken_
 
edm::InputTag segment4DLabel_
 
edm::EDGetTokenT< DTRecSegment4DCollectionsegment4DToken_
 
edm::InputTag simHitLabel_
 
edm::EDGetTokenT< edm::PSimHitContainersimHitToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::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)
 

Detailed Description

Basic analyzer class which accesses 1D DTRecHits and plot resolution comparing reconstructed and simulated quantities

Residual/pull plots are filled for the rechit with distance from wire closer to that of the muon simhit.

Efficiencies are defined as the fraction of muon simhits with a rechit in the same cell, for the given reconstruction step. Hence, for S2 and S3 the definition incorporate the segment reconstruction efficiency.

Author
G. Cerminara - INFN Torino

Definition at line 45 of file DTRecHitQuality.h.

Constructor & Destructor Documentation

DTRecHitQuality::DTRecHitQuality ( const edm::ParameterSet pset)

Constructor.

Definition at line 85 of file DTRecHitQuality.cc.

References edm::ParameterSet::getUntrackedParameter().

85  {
86  // Get the debug parameter for verbose output
87  debug_ = pset.getUntrackedParameter<bool>("debug");
88  // the name of the simhit collection
89  simHitLabel_ = pset.getUntrackedParameter<InputTag>("simHitLabel");
90  simHitToken_ = consumes<PSimHitContainer>(pset.getUntrackedParameter<InputTag>("simHitLabel"));
91  // the name of the 1D rec hit collection
92  recHitLabel_ = pset.getUntrackedParameter<InputTag>("recHitLabel");
93  recHitToken_ = consumes<DTRecHitCollection>(pset.getUntrackedParameter<InputTag>("recHitLabel"));
94  // the name of the 2D rec hit collection
95  segment2DLabel_ = pset.getUntrackedParameter<InputTag>("segment2DLabel");
96  segment2DToken_ = consumes<DTRecSegment2DCollection>(pset.getUntrackedParameter<InputTag>("segment2DLabel"));
97  // the name of the 4D rec hit collection
98  segment4DLabel_ = pset.getUntrackedParameter<InputTag>("segment4DLabel");
99  segment4DToken_ = consumes<DTRecSegment4DCollection>(pset.getUntrackedParameter<InputTag>("segment4DLabel"));
100  // Switches for analysis at various steps
101  doStep1_ = pset.getUntrackedParameter<bool>("doStep1", false);
102  doStep2_ = pset.getUntrackedParameter<bool>("doStep2", false);
103  doStep3_ = pset.getUntrackedParameter<bool>("doStep3", false);
104  doall_ = pset.getUntrackedParameter<bool>("doall", false);
105  local_ = pset.getUntrackedParameter<bool>("local", true);
106 }
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag recHitLabel_
edm::EDGetTokenT< DTRecHitCollection > recHitToken_
edm::InputTag segment4DLabel_
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
edm::InputTag simHitLabel_
edm::InputTag segment2DLabel_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_

Member Function Documentation

void DTRecHitQuality::bookHistograms ( DQMStore::ConcurrentBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup,
Histograms histograms 
) const
overrideprivatevirtual

Book the DQM plots.

Implements DQMGlobalEDAnalyzer< Histograms >.

Definition at line 108 of file DTRecHitQuality.cc.

References Histograms::hEff_S1RPhi, Histograms::hEff_S1RPhiWS, Histograms::hEff_S1RZ, Histograms::hEff_S1RZ_W0, Histograms::hEff_S1RZ_W1, Histograms::hEff_S1RZ_W2, Histograms::hEff_S1RZWS, Histograms::hEff_S2RPhi, Histograms::hEff_S2RZ, Histograms::hEff_S2RZ_W0, Histograms::hEff_S2RZ_W1, Histograms::hEff_S2RZ_W2, Histograms::hEff_S3RPhi, Histograms::hEff_S3RPhiWS, Histograms::hEff_S3RZ, Histograms::hEff_S3RZ_W0, Histograms::hEff_S3RZ_W1, Histograms::hEff_S3RZ_W2, Histograms::hEff_S3RZWS, Histograms::hRes_S1RPhi, Histograms::hRes_S1RPhi_W0, Histograms::hRes_S1RPhi_W1, Histograms::hRes_S1RPhi_W2, Histograms::hRes_S1RZ, Histograms::hRes_S1RZ_W0, Histograms::hRes_S1RZ_W1, Histograms::hRes_S1RZ_W2, Histograms::hRes_S2RPhi, Histograms::hRes_S2RPhi_W0, Histograms::hRes_S2RPhi_W1, Histograms::hRes_S2RPhi_W2, Histograms::hRes_S2RZ, Histograms::hRes_S2RZ_W0, Histograms::hRes_S2RZ_W1, Histograms::hRes_S2RZ_W2, Histograms::hRes_S3RPhi, Histograms::hRes_S3RPhi_W0, Histograms::hRes_S3RPhi_W1, Histograms::hRes_S3RPhi_W2, Histograms::hRes_S3RPhiWS, Histograms::hRes_S3RZ, Histograms::hRes_S3RZ_W0, Histograms::hRes_S3RZ_W1, Histograms::hRes_S3RZ_W2, Histograms::hRes_S3RZWS, alignCSCRings::s, and w.

108  {
109  if (doall_ && doStep1_) {
110  histograms.hRes_S1RPhi = new HRes1DHit("S1RPhi", booker, true, local_); // RecHits, 1. step, RPhi
111  histograms.hRes_S1RPhi_W0 = new HRes1DHit("S1RPhi_W0", booker, true, local_); // RecHits, 1. step, RZ, wheel 0
112  histograms.hRes_S1RPhi_W1 = new HRes1DHit("S1RPhi_W1", booker, true, local_); // RecHits, 1. step, RZ, wheel +-1
113  histograms.hRes_S1RPhi_W2 = new HRes1DHit("S1RPhi_W2", booker, true, local_); // RecHits, 1. step, RZ, wheel +-2
114  histograms.hRes_S1RZ = new HRes1DHit("S1RZ", booker, true, local_); // RecHits, 1. step, RZ
115  histograms.hRes_S1RZ_W0 = new HRes1DHit("S1RZ_W0", booker, true, local_); // RecHits, 1. step, RZ, wheel 0
116  histograms.hRes_S1RZ_W1 = new HRes1DHit("S1RZ_W1", booker, true, local_); // RecHits, 1. step, RZ, wheel +-1
117  histograms.hRes_S1RZ_W2 = new HRes1DHit("S1RZ_W2", booker, true, local_); // RecHits, 1. step, RZ, wheel +-2
118  histograms.hEff_S1RPhi = new HEff1DHit("S1RPhi", booker); // RecHits, 1. step, RPhi
119  histograms.hEff_S1RZ = new HEff1DHit("S1RZ", booker); // RecHits, 1. step, RZ
120  histograms.hEff_S1RZ_W0 = new HEff1DHit("S1RZ_W0", booker); // RecHits, 1. step, RZ, wheel 0
121  histograms.hEff_S1RZ_W1 = new HEff1DHit("S1RZ_W1", booker); // RecHits, 1. step, RZ, wheel +-1
122  histograms.hEff_S1RZ_W2 = new HEff1DHit("S1RZ_W2", booker); // RecHits, 1. step, RZ, wheel +-2
123  }
124  if (doall_ && doStep2_) {
125  histograms.hRes_S2RPhi = new HRes1DHit("S2RPhi", booker, true, local_); // RecHits, 2. step, RPhi
126  histograms.hRes_S2RPhi_W0 = new HRes1DHit("S2RPhi_W0", booker, true, local_); // RecHits, 2. step, RPhi, wheel 0
127  histograms.hRes_S2RPhi_W1 = new HRes1DHit("S2RPhi_W1", booker, true, local_); // RecHits, 2. step, RPhi, wheel +-1
128  histograms.hRes_S2RPhi_W2 = new HRes1DHit("S2RPhi_W2", booker, true, local_); // RecHits, 2. step, RPhi, wheel +-2
129  histograms.hRes_S2RZ = new HRes1DHit("S2RZ", booker, true, local_); // RecHits, 2. step, RZ
130  histograms.hRes_S2RZ_W0 = new HRes1DHit("S2RZ_W0", booker, true, local_); // RecHits, 2. step, RZ, wheel 0
131  histograms.hRes_S2RZ_W1 = new HRes1DHit("S2RZ_W1", booker, true, local_); // RecHits, 2. step, RZ, wheel +-1
132  histograms.hRes_S2RZ_W2 = new HRes1DHit("S2RZ_W2", booker, true, local_); // RecHits, 2. step, RZ, wheel +-2
133  histograms.hEff_S2RPhi = new HEff1DHit("S2RPhi", booker); // RecHits, 2. step, RPhi
134  histograms.hEff_S2RZ_W0 = new HEff1DHit("S2RZ_W0", booker); // RecHits, 2. step, RZ, wheel 0
135  histograms.hEff_S2RZ_W1 = new HEff1DHit("S2RZ_W1", booker); // RecHits, 2. step, RZ, wheel +-1
136  histograms.hEff_S2RZ_W2 = new HEff1DHit("S2RZ_W2", booker); // RecHits, 2. step, RZ, wheel +-2
137  histograms.hEff_S2RZ = new HEff1DHit("S2RZ", booker); // RecHits, 2. step, RZ
138  }
139  if (doStep3_) {
140  histograms.hRes_S3RPhi = new HRes1DHit("S3RPhi", booker, doall_, local_); // RecHits, 3. step, RPhi
141  histograms.hRes_S3RPhi_W0 = new HRes1DHit("S3RPhi_W0", booker, doall_, local_); // RecHits, 3. step, RPhi, wheel 0
142  histograms.hRes_S3RPhi_W1 = new HRes1DHit("S3RPhi_W1", booker, doall_, local_); // RecHits, 3. step, RPhi, wheel +-1
143  histograms.hRes_S3RPhi_W2 = new HRes1DHit("S3RPhi_W2", booker, doall_, local_); // RecHits, 3. step, RPhi, wheel +-2
144  histograms.hRes_S3RZ = new HRes1DHit("S3RZ", booker, doall_, local_); // RecHits, 3. step, RZ
145  histograms.hRes_S3RZ_W0 = new HRes1DHit("S3RZ_W0", booker, doall_, local_); // RecHits, 3. step, RZ, wheel 0
146  histograms.hRes_S3RZ_W1 = new HRes1DHit("S3RZ_W1", booker, doall_, local_); // RecHits, 3. step, RZ, wheel +-1
147  histograms.hRes_S3RZ_W2 = new HRes1DHit("S3RZ_W2", booker, doall_, local_); // RecHits, 3. step, RZ, wheel +-2
148 
149  if (local_) {
150  // Plots with finer granularity, not to be included in DQM
151  TString name1 = "RPhi_W";
152  TString name2 = "RZ_W";
153  for (long w = 0; w <= 2; ++w) {
154  for (long s = 1;s <= 4; ++s) {
155  histograms.hRes_S3RPhiWS[w][s-1] = new HRes1DHit(("S3"+name1+w+"_St"+s).Data(), booker, doall_, local_);
156  histograms.hEff_S1RPhiWS[w][s-1] = new HEff1DHit(("S1"+name1+w+"_St"+s).Data(), booker);
157  histograms.hEff_S3RPhiWS[w][s-1] = new HEff1DHit(("S3"+name1+w+"_St"+s).Data(), booker);
158  if (s != 4) {
159  histograms.hRes_S3RZWS[w][s-1] = new HRes1DHit(("S3"+name2+w+"_St"+s).Data(), booker, doall_, local_);
160  histograms.hEff_S1RZWS[w][s-1] = new HEff1DHit(("S1"+name2+w+"_St"+s).Data(), booker);
161  histograms.hEff_S3RZWS[w][s-1] = new HEff1DHit(("S3"+name2+w+"_St"+s).Data(), booker);
162  }
163  }
164  }
165  }
166 
167  if (doall_) {
168  histograms.hEff_S3RPhi = new HEff1DHit("S3RPhi", booker); // RecHits, 3. step, RPhi
169  histograms.hEff_S3RZ = new HEff1DHit("S3RZ", booker); // RecHits, 3. step, RZ
170  histograms.hEff_S3RZ_W0 = new HEff1DHit("S3RZ_W0", booker); // RecHits, 3. step, RZ, wheel 0
171  histograms.hEff_S3RZ_W1 = new HEff1DHit("S3RZ_W1", booker); // RecHits, 3. step, RZ, wheel +-1
172  histograms.hEff_S3RZ_W2 = new HEff1DHit("S3RZ_W2", booker); // RecHits, 3. step, RZ, wheel +-2
173  }
174  }
175 }
HEff1DHit * hEff_S1RPhi
HRes1DHit * hRes_S2RPhi_W1
HRes1DHit * hRes_S1RZ
HRes1DHit * hRes_S2RPhi
HEff1DHit * hEff_S1RPhiWS[3][4]
HEff1DHit * hEff_S2RZ_W1
const double w
Definition: UKUtility.cc:23
HRes1DHit * hRes_S1RPhi
HRes1DHit * hRes_S1RPhi_W1
A set of histograms fo efficiency computation for 1D RecHits (producer)
Definition: Histograms.h:133
HRes1DHit * hRes_S3RZ
HRes1DHit * hRes_S1RPhi_W0
HRes1DHit * hRes_S2RPhi_W0
HRes1DHit * hRes_S2RPhi_W2
HRes1DHit * hRes_S3RZ_W0
HEff1DHit * hEff_S1RZWS[3][4]
HEff1DHit * hEff_S3RPhi
HEff1DHit * hEff_S1RZ_W2
HEff1DHit * hEff_S3RZWS[3][4]
HEff1DHit * hEff_S2RZ_W2
HRes1DHit * hRes_S1RZ_W1
HRes1DHit * hRes_S3RZ_W2
HEff1DHit * hEff_S3RZ_W0
HEff1DHit * hEff_S3RZ_W1
HEff1DHit * hEff_S1RZ_W0
HRes1DHit * hRes_S1RZ_W2
HRes1DHit * hRes_S3RZ_W1
HRes1DHit * hRes_S3RPhi
A set of histograms of residuals and pulls for 1D RecHits.
Definition: Histograms.h:46
HRes1DHit * hRes_S2RZ_W0
HRes1DHit * hRes_S2RZ
HEff1DHit * hEff_S2RZ_W0
HEff1DHit * hEff_S2RZ
HRes1DHit * hRes_S2RZ_W1
HEff1DHit * hEff_S3RPhiWS[3][4]
HEff1DHit * hEff_S3RZ_W2
HEff1DHit * hEff_S1RZ_W1
HRes1DHit * hRes_S3RPhi_W1
HRes1DHit * hRes_S2RZ_W2
HEff1DHit * hEff_S2RPhi
HEff1DHit * hEff_S1RZ
HEff1DHit * hEff_S3RZ
HRes1DHit * hRes_S1RPhi_W2
HRes1DHit * hRes_S3RPhi_W0
HRes1DHit * hRes_S3RZWS[3][4]
HRes1DHit * hRes_S1RZ_W0
HRes1DHit * hRes_S3RPhiWS[3][4]
HRes1DHit * hRes_S3RPhi_W2
template<typename type >
void DTRecHitQuality::compute ( const DTGeometry dtGeom,
const std::map< DTWireId, std::vector< PSimHit >> &  simHitsPerWire,
const std::map< DTWireId, std::vector< type >> &  recHitsPerWire,
Histograms const &  histograms,
int  step 
) const
private

Definition at line 397 of file DTRecHitQuality.cc.

References funct::abs(), gather_cfg::cout, PV3DBase< T, PVType, FrameType >::eta(), HRes1DHit::fill(), HEff1DHit::fill(), DTHitQualityUtils::findMuSimHit(), Histograms::hEff_S1RPhi, Histograms::hEff_S1RPhiWS, Histograms::hEff_S1RZ, Histograms::hEff_S1RZ_W0, Histograms::hEff_S1RZ_W1, Histograms::hEff_S1RZ_W2, Histograms::hEff_S1RZWS, Histograms::hEff_S2RPhi, Histograms::hEff_S2RZ, Histograms::hEff_S2RZ_W0, Histograms::hEff_S2RZ_W1, Histograms::hEff_S2RZ_W2, Histograms::hEff_S3RPhi, Histograms::hEff_S3RPhiWS, Histograms::hEff_S3RZ, Histograms::hEff_S3RZ_W0, Histograms::hEff_S3RZ_W1, Histograms::hEff_S3RZ_W2, Histograms::hEff_S3RZWS, Histograms::hRes_S1RPhi, Histograms::hRes_S1RPhi_W0, Histograms::hRes_S1RPhi_W1, Histograms::hRes_S1RPhi_W2, Histograms::hRes_S1RZ, Histograms::hRes_S1RZ_W0, Histograms::hRes_S1RZ_W1, Histograms::hRes_S1RZ_W2, Histograms::hRes_S2RPhi, Histograms::hRes_S2RPhi_W0, Histograms::hRes_S2RPhi_W1, Histograms::hRes_S2RPhi_W2, Histograms::hRes_S2RZ, Histograms::hRes_S2RZ_W0, Histograms::hRes_S2RZ_W1, Histograms::hRes_S2RZ_W2, Histograms::hRes_S3RPhi, Histograms::hRes_S3RPhi_W0, Histograms::hRes_S3RPhi_W1, Histograms::hRes_S3RPhi_W2, Histograms::hRes_S3RPhiWS, Histograms::hRes_S3RZ, Histograms::hRes_S3RZ_W0, Histograms::hRes_S3RZ_W1, Histograms::hRes_S3RZ_W2, Histograms::hRes_S3RZWS, DTGeometry::layer(), PSimHit::localPosition(), PV3DBase< T, PVType, FrameType >::phi(), DTChamberId::station(), DTSuperLayerId::superLayer(), GeomDet::toGlobal(), DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

400  {
401  // Loop over cells with a muon SimHit
402  for (const auto & wireAndSHits : simHitsPerWire) {
403  DTWireId wireId = wireAndSHits.first;
404  int wheel = wireId.wheel();
405  int sl = wireId.superLayer();
406 
407  vector<PSimHit> simHitsInCell = wireAndSHits.second;
408 
409  // Get the layer
410  const DTLayer* layer = dtGeom->layer(wireId);
411 
412  // Look for a mu hit in the cell
413  const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell);
414  if (muSimHit == nullptr) {
415  if (debug_) {
416  cout << " No mu SimHit in channel: " << wireId << ", skipping! " << endl;
417 }
418  continue; // Skip this cell
419  }
420 
421  // Find the distance of the simhit from the wire
422  float simHitWireDist = simHitDistFromWire(layer, wireId, *muSimHit);
423  // Skip simhits out of the cell
424  if (simHitWireDist>2.1) {
425  if (debug_) {
426  cout << " [DTRecHitQuality]###Warning: The mu SimHit in out of the cell, skipping!" << endl;
427 }
428  continue; // Skip this cell
429  }
430  GlobalPoint simHitGlobalPos = layer->toGlobal(muSimHit->localPosition());
431 
432  // find SH impact angle
433  float simHitTheta = simHitImpactAngle(layer, wireId, *muSimHit);
434 
435  // find SH distance from FE
436  float simHitFEDist = simHitDistFromFE(layer, wireId, *muSimHit);
437 
438  bool recHitReconstructed = false;
439 
440  // Look for RecHits in the same cell
441  if (recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
442  // No RecHit found in this cell
443  if (debug_) {
444  cout << " No RecHit found at Step: " << step << " in cell: " << wireId << endl;
445 }
446  } else {
447  recHitReconstructed = true;
448  // vector<type> recHits = (*wireAndRecHits).second;
449  const vector<type>& recHits = recHitsPerWire.at(wireId);
450  if (debug_) {
451  cout << " " << recHits.size() << " RecHits, Step " << step << " in channel: " << wireId << endl;
452 }
453 
454  // Find the best RecHit
455  const type* theBestRecHit = findBestRecHit(layer, wireId, recHits, simHitWireDist);
456 
457 
458  float recHitWireDist = recHitDistFromWire(*theBestRecHit, layer);
459  if (debug_) {
460  cout << " SimHit distance from wire: " << simHitWireDist << endl
461  << " SimHit distance from FE: " << simHitFEDist << endl
462  << " SimHit angle in layer RF: " << simHitTheta << endl
463  << " RecHit distance from wire: " << recHitWireDist << endl;
464 }
465  float recHitErr = recHitPositionError(*theBestRecHit);
466  HRes1DHit *hRes = nullptr;
467  HRes1DHit *hResTot = nullptr;
468 
469  // Mirror angle in phi so that + and - wheels can be plotted together
470  if (mirrorMinusWheels && wheel<0 && sl!= 2) {
471  simHitTheta *= -1.;
472  // Note: local X, if used, would have to be mirrored as well
473  }
474 
475  // Fill residuals and pulls
476  // Select the histo to be filled
477  if (step == 1) {
478  // Step 1
479  if (sl != 2) {
480  hResTot = histograms.hRes_S1RPhi;
481  if (wheel == 0) {
482  hRes = histograms.hRes_S1RPhi_W0;
483 }
484  if (abs(wheel) == 1) {
485  hRes = histograms.hRes_S1RPhi_W1;
486 }
487  if (abs(wheel) == 2) {
488  hRes = histograms.hRes_S1RPhi_W2;
489 }
490  } else {
491  hResTot = histograms.hRes_S1RZ;
492  if (wheel == 0) {
493  hRes = histograms.hRes_S1RZ_W0;
494 }
495  if (abs(wheel) == 1) {
496  hRes = histograms.hRes_S1RZ_W1;
497 }
498  if (abs(wheel) == 2) {
499  hRes = histograms.hRes_S1RZ_W2;
500 }
501  }
502 
503  } else if (step == 2) {
504  // Step 2
505  if (sl != 2) {
506  hRes = histograms.hRes_S2RPhi;
507  if (wheel == 0) {
508  hRes = histograms.hRes_S2RPhi_W0;
509 }
510  if (abs(wheel) == 1) {
511  hRes = histograms.hRes_S2RPhi_W1;
512 }
513  if (abs(wheel) == 2) {
514  hRes = histograms.hRes_S2RPhi_W2;
515 }
516  } else {
517  hResTot = histograms.hRes_S2RZ;
518  if (wheel == 0) {
519  hRes = histograms.hRes_S2RZ_W0;
520 }
521  if (abs(wheel) == 1) {
522  hRes = histograms.hRes_S2RZ_W1;
523 }
524  if (abs(wheel) == 2) {
525  hRes = histograms.hRes_S2RZ_W2;
526 }
527  }
528 
529  } else if (step == 3) {
530  // Step 3
531  if (sl != 2) {
532  hResTot = histograms.hRes_S3RPhi;
533  if (wheel == 0) {
534  hRes = histograms.hRes_S3RPhi_W0;
535 }
536  if (abs(wheel) == 1) {
537  hRes = histograms.hRes_S3RPhi_W1;
538 }
539  if (abs(wheel) == 2) {
540  hRes = histograms.hRes_S3RPhi_W2;
541 }
542  if (local_) {
543  histograms.hRes_S3RPhiWS[abs(wheel)][wireId.station()-1]->fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitErr, wireId.station());
544 }
545  } else {
546  hResTot = histograms.hRes_S3RZ;
547  if (wheel == 0) {
548  hRes = histograms.hRes_S3RZ_W0;
549 }
550  if (abs(wheel) == 1) {
551  hRes = histograms.hRes_S3RZ_W1;
552 }
553  if (abs(wheel) == 2) {
554  hRes = histograms.hRes_S3RZ_W2;
555 }
556  if (local_) {
557  histograms.hRes_S3RZWS[abs(wheel)][wireId.station()-1]->fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitErr, wireId.station());
558 }
559  }
560  }
561 
562  // Fill
563  hRes->fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(),
564  simHitGlobalPos.phi(), recHitErr, wireId.station());
565  if (hResTot != nullptr) {
566  hResTot->fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(),
567  simHitGlobalPos.phi(), recHitErr, wireId.station());
568 }
569  }
570 
571  // Fill Efficiencies
572  if (doall_) {
573  HEff1DHit *hEff = nullptr;
574  HEff1DHit *hEffTot = nullptr;
575  if (step == 1) {
576  // Step 1
577  if (sl != 2) {
578  hEff = histograms.hEff_S1RPhi;
579  if (local_) { histograms.hEff_S1RPhiWS[abs(wheel)][wireId.station()-1]->fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
580 }
581  } else {
582  hEffTot = histograms.hEff_S1RZ;
583  if (wheel == 0) {
584  hEff = histograms.hEff_S1RZ_W0;
585 }
586  if (abs(wheel) == 1) {
587  hEff = histograms.hEff_S1RZ_W1;
588 }
589  if (abs(wheel) == 2) {
590  hEff = histograms.hEff_S1RZ_W2;
591 }
592  if (local_) { histograms.hEff_S1RZWS[abs(wheel)][wireId.station()-1]->fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
593 }
594  }
595 
596  } else if (step == 2) {
597  // Step 2
598  if (sl != 2) {
599  hEff = histograms.hEff_S2RPhi;
600  } else {
601  hEffTot = histograms.hEff_S2RZ;
602  if (wheel == 0) {
603  hEff = histograms.hEff_S2RZ_W0;
604 }
605  if (abs(wheel) == 1) {
606  hEff = histograms.hEff_S2RZ_W1;
607 }
608  if (abs(wheel) == 2) {
609  hEff = histograms.hEff_S2RZ_W2;
610 }
611  }
612 
613  } else if (step == 3) {
614  // Step 3
615  if (sl != 2) {
616  hEff = histograms.hEff_S3RPhi;
617  if (local_) { histograms.hEff_S3RPhiWS[abs(wheel)][wireId.station()-1]->fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
618 }
619  } else {
620  hEffTot = histograms.hEff_S3RZ;
621  if (wheel == 0) {
622  hEff = histograms.hEff_S3RZ_W0;
623 }
624  if (abs(wheel) == 1) {
625  hEff = histograms.hEff_S3RZ_W1;
626 }
627  if (abs(wheel) == 2) {
628  hEff = histograms.hEff_S3RZ_W2;
629 }
630  if (local_) { histograms.hEff_S3RZWS[abs(wheel)][wireId.station()-1]->fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
631 }
632  }
633 
634  }
635  // Fill
636  hEff->fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
637  if (hEffTot != nullptr) {
638  hEffTot->fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
639 }
640  }
641  }
642 }
type
Definition: HCALResponse.h:21
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
A set of histograms fo efficiency computation for 1D RecHits (producer)
Definition: Histograms.h:133
float simHitImpactAngle(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
static const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
void fill(float distSimHit, float thetaSimHit, float distFESimHit, float distRecHit, float etaSimHit, float phiSimHit, float errRecHit, int station)
Definition: Histograms.h:80
Local3DPoint localPosition() const
Definition: PSimHit.h:44
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int superLayer() const
Return the superlayer number.
float simHitDistFromWire(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer) const
const type * findBestRecHit(const DTLayer *layer, const DTWireId &wireId, const std::vector< type > &recHits, float simHitDist) const
A set of histograms of residuals and pulls for 1D RecHits.
Definition: Histograms.h:46
T eta() const
Definition: PV3DBase.h:76
void fill(float distSimHit, float etaSimHit, float phiSimHit, bool fillRecHit)
Definition: Histograms.h:148
step
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:109
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
float recHitPositionError(const DTRecHit1DPair &recHit) const
float simHitDistFromFE(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
void DTRecHitQuality::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
Histograms const &  histograms 
) const
overrideprivate

Perform the real analysis.

Definition at line 178 of file DTRecHitQuality.cc.

References bookConverter::compute(), gather_cfg::cout, edm::EventSetup::get(), ecalSelectiveReadoutValidation_cfi::histograms, edm::HandleBase::isValid(), DTHitQualityUtils::mapSimHitsPerWire(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), and trackerHits::simHits.

178  {
179  if (debug_) {
180  cout << "--- [DTRecHitQuality] Analysing Event: #Run: " << event.id().run()
181  << " #Event: " << event.id().event() << endl;
182 }
183 
184  // Get the DT Geometry
185  ESHandle<DTGeometry> dtGeom;
186  setup.get<MuonGeometryRecord>().get(dtGeom);
187 
188  // Get the SimHit collection from the event
190  event.getByToken(simHitToken_, simHits);
191 
192  // Map simhits per wire
193  map<DTWireId, PSimHitContainer > simHitsPerWire =
195 
196  //=======================================================================================
197  // RecHit analysis at Step 1
198  if (doStep1_ && doall_) {
199  if (debug_) {
200  cout << " -- DTRecHit S1: begin analysis:" << endl;
201 }
202  // Get the rechit collection from the event
203  Handle<DTRecHitCollection> dtRecHits;
204  event.getByToken(recHitToken_, dtRecHits);
205 
206  if (!dtRecHits.isValid()) {
207  if (debug_) { cout << "[DTRecHitQuality]**Warning: no 1DRechits with label: " << recHitLabel_ << " in this event, skipping!" << endl;
208 }
209  return;
210  }
211 
212  // Map rechits per wire
213  auto const& recHitsPerWire = map1DRecHitsPerWire(dtRecHits.product());
214  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, histograms, 1);
215  }
216 
217  //=======================================================================================
218  // RecHit analysis at Step 2
219  if (doStep2_ && doall_) {
220  if (debug_) {
221  cout << " -- DTRecHit S2: begin analysis:" << endl;
222 }
223 
224  // Get the 2D rechits from the event
226  event.getByToken(segment2DToken_, segment2Ds);
227 
228  if (!segment2Ds.isValid()) {
229  if (debug_) {
230  cout << "[DTRecHitQuality]**Warning: no 2DSegments with label: " << segment2DLabel_
231  << " in this event, skipping!" << endl;
232 }
233 
234  }
235  else{
236  // Map rechits per wire
237  auto const& recHitsPerWire = map1DRecHitsPerWire(segment2Ds.product());
238  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, histograms, 2);
239  }
240  }
241 
242  //=======================================================================================
243  // RecHit analysis at Step 3
244  if (doStep3_) {
245  if (debug_) {
246  cout << " -- DTRecHit S3: begin analysis:" << endl;
247 }
248 
249  // Get the 4D rechits from the event
251  event.getByToken(segment4DToken_, segment4Ds);
252 
253  if (!segment4Ds.isValid()) {
254  if (debug_) { cout << "[DTRecHitQuality]**Warning: no 4D Segments with label: " << segment4DLabel_
255  << " in this event, skipping!" << endl;
256 }
257  return;
258  }
259 
260  // Map rechits per wire
261  auto const& recHitsPerWire = map1DRecHitsPerWire(segment4Ds.product());
262  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, histograms, 3);
263  }
264 }
edm::InputTag recHitLabel_
edm::EDGetTokenT< DTRecHitCollection > recHitToken_
edm::InputTag segment4DLabel_
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs) const
edm::InputTag segment2DLabel_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
bool isValid() const
Definition: HandleBase.h:74
T const * product() const
Definition: Handle.h:81
void compute(const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit >> &simHitsPerWire, const std::map< DTWireId, std::vector< type >> &recHitsPerWire, Histograms const &histograms, int step) const
static std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
T const * product() const
Definition: ESHandle.h:86
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_
template<typename type >
const type * DTRecHitQuality::findBestRecHit ( const DTLayer layer,
const DTWireId wireId,
const std::vector< type > &  recHits,
float  simHitDist 
) const
private

Definition at line 358 of file DTRecHitQuality.cc.

References rpcPointValidation_cfi::recHit.

361  {
362  float res = 99999;
363  const type* theBestRecHit = nullptr;
364  // Loop over RecHits within the cell
365  for (auto recHit = recHits.begin();
366  recHit != recHits.end();
367  recHit++) {
368  float distTmp = recHitDistFromWire(*recHit, layer);
369  if (fabs(distTmp-simHitDist) < res) {
370  res = fabs(distTmp-simHitDist);
371  theBestRecHit = &(*recHit);
372  }
373  } // End of loop over RecHits within the cell
374 
375  return theBestRecHit;
376 }
type
Definition: HCALResponse.h:21
Definition: Electron.h:6
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer) const
map< DTWireId, vector< DTRecHit1DPair > > DTRecHitQuality::map1DRecHitsPerWire ( const DTRecHitCollection dt1DRecHitPairs) const
private

Definition at line 268 of file DTRecHitQuality.cc.

268  {
269  map<DTWireId, vector<DTRecHit1DPair>> ret;
270 
271  for (const auto & dt1DRecHitPair : *dt1DRecHitPairs) {
272  ret[dt1DRecHitPair.wireId()].push_back(dt1DRecHitPair);
273  }
274 
275  return ret;
276 }
map< DTWireId, vector< DTRecHit1D > > DTRecHitQuality::map1DRecHitsPerWire ( const DTRecSegment2DCollection segment2Ds) const
private

Definition at line 281 of file DTRecHitQuality.cc.

281  {
282  map<DTWireId, vector<DTRecHit1D>> ret;
283 
284  // Loop over all 2D segments
285  for (const auto & segment2D : *segment2Ds) {
286  vector<DTRecHit1D> component1DHits = segment2D.specificRecHits();
287  // Loop over all component 1D hits
288  for (auto & component1DHit : component1DHits) {
289  ret[component1DHit.wireId()].push_back(component1DHit);
290  }
291  }
292  return ret;
293 }
map< DTWireId, std::vector< DTRecHit1D > > DTRecHitQuality::map1DRecHitsPerWire ( const DTRecSegment4DCollection segment4Ds) const
private

Definition at line 297 of file DTRecHitQuality.cc.

References hfClusterShapes_cfi::hits.

297  {
298  map<DTWireId, vector<DTRecHit1D>> ret;
299  // Loop over all 4D segments
300  for (const auto & segment4D : *segment4Ds) {
301  // Get component 2D segments
302  vector<const TrackingRecHit*> segment2Ds = segment4D.recHits();
303  // Loop over 2D segments:
304  for (auto & segment2D : segment2Ds) {
305  // Get 1D component rechits
306  vector<const TrackingRecHit*> hits = segment2D->recHits();
307  // Loop over them
308  for (auto & hit : hits) {
309  const auto* hit1D = dynamic_cast<const DTRecHit1D*>(hit);
310  ret[hit1D->wireId()].push_back(*hit1D);
311  }
312  }
313  }
314 
315  return ret;
316 }
float DTRecHitQuality::recHitDistFromWire ( const DTRecHit1DPair hitPair,
const DTLayer layer 
) const
private

Definition at line 381 of file DTRecHitQuality.cc.

References DTEnums::Left, DTRecHit1DPair::localPosition(), DTEnums::Right, and PV3DBase< T, PVType, FrameType >::x().

381  {
382  // Compute the rechit distance from wire
383  return fabs(hitPair.localPosition(DTEnums::Left).x() -
384  hitPair.localPosition(DTEnums::Right).x())/2.;
385 }
LocalPoint localPosition() const override
T x() const
Definition: PV3DBase.h:62
float DTRecHitQuality::recHitDistFromWire ( const DTRecHit1D recHit,
const DTLayer layer 
) const
private

Definition at line 391 of file DTRecHitQuality.cc.

References DTRecHit1D::localPosition(), DTLayer::specificTopology(), DTWireId::wire(), DTRecHit1D::wireId(), DTTopology::wirePosition(), and PV3DBase< T, PVType, FrameType >::x().

391  {
392  return fabs(recHit.localPosition().x() - layer->specificTopology().wirePosition(recHit.wireId().wire()));
393 }
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:86
const DTTopology & specificTopology() const
Definition: DTLayer.cc:42
int wire() const
Return the wire number.
Definition: DTWireId.h:56
T x() const
Definition: PV3DBase.h:62
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:107
float DTRecHitQuality::recHitPositionError ( const DTRecHit1DPair recHit) const
private

Definition at line 645 of file DTRecHitQuality.cc.

References DTEnums::Left, DTRecHit1DPair::localPositionError(), mathSSE::sqrt(), and LocalError::xx().

645  {
646  return sqrt(recHit.localPositionError(DTEnums::Left).xx());
647 }
float xx() const
Definition: LocalError.h:24
LocalError localPositionError() const override
T sqrt(T t)
Definition: SSEVec.h:18
float DTRecHitQuality::recHitPositionError ( const DTRecHit1D recHit) const
private

Definition at line 650 of file DTRecHitQuality.cc.

References DEFINE_FWK_MODULE, DTRecHit1D::localPositionError(), mathSSE::sqrt(), and LocalError::xx().

650  {
651  return sqrt(recHit.localPositionError().xx());
652 }
float xx() const
Definition: LocalError.h:24
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: DTRecHit1D.h:66
T sqrt(T t)
Definition: SSEVec.h:18
float DTRecHitQuality::simHitDistFromFE ( const DTLayer layer,
const DTWireId wireId,
const PSimHit hit 
) const
private

Definition at line 342 of file DTRecHitQuality.cc.

References DTTopology::cellLenght(), PSimHit::entryPoint(), PSimHit::exitPoint(), DTLayer::specificTopology(), and PV3DBase< T, PVType, FrameType >::y().

344  {
345  LocalPoint entryP = hit.entryPoint();
346  LocalPoint exitP = hit.exitPoint();
347  float wireLenght = layer->specificTopology().cellLenght();
348  // FIXME: should take only wireLenght/2.;
349  // moreover, pos+cellLenght/2. is shorter than the distance from FE.
350  // In fact it would make more sense to make plots vs y.
351  return (entryP.y()+exitP.y())/2.+wireLenght;
352 }
T y() const
Definition: PV3DBase.h:63
const DTTopology & specificTopology() const
Definition: DTLayer.cc:42
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
float cellLenght() const
Definition: DTTopology.h:73
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
float DTRecHitQuality::simHitDistFromWire ( const DTLayer layer,
const DTWireId wireId,
const PSimHit hit 
) const
private

Definition at line 319 of file DTRecHitQuality.cc.

References PSimHit::entryPoint(), PSimHit::exitPoint(), DTLayer::specificTopology(), DTWireId::wire(), DTTopology::wirePosition(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

321  {
322  float xwire = layer->specificTopology().wirePosition(wireId.wire());
323  LocalPoint entryP = hit.entryPoint();
324  LocalPoint exitP = hit.exitPoint();
325  float xEntry = entryP.x() - xwire;
326  float xExit = exitP.x() - xwire;
327 
328  return fabs(xEntry - (entryP.z()*(xExit-xEntry))/(exitP.z()-entryP.z())); // FIXME: check...
329 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:86
const DTTopology & specificTopology() const
Definition: DTLayer.cc:42
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
T z() const
Definition: PV3DBase.h:64
int wire() const
Return the wire number.
Definition: DTWireId.h:56
T x() const
Definition: PV3DBase.h:62
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
float DTRecHitQuality::simHitImpactAngle ( const DTLayer layer,
const DTWireId wireId,
const PSimHit hit 
) const
private

Definition at line 332 of file DTRecHitQuality.cc.

References PSimHit::entryPoint(), PSimHit::exitPoint(), theta(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

334  {
335  LocalPoint entryP = hit.entryPoint();
336  LocalPoint exitP = hit.exitPoint();
337  float theta =(exitP.x()-entryP.x())/(exitP.z()-entryP.z());
338  return atan(theta);
339 }
Geom::Theta< T > theta() const
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35

Member Data Documentation

bool DTRecHitQuality::debug_
private

Definition at line 60 of file DTRecHitQuality.h.

bool DTRecHitQuality::doall_
private

Definition at line 78 of file DTRecHitQuality.h.

bool DTRecHitQuality::doStep1_
private

Definition at line 74 of file DTRecHitQuality.h.

bool DTRecHitQuality::doStep2_
private

Definition at line 75 of file DTRecHitQuality.h.

bool DTRecHitQuality::doStep3_
private

Definition at line 76 of file DTRecHitQuality.h.

bool DTRecHitQuality::local_
private

Definition at line 77 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::recHitLabel_
private

Definition at line 69 of file DTRecHitQuality.h.

edm::EDGetTokenT<DTRecHitCollection> DTRecHitQuality::recHitToken_
private

Definition at line 64 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::segment2DLabel_
private

Definition at line 70 of file DTRecHitQuality.h.

edm::EDGetTokenT<DTRecSegment2DCollection> DTRecHitQuality::segment2DToken_
private

Definition at line 65 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::segment4DLabel_
private

Definition at line 71 of file DTRecHitQuality.h.

edm::EDGetTokenT<DTRecSegment4DCollection> DTRecHitQuality::segment4DToken_
private

Definition at line 66 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::simHitLabel_
private

Definition at line 66 of file DTRecHitQuality.h.

edm::EDGetTokenT<edm::PSimHitContainer> DTRecHitQuality::simHitToken_
private

Definition at line 63 of file DTRecHitQuality.h.