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 Member Functions | Private Attributes
DTRecHitQuality Class Reference

#include <DTRecHitQuality.h>

Inheritance diagram for DTRecHitQuality:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup)
 Perform the real analysis. More...
 
virtual void beginRun (const edm::Run &iRun, const edm::EventSetup &setup)
 
 DTRecHitQuality (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
 
virtual ~DTRecHitQuality ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

template<typename type >
void compute (const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit > > &simHitsPerWire, const std::map< DTWireId, std::vector< type > > &recHitsPerWire, int step)
 
template<typename type >
const typefindBestRecHit (const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
 
std::map< DTWireId,
std::vector< DTRecHit1DPair > > 
map1DRecHitsPerWire (const DTRecHitCollection *dt1DRecHitPairs)
 
std::map< DTWireId,
std::vector< DTRecHit1D > > 
map1DRecHitsPerWire (const DTRecSegment2DCollection *segment2Ds)
 
std::map< DTWireId,
std::vector< DTRecHit1D > > 
map1DRecHitsPerWire (const DTRecSegment4DCollection *segment4Ds)
 
float recHitDistFromWire (const DTRecHit1DPair &hitPair, const DTLayer *layer)
 
float recHitDistFromWire (const DTRecHit1D &recHit, const DTLayer *layer)
 
float recHitPositionError (const DTRecHit1DPair &recHit)
 
float recHitPositionError (const DTRecHit1D &recHit)
 
float simHitDistFromFE (const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
 
float simHitDistFromWire (const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
 
float simHitImpactAngle (const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
 

Private Attributes

DQMStoredbe_
 
bool debug
 
bool doall
 
bool doStep1
 
bool doStep2
 
bool doStep3
 
HEff1DHithEff_S1RPhi
 
HEff1DHithEff_S1RPhiWS [3][4]
 
HEff1DHithEff_S1RZ
 
HEff1DHithEff_S1RZ_W0
 
HEff1DHithEff_S1RZ_W1
 
HEff1DHithEff_S1RZ_W2
 
HEff1DHithEff_S1RZWS [3][4]
 
HEff1DHithEff_S2RPhi
 
HEff1DHithEff_S2RZ
 
HEff1DHithEff_S2RZ_W0
 
HEff1DHithEff_S2RZ_W1
 
HEff1DHithEff_S2RZ_W2
 
HEff1DHithEff_S3RPhi
 
HEff1DHithEff_S3RPhiWS [3][4]
 
HEff1DHithEff_S3RZ
 
HEff1DHithEff_S3RZ_W0
 
HEff1DHithEff_S3RZ_W1
 
HEff1DHithEff_S3RZ_W2
 
HEff1DHithEff_S3RZWS [3][4]
 
HRes1DHithRes_S1RPhi
 
HRes1DHithRes_S1RPhi_W0
 
HRes1DHithRes_S1RPhi_W1
 
HRes1DHithRes_S1RPhi_W2
 
HRes1DHithRes_S1RZ
 
HRes1DHithRes_S1RZ_W0
 
HRes1DHithRes_S1RZ_W1
 
HRes1DHithRes_S1RZ_W2
 
HRes1DHithRes_S2RPhi
 
HRes1DHithRes_S2RPhi_W0
 
HRes1DHithRes_S2RPhi_W1
 
HRes1DHithRes_S2RPhi_W2
 
HRes1DHithRes_S2RZ
 
HRes1DHithRes_S2RZ_W0
 
HRes1DHithRes_S2RZ_W1
 
HRes1DHithRes_S2RZ_W2
 
HRes1DHithRes_S3RPhi
 
HRes1DHithRes_S3RPhi_W0
 
HRes1DHithRes_S3RPhi_W1
 
HRes1DHithRes_S3RPhi_W2
 
HRes1DHithRes_S3RPhiWS [3][4]
 
HRes1DHithRes_S3RZ
 
HRes1DHithRes_S3RZ_W0
 
HRes1DHithRes_S3RZ_W1
 
HRes1DHithRes_S3RZ_W2
 
HRes1DHithRes_S3RZWS [3][4]
 
bool local
 
edm::InputTag recHitLabel
 
edm::EDGetTokenT
< DTRecHitCollection
recHitToken_
 
std::string rootFileName
 
edm::InputTag segment2DLabel
 
edm::EDGetTokenT
< DTRecSegment2DCollection
segment2DToken_
 
edm::InputTag segment4DLabel
 
edm::EDGetTokenT
< DTRecSegment4DCollection
segment4DToken_
 
edm::InputTag simHitLabel
 
edm::EDGetTokenT
< edm::PSimHitContainer
simHitToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 50 of file DTRecHitQuality.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 44 of file DTRecHitQuality.cc.

References debug, and edm::ParameterSet::getUntrackedParameter().

44  {
45  // Get the debug parameter for verbose output
46  debug = pset.getUntrackedParameter<bool>("debug");
47  // the name of the simhit collection
48  simHitLabel = pset.getUntrackedParameter<InputTag>("simHitLabel");
49  simHitToken_ = consumes<PSimHitContainer>(pset.getUntrackedParameter<InputTag>("simHitLabel"));
50  // the name of the 1D rec hit collection
51  recHitLabel = pset.getUntrackedParameter<InputTag>("recHitLabel");
52  recHitToken_ = consumes<DTRecHitCollection>(pset.getUntrackedParameter<InputTag>("recHitLabel"));
53  // the name of the 2D rec hit collection
54  segment2DLabel = pset.getUntrackedParameter<InputTag>("segment2DLabel");
55  segment2DToken_ = consumes<DTRecSegment2DCollection>(pset.getUntrackedParameter<InputTag>("segment2DLabel"));
56  // the name of the 4D rec hit collection
57  segment4DLabel = pset.getUntrackedParameter<InputTag>("segment4DLabel");
58  segment4DToken_ = consumes<DTRecSegment4DCollection>(pset.getUntrackedParameter<InputTag>("segment4DLabel"));
59  // Switches for analysis at various steps
60  doStep1 = pset.getUntrackedParameter<bool>("doStep1", false);
61  doStep2 = pset.getUntrackedParameter<bool>("doStep2", false);
62  doStep3 = pset.getUntrackedParameter<bool>("doStep3", false);
63  doall = pset.getUntrackedParameter<bool>("doall", false);
64  local = pset.getUntrackedParameter<bool>("local", true);
65 }
edm::InputTag simHitLabel
edm::InputTag recHitLabel
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DTRecHitCollection > recHitToken_
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
edm::InputTag segment4DLabel
edm::InputTag segment2DLabel
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_
DTRecHitQuality::~DTRecHitQuality ( )
virtual

Destructor.

Definition at line 155 of file DTRecHitQuality.cc.

155  {
156 }

Member Function Documentation

void DTRecHitQuality::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

Perform the real analysis.

Implements edm::EDAnalyzer.

Definition at line 192 of file DTRecHitQuality.cc.

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

192  {
193  if(debug)
194  cout << "--- [DTRecHitQuality] Analysing Event: #Run: " << event.id().run()
195  << " #Event: " << event.id().event() << endl;
196  //theFile->cd();
197  // Get the DT Geometry
198  ESHandle<DTGeometry> dtGeom;
199  eventSetup.get<MuonGeometryRecord>().get(dtGeom);
200 
201  // Get the SimHit collection from the event
203  event.getByToken(simHitToken_, simHits);
204 
205  // Map simhits per wire
206  map<DTWireId, PSimHitContainer > simHitsPerWire =
208 
209 
210 
211  //=======================================================================================
212  // RecHit analysis at Step 1
213  if(doStep1 && doall) {
214  if(debug)
215  cout << " -- DTRecHit S1: begin analysis:" << endl;
216  // Get the rechit collection from the event
217  Handle<DTRecHitCollection> dtRecHits;
218  event.getByToken(recHitToken_, dtRecHits);
219 
220  if(!dtRecHits.isValid()) {
221  if(debug) cout << "[DTRecHitQuality]**Warning: no 1DRechits with label: " << recHitLabel << " in this event, skipping!" << endl;
222  return;
223  }
224 
225  // Map rechits per wire
226  map<DTWireId,vector<DTRecHit1DPair> > recHitsPerWire =
227  map1DRecHitsPerWire(dtRecHits.product());
228 
229  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 1);
230  }
231 
232 
233  //=======================================================================================
234  // RecHit analysis at Step 2
235  if(doStep2 && doall) {
236  if(debug)
237  cout << " -- DTRecHit S2: begin analysis:" << endl;
238 
239  // Get the 2D rechits from the event
241  event.getByToken(segment2DToken_, segment2Ds);
242 
243  if(!segment2Ds.isValid()) {
244  if(debug) cout << "[DTRecHitQuality]**Warning: no 2DSegments with label: " << segment2DLabel
245  << " in this event, skipping!" << endl;
246 
247  }
248  else{
249  // Map rechits per wire
250  map<DTWireId,vector<DTRecHit1D> > recHitsPerWire =
251  map1DRecHitsPerWire(segment2Ds.product());
252 
253  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 2);
254  }
255  }
256 
257  //=======================================================================================
258  // RecHit analysis at Step 3
259  if(doStep3) {
260  if(debug)
261  cout << " -- DTRecHit S3: begin analysis:" << endl;
262 
263  // Get the 4D rechits from the event
265  event.getByToken(segment4DToken_, segment4Ds);
266 
267  if(!segment4Ds.isValid()) {
268  if(debug) cout << "[DTRecHitQuality]**Warning: no 4D Segments with label: " << segment4DLabel
269  << " in this event, skipping!" << endl;
270  return;
271  }
272 
273  // Map rechits per wire
274  map<DTWireId,vector<DTRecHit1D> > recHitsPerWire =
275  map1DRecHitsPerWire(segment4Ds.product());
276 
277  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 3);
278  }
279 
280  }
edm::InputTag recHitLabel
edm::EDGetTokenT< DTRecHitCollection > recHitToken_
void compute(const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit > > &simHitsPerWire, const std::map< DTWireId, std::vector< type > > &recHitsPerWire, int step)
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
bool isValid() const
Definition: HandleBase.h:75
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
tuple simHits
Definition: trackerHits.py:16
edm::InputTag segment4DLabel
tuple cout
Definition: gather_cfg.py:121
edm::InputTag segment2DLabel
static std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_
void DTRecHitQuality::beginRun ( const edm::Run iRun,
const edm::EventSetup setup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 67 of file DTRecHitQuality.cc.

References dbe_, cppFunctionSkipper::operator, alignCSCRings::s, and w.

67  {
68 
69  // ----------------------
70  // get hold of back-end interface
71  dbe_ = 0;
73  /*if ( dbe_ ) {
74  if (debug) {
75  dbe_->setVerbose(1);
76  } else {
77  dbe_->setVerbose(0);
78  }
79  }*/
80  dbe_->setVerbose(0);
81  /*if ( dbe_ ) {
82  if ( debug ) dbe_->showDirStructure();
83  }*/
84  if(doall && doStep1){
85  hRes_S1RPhi= new HRes1DHit("S1RPhi",dbe_,true,local); // RecHits, 1. step, RPhi
86  hRes_S1RPhi_W0= new HRes1DHit("S1RPhi_W0",dbe_,true,local); // RecHits, 1. step, RZ, wheel 0
87  hRes_S1RPhi_W1= new HRes1DHit("S1RPhi_W1",dbe_,true,local); // RecHits, 1. step, RZ, wheel +-1
88  hRes_S1RPhi_W2= new HRes1DHit("S1RPhi_W2",dbe_,true,local); // RecHits, 1. step, RZ, wheel +-2
89  hRes_S1RZ= new HRes1DHit("S1RZ",dbe_,true,local); // RecHits, 1. step, RZ
90  hRes_S1RZ_W0= new HRes1DHit("S1RZ_W0",dbe_,true,local); // RecHits, 1. step, RZ, wheel 0
91  hRes_S1RZ_W1= new HRes1DHit("S1RZ_W1",dbe_,true,local); // RecHits, 1. step, RZ, wheel +-1
92  hRes_S1RZ_W2= new HRes1DHit("S1RZ_W2",dbe_,true,local); // RecHits, 1. step, RZ, wheel +-2
93  hEff_S1RPhi= new HEff1DHit("S1RPhi",dbe_); // RecHits, 1. step, RPhi
94  hEff_S1RZ= new HEff1DHit("S1RZ",dbe_); // RecHits, 1. step, RZ
95  hEff_S1RZ_W0= new HEff1DHit("S1RZ_W0",dbe_); // RecHits, 1. step, RZ, wheel 0
96  hEff_S1RZ_W1= new HEff1DHit("S1RZ_W1",dbe_); // RecHits, 1. step, RZ, wheel +-1
97  hEff_S1RZ_W2= new HEff1DHit("S1RZ_W2",dbe_); // RecHits, 1. step, RZ, wheel +-2
98  }
99  if(doall && doStep2){
100  hRes_S2RPhi= new HRes1DHit("S2RPhi",dbe_,true,local); // RecHits, 2. step, RPhi
101  hRes_S2RPhi_W0= new HRes1DHit("S2RPhi_W0",dbe_,true,local); // RecHits, 2. step, RPhi, wheel 0
102  hRes_S2RPhi_W1= new HRes1DHit("S2RPhi_W1",dbe_,true,local); // RecHits, 2. step, RPhi, wheel +-1
103  hRes_S2RPhi_W2= new HRes1DHit("S2RPhi_W2",dbe_,true,local); // RecHits, 2. step, RPhi, wheel +-2
104  hRes_S2RZ= new HRes1DHit("S2RZ",dbe_,true,local); // RecHits, 2. step, RZ
105  hRes_S2RZ_W0= new HRes1DHit("S2RZ_W0",dbe_,true,local); // RecHits, 2. step, RZ, wheel 0
106  hRes_S2RZ_W1= new HRes1DHit("S2RZ_W1",dbe_,true,local); // RecHits, 2. step, RZ, wheel +-1
107  hRes_S2RZ_W2= new HRes1DHit("S2RZ_W2",dbe_,true,local); // RecHits, 2. step, RZ, wheel +-2
108  hEff_S2RPhi= new HEff1DHit("S2RPhi",dbe_); // RecHits, 2. step, RPhi
109  hEff_S2RZ_W0= new HEff1DHit("S2RZ_W0",dbe_); // RecHits, 2. step, RZ, wheel 0
110  hEff_S2RZ_W1= new HEff1DHit("S2RZ_W1",dbe_); // RecHits, 2. step, RZ, wheel +-1
111  hEff_S2RZ_W2= new HEff1DHit("S2RZ_W2",dbe_); // RecHits, 2. step, RZ, wheel +-2
112  hEff_S2RZ= new HEff1DHit("S2RZ",dbe_); // RecHits, 2. step, RZ
113  }
114  if(doStep3){
115  hRes_S3RPhi= new HRes1DHit("S3RPhi",dbe_,doall,local); // RecHits, 3. step, RPhi
116  hRes_S3RPhi_W0= new HRes1DHit("S3RPhi_W0",dbe_,doall,local); // RecHits, 3. step, RPhi, wheel 0
117  hRes_S3RPhi_W1= new HRes1DHit("S3RPhi_W1",dbe_,doall,local); // RecHits, 3. step, RPhi, wheel +-1
118  hRes_S3RPhi_W2= new HRes1DHit("S3RPhi_W2",dbe_,doall,local); // RecHits, 3. step, RPhi, wheel +-2
119  hRes_S3RZ= new HRes1DHit("S3RZ",dbe_,doall,local); // RecHits, 3. step, RZ
120  hRes_S3RZ_W0= new HRes1DHit("S3RZ_W0",dbe_,doall,local); // RecHits, 3. step, RZ, wheel 0
121  hRes_S3RZ_W1= new HRes1DHit("S3RZ_W1",dbe_,doall,local); // RecHits, 3. step, RZ, wheel +-1
122  hRes_S3RZ_W2= new HRes1DHit("S3RZ_W2",dbe_,doall,local); // RecHits, 3. step, RZ, wheel +-2
123 
124  if (local) {
125  // Plots with finer granularity, not to be included in DQM
126  TString name1="RPhi_W";
127  TString name2="RZ_W";
128  for (long w=0;w<=2;++w) {
129  for (long s=1;s<=4;++s){
130  hRes_S3RPhiWS[w][s-1] = new HRes1DHit(("S3"+name1+w+"_St"+s).Data(),dbe_,doall,local);
131  hEff_S1RPhiWS[w][s-1] = new HEff1DHit(("S1"+name1+w+"_St"+s).Data(),dbe_);
132  hEff_S3RPhiWS[w][s-1] = new HEff1DHit(("S3"+name1+w+"_St"+s).Data(),dbe_);
133  if (s!=4) {
134  hRes_S3RZWS[w][s-1] = new HRes1DHit(("S3"+name2+w+"_St"+s).Data(),dbe_,doall,local);
135  hEff_S1RZWS[w][s-1] = new HEff1DHit(("S1"+name2+w+"_St"+s).Data(),dbe_);
136  hEff_S3RZWS[w][s-1] = new HEff1DHit(("S3"+name2+w+"_St"+s).Data(),dbe_);
137  }
138  }
139  }
140  }
141 
142 
143  if(doall){
144  hEff_S3RPhi= new HEff1DHit("S3RPhi",dbe_); // RecHits, 3. step, RPhi
145  hEff_S3RZ= new HEff1DHit("S3RZ",dbe_); // RecHits, 3. step, RZ
146  hEff_S3RZ_W0= new HEff1DHit("S3RZ_W0",dbe_); // RecHits, 3. step, RZ, wheel 0
147  hEff_S3RZ_W1= new HEff1DHit("S3RZ_W1",dbe_); // RecHits, 3. step, RZ, wheel +-1
148  hEff_S3RZ_W2= new HEff1DHit("S3RZ_W2",dbe_); // RecHits, 3. step, RZ, wheel +-2
149  }
150  }
151 }
HEff1DHit * hEff_S3RZ
HEff1DHit * hEff_S2RZ_W0
HRes1DHit * hRes_S3RPhi_W0
HEff1DHit * hEff_S2RZ
const double w
Definition: UKUtility.cc:23
HEff1DHit * hEff_S3RPhi
HRes1DHit * hRes_S1RPhi_W1
HEff1DHit * hEff_S1RZWS[3][4]
HRes1DHit * hRes_S1RPhi_W0
HRes1DHit * hRes_S1RZ
HRes1DHit * hRes_S3RZ_W2
HEff1DHit * hEff_S1RZ_W2
HEff1DHit * hEff_S3RZ_W1
HRes1DHit * hRes_S3RZWS[3][4]
HRes1DHit * hRes_S1RZ_W2
HRes1DHit * hRes_S2RPhi_W0
HRes1DHit * hRes_S1RPhi
HRes1DHit * hRes_S2RPhi_W1
HEff1DHit * hEff_S3RPhiWS[3][4]
HRes1DHit * hRes_S2RZ_W1
A set of histograms of residuals and pulls for 1D RecHits.
Definition: Histograms.h:26
HEff1DHit * hEff_S3RZ_W2
HEff1DHit * hEff_S1RZ_W0
HRes1DHit * hRes_S2RZ_W0
HRes1DHit * hRes_S2RPhi_W2
HEff1DHit * hEff_S2RZ_W1
HRes1DHit * hRes_S1RPhi_W2
HRes1DHit * hRes_S1RZ_W1
HEff1DHit * hEff_S3RZ_W0
HEff1DHit * hEff_S2RZ_W2
HRes1DHit * hRes_S2RPhi
HRes1DHit * hRes_S3RPhi_W2
HEff1DHit * hEff_S1RPhi
HEff1DHit * hEff_S1RZ
HEff1DHit * hEff_S3RZWS[3][4]
HRes1DHit * hRes_S3RPhi
HEff1DHit * hEff_S2RPhi
HEff1DHit * hEff_S1RZ_W1
HRes1DHit * hRes_S3RZ_W0
HRes1DHit * hRes_S3RZ_W1
HEff1DHit * hEff_S1RPhiWS[3][4]
HRes1DHit * hRes_S3RZ
HRes1DHit * hRes_S2RZ
HRes1DHit * hRes_S2RZ_W2
HRes1DHit * hRes_S3RPhi_W1
HRes1DHit * hRes_S3RPhiWS[3][4]
HRes1DHit * hRes_S1RZ_W0
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,
int  step 
)
private

Definition at line 427 of file DTRecHitQuality.cc.

References funct::abs(), gather_cfg::cout, debug, PV3DBase< T, PVType, FrameType >::eta(), HRes1DHit::Fill(), HEff1DHit::Fill(), DTHitQualityUtils::findMuSimHit(), DTGeometry::layer(), PSimHit::localPosition(), python.multivaluedict::map(), PV3DBase< T, PVType, FrameType >::phi(), HLT_25ns14e33_v3_cff::recHits, DTChamberId::station(), DTSuperLayerId::superLayer(), GeomDet::toGlobal(), and DTChamberId::wheel().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 164 of file DTRecHitQuality.cc.

164  {
165  // Write the histos to file
166  if(doall){
167  if(doStep1){
173  }
174  if(doStep2){
180  }
181  if(doStep3){
187  }
188  }
189 }
HEff1DHit * hEff_S3RZ
HEff1DHit * hEff_S2RZ_W0
HEff1DHit * hEff_S2RZ
HEff1DHit * hEff_S3RPhi
void ComputeEfficiency()
Definition: Histograms.h:234
HEff1DHit * hEff_S1RZ_W2
HEff1DHit * hEff_S3RZ_W1
HEff1DHit * hEff_S3RZ_W2
HEff1DHit * hEff_S1RZ_W0
HEff1DHit * hEff_S2RZ_W1
HEff1DHit * hEff_S3RZ_W0
HEff1DHit * hEff_S2RZ_W2
HEff1DHit * hEff_S1RPhi
HEff1DHit * hEff_S1RZ
HEff1DHit * hEff_S2RPhi
HEff1DHit * hEff_S1RZ_W1
void DTRecHitQuality::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 159 of file DTRecHitQuality.cc.

160  {
161 
162 }
template<typename type >
const type * DTRecHitQuality::findBestRecHit ( const DTLayer layer,
DTWireId  wireId,
const std::vector< type > &  recHits,
const float  simHitDist 
)
private

Definition at line 388 of file DTRecHitQuality.cc.

391  {
392  float res = 99999;
393  const type* theBestRecHit = 0;
394  // Loop over RecHits within the cell
395  for(typename vector<type>::const_iterator recHit = recHits.begin();
396  recHit != recHits.end();
397  recHit++) {
398  float distTmp = recHitDistFromWire(*recHit, layer);
399  if(fabs(distTmp-simHitDist) < res) {
400  res = fabs(distTmp-simHitDist);
401  theBestRecHit = &(*recHit);
402  }
403  } // End of loop over RecHits within the cell
404 
405  return theBestRecHit;
406 }
type
Definition: HCALResponse.h:21
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
map< DTWireId, vector< DTRecHit1DPair > > DTRecHitQuality::map1DRecHitsPerWire ( const DTRecHitCollection dt1DRecHitPairs)
private

Definition at line 286 of file DTRecHitQuality.cc.

References run_regression::ret.

286  {
287  map<DTWireId, vector<DTRecHit1DPair> > ret;
288 
289  for(DTRecHitCollection::const_iterator rechit = dt1DRecHitPairs->begin();
290  rechit != dt1DRecHitPairs->end(); rechit++) {
291  ret[(*rechit).wireId()].push_back(*rechit);
292  }
293 
294  return ret;
295 }
map< DTWireId, vector< DTRecHit1D > > DTRecHitQuality::map1DRecHitsPerWire ( const DTRecSegment2DCollection segment2Ds)
private

Definition at line 300 of file DTRecHitQuality.cc.

References run_regression::ret.

300  {
301  map<DTWireId, vector<DTRecHit1D> > ret;
302 
303  // Loop over all 2D segments
304  for(DTRecSegment2DCollection::const_iterator segment = segment2Ds->begin();
305  segment != segment2Ds->end();
306  segment++) {
307  vector<DTRecHit1D> component1DHits= (*segment).specificRecHits();
308  // Loop over all component 1D hits
309  for(vector<DTRecHit1D>::const_iterator hit = component1DHits.begin();
310  hit != component1DHits.end();
311  hit++) {
312  ret[(*hit).wireId()].push_back(*hit);
313  }
314  }
315  return ret;
316 }
map< DTWireId, std::vector< DTRecHit1D > > DTRecHitQuality::map1DRecHitsPerWire ( const DTRecSegment4DCollection segment4Ds)
private

Definition at line 322 of file DTRecHitQuality.cc.

References run_regression::ret, and DTRecHit1D::wireId().

322  {
323  map<DTWireId, vector<DTRecHit1D> > ret;
324  // Loop over all 4D segments
325  for(DTRecSegment4DCollection::const_iterator segment = segment4Ds->begin();
326  segment != segment4Ds->end();
327  segment++) {
328  // Get component 2D segments
329  vector<const TrackingRecHit*> segment2Ds = (*segment).recHits();
330  // Loop over 2D segments:
331  for(vector<const TrackingRecHit*>::const_iterator segment2D = segment2Ds.begin();
332  segment2D != segment2Ds.end();
333  segment2D++) {
334  // Get 1D component rechits
335  vector<const TrackingRecHit*> hits = (*segment2D)->recHits();
336  // Loop over them
337  for(vector<const TrackingRecHit*>::const_iterator hit = hits.begin();
338  hit != hits.end(); hit++) {
339  const DTRecHit1D* hit1D = dynamic_cast<const DTRecHit1D*>(*hit);
340  ret[hit1D->wireId()].push_back(*hit1D);
341  }
342  }
343  }
344 
345  return ret;
346 }
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:107
float DTRecHitQuality::recHitDistFromWire ( const DTRecHit1DPair hitPair,
const DTLayer layer 
)
private

Definition at line 411 of file DTRecHitQuality.cc.

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

411  {
412  // Compute the rechit distance from wire
413  return fabs(hitPair.localPosition(DTEnums::Left).x() -
414  hitPair.localPosition(DTEnums::Right).x())/2.;
415 }
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const
float DTRecHitQuality::recHitDistFromWire ( const DTRecHit1D recHit,
const DTLayer layer 
)
private

Definition at line 421 of file DTRecHitQuality.cc.

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

421  {
422  return fabs(recHit.localPosition().x() - layer->specificTopology().wirePosition(recHit.wireId().wire()));
423 }
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
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
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)
private

Definition at line 636 of file DTRecHitQuality.cc.

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

636  {
637  return sqrt(recHit.localPositionError(DTEnums::Left).xx());
638 }
float xx() const
Definition: LocalError.h:24
virtual LocalError localPositionError() const
T sqrt(T t)
Definition: SSEVec.h:48
float DTRecHitQuality::recHitPositionError ( const DTRecHit1D recHit)
private

Definition at line 641 of file DTRecHitQuality.cc.

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

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

Definition at line 372 of file DTRecHitQuality.cc.

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

374  {
375  LocalPoint entryP = hit.entryPoint();
376  LocalPoint exitP = hit.exitPoint();
377  float wireLenght=layer->specificTopology().cellLenght();
378  // FIXME: should take only wireLenght/2.;
379  // moreover, pos+cellLenght/2. is shorter than the distance from FE.
380  // In fact it would make more sense to make plots vs y.
381  return (entryP.y()+exitP.y())/2.+wireLenght;
382 }
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,
DTWireId  wireId,
const PSimHit hit 
)
private

Definition at line 349 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().

351  {
352  float xwire = layer->specificTopology().wirePosition(wireId.wire());
353  LocalPoint entryP = hit.entryPoint();
354  LocalPoint exitP = hit.exitPoint();
355  float xEntry = entryP.x()-xwire;
356  float xExit = exitP.x()-xwire;
357 
358  return fabs(xEntry - (entryP.z()*(xExit-xEntry))/(exitP.z()-entryP.z()));//FIXME: check...
359 }
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,
DTWireId  wireId,
const PSimHit hit 
)
private

Definition at line 362 of file DTRecHitQuality.cc.

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

364  {
365  LocalPoint entryP = hit.entryPoint();
366  LocalPoint exitP = hit.exitPoint();
367  float theta=(exitP.x()-entryP.x())/(exitP.z()-entryP.z());
368  return atan(theta);
369 }
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

DQMStore* DTRecHitQuality::dbe_
private

Definition at line 216 of file DTRecHitQuality.h.

bool DTRecHitQuality::debug
private

Definition at line 78 of file DTRecHitQuality.h.

bool DTRecHitQuality::doall
private

Definition at line 217 of file DTRecHitQuality.h.

bool DTRecHitQuality::doStep1
private

Definition at line 92 of file DTRecHitQuality.h.

bool DTRecHitQuality::doStep2
private

Definition at line 93 of file DTRecHitQuality.h.

bool DTRecHitQuality::doStep3
private

Definition at line 94 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RPhi
private

Definition at line 191 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RPhiWS[3][4]
private

Definition at line 211 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RZ
private

Definition at line 195 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RZ_W0
private

Definition at line 199 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RZ_W1
private

Definition at line 203 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RZ_W2
private

Definition at line 207 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S1RZWS[3][4]
private

Definition at line 213 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S2RPhi
private

Definition at line 192 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S2RZ
private

Definition at line 196 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S2RZ_W0
private

Definition at line 200 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S2RZ_W1
private

Definition at line 204 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S2RZ_W2
private

Definition at line 208 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RPhi
private

Definition at line 193 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RPhiWS[3][4]
private

Definition at line 212 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RZ
private

Definition at line 197 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RZ_W0
private

Definition at line 201 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RZ_W1
private

Definition at line 205 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RZ_W2
private

Definition at line 209 of file DTRecHitQuality.h.

HEff1DHit* DTRecHitQuality::hEff_S3RZWS[3][4]
private

Definition at line 214 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RPhi
private

Definition at line 156 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RPhi_W0
private

Definition at line 176 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RPhi_W1
private

Definition at line 180 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RPhi_W2
private

Definition at line 184 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RZ
private

Definition at line 160 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RZ_W0
private

Definition at line 164 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RZ_W1
private

Definition at line 168 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S1RZ_W2
private

Definition at line 172 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RPhi
private

Definition at line 157 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RPhi_W0
private

Definition at line 177 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RPhi_W1
private

Definition at line 181 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RPhi_W2
private

Definition at line 185 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RZ
private

Definition at line 161 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RZ_W0
private

Definition at line 165 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RZ_W1
private

Definition at line 169 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S2RZ_W2
private

Definition at line 173 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RPhi
private

Definition at line 158 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RPhi_W0
private

Definition at line 178 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RPhi_W1
private

Definition at line 182 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RPhi_W2
private

Definition at line 186 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RPhiWS[3][4]
private

Definition at line 188 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RZ
private

Definition at line 162 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RZ_W0
private

Definition at line 166 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RZ_W1
private

Definition at line 170 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RZ_W2
private

Definition at line 174 of file DTRecHitQuality.h.

HRes1DHit* DTRecHitQuality::hRes_S3RZWS[3][4]
private

Definition at line 189 of file DTRecHitQuality.h.

bool DTRecHitQuality::local
private

Definition at line 95 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::recHitLabel
private

Definition at line 87 of file DTRecHitQuality.h.

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

Definition at line 82 of file DTRecHitQuality.h.

std::string DTRecHitQuality::rootFileName
private

Definition at line 80 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::segment2DLabel
private

Definition at line 88 of file DTRecHitQuality.h.

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

Definition at line 83 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::segment4DLabel
private

Definition at line 89 of file DTRecHitQuality.h.

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

Definition at line 84 of file DTRecHitQuality.h.

edm::InputTag DTRecHitQuality::simHitLabel
private

Definition at line 84 of file DTRecHitQuality.h.

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

Definition at line 81 of file DTRecHitQuality.h.