CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
TrackerDpgAnalysis Class Reference

#include <DPGAnalysis/SiStripTools/plugins/TrackerDpgAnalysis.cc>

Inheritance diagram for TrackerDpgAnalysis:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 TrackerDpgAnalysis (const edm::ParameterSet &)
 
 ~TrackerDpgAnalysis () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

float delay (const SiStripEventSummary &)
 
std::map< uint32_t, float > delay (const std::vector< std::string > &)
 
void insertMeasurement (std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
 
void insertMeasurement (std::multimap< const uint32_t, std::pair< int, int > > &, const TrackingRecHit *, int)
 
void insertMeasurement (std::multimap< const uint32_t, std::pair< LocalPoint, std::pair< double, double > > > &, const TransientTrackingRecHit *, double, double)
 
void insertMeasurement (std::multimap< const uint32_t, std::pair< std::pair< float, float >, int > > &, const TrackingRecHit *, int)
 
std::map< size_t, int > inVertex (const reco::TrackCollection &, const reco::VertexCollection &, uint32_t)
 
std::vector< int > onTrack (edm::Handle< edmNew::DetSetVector< SiStripCluster > > &, const reco::TrackCollection &, uint32_t)
 
std::vector< int > onTrack (edm::Handle< edmNew::DetSetVector< SiPixelCluster > > &, const reco::TrackCollection &, uint32_t)
 
std::vector< double > onTrackAngles (edm::Handle< edmNew::DetSetVector< SiStripCluster > > &, const std::vector< Trajectory > &)
 
std::vector< std::pair< double,
double > > 
onTrackAngles (edm::Handle< edmNew::DetSetVector< SiPixelCluster > > &, const std::vector< Trajectory > &)
 
double sumPtSquared (const reco::Vertex &)
 
std::string toStringId (uint32_t)
 
std::string toStringName (uint32_t, const TrackerTopology &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 

Private Attributes

float alpha_
 
float angle_
 
float aplanarity_
 
float beta_
 
float bsDxdz_
 
float bsDydz_
 
float bsSigmaZ_
 
edm::EDGetTokenT< reco::BeamSpotbsToken_
 
float bsX0_
 
float bsY0_
 
float bsZ0_
 
uint32_t bx_
 
std::string cablingFileName_
 
uint16_t ccuAdd_
 
uint16_t ccuChan_
 
float charge_
 
float chargeCorr_
 
float chi2_
 
float clBareCharge_
 
float clBareNoise_
 
float clCorrectedCharge_
 
float clCorrectedSignalOverNoise_
 
float clNormalizedCharge_
 
float clNormalizedNoise_
 
float clPosition_
 
float clPositionX_
 
float clPositionY_
 
float clSignalOverNoise_
 
uint32_t clSize_
 
uint32_t clSizeX_
 
uint32_t clSizeY_
 
TTree * clusters_
 
edm::EDGetTokenT
< edmNew::DetSetVector
< SiStripCluster > > 
clusterToken_
 
float clWidth_
 
std::multimap< const uint32_t,
const FedChannelConnection * > 
connections_
 
uint32_t dcuId_
 
float dedx1_
 
edm::EDGetTokenT
< edm::ValueMap
< reco::DeDxData > > 
dedx1Token_
 
float dedx2_
 
edm::EDGetTokenT
< edm::ValueMap
< reco::DeDxData > > 
dedx2Token_
 
float dedx3_
 
edm::EDGetTokenT
< edm::ValueMap
< reco::DeDxData > > 
dedx3Token_
 
uint32_t dedxNoM_
 
float delay_
 
std::vector< std::string > delayFileNames_
 
uint32_t detid_
 
float distance_
 
float dxy_
 
float dxyCorr_
 
float dxyerr_
 
float dz_
 
float dzCorr_
 
float dzerr_
 
float errorX_
 
float errorY_
 
float eta_
 
float etaerr_
 
TTree * event_
 
edm::EventNumber_t eventid_
 
float fBz_
 
uint16_t fecCrate_
 
uint16_t fecRing_
 
uint16_t fecSlot_
 
edm::ESGetToken
< SiStripFedCabling,
SiStripFedCablingRcd
fedCablingToken_
 
uint16_t fedCh_
 
uint16_t fedId_
 
uint16_t fiberLength_
 
uint32_t foundhits_
 
uint32_t foundhitsPixels_
 
uint32_t foundhitsStrips_
 
bool functionality_events_
 
bool functionality_missingHits_
 
bool functionality_offtrackClusters_
 
bool functionality_ontrackClusters_
 
bool functionality_pixclusters_
 
bool functionality_pixvertices_
 
bool functionality_tracks_
 
bool functionality_vertices_
 
uint32_t * globaltrackid_
 
uint32_t globalvertexid_
 
float globalX_
 
float globalY_
 
float globalZ_
 
std::vector< std::string > hlNames_
 
HLTConfigProvider hltConfig_
 
bool HLTDecisionBits_ [256]
 
edm::InputTag HLTTag_
 
edm::EDGetTokenT
< edm::TriggerResults
HLTToken_
 
bool isFake_pvtx_
 
bool isValid_pvtx_
 
bool L1DecisionBits_ [192]
 
bool L1TechnicalBits_ [64]
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
L1Token_
 
uint16_t lldChannel_
 
uint32_t lostHits_
 
uint32_t losthitsPixels_
 
uint32_t losthitsStrips_
 
float * lowPixelProbabilityFraction_
 
uint16_t lumiSegment_
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
magFieldToken_
 
float maxCharge_
 
float measX_
 
float measY_
 
std::vector< TTree * > missingHits_
 
char * moduleId_
 
char * moduleName_
 
uint32_t nclusters_
 
uint32_t nclustersOntrack_
 
uint32_t ndof_
 
uint32_t nLayers_
 
uint32_t npixClusters_
 
uint32_t npixClustersOntrack_
 
uint32_t nPixelVertices_
 
uint32_t * ntracks_
 
uint32_t nTracks_pvtx_
 
uint32_t * ntrajs_
 
uint32_t nVertices_
 
bool onTrack_
 
uint32_t orbit_
 
uint32_t orbitL1_
 
float p_
 
float phi_
 
float phierr_
 
uint16_t physicsDeclared_
 
TTree * pixclusters_
 
edm::EDGetTokenT
< edmNew::DetSetVector
< SiPixelCluster > > 
pixelclusterToken_
 
edm::EDGetTokenT
< reco::VertexCollection
pixelVertexToken_
 
TTree * pixelVertices_
 
float planarity_
 
edm::ParameterSet pset_
 
TTree * psumap_
 
char * PSUname_
 
float pt_
 
float pterr_
 
float qoverp_
 
uint32_t quality_
 
TTree * readoutmap_
 
float recx_err_pvtx_
 
float recx_pvtx_
 
float recy_err_pvtx_
 
float recy_pvtx_
 
float recz_err_pvtx_
 
float recz_pvtx_
 
uint32_t runid_
 
SiStripClusterInfo siStripClusterInfo_
 
float sphericity_
 
uint32_t store_
 
float stripLength_
 
edm::EDGetTokenT
< SiStripEventSummary
summaryToken_
 
float sumptsq_pvtx_
 
float thickness_
 
float thrustValue_
 
float thrustX_
 
float thrustY_
 
float thrustZ_
 
uint32_t time_
 
edm::ESGetToken
< TrackerGeometry,
TrackerDigiGeometryRecord
tkGeomToken_
 
const TrackerGeometrytracker_
 
uint32_t * trackid_
 
std::vector< edm::InputTagtrackLabels_
 
std::vector< TTree * > tracks_
 
std::vector< edm::EDGetTokenT
< reco::TrackCollection > > 
trackTokens_
 
std::vector< edm::EDGetTokenT
< std::vector< Trajectory > > > 
trajectoryTokens_
 
std::vector< edm::EDGetTokenT
< TrajTrackAssociationCollection > > 
trajTrackAssoTokens_
 
float trkWeightpvtx_
 
edm::ESGetToken
< TrackerTopology,
TrackerTopologyRcd
tTopoToken_
 
uint32_t type_
 
uint32_t vertexid_
 
edm::EDGetTokenT
< reco::VertexCollection
vertexToken_
 
TTree * vertices_
 
float xPCA_
 
float yPCA_
 
float zPCA_
 

Static Private Attributes

static const int nMaxPVs_ = 50
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Description: analysis of the clusters and digis in the tracker

Implementation: analysis of the clusters and digis in the tracker

Definition at line 108 of file TrackerDpgAnalysis.cc.

Constructor & Destructor Documentation

TrackerDpgAnalysis::TrackerDpgAnalysis ( const edm::ParameterSet iConfig)
explicit

Definition at line 227 of file TrackerDpgAnalysis.cc.

References alpha_, angle_, aplanarity_, beta_, bsDxdz_, bsDydz_, bsSigmaZ_, bsToken_, bsX0_, bsY0_, bsZ0_, edmScanValgrind::buffer, bx_, cablingFileName_, ccuAdd_, ccuChan_, charge_, chargeCorr_, chi2_, clBareCharge_, clBareNoise_, clCorrectedCharge_, clCorrectedSignalOverNoise_, clNormalizedCharge_, clNormalizedNoise_, clPosition_, clPositionX_, clPositionY_, clSignalOverNoise_, clSize_, clSizeX_, clSizeY_, clusters_, clusterToken_, clWidth_, dcuId_, dedx1_, dedx1Token_, dedx2_, dedx2Token_, dedx3_, dedx3Token_, dedxNoM_, delay_, delayFileNames_, detid_, DeadROC_duringRun::dir, dxy_, dxyCorr_, dxyerr_, dz_, dzCorr_, dzerr_, errorX_, errorY_, eta_, etaerr_, event_, eventid_, fBz_, fecCrate_, fecRing_, fecSlot_, fedCh_, fedId_, fiberLength_, foundhits_, foundhitsPixels_, foundhitsStrips_, functionality_events_, functionality_missingHits_, functionality_offtrackClusters_, functionality_ontrackClusters_, functionality_pixclusters_, functionality_pixvertices_, functionality_tracks_, functionality_vertices_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), globaltrackid_, globalvertexid_, globalX_, globalY_, globalZ_, HLTDecisionBits_, HLTTag_, HLTToken_, mps_fire::i, iConfig, HLT_FULL_cff::InputTag, isFake_pvtx_, isValid_pvtx_, L1DecisionBits_, L1TechnicalBits_, L1Token_, lldChannel_, lostHits_, losthitsPixels_, losthitsStrips_, lowPixelProbabilityFraction_, lumiSegment_, TFileDirectory::make(), maxCharge_, measX_, measY_, missingHits_, TFileService::mkdir(), moduleId_, moduleName_, nclusters_, nclustersOntrack_, ndof_, nLayers_, npixClusters_, npixClustersOntrack_, ntracks_, nTracks_pvtx_, ntrajs_, nVertices_, onTrack_, orbit_, orbitL1_, p_, phi_, phierr_, physicsDeclared_, pixclusters_, pixelclusterToken_, pixelVertexToken_, pixelVertices_, planarity_, pset_, psumap_, PSUname_, pt_, pterr_, qoverp_, quality_, readoutmap_, recx_err_pvtx_, recx_pvtx_, recy_err_pvtx_, recy_pvtx_, recz_err_pvtx_, recz_pvtx_, runid_, sphericity_, store_, AlCaHLTBitMon_QueryRunRegistry::string, stripLength_, summaryToken_, sumptsq_pvtx_, GlobalPosition_Frontier_DevDB_cff::tag, thickness_, thrustValue_, thrustX_, thrustY_, thrustZ_, time_, trackid_, trackLabels_, tracks_, trackTokens_, trajectoryTokens_, trajTrackAssoTokens_, trkWeightpvtx_, type_, edm::vector_transform(), vertexid_, vertexToken_, vertices_, xPCA_, yPCA_, and zPCA_.

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 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< TTree * > tracks_
edm::ParameterSet pset_
edm::EDGetTokenT< edm::TriggerResults > HLTToken_
SiStripClusterInfo siStripClusterInfo_
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
edm::EDGetTokenT< reco::BeamSpot > bsToken_
std::vector< std::string > delayFileNames_
edm::EventNumber_t eventid_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1Token_
T * make(const Args &...args) const
make new ROOT object
std::vector< edm::InputTag > trackLabels_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
HLTConfigProvider hltConfig_
edm::EDGetTokenT< SiStripEventSummary > summaryToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx2Token_
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx1Token_
std::vector< TTree * > missingHits_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelclusterToken_
std::vector< edm::EDGetTokenT< TrajTrackAssociationCollection > > trajTrackAssoTokens_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx3Token_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
std::vector< edm::EDGetTokenT< std::vector< Trajectory > > > trajectoryTokens_
edm::EDGetTokenT< reco::VertexCollection > pixelVertexToken_
TrackerDpgAnalysis::~TrackerDpgAnalysis ( )
override

Definition at line 524 of file TrackerDpgAnalysis.cc.

References moduleId_, and moduleName_.

524  {
525  delete[] moduleName_;
526  delete[] moduleId_;
527 }

Member Function Documentation

void TrackerDpgAnalysis::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 534 of file TrackerDpgAnalysis.cc.

References alpha_, angle_, EventShape::aplanarity(), aplanarity_, SiStripClusterInfo::baryStrip(), beam_dqm_sourceclient-live_cfg::beamSpot, SplitLinear::begin, beta_, cms::cuda::bs, bsDxdz_, bsDydz_, bsSigmaZ_, bsToken_, bsX0_, bsY0_, bsZ0_, edm::EventAuxiliary::bunchCrossing(), bx_, c, SiStripClusterInfo::charge(), charge_, chargeCorr_, chi2_, clBareCharge_, clBareNoise_, clCorrectedCharge_, clCorrectedSignalOverNoise_, clNormalizedCharge_, clNormalizedNoise_, clPosition_, clPositionX_, clPositionY_, clSignalOverNoise_, clSize_, clSizeX_, clSizeY_, SiPixelRecHit::clusterProbability(), HLT_FULL_cff::clusters, clusters_, clusterToken_, clWidth_, edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, funct::cos(), dedx1_, dedx1Token_, dedx2_, dedx2Token_, dedx3_, dedx3Token_, dedxNoM_, delay(), delay_, detid_, dxy_, dxyCorr_, dxyerr_, dz_, dzCorr_, dzerr_, dataset::end, relativeConstraints::error, errorX_, errorY_, eta_, etaerr_, edm::EventID::event(), event_, edm::Event::eventAuxiliary(), eventid_, fBz_, foundhits_, foundhitsPixels_, foundhitsStrips_, functionality_events_, functionality_missingHits_, functionality_offtrackClusters_, functionality_ontrackClusters_, functionality_pixclusters_, functionality_pixvertices_, functionality_tracks_, functionality_vertices_, TrackingRecHit::geographicalId(), edm::Event::getByToken(), edm::EventSetup::getData(), globaltrackid_, globalvertexid_, globalX_, globalY_, globalZ_, runTauDisplay::gp, L1GtFdlWord::gtDecisionWord(), HLTDecisionBits_, HLTToken_, mps_fire::i, edm::EventBase::id(), TrackerGeometry::idToDet(), TrackerGeometry::idToDetUnit(), TrackingRecHit::inactive, SiStripClusterInfo::initEvent(), inVertex(), isFake_pvtx_, GeomDetType::isTracker(), isValid_pvtx_, edm::Ref< C, T, F >::key(), L1DecisionBits_, L1TechnicalBits_, L1Token_, lldChannel_, StripTopology::localPosition(), Topology::localPosition(), lostHits_, losthitsPixels_, losthitsStrips_, lowPixelProbabilityFraction_, edm::EventAuxiliary::luminosityBlock(), lumiSegment_, magFieldToken_, SiStripClusterInfo::maxCharge(), maxCharge_, Topology::measurementPosition(), measX_, measY_, missingHits_, nclusters_, nclustersOntrack_, ndof_, nLayers_, SiStripClusterInfo::noise(), SiStripClusterInfo::noiseRescaledByGain(), npixClusters_, npixClustersOntrack_, nPixelVertices_, ntracks_, nTracks_pvtx_, ntrajs_, nVertices_, onTrack(), onTrack_, onTrackAngles(), orbit_, orbitL1_, edm::EventAuxiliary::orbitNumber(), p_, phi_, phierr_, physicsDeclared_, pixclusters_, PixelSubdetector::PixelBarrel, pixelclusterToken_, pixelVertexToken_, pixelVertices_, EventShape::planarity(), planarity_, funct::pow(), pt_, pterr_, qoverp_, quality_, dt_dqm_sourceclient_common_cff::reco, recx_err_pvtx_, recx_pvtx_, recy_err_pvtx_, recy_pvtx_, recz_err_pvtx_, recz_pvtx_, edm::EventID::run(), runid_, SiStripClusterInfo::setCluster(), SiStripClusterInfo::signalOverNoise(), siStripClusterInfo_, PixelGeomDetUnit::specificTopology(), StripGeomDetUnit::specificTopology(), EventShape::sphericity(), sphericity_, mathSSE::sqrt(), store_, edm::EventAuxiliary::storeNumber(), stripLength_, DetId::subdetId(), edmLumisInFiles::summary, summaryToken_, sumptsq_pvtx_, sumPtSquared(), GeomDet::surface(), funct::tan(), thickness_, EventShape::thrust(), thrustValue_, thrustX_, thrustY_, thrustZ_, edm::EventAuxiliary::time(), time_, Surface::toGlobal(), unpackBuffers-CaloStage2::token, GeomDet::topology(), reco::HitPattern::TRACK_HITS, HLT_FULL_cff::trackCollection, tracker_, trackid_, trackLabels_, tracks_, trackTokens_, trajectoryTokens_, trajTrackAssoTokens_, trkWeightpvtx_, GeomDet::type(), type_, findQualityFiles::v, edm::Timestamp::value(), trackerHitRTTI::vector, vertexid_, vertexToken_, vertices_, SiStripClusterInfo::width(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), xPCA_, LocalError::xx(), PV2DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::y(), yPCA_, LocalError::yy(), PV3DBase< T, PVType, FrameType >::z(), and zPCA_.

534  {
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();
548 
549  // Retrieve commissioning information from "event summary", when available (for standard fine delay)
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
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();
872  MeasurementPoint meas = topo.measurementPosition(local);
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++) {
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++) {
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 }
RunNumber_t run() const
Definition: EventID.h:38
uint8_t maxCharge() const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
EventNumber_t event() const
Definition: EventID.h:40
std::vector< TTree * > tracks_
float xx() const
Definition: LocalError.h:22
const edm::EventSetup & c
float clusterProbability(unsigned int flags=0) const
Definition: SiPixelRecHit.cc:9
T y() const
Definition: PV2DBase.h:44
void setCluster(const SiStripCluster &cluster, int detId)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
std::vector< int > onTrack(edm::Handle< edmNew::DetSetVector< SiStripCluster > > &, const reco::TrackCollection &, uint32_t)
float noise() const
double sumPtSquared(const reco::Vertex &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
virtual const Topology & topology() const
Definition: GeomDet.cc:67
float noiseRescaledByGain() const
bool isTracker() const
Definition: GeomDetType.cc:21
edm::EDGetTokenT< edm::TriggerResults > HLTToken_
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
float baryStrip() const
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
Timestamp const & time() const
T y() const
Definition: PV3DBase.h:60
const TrackerGeometry * tracker_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
SiStripClusterInfo siStripClusterInfo_
data_type const * const_iterator
Definition: DetSetNew.h:31
key_type key() const
Accessor for product key.
Definition: Ref.h:250
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:95
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
int bunchCrossing() const
LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< reco::BeamSpot > bsToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
std::vector< bool > DecisionWordExtended
float signalOverNoise() const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:40
int storeNumber() const
uint16_t charge() const
float yy() const
Definition: LocalError.h:24
int orbitNumber() const
std::vector< bool > DecisionWord
typedefs
edm::EventNumber_t eventid_
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
math::XYZPoint Point
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
uint16_t width() const
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1Token_
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
std::vector< double > onTrackAngles(edm::Handle< edmNew::DetSetVector< SiStripCluster > > &, const std::vector< Trajectory > &)
const TrackerGeomDet * idToDet(DetId) const override
std::vector< edm::InputTag > trackLabels_
edm::EDGetTokenT< SiStripEventSummary > summaryToken_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: DetId.h:17
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
tuple trackCollection
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx2Token_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
const DecisionWord & gtDecisionWord() const
get/set/print algorithms bits (decision word)
Definition: L1GtFdlWord.h:128
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
std::map< size_t, int > inVertex(const reco::TrackCollection &, const reco::VertexCollection &, uint32_t)
edm::EventID id() const
Definition: EventBase.h:59
float delay(const SiStripEventSummary &)
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx1Token_
iterator end()
Definition: DetSetNew.h:56
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
std::vector< TTree * > missingHits_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelclusterToken_
std::vector< edm::EDGetTokenT< TrajTrackAssociationCollection > > trajTrackAssoTokens_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dedx3Token_
string end
Definition: dataset.py:937
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
virtual LocalPoint localPosition(float strip) const =0
DetId geographicalId() const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22
void initEvent(const edm::EventSetup &iSetup)
T x() const
Definition: PV2DBase.h:43
T x() const
Definition: PV3DBase.h:59
TimeValue_t value() const
Definition: Timestamp.h:45
std::vector< edm::EDGetTokenT< std::vector< Trajectory > > > trajectoryTokens_
edm::EDGetTokenT< reco::VertexCollection > pixelVertexToken_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
Our base class.
Definition: SiPixelRecHit.h:23
iterator begin()
Definition: DetSetNew.h:54
void TrackerDpgAnalysis::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1024 of file TrackerDpgAnalysis.cc.

References edmScanValgrind::buffer, cablingFileName_, ccuAdd_, ccuChan_, getInfo::conn, shell::connections, connections_, gather_cfg::cout, dcuId_, delay(), delay_, delayFileNames_, detid_, fecCrate_, fecRing_, fecSlot_, fedCablingToken_, fedCh_, fedId_, unpackBuffers-CaloStage1::feds, fiberLength_, TrackerMap::fill_current_val(), edm::EventSetup::getData(), globalX_, globalY_, globalZ_, runTauDisplay::gp, hlNames_, hltConfig_, HLTTag_, mps_fire::i, TrackerGeometry::idToDet(), HLTConfigProvider::init(), geometryCSVtoXML::line, lldChannel_, moduleId_, moduleName_, mergeVDriftHistosByStation::name, edm::InputTag::process(), psumap_, PSUname_, readoutmap_, TrackerMap::save(), AlCaHLTBitMon_QueryRunRegistry::string, GeomDet::surface(), tkGeomToken_, Surface::toGlobal(), toStringId(), toStringName(), tracker_, HLTConfigProvider::triggerNames(), tTopoToken_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

1024  {
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();
1076  tmap.fill_current_val(detid_, delay_);
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 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
const std::vector< std::string > & triggerNames() const
names of trigger paths
std::multimap< const uint32_t, const FedChannelConnection * > connections_
T y() const
Definition: PV3DBase.h:60
const TrackerGeometry * tracker_
std::string toStringId(uint32_t)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
bool getData(T &iHolder) const
Definition: EventSetup.h:128
list connections
Definition: shell.py:10
std::vector< std::string > delayFileNames_
Class containning control, module, detector and connection information, at the level of a FED channel...
T z() const
Definition: PV3DBase.h:61
const TrackerGeomDet * idToDet(DetId) const override
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
HLTConfigProvider hltConfig_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::string const & process() const
Definition: InputTag.h:40
float delay(const SiStripEventSummary &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
tuple conn
Definition: getInfo.py:9
tuple cout
Definition: gather_cfg.py:144
Log< level::Warning, false > LogWarning
T x() const
Definition: PV3DBase.h:59
std::string toStringName(uint32_t, const TrackerTopology &)
std::vector< std::string > hlNames_
float TrackerDpgAnalysis::delay ( const SiStripEventSummary summary)
protected

Definition at line 1475 of file TrackerDpgAnalysis.cc.

References edmLumisInFiles::summary.

Referenced by analyze(), beginRun(), and delay().

1475  {
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 }
float delay(const SiStripEventSummary &)
std::map< uint32_t, float > TrackerDpgAnalysis::delay ( const std::vector< std::string > &  files)
protected

Definition at line 1491 of file TrackerDpgAnalysis.cc.

References edmScanValgrind::buffer, delay(), mergeVDriftHistosByStation::file, geometryCSVtoXML::line, and AlCaHLTBitMon_QueryRunRegistry::string.

1491  {
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()) {
1505  std::string line(buffer);
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 }
float delay(const SiStripEventSummary &)
Log< level::Warning, false > LogWarning
void TrackerDpgAnalysis::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1108 of file TrackerDpgAnalysis.cc.

References edmScanValgrind::buffer, event_, mps_fire::i, psumap_, readoutmap_, tracks_, and vertices_.

1108  {
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 }
std::vector< TTree * > tracks_
void TrackerDpgAnalysis::insertMeasurement ( std::multimap< const uint32_t, std::pair< LocalPoint, double > > &  collection,
const TransientTrackingRecHit hit,
double  tla 
)
protected

Definition at line 1168 of file TrackerDpgAnalysis.cc.

References universalConfigTemplate::collection, TrackingRecHit::geographicalId(), BaseTrackerRecHit::localPosition(), DetId::rawId(), and SiTrackerMultiRecHit::recHits().

Referenced by insertMeasurement(), onTrack(), and onTrackAngles().

1170  {
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 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
LocalPoint localPosition() const override
DetId geographicalId() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
void TrackerDpgAnalysis::insertMeasurement ( std::multimap< const uint32_t, std::pair< int, int > > &  collection,
const TrackingRecHit hit,
int  trackid 
)
protected

Definition at line 1225 of file TrackerDpgAnalysis.cc.

References SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), universalConfigTemplate::collection, TrackingRecHit::geographicalId(), insertMeasurement(), DetId::rawId(), and SiTrackerMultiRecHit::recHits().

1227  {
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 }
ClusterRef cluster() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ClusterRef cluster() const
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
DetId geographicalId() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
void TrackerDpgAnalysis::insertMeasurement ( std::multimap< const uint32_t, std::pair< LocalPoint, std::pair< double, double > > > &  collection,
const TransientTrackingRecHit hit,
double  alpha,
double  beta 
)
protected

Definition at line 1306 of file TrackerDpgAnalysis.cc.

References universalConfigTemplate::collection, TrackingRecHit::geographicalId(), BaseTrackerRecHit::localPosition(), and DetId::rawId().

1310  {
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 }
float alpha
Definition: AMPTWrapper.h:105
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
LocalPoint localPosition() const override
DetId geographicalId() const
Our base class.
Definition: SiPixelRecHit.h:23
void TrackerDpgAnalysis::insertMeasurement ( std::multimap< const uint32_t, std::pair< std::pair< float, float >, int > > &  collection,
const TrackingRecHit hit,
int  trackid 
)
protected

Definition at line 1358 of file TrackerDpgAnalysis.cc.

References SiPixelRecHit::cluster(), universalConfigTemplate::collection, TrackingRecHit::geographicalId(), and DetId::rawId().

1361  {
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 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ClusterRef cluster() const
Definition: SiPixelRecHit.h:47
DetId geographicalId() const
Our base class.
Definition: SiPixelRecHit.h:23
std::map< size_t, int > TrackerDpgAnalysis::inVertex ( const reco::TrackCollection tracks,
const reco::VertexCollection vertices,
uint32_t  firstVertex 
)
protected

Definition at line 1247 of file TrackerDpgAnalysis.cc.

References convertSQLitetoXML_cfg::output, and findQualityFiles::v.

Referenced by analyze().

1249  {
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 }
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:38
std::vector< int > TrackerDpgAnalysis::onTrack ( edm::Handle< edmNew::DetSetVector< SiStripCluster > > &  clusters,
const reco::TrackCollection trackVec,
uint32_t  firstTrack 
)
protected

Definition at line 1189 of file TrackerDpgAnalysis.cc.

References SplitLinear::begin, haddnano::cl, HLT_FULL_cff::clusters, dataset::end, insertMeasurement(), sistrip::SpyUtilities::range(), and mps_fire::result.

Referenced by analyze().

1191  {
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++) {
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 }
data_type const * const_iterator
Definition: DetSetNew.h:31
tuple cl
Definition: haddnano.py:49
const uint16_t range(const Frame &aFrame)
tuple result
Definition: mps_fire.py:311
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
string end
Definition: dataset.py:937
std::vector< int > TrackerDpgAnalysis::onTrack ( edm::Handle< edmNew::DetSetVector< SiPixelCluster > > &  clusters,
const reco::TrackCollection trackVec,
uint32_t  firstTrack 
)
protected

Definition at line 1320 of file TrackerDpgAnalysis.cc.

References SplitLinear::begin, haddnano::cl, HLT_FULL_cff::clusters, dataset::end, insertMeasurement(), sistrip::SpyUtilities::range(), and mps_fire::result.

1322  {
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++) {
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 }
data_type const * const_iterator
Definition: DetSetNew.h:31
tuple cl
Definition: haddnano.py:49
const uint16_t range(const Frame &aFrame)
tuple result
Definition: mps_fire.py:311
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
string end
Definition: dataset.py:937
std::vector< double > TrackerDpgAnalysis::onTrackAngles ( edm::Handle< edmNew::DetSetVector< SiStripCluster > > &  clusters,
const std::vector< Trajectory > &  trajVec 
)
protected

Definition at line 1132 of file TrackerDpgAnalysis.cc.

References angle(), SplitLinear::begin, haddnano::cl, HLT_FULL_cff::clusters, dataset::end, TrackerGeometry::idToDet(), insertMeasurement(), Topology::measurementPosition(), sistrip::SpyUtilities::range(), mps_fire::result, GeomDet::topology(), tracker_, and PV2DBase< T, PVType, FrameType >::x().

Referenced by analyze().

1133  {
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++) {
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 }
virtual const Topology & topology() const
Definition: GeomDet.cc:67
const TrackerGeometry * tracker_
data_type const * const_iterator
Definition: DetSetNew.h:31
tuple cl
Definition: haddnano.py:49
const uint16_t range(const Frame &aFrame)
tuple result
Definition: mps_fire.py:311
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:40
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const TrackerGeomDet * idToDet(DetId) const override
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
string end
Definition: dataset.py:937
T x() const
Definition: PV2DBase.h:43
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
std::vector< std::pair< double, double > > TrackerDpgAnalysis::onTrackAngles ( edm::Handle< edmNew::DetSetVector< SiPixelCluster > > &  clusters,
const std::vector< Trajectory > &  trajVec 
)
protected

Definition at line 1263 of file TrackerDpgAnalysis.cc.

References alpha, SplitLinear::begin, HLT_FULL_cff::beta, haddnano::cl, HLT_FULL_cff::clusters, dataset::end, TrackerGeometry::idToDet(), insertMeasurement(), Topology::measurementPosition(), sistrip::SpyUtilities::range(), mps_fire::result, GeomDet::topology(), tracker_, PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

1264  {
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++) {
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 }
float alpha
Definition: AMPTWrapper.h:105
T y() const
Definition: PV2DBase.h:44
virtual const Topology & topology() const
Definition: GeomDet.cc:67
T y() const
Definition: PV3DBase.h:60
const TrackerGeometry * tracker_
data_type const * const_iterator
Definition: DetSetNew.h:31
tuple cl
Definition: haddnano.py:49
const uint16_t range(const Frame &aFrame)
tuple result
Definition: mps_fire.py:311
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:40
T z() const
Definition: PV3DBase.h:61
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const TrackerGeomDet * idToDet(DetId) const override
void insertMeasurement(std::multimap< const uint32_t, std::pair< LocalPoint, double > > &, const TransientTrackingRecHit *, double)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
string end
Definition: dataset.py:937
T x() const
Definition: PV2DBase.h:43
T x() const
Definition: PV3DBase.h:59
double TrackerDpgAnalysis::sumPtSquared ( const reco::Vertex v)
protected

Definition at line 1465 of file TrackerDpgAnalysis.cc.

References PVValHelper::pT, reco::Vertex::tracks_begin(), and reco::Vertex::tracks_end().

Referenced by analyze().

1465  {
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 }
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.h:110
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.h:108
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:38
std::string TrackerDpgAnalysis::toStringId ( uint32_t  rawid)
protected

Definition at line 1457 of file TrackerDpgAnalysis.cc.

References TauDecayModes::dec, submitPVResolutionJobs::out, convertSQLitetoXML_cfg::output, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginRun().

1457  {
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 }
std::string TrackerDpgAnalysis::toStringName ( uint32_t  rawid,
const TrackerTopology tTopo 
)
protected

Definition at line 1372 of file TrackerDpgAnalysis.cc.

References submitPVResolutionJobs::out, convertSQLitetoXML_cfg::output, AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::subDetector(), TrackerTopology::tecIsDoubleSide(), TrackerTopology::tecIsFrontPetal(), TrackerTopology::tecIsRPhi(), TrackerTopology::tecIsZPlusSide(), TrackerTopology::tecModule(), TrackerTopology::tecPetalNumber(), TrackerTopology::tecRing(), TrackerTopology::tecWheel(), TrackerTopology::tibIsDoubleSide(), TrackerTopology::tibIsExternalString(), TrackerTopology::tibIsRPhi(), TrackerTopology::tibIsZPlusSide(), TrackerTopology::tibLayer(), TrackerTopology::tibModule(), TrackerTopology::tibString(), TrackerTopology::tidIsDoubleSide(), TrackerTopology::tidIsFrontRing(), TrackerTopology::tidIsRPhi(), TrackerTopology::tidIsZPlusSide(), TrackerTopology::tidModule(), TrackerTopology::tidRing(), TrackerTopology::tidWheel(), TrackerTopology::tobIsDoubleSide(), TrackerTopology::tobIsRPhi(), TrackerTopology::tobIsZPlusSide(), TrackerTopology::tobLayer(), TrackerTopology::tobModule(), and TrackerTopology::tobRod().

Referenced by beginRun().

1372  {
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 }
bool tecIsDoubleSide(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
bool tibIsDoubleSide(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
bool tidIsFrontRing(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
bool tobIsRPhi(const DetId &id) const
bool tibIsZPlusSide(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
bool tibIsRPhi(const DetId &id) const
unsigned int tidModule(const DetId &id) const
bool tobIsZPlusSide(const DetId &id) const
bool tecIsRPhi(const DetId &id) const
unsigned int tibModule(const DetId &id) const
unsigned int tecModule(const DetId &id) const
bool tecIsFrontPetal(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
bool tidIsRPhi(const DetId &id) const
bool tidIsZPlusSide(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
unsigned int tobModule(const DetId &id) const
bool tecIsZPlusSide(const DetId &id) const
unsigned int tecPetalNumber(const DetId &id) const
unsigned int tobRod(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const

Member Data Documentation

float TrackerDpgAnalysis::alpha_
private

Definition at line 204 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::angle_
private

Definition at line 188 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::aplanarity_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::beta_
private

Definition at line 204 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::bsDxdz_
private

Definition at line 211 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::bsDydz_
private

Definition at line 211 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::bsSigmaZ_
private

Definition at line 211 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<reco::BeamSpot> TrackerDpgAnalysis::bsToken_
private

Definition at line 154 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::bsX0_
private

Definition at line 211 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::bsY0_
private

Definition at line 211 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::bsZ0_
private

Definition at line 211 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::bx_
private

Definition at line 214 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::string TrackerDpgAnalysis::cablingFileName_
private

Definition at line 217 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::ccuAdd_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::ccuChan_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::charge_
private

Definition at line 210 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::chargeCorr_
private

Definition at line 204 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::chi2_
private

Definition at line 193 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clBareCharge_
private

Definition at line 191 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clBareNoise_
private

Definition at line 191 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clCorrectedCharge_
private

Definition at line 189 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clCorrectedSignalOverNoise_
private

Definition at line 189 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clNormalizedCharge_
private

Definition at line 190 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clNormalizedNoise_
private

Definition at line 190 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clPosition_
private

Definition at line 192 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clPositionX_
private

Definition at line 204 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clPositionY_
private

Definition at line 204 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clSignalOverNoise_
private

Definition at line 190 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::clSize_
private

Definition at line 203 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::clSizeX_
private

Definition at line 203 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::clSizeY_
private

Definition at line 203 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::clusters_
private

Definition at line 171 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > TrackerDpgAnalysis::clusterToken_
private

Definition at line 147 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::clWidth_
private

Definition at line 192 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::multimap<const uint32_t, const FedChannelConnection*> TrackerDpgAnalysis::connections_
private

Definition at line 167 of file TrackerDpgAnalysis.cc.

Referenced by beginRun().

uint32_t TrackerDpgAnalysis::dcuId_
private

Definition at line 195 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dedx1_
private

Definition at line 194 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > TrackerDpgAnalysis::dedx1Token_
private

Definition at line 149 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dedx2_
private

Definition at line 194 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > TrackerDpgAnalysis::dedx2Token_
private

Definition at line 150 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dedx3_
private

Definition at line 194 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > TrackerDpgAnalysis::dedx3Token_
private

Definition at line 151 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::dedxNoM_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::delay_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and TrackerDpgAnalysis().

std::vector<std::string> TrackerDpgAnalysis::delayFileNames_
private

Definition at line 218 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::detid_
private

Definition at line 195 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::distance_
private

Definition at line 192 of file TrackerDpgAnalysis.cc.

float TrackerDpgAnalysis::dxy_
private

Definition at line 207 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dxyCorr_
private

Definition at line 207 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dxyerr_
private

Definition at line 207 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dz_
private

Definition at line 207 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dzCorr_
private

Definition at line 207 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::dzerr_
private

Definition at line 207 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::errorX_
private

Definition at line 187 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::errorY_
private

Definition at line 187 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::eta_
private

Definition at line 193 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::etaerr_
private

Definition at line 206 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::event_
private

Definition at line 177 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), endJob(), and TrackerDpgAnalysis().

edm::EventNumber_t TrackerDpgAnalysis::eventid_
private

Definition at line 182 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::fBz_
private

Definition at line 204 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::fecCrate_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::fecRing_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::fecSlot_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

edm::ESGetToken<SiStripFedCabling, SiStripFedCablingRcd> TrackerDpgAnalysis::fedCablingToken_
private

Definition at line 165 of file TrackerDpgAnalysis.cc.

Referenced by beginRun().

uint16_t TrackerDpgAnalysis::fedCh_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::fedId_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::fiberLength_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::foundhits_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::foundhitsPixels_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::foundhitsStrips_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_events_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_missingHits_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_offtrackClusters_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_ontrackClusters_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_pixclusters_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_pixvertices_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_tracks_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::functionality_vertices_
private

Definition at line 168 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t* TrackerDpgAnalysis::globaltrackid_
private

Definition at line 185 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::globalvertexid_
private

Definition at line 184 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::globalX_
private

Definition at line 186 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::globalY_
private

Definition at line 186 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::globalZ_
private

Definition at line 186 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and TrackerDpgAnalysis().

std::vector<std::string> TrackerDpgAnalysis::hlNames_
private

Definition at line 220 of file TrackerDpgAnalysis.cc.

Referenced by beginRun().

HLTConfigProvider TrackerDpgAnalysis::hltConfig_
private

Definition at line 221 of file TrackerDpgAnalysis.cc.

Referenced by beginRun().

bool TrackerDpgAnalysis::HLTDecisionBits_[256]
private

Definition at line 213 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::InputTag TrackerDpgAnalysis::HLTTag_
private

Definition at line 156 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

edm::EDGetTokenT<edm::TriggerResults> TrackerDpgAnalysis::HLTToken_
private

Definition at line 157 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::isFake_pvtx_
private

Definition at line 209 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::isValid_pvtx_
private

Definition at line 209 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::L1DecisionBits_[192]
private

Definition at line 213 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::L1TechnicalBits_[64]
private

Definition at line 213 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> TrackerDpgAnalysis::L1Token_
private

Definition at line 155 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::lldChannel_
private

Definition at line 196 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::lostHits_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::losthitsPixels_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::losthitsStrips_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float* TrackerDpgAnalysis::lowPixelProbabilityFraction_
private

Definition at line 200 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::lumiSegment_
private

Definition at line 215 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> TrackerDpgAnalysis::magFieldToken_
private

Definition at line 162 of file TrackerDpgAnalysis.cc.

Referenced by analyze().

float TrackerDpgAnalysis::maxCharge_
private

Definition at line 188 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::measX_
private

Definition at line 187 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::measY_
private

Definition at line 187 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::vector<TTree*> TrackerDpgAnalysis::missingHits_
private

Definition at line 174 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

char * TrackerDpgAnalysis::moduleId_
private

Definition at line 216 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), TrackerDpgAnalysis(), and ~TrackerDpgAnalysis().

char* TrackerDpgAnalysis::moduleName_
private

Definition at line 216 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), TrackerDpgAnalysis(), and ~TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::nclusters_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::nclustersOntrack_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::ndof_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::nLayers_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

const int TrackerDpgAnalysis::nMaxPVs_ = 50
staticprivate

Definition at line 144 of file TrackerDpgAnalysis.cc.

uint32_t TrackerDpgAnalysis::npixClusters_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::npixClustersOntrack_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::nPixelVertices_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze().

uint32_t* TrackerDpgAnalysis::ntracks_
private

Definition at line 199 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::nTracks_pvtx_
private

Definition at line 202 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t * TrackerDpgAnalysis::ntrajs_
private

Definition at line 199 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::nVertices_
private

Definition at line 201 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

bool TrackerDpgAnalysis::onTrack_
private

Definition at line 180 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::orbit_
private

Definition at line 214 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::orbitL1_
private

Definition at line 214 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::p_
private

Definition at line 210 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::phi_
private

Definition at line 193 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::phierr_
private

Definition at line 206 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint16_t TrackerDpgAnalysis::physicsDeclared_
private

Definition at line 215 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::pixclusters_
private

Definition at line 172 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > TrackerDpgAnalysis::pixelclusterToken_
private

Definition at line 148 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<reco::VertexCollection> TrackerDpgAnalysis::pixelVertexToken_
private

Definition at line 152 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::pixelVertices_
private

Definition at line 176 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::planarity_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::ParameterSet TrackerDpgAnalysis::pset_
private

Definition at line 219 of file TrackerDpgAnalysis.cc.

Referenced by TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::psumap_
private

Definition at line 178 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), endJob(), and TrackerDpgAnalysis().

char * TrackerDpgAnalysis::PSUname_
private

Definition at line 216 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::pt_
private

Definition at line 210 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::pterr_
private

Definition at line 206 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::qoverp_
private

Definition at line 208 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::quality_
private

Definition at line 197 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::readoutmap_
private

Definition at line 179 of file TrackerDpgAnalysis.cc.

Referenced by beginRun(), endJob(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::recx_err_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::recx_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::recy_err_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::recy_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::recz_err_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::recz_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::runid_
private

Definition at line 183 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

SiStripClusterInfo TrackerDpgAnalysis::siStripClusterInfo_
private

Definition at line 145 of file TrackerDpgAnalysis.cc.

Referenced by analyze().

float TrackerDpgAnalysis::sphericity_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::store_
private

Definition at line 214 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::stripLength_
private

Definition at line 192 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<SiStripEventSummary> TrackerDpgAnalysis::summaryToken_
private

Definition at line 146 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::sumptsq_pvtx_
private

Definition at line 205 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::thickness_
private

Definition at line 192 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::thrustValue_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::thrustX_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::thrustY_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::thrustZ_
private

Definition at line 212 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

uint32_t TrackerDpgAnalysis::time_
private

Definition at line 214 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> TrackerDpgAnalysis::tkGeomToken_
private

Definition at line 164 of file TrackerDpgAnalysis.cc.

Referenced by beginRun().

const TrackerGeometry* TrackerDpgAnalysis::tracker_
private

Definition at line 166 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), beginRun(), and onTrackAngles().

uint32_t * TrackerDpgAnalysis::trackid_
private

Definition at line 185 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::vector<edm::InputTag> TrackerDpgAnalysis::trackLabels_
private

Definition at line 158 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::vector<TTree*> TrackerDpgAnalysis::tracks_
private

Definition at line 173 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), endJob(), and TrackerDpgAnalysis().

std::vector<edm::EDGetTokenT<reco::TrackCollection> > TrackerDpgAnalysis::trackTokens_
private

Definition at line 159 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::vector<edm::EDGetTokenT<std::vector<Trajectory> > > TrackerDpgAnalysis::trajectoryTokens_
private

Definition at line 160 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

std::vector<edm::EDGetTokenT<TrajTrackAssociationCollection> > TrackerDpgAnalysis::trajTrackAssoTokens_
private

Definition at line 161 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::trkWeightpvtx_
private

Definition at line 208 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> TrackerDpgAnalysis::tTopoToken_
private

Definition at line 163 of file TrackerDpgAnalysis.cc.

Referenced by beginRun().

uint32_t TrackerDpgAnalysis::type_
private
uint32_t TrackerDpgAnalysis::vertexid_
private

Definition at line 181 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

edm::EDGetTokenT<reco::VertexCollection> TrackerDpgAnalysis::vertexToken_
private

Definition at line 153 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

TTree* TrackerDpgAnalysis::vertices_
private

Definition at line 175 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), endJob(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::xPCA_
private

Definition at line 208 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::yPCA_
private

Definition at line 208 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().

float TrackerDpgAnalysis::zPCA_
private

Definition at line 208 of file TrackerDpgAnalysis.cc.

Referenced by analyze(), and TrackerDpgAnalysis().