CMS 3D CMS Logo

TrackerDpgAnalysis.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DPGAnalysis
4 // Class: TrackerDpgAnalysis
5 //
13 //
14 // Original Author: Christophe DELAERE
15 // Created: Tue Sep 23 02:11:44 CEST 2008
16 // Revised: Thu Nov 26 10:00:00 CEST 2009
17 // part of the code was inspired by http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/YGao/LhcTrackAnalyzer/
18 // part of the code was inspired by
19 // other inputs from Andrea Giammanco, Gaelle Boudoul, Andrea Venturi, Steven Lowette, Gavril Giurgiu
20 // $Id: TrackerDpgAnalysis.cc,v 1.14 2013/02/27 19:49:47 wmtan Exp $
21 //
22 //
23 
24 // system include files
25 #include <memory>
26 #include <iostream>
27 #include <limits>
28 #include <utility>
29 #include <vector>
30 #include <algorithm>
31 #include <functional>
32 #include <cstring>
33 #include <sstream>
34 #include <fstream>
35 
36 // root include files
37 #include "TTree.h"
38 #include "TFile.h"
39 
40 // user include files
100 
101 // topology
103 
104 //
105 // class decleration
106 //
108 
110 public:
111  explicit TrackerDpgAnalysis(const edm::ParameterSet&);
112  ~TrackerDpgAnalysis() override;
113 
114 protected:
116  const std::vector<Trajectory>&);
117  void insertMeasurement(std::multimap<const uint32_t, std::pair<LocalPoint, double> >&,
119  double);
120  std::vector<int> onTrack(edm::Handle<edmNew::DetSetVector<SiStripCluster> >&, const reco::TrackCollection&, uint32_t);
121  void insertMeasurement(std::multimap<const uint32_t, std::pair<int, int> >&, const TrackingRecHit*, int);
122  std::map<size_t, int> inVertex(const reco::TrackCollection&, const reco::VertexCollection&, uint32_t);
123  std::vector<std::pair<double, double> > onTrackAngles(edm::Handle<edmNew::DetSetVector<SiPixelCluster> >&,
124  const std::vector<Trajectory>&);
125  void insertMeasurement(std::multimap<const uint32_t, std::pair<LocalPoint, std::pair<double, double> > >&,
127  double,
128  double);
129  std::vector<int> onTrack(edm::Handle<edmNew::DetSetVector<SiPixelCluster> >&, const reco::TrackCollection&, uint32_t);
130  void insertMeasurement(std::multimap<const uint32_t, std::pair<std::pair<float, float>, int> >&,
131  const TrackingRecHit*,
132  int);
133  std::string toStringName(uint32_t, const TrackerTopology*);
134  std::string toStringId(uint32_t);
135  double sumPtSquared(const reco::Vertex&);
136  float delay(const SiStripEventSummary&);
137  std::map<uint32_t, float> delay(const std::vector<std::string>&);
138 
139 private:
140  void beginRun(const edm::Run&, const edm::EventSetup&) override;
141  void analyze(const edm::Event&, const edm::EventSetup&) override;
142  void endJob() override;
143 
144  // ----------member data ---------------------------
145  static const int nMaxPVs_ = 50;
159  std::vector<edm::InputTag> trackLabels_;
160  std::vector<edm::EDGetTokenT<reco::TrackCollection> > trackTokens_;
161  std::vector<edm::EDGetTokenT<std::vector<Trajectory> > > trajectoryTokens_;
162  std::vector<edm::EDGetTokenT<TrajTrackAssociationCollection> > trajTrackAssoTokens_;
165  std::multimap<const uint32_t, const FedChannelConnection*> connections_;
169  TTree* clusters_;
170  TTree* pixclusters_;
171  std::vector<TTree*> tracks_;
172  std::vector<TTree*> missingHits_;
173  TTree* vertices_;
175  TTree* event_;
176  TTree* psumap_;
177  TTree* readoutmap_;
178  bool onTrack_;
179  uint32_t vertexid_;
181  uint32_t runid_;
182  uint32_t globalvertexid_;
191  float eta_, phi_, chi2_;
193  uint32_t detid_, dcuId_, type_;
196  lostHits_, ndof_;
197  uint32_t *ntracks_, *ntrajs_;
200  uint32_t nTracks_pvtx_;
208  float charge_, p_, pt_;
216  std::vector<std::string> delayFileNames_;
218  std::vector<std::string> hlNames_; // name of each HLT algorithm
219  HLTConfigProvider hltConfig_; // to get configuration for L1s/Pre
220 };
221 
222 //
223 // constructors and destructor
224 //
226  : siStripClusterInfo_(consumesCollector(), std::string("")), hltConfig_() {
227  // members
228  moduleName_ = new char[256];
229  moduleId_ = new char[256];
230  PSUname_ = new char[256];
231  pset_ = iConfig;
232 
233  // enable/disable functionalities
234  functionality_offtrackClusters_ = iConfig.getUntrackedParameter<bool>("keepOfftrackClusters", true);
235  functionality_ontrackClusters_ = iConfig.getUntrackedParameter<bool>("keepOntrackClusters", true);
236  functionality_pixclusters_ = iConfig.getUntrackedParameter<bool>("keepPixelClusters", true);
237  functionality_pixvertices_ = iConfig.getUntrackedParameter<bool>("keepPixelVertices", true);
238  functionality_missingHits_ = iConfig.getUntrackedParameter<bool>("keepMissingHits", true);
239  functionality_tracks_ = iConfig.getUntrackedParameter<bool>("keepTracks", true);
240  functionality_vertices_ = iConfig.getUntrackedParameter<bool>("keepVertices", true);
241  functionality_events_ = iConfig.getUntrackedParameter<bool>("keepEvents", true);
242 
243  // parameters
244  summaryToken_ = consumes<SiStripEventSummary>(edm::InputTag("siStripDigis"));
245  clusterToken_ = consumes<edmNew::DetSetVector<SiStripCluster> >(iConfig.getParameter<edm::InputTag>("ClustersLabel"));
247  consumes<edmNew::DetSetVector<SiPixelCluster> >(iConfig.getParameter<edm::InputTag>("PixelClustersLabel"));
248  trackLabels_ = iConfig.getParameter<std::vector<edm::InputTag> >("TracksLabel");
250  trackLabels_, [this](edm::InputTag const& tag) { return consumes<reco::TrackCollection>(tag); });
252  trackLabels_, [this](edm::InputTag const& tag) { return consumes<std::vector<Trajectory> >(tag); });
254  trackLabels_, [this](edm::InputTag const& tag) { return consumes<TrajTrackAssociationCollection>(tag); });
255  dedx1Token_ = consumes<edm::ValueMap<reco::DeDxData> >(iConfig.getParameter<edm::InputTag>("DeDx1Label"));
256  dedx2Token_ = consumes<edm::ValueMap<reco::DeDxData> >(iConfig.getParameter<edm::InputTag>("DeDx2Label"));
257  dedx3Token_ = consumes<edm::ValueMap<reco::DeDxData> >(iConfig.getParameter<edm::InputTag>("DeDx3Label"));
258  vertexToken_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexLabel"));
259  pixelVertexToken_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("pixelVertexLabel"));
260  bsToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpotLabel"));
261  L1Token_ = consumes<L1GlobalTriggerReadoutRecord>(iConfig.getParameter<edm::InputTag>("L1Label"));
262  HLTTag_ = iConfig.getParameter<edm::InputTag>("HLTLabel");
263  HLTToken_ = consumes<edm::TriggerResults>(HLTTag_);
264 
265  // initialize arrays
266  size_t trackSize(trackLabels_.size());
267  ntracks_ = new uint32_t[trackSize];
268  ntrajs_ = new uint32_t[trackSize];
269  globaltrackid_ = new uint32_t[trackSize];
270  trackid_ = new uint32_t[trackSize];
271  lowPixelProbabilityFraction_ = new float[trackSize];
272  globalvertexid_ = iConfig.getParameter<uint32_t>("InitalCounter");
273  for (size_t i = 0; i < trackSize; ++i) {
274  ntracks_[i] = 0;
275  ntrajs_[i] = 0;
276  globaltrackid_[i] = iConfig.getParameter<uint32_t>("InitalCounter");
277  trackid_[i] = 0;
279  }
280 
281  // create output
283  TFileDirectory* dir = new TFileDirectory(fileService->mkdir("trackerDPG"));
284 
285  // create a TTree for clusters
286  clusters_ = dir->make<TTree>("clusters", "cluster information");
287  clusters_->Branch("eventid", &eventid_, "eventid/i");
288  clusters_->Branch("runid", &runid_, "runid/i");
289  for (size_t i = 0; i < trackSize; ++i) {
290  char buffer1[256];
291  char buffer2[256];
292  sprintf(buffer1, "trackid%lu", (unsigned long)i);
293  sprintf(buffer2, "trackid%lu/i", (unsigned long)i);
294  clusters_->Branch(buffer1, trackid_ + i, buffer2);
295  }
296  clusters_->Branch("onTrack", &onTrack_, "onTrack/O");
297  clusters_->Branch("clWidth", &clWidth_, "clWidth/F");
298  clusters_->Branch("clPosition", &clPosition_, "clPosition/F");
299  clusters_->Branch("clglobalX", &globalX_, "clglobalX/F");
300  clusters_->Branch("clglobalY", &globalY_, "clglobalY/F");
301  clusters_->Branch("clglobalZ", &globalZ_, "clglobalZ/F");
302  clusters_->Branch("angle", &angle_, "angle/F");
303  clusters_->Branch("thickness", &thickness_, "thickness/F");
304  clusters_->Branch("maxCharge", &maxCharge_, "maxCharge/F");
305  clusters_->Branch("clNormalizedCharge", &clNormalizedCharge_, "clNormalizedCharge/F");
306  clusters_->Branch("clNormalizedNoise", &clNormalizedNoise_, "clNormalizedNoise/F");
307  clusters_->Branch("clSignalOverNoise", &clSignalOverNoise_, "clSignalOverNoise/F");
308  clusters_->Branch("clCorrectedCharge", &clCorrectedCharge_, "clCorrectedCharge/F");
309  clusters_->Branch("clCorrectedSignalOverNoise", &clCorrectedSignalOverNoise_, "clCorrectedSignalOverNoise/F");
310  clusters_->Branch("clBareCharge", &clBareCharge_, "clBareCharge/F");
311  clusters_->Branch("clBareNoise", &clBareNoise_, "clBareNoise/F");
312  clusters_->Branch("stripLength", &stripLength_, "stripLength/F");
313  clusters_->Branch("detid", &detid_, "detid/i");
314  clusters_->Branch("lldChannel", &lldChannel_, "lldChannel/s");
315 
316  // create a TTree for pixel clusters
317  pixclusters_ = dir->make<TTree>("pixclusters", "pixel cluster information");
318  pixclusters_->Branch("eventid", &eventid_, "eventid/i");
319  pixclusters_->Branch("runid", &runid_, "runid/i");
320  for (size_t i = 0; i < trackSize; ++i) {
321  char buffer1[256];
322  char buffer2[256];
323  sprintf(buffer1, "trackid%lu", (unsigned long)i);
324  sprintf(buffer2, "trackid%lu/i", (unsigned long)i);
325  pixclusters_->Branch(buffer1, trackid_ + i, buffer2);
326  }
327  pixclusters_->Branch("onTrack", &onTrack_, "onTrack/O");
328  pixclusters_->Branch("clPositionX", &clPositionX_, "clPositionX/F");
329  pixclusters_->Branch("clPositionY", &clPositionY_, "clPositionY/F");
330  pixclusters_->Branch("clSize", &clSize_, "clSize/i");
331  pixclusters_->Branch("clSizeX", &clSizeX_, "clSizeX/i");
332  pixclusters_->Branch("clSizeY", &clSizeY_, "clSizeY/i");
333  pixclusters_->Branch("alpha", &alpha_, "alpha/F");
334  pixclusters_->Branch("beta", &beta_, "beta/F");
335  pixclusters_->Branch("charge", &charge_, "charge/F");
336  pixclusters_->Branch("chargeCorr", &chargeCorr_, "chargeCorr/F");
337  pixclusters_->Branch("clglobalX", &globalX_, "clglobalX/F");
338  pixclusters_->Branch("clglobalY", &globalY_, "clglobalY/F");
339  pixclusters_->Branch("clglobalZ", &globalZ_, "clglobalZ/F");
340  pixclusters_->Branch("detid", &detid_, "detid/i");
341 
342  // create a tree for tracks
343  for (size_t i = 0; i < trackSize; ++i) {
344  char buffer1[256];
345  char buffer2[256];
346  sprintf(buffer1, "tracks%lu", (unsigned long)i);
347  sprintf(buffer2, "track%lu information", (unsigned long)i);
348  TTree* thetracks_ = dir->make<TTree>(buffer1, buffer2);
349  sprintf(buffer1, "trackid%lu", (unsigned long)i);
350  sprintf(buffer2, "trackid%lu/i", (unsigned long)i);
351  thetracks_->Branch(buffer1, globaltrackid_ + i, buffer2);
352  thetracks_->Branch("eventid", &eventid_, "eventid/i");
353  thetracks_->Branch("runid", &runid_, "runid/i");
354  thetracks_->Branch("chi2", &chi2_, "chi2/F");
355  thetracks_->Branch("eta", &eta_, "eta/F");
356  thetracks_->Branch("etaerr", &etaerr_, "etaerr/F");
357  thetracks_->Branch("phi", &phi_, "phi/F");
358  thetracks_->Branch("phierr", &phierr_, "phierr/F");
359  thetracks_->Branch("dedx1", &dedx1_, "dedx1/F");
360  thetracks_->Branch("dedx2", &dedx2_, "dedx2/F");
361  thetracks_->Branch("dedx3", &dedx3_, "dedx3/F");
362  thetracks_->Branch("dedxNoM", &dedxNoM_, "dedxNoM/i");
363  thetracks_->Branch("charge", &charge_, "charge/F");
364  thetracks_->Branch("quality", &quality_, "quality/i");
365  thetracks_->Branch("foundhits", &foundhits_, "foundhits/i");
366  thetracks_->Branch("lostHits", &lostHits_, "lostHits/i");
367  thetracks_->Branch("foundhitsStrips", &foundhitsStrips_, "foundhitsStrips/i");
368  thetracks_->Branch("foundhitsPixels", &foundhitsPixels_, "foundhitsPixels/i");
369  thetracks_->Branch("losthitsStrips", &losthitsStrips_, "losthitsStrips/i");
370  thetracks_->Branch("losthitsPixels", &losthitsPixels_, "losthitsPixels/i");
371  thetracks_->Branch("p", &p_, "p/F");
372  thetracks_->Branch("pt", &pt_, "pt/F");
373  thetracks_->Branch("pterr", &pterr_, "pterr/F");
374  thetracks_->Branch("ndof", &ndof_, "ndof/i");
375  thetracks_->Branch("dz", &dz_, "dz/F");
376  thetracks_->Branch("dzerr", &dzerr_, "dzerr/F");
377  thetracks_->Branch("dzCorr", &dzCorr_, "dzCorr/F");
378  thetracks_->Branch("dxy", &dxy_, "dxy/F");
379  thetracks_->Branch("dxyerr", &dxyerr_, "dxyerr/F");
380  thetracks_->Branch("dxyCorr", &dxyCorr_, "dxyCorr/F");
381  thetracks_->Branch("qoverp", &qoverp_, "qoverp/F");
382  thetracks_->Branch("xPCA", &xPCA_, "xPCA/F");
383  thetracks_->Branch("yPCA", &yPCA_, "yPCA/F");
384  thetracks_->Branch("zPCA", &zPCA_, "zPCA/F");
385  thetracks_->Branch("nLayers", &nLayers_, "nLayers/i");
386  thetracks_->Branch("trkWeightpvtx", &trkWeightpvtx_, "trkWeightpvtx/F");
387  thetracks_->Branch("vertexid", &vertexid_, "vertexid/i");
388  tracks_.push_back(thetracks_);
389  }
390 
391  // create a tree for missing hits
392  for (size_t i = 0; i < trackSize; ++i) {
393  char buffer1[256];
394  char buffer2[256];
395  sprintf(buffer1, "misingHits%lu", (unsigned long)i);
396  sprintf(buffer2, "missing hits from track collection %lu", (unsigned long)i);
397  TTree* themissingHits_ = dir->make<TTree>(buffer1, buffer2);
398  sprintf(buffer1, "trackid%lu", (unsigned long)i);
399  sprintf(buffer2, "trackid%lu/i", (unsigned long)i);
400  themissingHits_->Branch(buffer1, globaltrackid_ + i, buffer2);
401  themissingHits_->Branch("eventid", &eventid_, "eventid/i");
402  themissingHits_->Branch("runid", &runid_, "runid/i");
403  themissingHits_->Branch("detid", &detid_, "detid/i");
404  themissingHits_->Branch("type", &type_, "type/i");
405  themissingHits_->Branch("localX", &clPositionX_, "localX/F");
406  themissingHits_->Branch("localY", &clPositionY_, "localY/F");
407  themissingHits_->Branch("globalX", &globalX_, "globalX/F");
408  themissingHits_->Branch("globalY", &globalY_, "globalY/F");
409  themissingHits_->Branch("globalZ", &globalZ_, "globalZ/F");
410  themissingHits_->Branch("measX", &measX_, "measX/F");
411  themissingHits_->Branch("measY", &measY_, "measY/F");
412  themissingHits_->Branch("errorX", &errorX_, "errorX/F");
413  themissingHits_->Branch("errorY", &errorY_, "errorY/F");
414  missingHits_.push_back(themissingHits_);
415  }
416 
417  // create a tree for the vertices
418  vertices_ = dir->make<TTree>("vertices", "vertex information");
419  vertices_->Branch("vertexid", &globalvertexid_, "vertexid/i");
420  vertices_->Branch("eventid", &eventid_, "eventid/i");
421  vertices_->Branch("runid", &runid_, "runid/i");
422  vertices_->Branch("nTracks", &nTracks_pvtx_, "nTracks/i");
423  vertices_->Branch("sumptsq", &sumptsq_pvtx_, "sumptsq/F");
424  vertices_->Branch("isValid", &isValid_pvtx_, "isValid/O");
425  vertices_->Branch("isFake", &isFake_pvtx_, "isFake/O");
426  vertices_->Branch("recx", &recx_pvtx_, "recx/F");
427  vertices_->Branch("recy", &recy_pvtx_, "recy/F");
428  vertices_->Branch("recz", &recz_pvtx_, "recz/F");
429  vertices_->Branch("recx_err", &recx_err_pvtx_, "recx_err/F");
430  vertices_->Branch("recy_err", &recy_err_pvtx_, "recy_err/F");
431  vertices_->Branch("recz_err", &recz_err_pvtx_, "recz_err/F");
432 
433  // create a tree for the vertices
434  pixelVertices_ = dir->make<TTree>("pixelVertices", "pixel vertex information");
435  pixelVertices_->Branch("eventid", &eventid_, "eventid/i");
436  pixelVertices_->Branch("runid", &runid_, "runid/i");
437  pixelVertices_->Branch("nTracks", &nTracks_pvtx_, "nTracks/i");
438  pixelVertices_->Branch("sumptsq", &sumptsq_pvtx_, "sumptsq/F");
439  pixelVertices_->Branch("isValid", &isValid_pvtx_, "isValid/O");
440  pixelVertices_->Branch("isFake", &isFake_pvtx_, "isFake/O");
441  pixelVertices_->Branch("recx", &recx_pvtx_, "recx/F");
442  pixelVertices_->Branch("recy", &recy_pvtx_, "recy/F");
443  pixelVertices_->Branch("recz", &recz_pvtx_, "recz/F");
444  pixelVertices_->Branch("recx_err", &recx_err_pvtx_, "recx_err/F");
445  pixelVertices_->Branch("recy_err", &recy_err_pvtx_, "recy_err/F");
446  pixelVertices_->Branch("recz_err", &recz_err_pvtx_, "recz_err/F");
447 
448  // create a tree for the events
449  event_ = dir->make<TTree>("events", "event information");
450  event_->Branch("eventid", &eventid_, "eventid/i");
451  event_->Branch("runid", &runid_, "runid/i");
452  event_->Branch("L1DecisionBits", L1DecisionBits_, "L1DecisionBits[192]/O");
453  event_->Branch("L1TechnicalBits", L1TechnicalBits_, "L1TechnicalBits[64]/O");
454  event_->Branch("orbit", &orbit_, "orbit/i");
455  event_->Branch("orbitL1", &orbitL1_, "orbitL1/i");
456  event_->Branch("bx", &bx_, "bx/i");
457  event_->Branch("store", &store_, "store/i");
458  event_->Branch("time", &time_, "time/i");
459  event_->Branch("delay", &delay_, "delay/F");
460  event_->Branch("lumiSegment", &lumiSegment_, "lumiSegment/s");
461  event_->Branch("physicsDeclared", &physicsDeclared_, "physicsDeclared/s");
462  event_->Branch("HLTDecisionBits", HLTDecisionBits_, "HLTDecisionBits[256]/O");
463  char buffer[256];
464  sprintf(buffer, "ntracks[%lu]/i", (unsigned long)trackSize);
465  event_->Branch("ntracks", ntracks_, buffer);
466  sprintf(buffer, "ntrajs[%lu]/i", (unsigned long)trackSize);
467  event_->Branch("ntrajs", ntrajs_, buffer);
468  sprintf(buffer, "lowPixelProbabilityFraction[%lu]/F", (unsigned long)trackSize);
469  event_->Branch("lowPixelProbabilityFraction", lowPixelProbabilityFraction_, buffer);
470  event_->Branch("nclusters", &nclusters_, "nclusters/i");
471  event_->Branch("npixClusters", &npixClusters_, "npixClusters/i");
472  event_->Branch("nclustersOntrack", &nclustersOntrack_, "nclustersOntrack/i");
473  event_->Branch("npixClustersOntrack", &npixClustersOntrack_, "npixClustersOntrack/i");
474  event_->Branch("bsX0", &bsX0_, "bsX0/F");
475  event_->Branch("bsY0", &bsY0_, "bsY0/F");
476  event_->Branch("bsZ0", &bsZ0_, "bsZ0/F");
477  event_->Branch("bsSigmaZ", &bsSigmaZ_, "bsSigmaZ/F");
478  event_->Branch("bsDxdz", &bsDxdz_, "bsDxdz/F");
479  event_->Branch("bsDydz", &bsDydz_, "bsDydz/F");
480  event_->Branch("nVertices", &nVertices_, "nVertices/i");
481  event_->Branch("thrustValue", &thrustValue_, "thrustValue/F");
482  event_->Branch("thrustX", &thrustX_, "thrustX/F");
483  event_->Branch("thrustY", &thrustY_, "thrustY/F");
484  event_->Branch("thrustZ", &thrustZ_, "thrustZ/F");
485  event_->Branch("sphericity", &sphericity_, "sphericity/F");
486  event_->Branch("planarity", &planarity_, "planarity/F");
487  event_->Branch("aplanarity", &aplanarity_, "aplanarity/F");
488  event_->Branch("MagneticField", &fBz_, "MagneticField/F");
489 
490  // cabling
491  cablingFileName_ = iConfig.getUntrackedParameter<std::string>("PSUFileName", "PSUmapping.csv");
493  iConfig.getUntrackedParameter<std::vector<std::string> >("DelayFileNames", std::vector<std::string>(0));
494  psumap_ = dir->make<TTree>("psumap", "PSU map");
495  psumap_->Branch("PSUname", PSUname_, "PSUname/C");
496  psumap_->Branch("dcuId", &dcuId_, "dcuId/i");
497  readoutmap_ = dir->make<TTree>("readoutMap", "cabling map");
498  readoutmap_->Branch("detid", &detid_, "detid/i");
499  readoutmap_->Branch("dcuId", &dcuId_, "dcuId/i");
500  readoutmap_->Branch("fecCrate", &fecCrate_, "fecCrate/s");
501  readoutmap_->Branch("fecSlot", &fecSlot_, "fecSlot/s");
502  readoutmap_->Branch("fecRing", &fecRing_, "fecRing/s");
503  readoutmap_->Branch("ccuAdd", &ccuAdd_, "ccuAdd/s");
504  readoutmap_->Branch("ccuChan", &ccuChan_, "ccuChan/s");
505  readoutmap_->Branch("lldChannel", &lldChannel_, "lldChannel/s");
506  readoutmap_->Branch("fedId", &fedId_, "fedId/s");
507  readoutmap_->Branch("fedCh", &fedCh_, "fedCh/s");
508  readoutmap_->Branch("fiberLength", &fiberLength_, "fiberLength/s");
509  readoutmap_->Branch("moduleName", moduleName_, "moduleName/C");
510  readoutmap_->Branch("moduleId", moduleId_, "moduleId/C");
511  readoutmap_->Branch("delay", &delay_, "delay/F");
512  readoutmap_->Branch("globalX", &globalX_, "globalX/F");
513  readoutmap_->Branch("globalY", &globalY_, "globalY/F");
514  readoutmap_->Branch("globalZ", &globalZ_, "globalZ/F");
515 }
516 
518  delete[] moduleName_;
519  delete[] moduleId_;
520 }
521 
522 //
523 // member functions
524 //
525 
526 // ------------ method called to for each event ------------
528  using namespace edm;
529  using namespace reco;
530  using namespace std;
531  using reco::TrackCollection;
532 
533  // load event info
534  eventid_ = iEvent.id().event();
535  runid_ = iEvent.id().run();
536  bx_ = iEvent.eventAuxiliary().bunchCrossing();
537  orbit_ = iEvent.eventAuxiliary().orbitNumber();
538  store_ = iEvent.eventAuxiliary().storeNumber();
539  time_ = iEvent.eventAuxiliary().time().value();
540  lumiSegment_ = iEvent.eventAuxiliary().luminosityBlock();
541 
542  // Retrieve commissioning information from "event summary", when available (for standard fine delay)
544  iEvent.getByToken(summaryToken_, summary);
545  if (summary.isValid())
546  delay_ = delay(*summary.product());
547  else
548  delay_ = 0.;
549 
550  // -- Magnetic field
552  iSetup.get<IdealMagneticFieldRecord>().get(MF);
553  const MagneticField* theMagneticField = MF.product();
554  fBz_ = fabs(theMagneticField->inTesla(GlobalPoint(0, 0, 0)).z());
555 
557 
558  // load trigger info
560  iEvent.getByToken(L1Token_, gtrr_handle);
561  L1GlobalTriggerReadoutRecord const* gtrr = gtrr_handle.product();
562  L1GtFdlWord fdlWord = gtrr->gtFdlWord();
563  DecisionWord L1decision = fdlWord.gtDecisionWord();
564  for (int bit = 0; bit < 128; ++bit) {
565  L1DecisionBits_[bit] = L1decision[bit];
566  }
567  DecisionWordExtended L1decisionE = fdlWord.gtDecisionWordExtended();
568  for (int bit = 0; bit < 64; ++bit) {
569  L1DecisionBits_[bit + 128] = L1decisionE[bit];
570  }
571  TechnicalTriggerWord L1technical = fdlWord.gtTechnicalTriggerWord();
572  for (int bit = 0; bit < 64; ++bit) {
573  L1TechnicalBits_[bit] = L1technical[bit];
574  }
575  orbitL1_ = fdlWord.orbitNr();
576  physicsDeclared_ = fdlWord.physicsDeclared();
578  iEvent.getByToken(HLTToken_, trh);
579  size_t ntrh = trh->size();
580  for (size_t bit = 0; bit < 256; ++bit)
581  HLTDecisionBits_[bit] = bit < ntrh ? (bool)(trh->accept(bit)) : false;
582 
583  // load beamspot
584  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
585  iEvent.getByToken(bsToken_, recoBeamSpotHandle);
586  reco::BeamSpot bs = *recoBeamSpotHandle;
587  const Point beamSpot = recoBeamSpotHandle.isValid()
588  ? Point(recoBeamSpotHandle->x0(), recoBeamSpotHandle->y0(), recoBeamSpotHandle->z0())
589  : Point(0, 0, 0);
590  if (recoBeamSpotHandle.isValid()) {
591  bsX0_ = bs.x0();
592  bsY0_ = bs.y0();
593  bsZ0_ = bs.z0();
594  bsSigmaZ_ = bs.sigmaZ();
595  bsDxdz_ = bs.dxdz();
596  bsDydz_ = bs.dydz();
597  } else {
598  bsX0_ = 0.;
599  bsY0_ = 0.;
600  bsZ0_ = 0.;
601  bsSigmaZ_ = 0.;
602  bsDxdz_ = 0.;
603  bsDydz_ = 0.;
604  }
605 
606  // load primary vertex
607  static const reco::VertexCollection s_empty_vertexColl;
608  edm::Handle<reco::VertexCollection> vertexCollectionHandle;
609  iEvent.getByToken(vertexToken_, vertexCollectionHandle);
610  const reco::VertexCollection vertexColl = *(vertexCollectionHandle.product());
611  nVertices_ = 0;
612  for (reco::VertexCollection::const_iterator v = vertexColl.begin(); v != vertexColl.end(); ++v) {
613  if (v->isValid() && !v->isFake())
614  ++nVertices_;
615  }
616 
617  // load pixel vertices
618  // Pixel vertices are handled as primary vertices, but not linked to tracks.
619  edm::Handle<reco::VertexCollection> pixelVertexCollectionHandle;
620  iEvent.getByToken(pixelVertexToken_, pixelVertexCollectionHandle);
621  const reco::VertexCollection pixelVertexColl = *(pixelVertexCollectionHandle.product());
622  nPixelVertices_ = pixelVertexColl.size();
623 
624  // load the clusters
626  iEvent.getByToken(clusterToken_, clusters);
628  iEvent.getByToken(pixelclusterToken_, pixelclusters);
629 
630  // load dedx info
631  Handle<ValueMap<DeDxData> > dEdx1Handle;
632  Handle<ValueMap<DeDxData> > dEdx2Handle;
633  Handle<ValueMap<DeDxData> > dEdx3Handle;
634  try {
635  iEvent.getByToken(dedx1Token_, dEdx1Handle);
636  } catch (cms::Exception&) {
637  ;
638  }
639  try {
640  iEvent.getByToken(dedx2Token_, dEdx2Handle);
641  } catch (cms::Exception&) {
642  ;
643  }
644  try {
645  iEvent.getByToken(dedx3Token_, dEdx3Handle);
646  } catch (cms::Exception&) {
647  ;
648  }
649  const ValueMap<DeDxData> dEdxTrack1 = *dEdx1Handle.product();
650  const ValueMap<DeDxData> dEdxTrack2 = *dEdx2Handle.product();
651  const ValueMap<DeDxData> dEdxTrack3 = *dEdx3Handle.product();
652 
653  // load track collections
654  const size_t trackSize(trackLabels_.size());
655  std::vector<reco::TrackCollection> trackCollection;
656  std::vector<edm::Handle<reco::TrackCollection> > trackCollectionHandle;
657  trackCollectionHandle.resize(trackSize);
658  size_t index = 0;
659  for (std::vector<edm::EDGetTokenT<reco::TrackCollection> >::const_iterator token = trackTokens_.begin();
660  token != trackTokens_.end();
661  ++token, ++index) {
662  try {
663  iEvent.getByToken(*token, trackCollectionHandle[index]);
664  } catch (cms::Exception&) {
665  ;
666  }
667  trackCollection.push_back(*trackCollectionHandle[index].product());
668  ntracks_[index] = trackCollection[index].size();
669  }
670 
671  // load the trajectory collections
672  std::vector<std::vector<Trajectory> > trajectoryCollection;
673  std::vector<edm::Handle<std::vector<Trajectory> > > trajectoryCollectionHandle;
674  trajectoryCollectionHandle.resize(trackSize);
675  index = 0;
676  for (std::vector<edm::EDGetTokenT<std::vector<Trajectory> > >::const_iterator token = trajectoryTokens_.begin();
677  token != trajectoryTokens_.end();
678  ++token, ++index) {
679  try {
680  iEvent.getByToken(*token, trajectoryCollectionHandle[index]);
681  } catch (cms::Exception&) {
682  ;
683  }
684  trajectoryCollection.push_back(*trajectoryCollectionHandle[index].product());
685  ntrajs_[index] = trajectoryCollection[index].size();
686  }
687 
688  // load the tracks/traj association maps
689  std::vector<TrajTrackAssociationCollection> TrajToTrackMap;
690  Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle;
691  for (std::vector<edm::EDGetTokenT<TrajTrackAssociationCollection> >::const_iterator token =
692  trajTrackAssoTokens_.begin();
693  token != trajTrackAssoTokens_.end();
694  ++token) {
695  try {
696  iEvent.getByToken(*token, trajTrackAssociationHandle);
697  } catch (cms::Exception&) {
698  ;
699  }
700  TrajToTrackMap.push_back(*trajTrackAssociationHandle.product());
701  }
702 
703  // sanity check
704  if (!(!trackCollection.empty() && !trajectoryCollection.empty()))
705  return;
706 
707  // build the reverse map tracks -> vertex
708  std::vector<std::map<size_t, int> > trackVertices;
709  for (size_t i = 0; i < trackSize; ++i) {
710  trackVertices.push_back(inVertex(trackCollection[0], vertexColl, globalvertexid_ + 1));
711  }
712 
713  // iterate over vertices
715  for (reco::VertexCollection::const_iterator v = vertexColl.begin(); v != vertexColl.end(); ++v) {
716  nTracks_pvtx_ = v->tracksSize();
718  isValid_pvtx_ = int(v->isValid());
719  isFake_pvtx_ = int(v->isFake());
720  recx_pvtx_ = v->x();
721  recy_pvtx_ = v->y();
722  recz_pvtx_ = v->z();
723  recx_err_pvtx_ = v->xError();
724  recy_err_pvtx_ = v->yError();
725  recz_err_pvtx_ = v->zError();
726  globalvertexid_++;
727  vertices_->Fill();
728  }
729  }
730 
731  // iterate over pixel vertices
733  for (reco::VertexCollection::const_iterator v = pixelVertexColl.begin(); v != pixelVertexColl.end(); ++v) {
734  nTracks_pvtx_ = v->tracksSize();
736  isValid_pvtx_ = int(v->isValid());
737  isFake_pvtx_ = int(v->isFake());
738  recx_pvtx_ = v->x();
739  recy_pvtx_ = v->y();
740  recz_pvtx_ = v->z();
741  recx_err_pvtx_ = v->xError();
742  recy_err_pvtx_ = v->yError();
743  recz_err_pvtx_ = v->zError();
744  pixelVertices_->Fill();
745  }
746  }
747 
748  // determine if each cluster is on a track or not, and record the local angle
749  // to do this, we use the first track/traj collection
750  std::vector<double> clusterOntrackAngles = onTrackAngles(clusters, trajectoryCollection[0]);
751  std::vector<std::pair<double, double> > pixclusterOntrackAngles =
752  onTrackAngles(pixelclusters, trajectoryCollection[0]);
753 
754  /*
755  // iterate over trajectories
756  // note: when iterating over trajectories, it might be simpler to use the tracks/trajectories association map
757  for(std::vector<Trajectory>::const_iterator traj = trajVec.begin(); traj< trajVec.end(); ++traj) {
758  }
759  // loop over all rechits from trajectories
760  //iterate over trajectories
761  for(std::vector<Trajectory>::const_iterator traj = trajVec.begin(); traj< trajVec.end(); ++traj) {
762  Trajectory::DataContainer measurements = traj->measurements();
763  // iterate over measurements
764  for(Trajectory::DataContainer::iterator meas = measurements.begin(); meas!= measurements.end(); ++meas) {
765  }
766  }
767 */
768 
769  // determine if each cluster is on a track or not, and record the trackid
770  std::vector<std::vector<int> > stripClusterOntrackIndices;
771  for (size_t i = 0; i < trackSize; ++i) {
772  stripClusterOntrackIndices.push_back(onTrack(clusters, trackCollection[i], globaltrackid_[i] + 1));
773  }
774  std::vector<std::vector<int> > pixelClusterOntrackIndices;
775  for (size_t i = 0; i < trackSize; ++i) {
776  pixelClusterOntrackIndices.push_back(onTrack(pixelclusters, trackCollection[i], globaltrackid_[i] + 1));
777  }
778  nclustersOntrack_ = count_if(
779  stripClusterOntrackIndices[0].begin(), stripClusterOntrackIndices[0].end(), [](auto c) { return c != -1; });
780  npixClustersOntrack_ = count_if(
781  pixelClusterOntrackIndices[0].begin(), pixelClusterOntrackIndices[0].end(), [](auto c) { return c != -1; });
782 
783  // iterate over tracks
784  for (size_t coll = 0; coll < trackCollection.size(); ++coll) {
785  uint32_t n_hits_barrel = 0;
786  uint32_t n_hits_lowprob = 0;
787  for (TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap[coll].begin();
788  it != TrajToTrackMap[coll].end();
789  ++it) {
790  reco::TrackRef itTrack = it->val;
791  edm::Ref<std::vector<Trajectory> > traj = it->key; // bug to find type of the key
792  eta_ = itTrack->eta();
793  phi_ = itTrack->phi();
794  try { // not all track collections have the dedx info... indeed at best one.
795  dedxNoM_ = dEdxTrack1[itTrack].numberOfMeasurements();
796  dedx1_ = dEdxTrack1[itTrack].dEdx();
797  dedx2_ = dEdxTrack2[itTrack].dEdx();
798  dedx3_ = dEdxTrack3[itTrack].dEdx();
799  } catch (cms::Exception&) {
800  dedxNoM_ = 0;
801  dedx1_ = 0.;
802  dedx2_ = 0.;
803  dedx3_ = 0.;
804  }
805  charge_ = itTrack->charge();
806  quality_ = itTrack->qualityMask();
807  foundhits_ = itTrack->found();
808  lostHits_ = itTrack->lost();
809  foundhitsStrips_ = itTrack->hitPattern().numberOfValidStripHits();
810  foundhitsPixels_ = itTrack->hitPattern().numberOfValidPixelHits();
811  losthitsStrips_ = itTrack->hitPattern().numberOfLostStripHits(reco::HitPattern::TRACK_HITS);
812  losthitsPixels_ = itTrack->hitPattern().numberOfLostPixelHits(reco::HitPattern::TRACK_HITS);
813  nLayers_ = uint32_t(itTrack->hitPattern().trackerLayersWithMeasurement());
814  p_ = itTrack->p();
815  pt_ = itTrack->pt();
816  chi2_ = itTrack->chi2();
817  ndof_ = (uint32_t)itTrack->ndof();
818  dz_ = itTrack->dz();
819  dzerr_ = itTrack->dzError();
820  dzCorr_ = itTrack->dz(beamSpot);
821  dxy_ = itTrack->dxy();
822  dxyerr_ = itTrack->dxyError();
823  dxyCorr_ = itTrack->dxy(beamSpot);
824  pterr_ = itTrack->ptError();
825  etaerr_ = itTrack->etaError();
826  phierr_ = itTrack->phiError();
827  qoverp_ = itTrack->qoverp();
828  xPCA_ = itTrack->vertex().x();
829  yPCA_ = itTrack->vertex().y();
830  zPCA_ = itTrack->vertex().z();
831  try { // only one track collection (at best) is connected to the main vertex
832  if (!vertexColl.empty() && !vertexColl.begin()->isFake()) {
833  trkWeightpvtx_ = vertexColl.begin()->trackWeight(itTrack);
834  } else
835  trkWeightpvtx_ = 0.;
836  } catch (cms::Exception&) {
837  trkWeightpvtx_ = 0.;
838  }
839  globaltrackid_[coll]++;
840  std::map<size_t, int>::const_iterator theV = trackVertices[coll].find(itTrack.key());
841  vertexid_ = (theV != trackVertices[coll].end()) ? theV->second : 0;
842  // add missing hits (separate tree, common strip + pixel)
843  Trajectory::DataContainer const& measurements = traj->measurements();
845  for (Trajectory::DataContainer::const_iterator it = measurements.begin(); it != measurements.end(); ++it) {
846  TrajectoryMeasurement::ConstRecHitPointer rechit = it->recHit();
847  if (!rechit->isValid()) {
848  // detid
849  detid_ = rechit->geographicalId();
850  // status
851  type_ = rechit->getType();
852  // position
853  LocalPoint local = it->predictedState().localPosition();
854  clPositionX_ = local.x();
855  clPositionY_ = local.y();
856  // global position
857  GlobalPoint global = it->predictedState().globalPosition();
858  globalX_ = global.x();
859  globalY_ = global.y();
860  globalZ_ = global.z();
861  // position in the measurement frame
862  measX_ = 0;
863  measY_ = 0;
865  const GeomDetUnit* gdu = static_cast<const GeomDetUnit*>(tracker_->idToDetUnit(detid_));
866  if (gdu && gdu->type().isTracker()) {
867  const Topology& topo = gdu->topology();
869  measX_ = meas.x();
870  measY_ = meas.y();
871  }
872  }
873  // local error
874  LocalError error = it->predictedState().localError().positionError();
875  errorX_ = error.xx();
876  errorY_ = error.yy();
877  // fill
878  missingHits_[coll]->Fill();
879  }
880  }
881  }
882  // compute the fraction of low probability pixels... will be added to the event tree
883  for (trackingRecHit_iterator it = itTrack->recHitsBegin(); it != itTrack->recHitsEnd(); ++it) {
884  const TrackingRecHit* hit = &(**it);
885  const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(hit);
886  if (pixhit) {
887  DetId detId = pixhit->geographicalId();
888  if (detId.subdetId() == PixelSubdetector::PixelBarrel) {
889  ++n_hits_barrel;
890  double proba = pixhit->clusterProbability(0);
891  if (proba <= 0.0)
892  ++n_hits_lowprob;
893  }
894  }
895  }
896  // fill the track tree
898  tracks_[coll]->Fill();
899  }
900  lowPixelProbabilityFraction_[coll] = n_hits_barrel > 0 ? (float)n_hits_lowprob / n_hits_barrel : -1.;
901  }
902 
903  // iterate over clusters
904  nclusters_ = 0;
905  std::vector<double>::const_iterator angleIt = clusterOntrackAngles.begin();
906  uint32_t localCounter = 0;
907  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = clusters->begin(); DSViter != clusters->end();
908  DSViter++) {
911  uint32_t detid = DSViter->id();
912  nclusters_ += DSViter->size();
915  ++iter, ++angleIt, ++localCounter) {
916  siStripClusterInfo_.setCluster(*iter, detid);
917  // general quantities
918  for (size_t i = 0; i < trackSize; ++i) {
919  trackid_[i] = stripClusterOntrackIndices[i][localCounter];
920  }
921  onTrack_ = (trackid_[0] != (uint32_t)-1);
924  angle_ = *angleIt;
925  thickness_ = ((((DSViter->id() >> 25) & 0x7f) == 0xd) ||
926  ((((DSViter->id() >> 25) & 0x7f) == 0xe) && (((DSViter->id() >> 5) & 0x7) > 4)))
927  ? 500
928  : 300;
929  stripLength_ = static_cast<const StripGeomDetUnit*>(tracker_->idToDet(detid))->specificTopology().stripLength();
930  int nstrips = static_cast<const StripGeomDetUnit*>(tracker_->idToDet(detid))->specificTopology().nstrips();
932  // signal and noise with gain corrections
936  // signal and noise with gain corrections and angle corrections
937  clCorrectedCharge_ = clNormalizedCharge_ * fabs(cos(angle_)); // corrected for track angle
938  clCorrectedSignalOverNoise_ = clSignalOverNoise_ * fabs(cos(angle_)); // corrected for track angle
939  // signal and noise without gain corrections
942  // global position
943  const StripGeomDetUnit* sgdu = static_cast<const StripGeomDetUnit*>(tracker_->idToDet(detid));
946  globalX_ = gp.x();
947  globalY_ = gp.y();
948  globalZ_ = gp.z();
949  // cabling
950  detid_ = detid;
951  lldChannel_ = 1 + (int(floor(iter->barycenter())) / 256);
952  if (lldChannel_ == 2 && nstrips == 512)
953  lldChannel_ = 3;
955  clusters_->Fill();
956  }
957  }
958  }
959 
960  // iterate over pixel clusters
961  npixClusters_ = 0;
962  std::vector<std::pair<double, double> >::const_iterator pixAngleIt = pixclusterOntrackAngles.begin();
963  localCounter = 0;
964  for (edmNew::DetSetVector<SiPixelCluster>::const_iterator DSViter = pixelclusters->begin();
965  DSViter != pixelclusters->end();
966  DSViter++) {
969  uint32_t detid = DSViter->id();
970  npixClusters_ += DSViter->size();
973  ++iter, ++pixAngleIt, ++localCounter) {
974  // general quantities
975  for (size_t i = 0; i < trackSize; ++i) {
976  trackid_[i] = pixelClusterOntrackIndices[i][localCounter];
977  }
978  onTrack_ = (trackid_[0] != (uint32_t)-1);
979  clPositionX_ = iter->x();
980  clPositionY_ = iter->y();
981  clSize_ = iter->size();
982  clSizeX_ = iter->sizeX();
983  clSizeY_ = iter->sizeY();
984  alpha_ = pixAngleIt->first;
985  beta_ = pixAngleIt->second;
986  charge_ = (iter->charge()) / 1000.;
987  chargeCorr_ = charge_ * sqrt(1.0 / (1.0 / pow(tan(alpha_), 2) + 1.0 / pow(tan(beta_), 2) + 1.0)) / 1000.;
988  // global position
989  const PixelGeomDetUnit* pgdu = static_cast<const PixelGeomDetUnit*>(tracker_->idToDet(detid));
992  globalX_ = gp.x();
993  globalY_ = gp.y();
994  globalZ_ = gp.z();
995  // cabling
996  detid_ = detid;
997  // fill
998  pixclusters_->Fill();
999  }
1000  }
1001  }
1002 
1003  // topological quantities - uses the first track collection
1004  EventShape shape(trackCollection[0]);
1005  math::XYZTLorentzVectorF thrust = shape.thrust();
1006  thrustValue_ = thrust.t();
1007  thrustX_ = thrust.x();
1008  thrustY_ = thrust.y();
1009  thrustZ_ = thrust.z();
1010  sphericity_ = shape.sphericity();
1011  planarity_ = shape.planarity();
1012  aplanarity_ = shape.aplanarity();
1013 
1014  // fill event tree
1016  event_->Fill();
1017 }
1018 
1019 // ------------ method called once each job just before starting event loop ------------
1020 void TrackerDpgAnalysis::beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
1021  //Retrieve tracker topology from geometry
1022  edm::ESHandle<TrackerTopology> tTopoHandle;
1023  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
1024  const TrackerTopology* const tTopo = tTopoHandle.product();
1025 
1026  //geometry
1028 
1029  //HLT names
1030  bool changed(true);
1031  if (hltConfig_.init(iRun, iSetup, HLTTag_.process(), changed)) {
1032  if (changed) {
1034  }
1035  }
1036  int i = 0;
1037  for (std::vector<std::string>::const_iterator it = hlNames_.begin(); it < hlNames_.end(); ++it) {
1038  std::cout << (i++) << " = " << (*it) << std::endl;
1039  }
1040 
1041  // read the delay offsets for each device from input files
1042  // this is only for the so-called "random delay" run
1043  std::map<uint32_t, float> delayMap = delay(delayFileNames_);
1044  TrackerMap tmap("Delays");
1045 
1046  // cabling I (readout)
1047  iSetup.get<SiStripFedCablingRcd>().get(cabling_);
1048  auto feds = cabling_->fedIds();
1049  for (auto fedid = feds.begin(); fedid < feds.end(); ++fedid) {
1050  auto connections = cabling_->fedConnections(*fedid);
1051  for (auto conn = connections.begin(); conn < connections.end(); ++conn) {
1052  // Fill the "old" map to be used for lookup during analysis
1053  if (conn->isConnected())
1054  connections_.insert(std::make_pair(conn->detId(), new FedChannelConnection(*conn)));
1055  // Fill the standalone tree (once for all)
1056  if (conn->isConnected()) {
1057  detid_ = conn->detId();
1058  strncpy(moduleName_, toStringName(detid_, tTopo).c_str(), 256);
1059  strncpy(moduleId_, toStringId(detid_).c_str(), 256);
1060  lldChannel_ = conn->lldChannel();
1061  dcuId_ = conn->dcuId();
1062  fecCrate_ = conn->fecCrate();
1063  fecSlot_ = conn->fecSlot();
1064  fecRing_ = conn->fecRing();
1065  ccuAdd_ = conn->ccuAddr();
1066  ccuChan_ = conn->ccuChan();
1067  fedId_ = conn->fedId();
1068  fedCh_ = conn->fedCh();
1069  fiberLength_ = conn->fiberLength();
1070  delay_ = delayMap[dcuId_];
1071  const StripGeomDetUnit* sgdu = static_cast<const StripGeomDetUnit*>(tracker_->idToDet(detid_));
1073  globalX_ = gp.x();
1074  globalY_ = gp.y();
1075  globalZ_ = gp.z();
1076  readoutmap_->Fill();
1078  }
1079  }
1080  }
1081  if (!delayMap.empty())
1082  tmap.save(true, 0, 0, "delaymap.png");
1083 
1084  // cabling II (DCU map)
1085  std::ifstream cablingFile(cablingFileName_.c_str());
1086  if (cablingFile.is_open()) {
1087  char buffer[1024];
1088  cablingFile.getline(buffer, 1024);
1089  while (!cablingFile.eof()) {
1090  std::istringstream line(buffer);
1091  std::string name;
1092  // one line contains the PSU name + all dcuids connected to it.
1093  line >> name;
1094  strncpy(PSUname_, name.c_str(), 256);
1095  while (!line.eof()) {
1096  line >> dcuId_;
1097  psumap_->Fill();
1098  }
1099  cablingFile.getline(buffer, 1024);
1100  }
1101  } else {
1102  edm::LogWarning("BadConfig") << " The PSU file does not exist. The psumap tree will not be filled." << std::endl
1103  << " Looking for " << cablingFileName_.c_str() << "." << std::endl
1104  << " Please specify a valid filename through the PSUFileName untracked parameter.";
1105  }
1106 }
1107 
1108 // ------------ method called once each job just after ending the event loop ------------
1110  for (size_t i = 0; i < tracks_.size(); ++i) {
1111  char buffer[256];
1112  sprintf(buffer, "trackid%lu", (unsigned long)i);
1113  if (tracks_[i]->GetEntries())
1114  tracks_[i]->BuildIndex(buffer, "eventid");
1115  }
1116  /* not needed: missing hits is a high-level quantity
1117  for(size_t i = 0; i<missingHits_.size();++i) {
1118  char buffer[256];
1119  sprintf(buffer,"trackid%lu",(unsigned long)i);
1120  if(missingHits_[i]->GetEntries()) missingHits_[i]->BuildIndex(buffer);
1121  }
1122  */
1123  if (vertices_->GetEntries())
1124  vertices_->BuildIndex("vertexid", "eventid");
1125  if (event_->GetEntries())
1126  event_->BuildIndex("runid", "eventid");
1127  if (psumap_->GetEntries())
1128  psumap_->BuildIndex("dcuId");
1129  if (readoutmap_->GetEntries())
1130  readoutmap_->BuildIndex("detid", "lldChannel");
1131 }
1132 
1134  const std::vector<Trajectory>& trajVec) {
1135  std::vector<double> result;
1136  // first, build a list of positions and angles on trajectories
1137  std::multimap<const uint32_t, std::pair<LocalPoint, double> > onTrackPositions;
1138  for (std::vector<Trajectory>::const_iterator traj = trajVec.begin(); traj < trajVec.end(); ++traj) {
1139  Trajectory::DataContainer measurements = traj->measurements();
1140  for (Trajectory::DataContainer::iterator meas = measurements.begin(); meas != measurements.end(); ++meas) {
1141  double tla = meas->updatedState().localDirection().theta();
1142  insertMeasurement(onTrackPositions, &(*(meas->recHit())), tla);
1143  }
1144  }
1145  // then loop over the clusters to check
1146  double angle = 0.;
1147  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = clusters->begin(); DSViter != clusters->end();
1148  DSViter++) {
1151  std::pair<std::multimap<uint32_t, std::pair<LocalPoint, double> >::const_iterator,
1152  std::multimap<uint32_t, std::pair<LocalPoint, double> >::const_iterator>
1153  range = onTrackPositions.equal_range(DSViter->id());
1154  const GeomDetUnit* gdu = static_cast<const GeomDetUnit*>(tracker_->idToDet(DSViter->id()));
1155  for (edmNew::DetSet<SiStripCluster>::const_iterator iter = begin; iter != end; ++iter) {
1156  angle = 0.;
1157  for (std::multimap<uint32_t, std::pair<LocalPoint, double> >::const_iterator cl = range.first; cl != range.second;
1158  ++cl) {
1159  if (fabs(gdu->topology().measurementPosition(cl->second.first).x() - iter->barycenter()) < 2) {
1160  angle = cl->second.second;
1161  }
1162  }
1163  result.push_back(angle);
1164  }
1165  }
1166  return result;
1167 }
1168 
1169 void TrackerDpgAnalysis::insertMeasurement(std::multimap<const uint32_t, std::pair<LocalPoint, double> >& collection,
1171  double tla) {
1172  if (!hit)
1173  return;
1174  const SiTrackerMultiRecHit* multihit = dynamic_cast<const SiTrackerMultiRecHit*>(hit);
1175  const SiStripRecHit2D* singlehit = dynamic_cast<const SiStripRecHit2D*>(hit);
1176  const SiStripRecHit1D* hit1d = dynamic_cast<const SiStripRecHit1D*>(hit);
1177  if (hit1d) { //...->33X
1178  collection.insert(std::make_pair(hit1d->geographicalId().rawId(), std::make_pair(hit1d->localPosition(), tla)));
1179  } else if (singlehit) { // 41X->...
1180  collection.insert(
1181  std::make_pair(singlehit->geographicalId().rawId(), std::make_pair(singlehit->localPosition(), tla)));
1182  } else if (multihit) {
1183  std::vector<const TrackingRecHit*> childs = multihit->recHits();
1184  for (std::vector<const TrackingRecHit*>::const_iterator it = childs.begin(); it != childs.end(); ++it) {
1185  insertMeasurement(collection, dynamic_cast<const TrackingRecHit*>(*it), tla);
1186  }
1187  }
1188 }
1189 
1191  const reco::TrackCollection& trackVec,
1192  uint32_t firstTrack) {
1193  std::vector<int> result;
1194  // first, build a list of positions and trackid on tracks
1195  std::multimap<const uint32_t, std::pair<int, int> > onTrackPositions;
1196  uint32_t trackid = firstTrack;
1197  for (reco::TrackCollection::const_iterator itTrack = trackVec.begin(); itTrack != trackVec.end();
1198  ++itTrack, ++trackid) {
1199  for (trackingRecHit_iterator it = itTrack->recHitsBegin(); it != itTrack->recHitsEnd(); ++it) {
1200  const TrackingRecHit* hit = &(**it);
1201  insertMeasurement(onTrackPositions, hit, trackid);
1202  }
1203  }
1204  // then loop over the clusters to check
1205  int thetrackid = -1;
1206  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = clusters->begin(); DSViter != clusters->end();
1207  DSViter++) {
1210  std::pair<std::multimap<uint32_t, std::pair<int, int> >::const_iterator,
1211  std::multimap<uint32_t, std::pair<int, int> >::const_iterator>
1212  range = onTrackPositions.equal_range(DSViter->id());
1213  for (edmNew::DetSet<SiStripCluster>::const_iterator iter = begin; iter != end; ++iter) {
1214  thetrackid = -1;
1215  for (std::multimap<uint32_t, std::pair<int, int> >::const_iterator cl = range.first; cl != range.second; ++cl) {
1216  if (fabs(cl->second.first - iter->barycenter()) < 2) {
1217  thetrackid = cl->second.second;
1218  }
1219  }
1220  result.push_back(thetrackid);
1221  }
1222  }
1223  return result;
1224 }
1225 
1226 void TrackerDpgAnalysis::insertMeasurement(std::multimap<const uint32_t, std::pair<int, int> >& collection,
1227  const TrackingRecHit* hit,
1228  int trackid) {
1229  if (!hit)
1230  return;
1231  const SiTrackerMultiRecHit* multihit = dynamic_cast<const SiTrackerMultiRecHit*>(hit);
1232  const SiStripRecHit2D* singlehit = dynamic_cast<const SiStripRecHit2D*>(hit);
1233  const SiStripRecHit1D* hit1d = dynamic_cast<const SiStripRecHit1D*>(hit);
1234  if (hit1d) { // 41X->...
1235  collection.insert(
1236  std::make_pair(hit1d->geographicalId().rawId(), std::make_pair(int(hit1d->cluster()->barycenter()), trackid)));
1237  } else if (singlehit) { //...->33X
1238  collection.insert(std::make_pair(singlehit->geographicalId().rawId(),
1239  std::make_pair(int(singlehit->cluster()->barycenter()), trackid)));
1240  } else if (multihit) {
1241  std::vector<const TrackingRecHit*> childs = multihit->recHits();
1242  for (std::vector<const TrackingRecHit*>::const_iterator it = childs.begin(); it != childs.end(); ++it) {
1243  insertMeasurement(collection, *it, trackid);
1244  }
1245  }
1246 }
1247 
1250  uint32_t firstVertex) {
1251  // build reverse map track -> vertex
1252  std::map<size_t, int> output;
1253  uint32_t vertexid = firstVertex;
1254  for (reco::VertexCollection::const_iterator v = vertices.begin(); v != vertices.end(); ++v, ++vertexid) {
1255  reco::Vertex::trackRef_iterator it = v->tracks_begin();
1256  reco::Vertex::trackRef_iterator lastTrack = v->tracks_end();
1257  for (; it != lastTrack; ++it) {
1258  output[it->key()] = vertexid;
1259  }
1260  }
1261  return output;
1262 }
1263 
1264 std::vector<std::pair<double, double> > TrackerDpgAnalysis::onTrackAngles(
1265  edm::Handle<edmNew::DetSetVector<SiPixelCluster> >& clusters, const std::vector<Trajectory>& trajVec) {
1266  std::vector<std::pair<double, double> > result;
1267  // first, build a list of positions and angles on trajectories
1268  std::multimap<const uint32_t, std::pair<LocalPoint, std::pair<double, double> > > onTrackPositions;
1269  for (std::vector<Trajectory>::const_iterator traj = trajVec.begin(); traj < trajVec.end(); ++traj) {
1270  Trajectory::DataContainer measurements = traj->measurements();
1271  for (Trajectory::DataContainer::iterator meas = measurements.begin(); meas != measurements.end(); ++meas) {
1272  LocalVector localDir = meas->updatedState().localDirection();
1273  double alpha = atan2(localDir.z(), localDir.x());
1274  double beta = atan2(localDir.z(), localDir.y());
1275  insertMeasurement(onTrackPositions, &(*(meas->recHit())), alpha, beta);
1276  }
1277  }
1278  // then loop over the clusters to check
1279  double alpha = 0.;
1280  double beta = 0.;
1281  for (edmNew::DetSetVector<SiPixelCluster>::const_iterator DSViter = clusters->begin(); DSViter != clusters->end();
1282  DSViter++) {
1285  for (edmNew::DetSet<SiPixelCluster>::const_iterator iter = begin; iter != end; ++iter) {
1286  alpha = 0.;
1287  beta = 0.;
1288  std::pair<std::multimap<uint32_t, std::pair<LocalPoint, std::pair<double, double> > >::const_iterator,
1289  std::multimap<uint32_t, std::pair<LocalPoint, std::pair<double, double> > >::const_iterator>
1290  range = onTrackPositions.equal_range(DSViter->id());
1291  const GeomDetUnit* gdu = static_cast<const GeomDetUnit*>(tracker_->idToDet(DSViter->id()));
1292  for (std::multimap<uint32_t, std::pair<LocalPoint, std::pair<double, double> > >::const_iterator cl = range.first;
1293  cl != range.second;
1294  ++cl) {
1295  if (fabs(gdu->topology().measurementPosition(cl->second.first).x() - iter->x()) < 2 &&
1296  fabs(gdu->topology().measurementPosition(cl->second.first).y() - iter->y()) < 2) {
1297  alpha = cl->second.second.first;
1298  beta = cl->second.second.second;
1299  }
1300  }
1301  result.push_back(std::make_pair(alpha, beta));
1302  }
1303  }
1304  return result;
1305 }
1306 
1308  std::multimap<const uint32_t, std::pair<LocalPoint, std::pair<double, double> > >& collection,
1310  double alpha,
1311  double beta) {
1312  if (!hit)
1313  return;
1314  const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(hit);
1315  if (pixhit) {
1316  collection.insert(std::make_pair(pixhit->geographicalId().rawId(),
1317  std::make_pair(pixhit->localPosition(), std::make_pair(alpha, beta))));
1318  }
1319 }
1320 
1322  const reco::TrackCollection& trackVec,
1323  uint32_t firstTrack) {
1324  std::vector<int> result;
1325  // first, build a list of positions and trackid on tracks
1326  std::multimap<const uint32_t, std::pair<std::pair<float, float>, int> > onTrackPositions;
1327  uint32_t trackid = firstTrack;
1328  for (reco::TrackCollection::const_iterator itTrack = trackVec.begin(); itTrack != trackVec.end();
1329  ++itTrack, ++trackid) {
1330  for (trackingRecHit_iterator it = itTrack->recHitsBegin(); it != itTrack->recHitsEnd(); ++it) {
1331  const TrackingRecHit* hit = &(**it);
1332  insertMeasurement(onTrackPositions, hit, trackid);
1333  }
1334  }
1335  // then loop over the clusters to check
1336  int thetrackid = -1;
1337  for (edmNew::DetSetVector<SiPixelCluster>::const_iterator DSViter = clusters->begin(); DSViter != clusters->end();
1338  DSViter++) {
1341  for (edmNew::DetSet<SiPixelCluster>::const_iterator iter = begin; iter != end; ++iter) {
1342  thetrackid = -1;
1343  std::pair<std::multimap<uint32_t, std::pair<std::pair<float, float>, int> >::const_iterator,
1344  std::multimap<uint32_t, std::pair<std::pair<float, float>, int> >::const_iterator>
1345  range = onTrackPositions.equal_range(DSViter->id());
1346  for (std::multimap<uint32_t, std::pair<std::pair<float, float>, int> >::const_iterator cl = range.first;
1347  cl != range.second;
1348  ++cl) {
1349  if ((fabs(cl->second.first.first - iter->x()) < 2) && (fabs(cl->second.first.second - iter->y()) < 2)) {
1350  thetrackid = cl->second.second;
1351  }
1352  }
1353  result.push_back(thetrackid);
1354  }
1355  }
1356  return result;
1357 }
1358 
1360  std::multimap<const uint32_t, std::pair<std::pair<float, float>, int> >& collection,
1361  const TrackingRecHit* hit,
1362  int trackid) {
1363  if (!hit)
1364  return;
1365  const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(hit);
1366  if (pixhit) {
1367  collection.insert(
1368  std::make_pair(pixhit->geographicalId().rawId(),
1369  std::make_pair(std::make_pair(pixhit->cluster()->x(), pixhit->cluster()->y()), trackid)));
1370  }
1371 }
1372 
1374  SiStripDetId detid(rawid);
1375  std::string out;
1376  std::stringstream output;
1377  switch (detid.subDetector()) {
1378  case 3: {
1379  output << "TIB";
1380 
1381  output << (tTopo->tibIsZPlusSide(rawid) ? "+" : "-");
1382  output << " layer ";
1383  output << tTopo->tibLayer(rawid);
1384  output << ", string ";
1385  output << tTopo->tibString(rawid);
1386  output << (tTopo->tibIsExternalString(rawid) ? " external" : " internal");
1387  output << ", module ";
1388  output << tTopo->tibModule(rawid);
1389  if (tTopo->tibIsDoubleSide(rawid)) {
1390  output << " (double)";
1391  } else {
1392  output << (tTopo->tibIsRPhi(rawid) ? " (rphi)" : " (stereo)");
1393  }
1394  break;
1395  }
1396  case 4: {
1397  output << "TID";
1398 
1399  output << (tTopo->tidIsZPlusSide(rawid) ? "+" : "-");
1400  output << " disk ";
1401  output << tTopo->tidWheel(rawid);
1402  output << ", ring ";
1403  output << tTopo->tidRing(rawid);
1404  output << (tTopo->tidIsFrontRing(rawid) ? " front" : " back");
1405  output << ", module ";
1406  output << tTopo->tidModule(rawid);
1407  if (tTopo->tidIsDoubleSide(rawid)) {
1408  output << " (double)";
1409  } else {
1410  output << (tTopo->tidIsRPhi(rawid) ? " (rphi)" : " (stereo)");
1411  }
1412  break;
1413  }
1414  case 5: {
1415  output << "TOB";
1416 
1417  output << (tTopo->tobIsZPlusSide(rawid) ? "+" : "-");
1418  output << " layer ";
1419  output << tTopo->tobLayer(rawid);
1420  output << ", rod ";
1421  output << tTopo->tobRod(rawid);
1422  output << ", module ";
1423  output << tTopo->tobModule(rawid);
1424  if (tTopo->tobIsDoubleSide(rawid)) {
1425  output << " (double)";
1426  } else {
1427  output << (tTopo->tobIsRPhi(rawid) ? " (rphi)" : " (stereo)");
1428  }
1429  break;
1430  }
1431  case 6: {
1432  output << "TEC";
1433 
1434  output << (tTopo->tecIsZPlusSide(rawid) ? "+" : "-");
1435  output << " disk ";
1436  output << tTopo->tecWheel(rawid);
1437  output << " sector ";
1438  output << tTopo->tecPetalNumber(rawid);
1439  output << (tTopo->tecIsFrontPetal(rawid) ? " Front Petal" : " Back Petal");
1440  output << ", module ";
1441  output << tTopo->tecRing(rawid);
1442  output << tTopo->tecModule(rawid);
1443  if (tTopo->tecIsDoubleSide(rawid)) {
1444  output << " (double)";
1445  } else {
1446  output << (tTopo->tecIsRPhi(rawid) ? " (rphi)" : " (stereo)");
1447  }
1448  break;
1449  }
1450  default: {
1451  output << "UNKNOWN";
1452  }
1453  }
1454  out = output.str();
1455  return out;
1456 }
1457 
1459  std::string out;
1460  std::stringstream output;
1461  output << rawid << " (0x" << std::hex << rawid << std::dec << ")";
1462  out = output.str();
1463  return out;
1464 }
1465 
1467  double sum = 0.;
1468  double pT;
1469  for (reco::Vertex::trackRef_iterator it = v.tracks_begin(); it != v.tracks_end(); it++) {
1470  pT = (**it).pt();
1471  sum += pT * pT;
1472  }
1473  return sum;
1474 }
1475 
1477  float delay = const_cast<SiStripEventSummary&>(summary).ttcrx();
1478  uint32_t latencyCode = (const_cast<SiStripEventSummary&>(summary).layerScanned() >> 24) & 0xff;
1479  int latencyShift =
1480  latencyCode & 0x3f; // number of bunch crossings between current value and start of scan... must be positive
1481  if (latencyShift > 32)
1482  latencyShift -= 64; // allow negative values: we cover [-32,32].. should not be needed.
1483  if ((latencyCode >> 6) == 2)
1484  latencyShift -= 3; // layer in deconv, rest in peak
1485  if ((latencyCode >> 6) == 1)
1486  latencyShift += 3; // layer in peak, rest in deconv
1487  float correctedDelay =
1488  delay - (latencyShift * 25.); // shifts the delay so that 0 corresponds to the current settings.
1489  return correctedDelay;
1490 }
1491 
1492 std::map<uint32_t, float> TrackerDpgAnalysis::delay(const std::vector<std::string>& files) {
1493  // prepare output
1494  uint32_t dcuid;
1495  float delay;
1496  std::map<uint32_t, float> delayMap;
1497  //iterator over input files
1498  for (std::vector<std::string>::const_iterator file = files.begin(); file < files.end(); ++file) {
1499  // open the file
1500  std::ifstream cablingFile(file->c_str());
1501  if (cablingFile.is_open()) {
1502  char buffer[1024];
1503  // read one line
1504  cablingFile.getline(buffer, 1024);
1505  while (!cablingFile.eof()) {
1507  size_t pos = line.find("dcuid");
1508  // one line containing dcuid
1509  if (pos != std::string::npos) {
1510  // decode dcuid
1511  std::string dcuids = line.substr(pos + 7, line.find(" ", pos) - pos - 8);
1512  std::istringstream dcuidstr(dcuids);
1513  dcuidstr >> std::hex >> dcuid;
1514  // decode delay
1515  pos = line.find("difpll");
1516  std::string diffs = line.substr(pos + 8, line.find(" ", pos) - pos - 9);
1517  std::istringstream diffstr(diffs);
1518  diffstr >> delay;
1519  // fill the map
1520  delayMap[dcuid] = delay;
1521  }
1522  // iterate
1523  cablingFile.getline(buffer, 1024);
1524  }
1525  } else {
1526  edm::LogWarning("BadConfig") << " The delay file does not exist. The delay map will not be filled properly."
1527  << std::endl
1528  << " Looking for " << file->c_str() << "." << std::endl
1529  << " Please specify valid filenames through the DelayFileNames untracked parameter.";
1530  }
1531  }
1532  return delayMap;
1533 }
1534 
1535 //define this as a plug-in
Vector3DBase< float, LocalTag >
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
TrackerDpgAnalysis::fecRing_
uint16_t fecRing_
Definition: TrackerDpgAnalysis.cc:194
SiStripClusterInfo
Definition: SiStripClusterInfo.h:21
TrackerTopology::tobIsDoubleSide
bool tobIsDoubleSide(const DetId &id) const
Definition: TrackerTopology.h:245
TrackerDpgAnalysis::dedx2_
float dedx2_
Definition: TrackerDpgAnalysis.cc:192
TrackerDpgAnalysis::clPositionX_
float clPositionX_
Definition: TrackerDpgAnalysis.cc:202
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
reco::Vertex::trackRef_iterator
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
Point2DBase
Definition: Point2DBase.h:9
l1tstage2emulator_dqm_sourceclient-live_cfg.feds
feds
Definition: l1tstage2emulator_dqm_sourceclient-live_cfg.py:153
TrackerTopology::tecIsFrontPetal
bool tecIsFrontPetal(const DetId &id) const
Definition: TrackerTopology.h:416
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
TrajectoryStateOnSurface.h
TrackerDpgAnalysis::eventid_
edm::EventNumber_t eventid_
Definition: TrackerDpgAnalysis.cc:180
EventShape::thrust
static math::XYZTLorentzVectorF thrust(const reco::TrackCollection &)
Definition: EventShape.cc:124
TrackerDpgAnalysis::recx_pvtx_
float recx_pvtx_
Definition: TrackerDpgAnalysis.cc:203
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
SiStripRecHit2D::cluster
ClusterRef cluster() const
Definition: SiStripRecHit2D.h:22
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
TrackerDpgAnalysis::dedx2Token_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx2Token_
Definition: TrackerDpgAnalysis.cc:151
TrackerDpgAnalysis::time_
uint32_t time_
Definition: TrackerDpgAnalysis.cc:212
mps_fire.i
i
Definition: mps_fire.py:355
TrackerDpgAnalysis::pixelVertexToken_
edm::EDGetTokenT< reco::VertexCollection > pixelVertexToken_
Definition: TrackerDpgAnalysis.cc:153
TrackerDpgAnalysis::measY_
float measY_
Definition: TrackerDpgAnalysis.cc:185
TrackerDpgAnalysis::clNormalizedCharge_
float clNormalizedCharge_
Definition: TrackerDpgAnalysis.cc:188
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
TrackerTopology::tibIsExternalString
bool tibIsExternalString(const DetId &id) const
Definition: TrackerTopology.h:431
TrackerDpgAnalysis::clPositionY_
float clPositionY_
Definition: TrackerDpgAnalysis.cc:202
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
TrackerDpgAnalysis::toStringId
std::string toStringId(uint32_t)
Definition: TrackerDpgAnalysis.cc:1458
TrackerDpgAnalysis::measX_
float measX_
Definition: TrackerDpgAnalysis.cc:185
SiStripClusterInfo.h
TrackerGeometry.h
GeomDet
Definition: GeomDet.h:27
TrackerDpgAnalysis::bsSigmaZ_
float bsSigmaZ_
Definition: TrackerDpgAnalysis.cc:209
TrackerDpgAnalysis::trackTokens_
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
Definition: TrackerDpgAnalysis.cc:160
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
edm::Handle::product
T const * product() const
Definition: Handle.h:70
DeDxData.h
PixelTopology.h
TrackerDpgAnalysis::nPixelVertices_
uint32_t nPixelVertices_
Definition: TrackerDpgAnalysis.cc:199
ESHandle.h
TriggerResults.h
TrackerDpgAnalysis::clusters_
TTree * clusters_
Definition: TrackerDpgAnalysis.cc:169
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
fileService
edm::Service< TFileService > fileService
Definition: HSCPValidator.cc:91
TrackerDpgAnalysis::clSizeX_
uint32_t clSizeX_
Definition: TrackerDpgAnalysis.cc:201
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
SiStripMatchedRecHit2DCollection.h
L1GtFdlWord::physicsDeclared
const cms_uint16_t physicsDeclared() const
get/set "physics declared" bit
Definition: L1GtFdlWord.h:169
L1GlobalTriggerReadoutSetupFwd.h
TrackerDpgAnalysis::etaerr_
float etaerr_
Definition: TrackerDpgAnalysis.cc:204
edm::Run
Definition: Run.h:45
GeomDet::type
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
TrackerDpgAnalysis::psumap_
TTree * psumap_
Definition: TrackerDpgAnalysis.cc:176
reco::BeamSpot::z0
double z0() const
z coordinate
Definition: BeamSpot.h:65
zMuMuMuonUserData.alpha
alpha
zGenParticlesMatch = cms.InputTag(""),
Definition: zMuMuMuonUserData.py:9
TrackerDpgAnalysis::fBz_
float fBz_
Definition: TrackerDpgAnalysis.cc:202
edm::EDGetTokenT< SiStripEventSummary >
EventShape.h
TrackerDpgAnalysis::clPosition_
float clPosition_
Definition: TrackerDpgAnalysis.cc:190
TrackerDpgAnalysis::globalX_
float globalX_
Definition: TrackerDpgAnalysis.cc:184
StripTopology::localPosition
virtual LocalPoint localPosition(float strip) const =0
edm
HLT enums.
Definition: AlignableModifier.h:19
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
math::XYZTLorentzVectorF
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22
TrackerTopology
Definition: TrackerTopology.h:16
TrackerTopology::tecIsDoubleSide
bool tecIsDoubleSide(const DetId &id) const
Definition: TrackerTopology.h:246
TrackerDpgAnalysis::nVertices_
uint32_t nVertices_
Definition: TrackerDpgAnalysis.cc:199
TrackerDpgAnalysis::HLTTag_
edm::InputTag HLTTag_
Definition: TrackerDpgAnalysis.cc:157
TrackerTopology::tidIsDoubleSide
bool tidIsDoubleSide(const DetId &id) const
Definition: TrackerTopology.h:250
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
TrackerTopology::tidIsRPhi
bool tidIsRPhi(const DetId &id) const
Definition: TrackerTopology.h:272
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TrackerDpgAnalysis::trkWeightpvtx_
float trkWeightpvtx_
Definition: TrackerDpgAnalysis.cc:206
pos
Definition: PixelAliasList.h:18
SiPixelCluster.h
TrackerDpgAnalysis::functionality_vertices_
bool functionality_vertices_
Definition: TrackerDpgAnalysis.cc:166
TrackerDpgAnalysis::endJob
void endJob() override
Definition: TrackerDpgAnalysis.cc:1109
SiStripFedCabling.h
L1GtFdlWord::gtDecisionWordExtended
const DecisionWordExtended & gtDecisionWordExtended() const
get/set extended algorithms bits (extended decision word)
Definition: L1GtFdlWord.h:153
TrackerTopology::tidIsFrontRing
bool tidIsFrontRing(const DetId &id) const
Definition: TrackerTopology.h:443
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:231
TrackerDpgAnalysis::quality_
uint32_t quality_
Definition: TrackerDpgAnalysis.cc:195
TrackerDpgAnalysis::onTrackAngles
std::vector< double > onTrackAngles(edm::Handle< edmNew::DetSetVector< SiStripCluster > > &, const std::vector< Trajectory > &)
Definition: TrackerDpgAnalysis.cc:1133
GeomDetType.h
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
SiTrackerMultiRecHit::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: SiTrackerMultiRecHit.cc:59
TrackerDpgAnalysis::thrustX_
float thrustX_
Definition: TrackerDpgAnalysis.cc:210
TrackerDpgAnalysis::functionality_pixclusters_
bool functionality_pixclusters_
Definition: TrackerDpgAnalysis.cc:166
TrackerDpgAnalysis::alpha_
float alpha_
Definition: TrackerDpgAnalysis.cc:202
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
GeomDet::topology
virtual const Topology & topology() const
Definition: GeomDet.cc:67
TrackerMap::fill_current_val
void fill_current_val(int idmod, float current_val)
Definition: TrackerMap.cc:3258
TSiStripRecHit1D.h
SiStripDetId.h
SiStripRecHit2D
Definition: SiStripRecHit2D.h:7
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
TransientTrackingRecHit.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EDAnalyzer.h
TrackerDpgAnalysis::bsY0_
float bsY0_
Definition: TrackerDpgAnalysis.cc:209
TFileDirectory
Definition: TFileDirectory.h:24
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
TrackerDpgAnalysis::recy_pvtx_
float recy_pvtx_
Definition: TrackerDpgAnalysis.cc:203
TrackerDpgAnalysis::bsDxdz_
float bsDxdz_
Definition: TrackerDpgAnalysis.cc:209
TrackerDpgAnalysis::TrackerDpgAnalysis
TrackerDpgAnalysis(const edm::ParameterSet &)
Definition: TrackerDpgAnalysis.cc:225
StripTopology.h
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrackerDpgAnalysis::cabling_
edm::ESHandle< SiStripFedCabling > cabling_
Definition: TrackerDpgAnalysis.cc:163
TrackerDpgAnalysis::L1TechnicalBits_
bool L1TechnicalBits_[64]
Definition: TrackerDpgAnalysis.cc:211
TrackerDpgAnalysis::dedx1Token_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx1Token_
Definition: TrackerDpgAnalysis.cc:150
TrackerDpgAnalysis::fiberLength_
uint16_t fiberLength_
Definition: TrackerDpgAnalysis.cc:194
edm::Handle
Definition: AssociativeIterator.h:50
relativeConstraints.error
error
Definition: relativeConstraints.py:53
SiPixelRecHit::cluster
ClusterRef cluster() const
Definition: SiPixelRecHit.h:47
TrackerTopology::tidModule
unsigned int tidModule(const DetId &id) const
Definition: TrackerTopology.h:175
TrackerDpgAnalysis::vertexid_
uint32_t vertexid_
Definition: TrackerDpgAnalysis.cc:179
TrackerDpgAnalysis::foundhitsStrips_
uint32_t foundhitsStrips_
Definition: TrackerDpgAnalysis.cc:199
TrackerDpgAnalysis::npixClustersOntrack_
uint32_t npixClustersOntrack_
Definition: TrackerDpgAnalysis.cc:195
TrackerDpgAnalysis::nMaxPVs_
static const int nMaxPVs_
Definition: TrackerDpgAnalysis.cc:145
TrackerDpgAnalysis::missingHits_
std::vector< TTree * > missingHits_
Definition: TrackerDpgAnalysis.cc:172
L1GlobalTriggerReadoutRecord
Definition: L1GlobalTriggerReadoutRecord.h:46
TrackerDpgAnalysis::dxyCorr_
float dxyCorr_
Definition: TrackerDpgAnalysis.cc:205
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
TrackerDpgAnalysis::ccuChan_
uint16_t ccuChan_
Definition: TrackerDpgAnalysis.cc:194
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
TrackerDpgAnalysis::ntrajs_
uint32_t * ntrajs_
Definition: TrackerDpgAnalysis.cc:197
TrackerDpgAnalysis::sumPtSquared
double sumPtSquared(const reco::Vertex &)
Definition: TrackerDpgAnalysis.cc:1466
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
TrackerTopology::tobIsRPhi
bool tobIsRPhi(const DetId &id) const
Definition: TrackerTopology.h:269
end
#define end
Definition: vmac.h:39
TrackerDpgAnalysis::dz_
float dz_
Definition: TrackerDpgAnalysis.cc:205
TrackerTopology::tobRod
unsigned int tobRod(const DetId &id) const
Definition: TrackerTopology.h:195
edm::Ref< TrackCollection >
TSiStripRecHit2DLocalPos.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
TrackerDpgAnalysis::clusterToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
Definition: TrackerDpgAnalysis.cc:148
SiStripClusterInfo::width
uint16_t width() const
Definition: SiStripClusterInfo.h:31
TrackerDpgAnalysis::inVertex
std::map< size_t, int > inVertex(const reco::TrackCollection &, const reco::VertexCollection &, uint32_t)
Definition: TrackerDpgAnalysis.cc:1248
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
EventShape::sphericity
static float sphericity(const reco::TrackCollection &)
Definition: EventShape.cc:215
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrackerDpgAnalysis::clSizeY_
uint32_t clSizeY_
Definition: TrackerDpgAnalysis.cc:201
TrackerDpgAnalysis::vertexToken_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: TrackerDpgAnalysis.cc:154
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrackerDpgAnalysis::functionality_tracks_
bool functionality_tracks_
Definition: TrackerDpgAnalysis.cc:166
DetId
Definition: DetId.h:17
TrackerDpgAnalysis::trackLabels_
std::vector< edm::InputTag > trackLabels_
Definition: TrackerDpgAnalysis.cc:159
TrackerDpgAnalysis::stripLength_
float stripLength_
Definition: TrackerDpgAnalysis.cc:190
TrackerDpgAnalysis::dzerr_
float dzerr_
Definition: TrackerDpgAnalysis.cc:205
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MakerMacros.h
Point
math::XYZPoint Point
Definition: TrackerDpgAnalysis.cc:107
TrackerTopology.h
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
TrackerDpgAnalysis::beta_
float beta_
Definition: TrackerDpgAnalysis.cc:202
cms::cuda::bs
bs
Definition: HistoContainer.h:127
TrackerDpgAnalysis::runid_
uint32_t runid_
Definition: TrackerDpgAnalysis.cc:181
TrackerDpgAnalysis::qoverp_
float qoverp_
Definition: TrackerDpgAnalysis.cc:206
TrackerDpgAnalysis::dedxNoM_
uint32_t dedxNoM_
Definition: TrackerDpgAnalysis.cc:195
TrackerDpgAnalysis::HLTDecisionBits_
bool HLTDecisionBits_[256]
Definition: TrackerDpgAnalysis.cc:211
TrackerDpgAnalysis::functionality_ontrackClusters_
bool functionality_ontrackClusters_
Definition: TrackerDpgAnalysis.cc:166
TrackerTopology::tecIsRPhi
bool tecIsRPhi(const DetId &id) const
Definition: TrackerTopology.h:270
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
TrackerTopologyRcd.h
Track.h
TrackerDpgAnalysis::store_
uint32_t store_
Definition: TrackerDpgAnalysis.cc:212
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MainPageGenerator.files
files
Definition: MainPageGenerator.py:256
EventShape::planarity
static float planarity(const reco::TrackCollection &)
Definition: EventShape.cc:275
TrackerDpgAnalysis::charge_
float charge_
Definition: TrackerDpgAnalysis.cc:208
BeamSpot.h
TrackerDpgAnalysis::clSize_
uint32_t clSize_
Definition: TrackerDpgAnalysis.cc:201
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
TrackerDpgAnalysis::clCorrectedCharge_
float clCorrectedCharge_
Definition: TrackerDpgAnalysis.cc:187
SiStripClusterInfo::baryStrip
float baryStrip() const
Definition: SiStripClusterInfo.h:33
edm::HLTGlobalStatus::size
unsigned int size() const
Get number of paths stored.
Definition: HLTGlobalStatus.h:35
Trajectory::DataContainer
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:40
TrackerDpgAnalysis::isFake_pvtx_
bool isFake_pvtx_
Definition: TrackerDpgAnalysis.cc:207
TrackerDpgAnalysis::moduleId_
char * moduleId_
Definition: TrackerDpgAnalysis.cc:214
Service.h
PVValHelper::pT
Definition: PVValidationHelpers.h:70
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
TrackerDpgAnalysis::recz_pvtx_
float recz_pvtx_
Definition: TrackerDpgAnalysis.cc:203
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TrackerDpgAnalysis::dxy_
float dxy_
Definition: TrackerDpgAnalysis.cc:205
TrackerDpgAnalysis::fedCh_
uint16_t fedCh_
Definition: TrackerDpgAnalysis.cc:194
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
TrackerDpgAnalysis::detid_
uint32_t detid_
Definition: TrackerDpgAnalysis.cc:193
reco::BeamSpot
Definition: BeamSpot.h:21
SiTrackerMultiRecHit.h
TrackerDpgAnalysis::L1DecisionBits_
bool L1DecisionBits_[192]
Definition: TrackerDpgAnalysis.cc:211
IdealMagneticFieldRecord.h
edm::ESHandle< SiStripFedCabling >
EventShape
Definition: EventShape.h:6
TrackerDpgAnalysis::~TrackerDpgAnalysis
~TrackerDpgAnalysis() override
Definition: TrackerDpgAnalysis.cc:517
TrackerTopology::tobIsZPlusSide
bool tobIsZPlusSide(const DetId &id) const
Definition: TrackerTopology.h:252
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
TrackerDpgAnalysis::vertices_
TTree * vertices_
Definition: TrackerDpgAnalysis.cc:173
L1GtFdlWord.h
TrackerDpgAnalysis::npixClusters_
uint32_t npixClusters_
Definition: TrackerDpgAnalysis.cc:195
TrackerMap
Definition: TrackerMap.h:76
EventShape::aplanarity
static float aplanarity(const reco::TrackCollection &)
Definition: EventShape.cc:246
TrackerDpgAnalysis::fecSlot_
uint16_t fecSlot_
Definition: TrackerDpgAnalysis.cc:194
Point3DBase< float, LocalTag >
TrackerDpgAnalysis::errorY_
float errorY_
Definition: TrackerDpgAnalysis.cc:185
TrackerDpgAnalysis::fedId_
uint16_t fedId_
Definition: TrackerDpgAnalysis.cc:194
TrackerDpgAnalysis::physicsDeclared_
uint16_t physicsDeclared_
Definition: TrackerDpgAnalysis.cc:213
SiPixelRecHit.h
TrackerDpgAnalysis::trackid_
uint32_t * trackid_
Definition: TrackerDpgAnalysis.cc:183
SiStripClusterInfo::noise
float noise() const
Definition: SiStripClusterInfo.h:50
TrackerDpgAnalysis::dcuId_
uint32_t dcuId_
Definition: TrackerDpgAnalysis.cc:193
TrackerDpgAnalysis::pset_
edm::ParameterSet pset_
Definition: TrackerDpgAnalysis.cc:217
TrackerDpgAnalysis::chargeCorr_
float chargeCorr_
Definition: TrackerDpgAnalysis.cc:202
TrajTrackAssociation.h
TrackerDpgAnalysis::moduleName_
char * moduleName_
Definition: TrackerDpgAnalysis.cc:214
TrackerDpgAnalysis::dzCorr_
float dzCorr_
Definition: TrackerDpgAnalysis.cc:205
TrackerDpgAnalysis::phi_
float phi_
Definition: TrackerDpgAnalysis.cc:191
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
TrackerDpgAnalysis::dxyerr_
float dxyerr_
Definition: TrackerDpgAnalysis.cc:205
TrackerDpgAnalysis::functionality_pixvertices_
bool functionality_pixvertices_
Definition: TrackerDpgAnalysis.cc:166
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::vector_transform
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
Vertex.h
SiStripEventSummary.h
TrackerDpgAnalysis::foundhitsPixels_
uint32_t foundhitsPixels_
Definition: TrackerDpgAnalysis.cc:199
edm::LogWarning
Definition: MessageLogger.h:141
TFileService.h
TrackerDpgAnalysis::thrustValue_
float thrustValue_
Definition: TrackerDpgAnalysis.cc:210
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
TrackerDpgAnalysis::globalY_
float globalY_
Definition: TrackerDpgAnalysis.cc:184
FedChannelConnection
Class containning control, module, detector and connection information, at the level of a FED channel...
Definition: FedChannelConnection.h:26
TrackerDpgAnalysis::tracks_
std::vector< TTree * > tracks_
Definition: TrackerDpgAnalysis.cc:171
TrackerDpgAnalysis::ntracks_
uint32_t * ntracks_
Definition: TrackerDpgAnalysis.cc:197
SiStripClusterInfo::setCluster
void setCluster(const SiStripCluster &cluster, int detId)
Definition: SiStripClusterInfo.cc:16
TrackerDpgAnalysis::clWidth_
float clWidth_
Definition: TrackerDpgAnalysis.cc:190
TFileService::mkdir
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator
friend struct const_iterator
Definition: AssociationMap.h:274
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
MeasurementPoint
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Definition: MeasurementPoint.h:12
TrackerDigiGeometryRecord.h
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
TrackerTopology::tibString
unsigned int tibString(const DetId &id) const
Definition: TrackerTopology.h:419
TrackerDpgAnalysis::event_
TTree * event_
Definition: TrackerDpgAnalysis.cc:175
TrackerDpgAnalysis::cablingFileName_
std::string cablingFileName_
Definition: TrackerDpgAnalysis.cc:215
TrackerDpgAnalysis::nclusters_
uint32_t nclusters_
Definition: TrackerDpgAnalysis.cc:195
TrackerDpgAnalysis::ndof_
uint32_t ndof_
Definition: TrackerDpgAnalysis.cc:195
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
TSiPixelRecHit.h
TrackerDpgAnalysis::PSUname_
char * PSUname_
Definition: TrackerDpgAnalysis.cc:214
TrackerDpgAnalysis::planarity_
float planarity_
Definition: TrackerDpgAnalysis.cc:210
SiStripCluster.h
TrackerDpgAnalysis::fecCrate_
uint16_t fecCrate_
Definition: TrackerDpgAnalysis.cc:194
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
Event.h
L1GlobalTriggerReadoutSetup.h
TrackerTopology::tecPetalNumber
unsigned int tecPetalNumber(const DetId &id) const
Definition: TrackerTopology.h:221
TrackerDpgAnalysis::functionality_offtrackClusters_
bool functionality_offtrackClusters_
Definition: TrackerDpgAnalysis.cc:166
TrackerDpgAnalysis::bsZ0_
float bsZ0_
Definition: TrackerDpgAnalysis.cc:209
TrackerDpgAnalysis::trajectoryTokens_
std::vector< edm::EDGetTokenT< std::vector< Trajectory > > > trajectoryTokens_
Definition: TrackerDpgAnalysis.cc:161
LocalError
Definition: LocalError.h:12
TrackerDpgAnalysis::nLayers_
uint32_t nLayers_
Definition: TrackerDpgAnalysis.cc:199
TrackerDpgAnalysis::bsDydz_
float bsDydz_
Definition: TrackerDpgAnalysis.cc:209
TrackerDpgAnalysis::clNormalizedNoise_
float clNormalizedNoise_
Definition: TrackerDpgAnalysis.cc:188
PV2DBase::y
T y() const
Definition: PV2DBase.h:44
TrackerDpgAnalysis::dedx1_
float dedx1_
Definition: TrackerDpgAnalysis.cc:192
PixelGeomDetUnit::specificTopology
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Definition: PixelGeomDetUnit.cc:17
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
TrackerDpgAnalysis::delayFileNames_
std::vector< std::string > delayFileNames_
Definition: TrackerDpgAnalysis.cc:216
BaseTrackerRecHit::localPosition
LocalPoint localPosition() const final
Definition: BaseTrackerRecHit.h:54
TrackerDpgAnalysis::bsX0_
float bsX0_
Definition: TrackerDpgAnalysis.cc:209
TrackerDpgAnalysis::clBareNoise_
float clBareNoise_
Definition: TrackerDpgAnalysis.cc:189
TrackerTopology::tidIsZPlusSide
bool tidIsZPlusSide(const DetId &id) const
Definition: TrackerTopology.h:258
TrackerDpgAnalysis::sumptsq_pvtx_
float sumptsq_pvtx_
Definition: TrackerDpgAnalysis.cc:203
L1GtFdlWord
Definition: L1GtFdlWord.h:29
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
TrackerTopology::tibModule
unsigned int tibModule(const DetId &id) const
Definition: TrackerTopology.h:172
edm::Service< TFileService >
TrackerDpgAnalysis::clSignalOverNoise_
float clSignalOverNoise_
Definition: TrackerDpgAnalysis.cc:188
createfilelist.int
int
Definition: createfilelist.py:10
TrackerDpgAnalysis::L1Token_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1Token_
Definition: TrackerDpgAnalysis.cc:156
TrackerDpgAnalysis::dedx3Token_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx3Token_
Definition: TrackerDpgAnalysis.cc:152
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
iEvent
int iEvent
Definition: GenABIO.cc:224
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
TrackerTopology::tecRing
unsigned int tecRing(const DetId &id) const
ring id
Definition: TrackerTopology.h:217
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
TrackerDpgAnalysis::toStringName
std::string toStringName(uint32_t, const TrackerTopology *)
Definition: TrackerDpgAnalysis.cc:1373
TrackerDpgAnalysis::globalvertexid_
uint32_t globalvertexid_
Definition: TrackerDpgAnalysis.cc:182
SiStripRecHit2DCollection.h
TrackerDpgAnalysis::zPCA_
float zPCA_
Definition: TrackerDpgAnalysis.cc:206
TrackerDpgAnalysis::angle_
float angle_
Definition: TrackerDpgAnalysis.cc:186
TrackerDpgAnalysis::dedx3_
float dedx3_
Definition: TrackerDpgAnalysis.cc:192
TrackerDpgAnalysis::readoutmap_
TTree * readoutmap_
Definition: TrackerDpgAnalysis.cc:177
TrackerDpgAnalysis::delay_
float delay_
Definition: TrackerDpgAnalysis.cc:210
TrackerDpgAnalysis::orbitL1_
uint32_t orbitL1_
Definition: TrackerDpgAnalysis.cc:212
TrackerDpgAnalysis::isValid_pvtx_
bool isValid_pvtx_
Definition: TrackerDpgAnalysis.cc:207
L1GtFdlWord::gtDecisionWord
const DecisionWord & gtDecisionWord() const
get/set/print algorithms bits (decision word)
Definition: L1GtFdlWord.h:128
SiStripRecHit1D::cluster
ClusterRef cluster() const
Definition: SiStripRecHit1D.h:18
TrackerDpgAnalysis::recx_err_pvtx_
float recx_err_pvtx_
Definition: TrackerDpgAnalysis.cc:203
TrackerDpgAnalysis::chi2_
float chi2_
Definition: TrackerDpgAnalysis.cc:191
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
SiStripClusterInfo::maxCharge
uint8_t maxCharge() const
Definition: SiStripClusterInfo.h:44
TrackerDpgAnalysis::HLTToken_
edm::EDGetTokenT< edm::TriggerResults > HLTToken_
Definition: TrackerDpgAnalysis.cc:158
TrackerDpgAnalysis::type_
uint32_t type_
Definition: TrackerDpgAnalysis.cc:193
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
TrackerDpgAnalysis::lumiSegment_
uint16_t lumiSegment_
Definition: TrackerDpgAnalysis.cc:213
SiStripRecHit1D
Definition: SiStripRecHit1D.h:8
HLTConfigProvider.h
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition: PixelSLinkDataInputSource_cfi.py:6
SiStripClusterInfo::charge
uint16_t charge() const
Definition: SiStripClusterInfo.h:43
get
#define get
TrackerDpgAnalysis::sphericity_
float sphericity_
Definition: TrackerDpgAnalysis.cc:210
TrackerDpgAnalysis::delay
float delay(const SiStripEventSummary &)
Definition: TrackerDpgAnalysis.cc:1476
TrackerDpgAnalysis::clBareCharge_
float clBareCharge_
Definition: TrackerDpgAnalysis.cc:189
TrackerDpgAnalysis::orbit_
uint32_t orbit_
Definition: TrackerDpgAnalysis.cc:212
InputTag.h
TrackerMap.h
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
TrackerDpgAnalysis::siStripClusterInfo_
SiStripClusterInfo siStripClusterInfo_
Definition: TrackerDpgAnalysis.cc:146
TrackingRecHit
Definition: TrackingRecHit.h:21
TrackerDpgAnalysis::distance_
float distance_
Definition: TrackerDpgAnalysis.cc:190
TrackerDpgAnalysis::hltConfig_
HLTConfigProvider hltConfig_
Definition: TrackerDpgAnalysis.cc:219
DecisionWord
std::vector< bool > DecisionWord
typedefs
Definition: L1GlobalTriggerReadoutSetupFwd.h:34
VertexFwd.h
TrackerDpgAnalysis::clCorrectedSignalOverNoise_
float clCorrectedSignalOverNoise_
Definition: TrackerDpgAnalysis.cc:187
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TrackerDpgAnalysis::bx_
uint32_t bx_
Definition: TrackerDpgAnalysis.cc:212
reco::BeamSpot::x0
double x0() const
x coordinate
Definition: BeamSpot.h:61
Trajectory.h
TrackerDpgAnalysis::nclustersOntrack_
uint32_t nclustersOntrack_
Definition: TrackerDpgAnalysis.cc:195
GeomDet.h
TrackerMap::save
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:810
DecisionWordExtended
std::vector< bool > DecisionWordExtended
Definition: L1GlobalTriggerReadoutSetupFwd.h:38
edmNew::DetSetVector
Definition: DetSetNew.h:13
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
SiStripClusterInfo::initEvent
void initEvent(const edm::EventSetup &iSetup)
Definition: SiStripClusterInfo.cc:10
TrackerDpgAnalysis::insertMeasurement
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
Definition: TrackerDpgAnalysis.cc:1169
TransientVertex.h
TrackerDpgAnalysis::errorX_
float errorX_
Definition: TrackerDpgAnalysis.cc:185
TrackerDpgAnalysis::onTrack
std::vector< int > onTrack(edm::Handle< edmNew::DetSetVector< SiStripCluster > > &, const reco::TrackCollection &, uint32_t)
Definition: TrackerDpgAnalysis.cc:1190
TrackerDpgAnalysis::pt_
float pt_
Definition: TrackerDpgAnalysis.cc:208
HLTConfigProvider
Definition: HLTConfigProvider.h:28
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Ref.h
TrackerDpgAnalysis::thrustY_
float thrustY_
Definition: TrackerDpgAnalysis.cc:210
L1GtFdlWord::gtTechnicalTriggerWord
const TechnicalTriggerWord & gtTechnicalTriggerWord() const
get/set technical trigger bits
Definition: L1GtFdlWord.h:112
TrackerDpgAnalysis::pixclusters_
TTree * pixclusters_
Definition: TrackerDpgAnalysis.cc:170
TrackerDpgAnalysis::functionality_missingHits_
bool functionality_missingHits_
Definition: TrackerDpgAnalysis.cc:166
TrackerDpgAnalysis::ccuAdd_
uint16_t ccuAdd_
Definition: TrackerDpgAnalysis.cc:194
TrackerTopology::tobModule
unsigned int tobModule(const DetId &id) const
Definition: TrackerTopology.h:166
SiStripClusterInfo::noiseRescaledByGain
float noiseRescaledByGain() const
Definition: SiStripClusterInfo.h:51
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
TrackerTopology::tibIsDoubleSide
bool tibIsDoubleSide(const DetId &id) const
Definition: TrackerTopology.h:249
FedChannelConnection.h
TrajectoryMeasurement::ConstRecHitPointer
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
Definition: TrajectoryMeasurement.h:28
DetId.h
Frameworkfwd.h
transform.h
edm::ValueMap
Definition: ValueMap.h:107
TrackerDpgAnalysis::summaryToken_
edm::EDGetTokenT< SiStripEventSummary > summaryToken_
Definition: TrackerDpgAnalysis.cc:147
SiStripDetId::subDetector
SubDetector subDetector() const
Definition: SiStripDetId.h:105
TrackerDpgAnalysis::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: TrackerDpgAnalysis.cc:1020
PixelGeomDetUnit.h
TrackerDpgAnalysis::onTrack_
bool onTrack_
Definition: TrackerDpgAnalysis.cc:178
TrackerDpgAnalysis::phierr_
float phierr_
Definition: TrackerDpgAnalysis.cc:204
TrackerTopology::tibIsZPlusSide
bool tibIsZPlusSide(const DetId &id) const
Definition: TrackerTopology.h:255
TrackerDpgAnalysis::bsToken_
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: TrackerDpgAnalysis.cc:155
TrackerDpgAnalysis
Definition: TrackerDpgAnalysis.cc:109
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
TrackerDpgAnalysis::pterr_
float pterr_
Definition: TrackerDpgAnalysis.cc:204
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TrackerDpgAnalysis::tracker_
edm::ESHandle< TrackerGeometry > tracker_
Definition: TrackerDpgAnalysis.cc:164
TrackerDpgAnalysis::globalZ_
float globalZ_
Definition: TrackerDpgAnalysis.cc:184
SiStripFedCablingRcd.h
TrackerTopology::tecModule
unsigned int tecModule(const DetId &id) const
Definition: TrackerTopology.h:169
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
TrackerTopology::tecIsZPlusSide
bool tecIsZPlusSide(const DetId &id) const
Definition: TrackerTopology.h:261
TrackerDpgAnalysis::hlNames_
std::vector< std::string > hlNames_
Definition: TrackerDpgAnalysis.cc:218
cmsRun_displayProdMFGeom_cfg.MF
MF
Definition: cmsRun_displayProdMFGeom_cfg.py:49
SiStripFedCabling::fedIds
FedsConstIterRange fedIds() const
Definition: SiStripFedCabling.h:154
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
StripGeomDetUnit::specificTopology
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Definition: StripGeomDetUnit.cc:17
TrackerDpgAnalysis::lowPixelProbabilityFraction_
float * lowPixelProbabilityFraction_
Definition: TrackerDpgAnalysis.cc:198
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
TrackerDpgAnalysis::eta_
float eta_
Definition: TrackerDpgAnalysis.cc:191
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
TrackerDpgAnalysis::nTracks_pvtx_
uint32_t nTracks_pvtx_
Definition: TrackerDpgAnalysis.cc:200
TrackingRecHit::inactive
Definition: TrackingRecHit.h:48
TrackerDpgAnalysis::thrustZ_
float thrustZ_
Definition: TrackerDpgAnalysis.cc:210
mps_fire.result
result
Definition: mps_fire.py:303
TrackerDpgAnalysis::lldChannel_
uint16_t lldChannel_
Definition: TrackerDpgAnalysis.cc:194
cms::Exception
Definition: Exception.h:70
Topology
Definition: Topology.h:39
TrackerDpgAnalysis::recy_err_pvtx_
float recy_err_pvtx_
Definition: TrackerDpgAnalysis.cc:203
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
TrackerDpgAnalysis::lostHits_
uint32_t lostHits_
Definition: TrackerDpgAnalysis.cc:195
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
TrackerDpgAnalysis::p_
float p_
Definition: TrackerDpgAnalysis.cc:208
SiStripDetId
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
TrackerDpgAnalysis::aplanarity_
float aplanarity_
Definition: TrackerDpgAnalysis.cc:210
TechnicalTriggerWord
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
Definition: L1GlobalTriggerReadoutSetupFwd.h:41
SiStripEventSummary
Definition: SiStripEventSummary.h:22
HLTConfigProvider::triggerNames
const std::vector< std::string > & triggerNames() const
names of trigger paths
Definition: HLTConfigProvider.h:68
TrackerDpgAnalysis::losthitsPixels_
uint32_t losthitsPixels_
Definition: TrackerDpgAnalysis.cc:199
TrackerDpgAnalysis::xPCA_
float xPCA_
Definition: TrackerDpgAnalysis.cc:206
TrackerDpgAnalysis::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: TrackerDpgAnalysis.cc:527
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
SiStripFedCabling::fedConnections
ConnsConstIterRange fedConnections(uint16_t fed_id) const
Definition: SiStripFedCabling.cc:160
reco::BeamSpot::y0
double y0() const
y coordinate
Definition: BeamSpot.h:63
TrackerTopology::tibIsRPhi
bool tibIsRPhi(const DetId &id) const
Definition: TrackerTopology.h:271
TrackerDpgAnalysis::recz_err_pvtx_
float recz_err_pvtx_
Definition: TrackerDpgAnalysis.cc:203
edm::Event
Definition: Event.h:73
mps_splice.line
line
Definition: mps_splice.py:76
LocalVector.h
MagneticField
Definition: MagneticField.h:19
SiStripClusterInfo::signalOverNoise
float signalOverNoise() const
Definition: SiStripClusterInfo.h:53
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
SiTrackerMultiRecHit
Definition: SiTrackerMultiRecHit.h:13
SiStripRecHit2D.h
TrackerDpgAnalysis::functionality_events_
bool functionality_events_
Definition: TrackerDpgAnalysis.cc:166
Topology.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
TrackerDpgAnalysis::connections_
std::multimap< const uint32_t, const FedChannelConnection * > connections_
Definition: TrackerDpgAnalysis.cc:165
SiPixelRecHit::clusterProbability
float clusterProbability(unsigned int flags=0) const
Definition: SiPixelRecHit.cc:9
L1GlobalTriggerReadoutRecord::gtFdlWord
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
Definition: L1GlobalTriggerReadoutRecord.cc:372
edm::InputTag
Definition: InputTag.h:15
begin
#define begin
Definition: vmac.h:32
TrackerDpgAnalysis::foundhits_
uint32_t foundhits_
Definition: TrackerDpgAnalysis.cc:195
L1GlobalTriggerReadoutRecord.h
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
GeomDetType::isTracker
bool isTracker() const
Definition: GeomDetType.cc:21
L1GtFdlWord::orbitNr
const cms_uint32_t orbitNr() const
get/set orbit number
Definition: L1GtFdlWord.h:235
TrackerDpgAnalysis::pixelclusterToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelclusterToken_
Definition: TrackerDpgAnalysis.cc:149
TrackerDpgAnalysis::trajTrackAssoTokens_
std::vector< edm::EDGetTokenT< TrajTrackAssociationCollection > > trajTrackAssoTokens_
Definition: TrackerDpgAnalysis.cc:162
reco::Vertex
Definition: Vertex.h:35
TrackerDpgAnalysis::thickness_
float thickness_
Definition: TrackerDpgAnalysis.cc:190
TrackerDpgAnalysis::globaltrackid_
uint32_t * globaltrackid_
Definition: TrackerDpgAnalysis.cc:183
TrackerDpgAnalysis::maxCharge_
float maxCharge_
Definition: TrackerDpgAnalysis.cc:186
hit
Definition: SiStripHitEffFromCalibTree.cc:88
TrackerDpgAnalysis::pixelVertices_
TTree * pixelVertices_
Definition: TrackerDpgAnalysis.cc:174
TrackerDpgAnalysis::losthitsStrips_
uint32_t losthitsStrips_
Definition: TrackerDpgAnalysis.cc:199
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
TrackerDpgAnalysis::yPCA_
float yPCA_
Definition: TrackerDpgAnalysis.cc:206
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316