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