CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Attributes
SiStripLAProfileBooker Class Reference

#include <SiStripLAProfileBooker.h>

Inheritance diagram for SiStripLAProfileBooker:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  detparameters
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginRun (edm::Run const &, const edm::EventSetup &c) override
 
void endJob () override
 
void endRun (edm::Run const &, const edm::EventSetup &c) override
 
void getlayer (const DetId &detid, const TrackerTopology *tTopo, std::string &name, unsigned int &layerid)
 
 SiStripLAProfileBooker (const edm::ParameterSet &conf)
 
 ~SiStripLAProfileBooker () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef std::map< unsigned int, detparameters * > detparmap
 
typedef std::map< unsigned int, MonitorElement * > histomap
 

Private Attributes

uint8_t Amplitudes [100]
 
float barycenter
 
int better_double_hit
 
int bw_fw
 
float chi2norm
 
int ClSize
 
edm::ParameterSet conf_
 
DQMStoredbe_
 
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcddetCablingToken_
 
detparmap detmap
 
float EtaTrack
 
TDirectory * Event_Tree
 
int eventcounter
 
int EventCounter
 
int EventNumber
 
TTree * EventTree
 
int Ext_Int
 
TFile * hFile
 
histomap histos
 
float hit_std_dev
 
TDirectory * Hit_Tree
 
int HitCharge
 
int hitcounter
 
int hitcounter_2ndloop
 
int HitNr
 
int HitPerTrack
 
TTree * HitsTree
 
int id_detector
 
int Layer
 
float MagField
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
float Momentum
 
int MonoStereo
 
int nstrip
 
int ParticleCharge
 
float PhiTrack
 
float pitch_detector
 
float pt
 
int RunNumber
 
float SignCorrection
 
int size
 
detparmap summarydetmap
 
histomap summaryhisto
 
float sumx
 
float TanTrackAngle
 
float TanTrackAngleParallel
 
float thick_detector
 
const TrackerGeometrytkGeom_ = nullptr
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
TDirectory * Track_Tree
 
int trackcollsize
 
int TrackCounter
 
TTree * TrackTree
 
int trajsize
 
std::string treename_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
int Type
 
int Wheel
 
int worse_double_hit
 
float XGlobal
 
float YGlobal
 
float ZGlobal
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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)
 

Detailed Description

Definition at line 33 of file SiStripLAProfileBooker.h.

Member Typedef Documentation

◆ detparmap

typedef std::map<unsigned int, detparameters*> SiStripLAProfileBooker::detparmap
private

Definition at line 57 of file SiStripLAProfileBooker.h.

◆ DQMStore

Definition at line 36 of file SiStripLAProfileBooker.h.

◆ histomap

typedef std::map<unsigned int, MonitorElement*> SiStripLAProfileBooker::histomap
private

Definition at line 58 of file SiStripLAProfileBooker.h.

◆ MonitorElement

Definition at line 35 of file SiStripLAProfileBooker.h.

Constructor & Destructor Documentation

◆ SiStripLAProfileBooker()

SiStripLAProfileBooker::SiStripLAProfileBooker ( const edm::ParameterSet conf)
explicit

Definition at line 55 of file SiStripLAProfileBooker.cc.

56  : conf_(conf),
57  tTopoToken_(esConsumes<edm::Transition::BeginRun>()),
58  tkGeomToken_(esConsumes<edm::Transition::BeginRun>()),
59  magFieldToken_(esConsumes<edm::Transition::BeginRun>()),
60  detCablingToken_(conf_.getParameter<bool>("UseStripCablingDB")
61  ? decltype(detCablingToken_){esConsumes<edm::Transition::BeginRun>()}
62  : decltype(detCablingToken_){}) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_

◆ ~SiStripLAProfileBooker()

SiStripLAProfileBooker::~SiStripLAProfileBooker ( )
override

Definition at line 242 of file SiStripLAProfileBooker.cc.

References detmap, cms::cuda::for(), hFile, and summarydetmap.

242  {
243  detparmap::iterator detpariter;
244  for (detpariter = detmap.begin(); detpariter != detmap.end(); ++detpariter)
245  delete detpariter->second;
246  for (detpariter = summarydetmap.begin(); detpariter != summarydetmap.end(); ++detpariter)
247  delete detpariter->second;
248  delete hFile;
249 }
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)

Member Function Documentation

◆ analyze()

void SiStripLAProfileBooker::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 253 of file SiStripLAProfileBooker.cc.

References Amplitudes, barycenter, edm::AssociationMap< Tag >::begin(), better_double_hit, Surface::bounds(), bw_fw, utilities::cache(), chi2norm, ClSize, SiStripRecHit2D::cluster(), conf_, detmap, MillePedeFileConverter_cfg::e, edm::AssociationMap< Tag >::end(), EtaTrack, eventcounter, EventNumber, EventTree, Ext_Int, TrackingRecHit::geographicalId(), edm::EventSetup::getData(), getlayer(), edm::ParameterSet::getParameter(), histos, hit_std_dev, HitCharge, hitcounter, hitcounter_2ndloop, HitNr, HitPerTrack, HitsTree, mps_fire::i, id_detector, TrackerGeometry::idToDet(), createfilelist::int, edm::helpers::KeyVal< K, V >::key, Layer, TrajectoryStateOnSurface::localDirection(), StripTopology::localPitch(), BaseTrackerRecHit::localPosition(), LogDebug, PV3DBase< T, PVType, FrameType >::mag(), MagField, Momentum, GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), MonoStereo, Skims_PA_cff::name, nstrip, ProjectedSiStripRecHit2D::originalHit(), ParticleCharge, PhiTrack, pitch_detector, position, funct::pow(), pt, DetId::rawId(), RunNumber, SignCorrection, size, GeomDet::specificSurface(), mathSSE::sqrt(), StripSubdetector::stereo(), GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), summaryhisto, sumx, GeomDet::surface(), TanTrackAngle, TanTrackAngleParallel, StripSubdetector::TEC, TrackerTopology::tecPetalInfo(), TrackerTopology::tecWheel(), thick_detector, Bounds::thickness(), StripSubdetector::TIB, TrackerTopology::tibLayer(), TrackerTopology::tibStringInfo(), StripSubdetector::TID, TrackerTopology::tidModuleInfo(), TrackerTopology::tidWheel(), tkGeom_, Zmumu_cfg::TkTag, StripSubdetector::TOB, TrackerTopology::tobLayer(), TrackerTopology::tobRodInfo(), GeomDet::toGlobal(), GeomDet::toLocal(), GeomDet::topology(), JetHT_cfg::trackCollection, trackcollsize, DiMuonV_cfg::tracks, TrackTree, trajsize, tTopoToken_, Type, edm::helpers::KeyVal< K, V >::val, Wheel, worse_double_hit, PV3DBase< T, PVType, FrameType >::x(), XGlobal, PV3DBase< T, PVType, FrameType >::y(), YGlobal, PV3DBase< T, PVType, FrameType >::z(), and ZGlobal.

253  {
254  const TrackerTopology* const tTopo = &es.getData(tTopoToken_);
255 
256  RunNumber = e.id().run();
257  EventNumber = e.id().event();
258 
259  eventcounter++;
260 
261  EventTree->Fill();
262 
263  //Analysis of Trajectory-RecHits
264 
266 
268  e.getByLabel(TkTag, trackCollection);
269 
271  e.getByLabel(TkTag, TrajectoryCollection);
272 
274  e.getByLabel(TkTag, TrajTrackMap);
275 
276  const reco::TrackCollection* tracks = trackCollection.product();
277 
278  // FIXME this has to be changed to use pointers to clusters...
279  std::map<const SiStripRecHit2D*, std::pair<float, float>, DetIdLess> hitangleassociation;
280  std::list<SiStripRecHit2D> cache; // ugly, inefficient, effective in making the above working
281 
282  trackcollsize = tracks->size();
283  trajsize = TrajectoryCollection->size();
284 
285  edm::LogInfo("SiStripLAProfileBooker::analyze") << " Number of tracks in event = " << trackcollsize << "\n";
286  edm::LogInfo("SiStripLAProfileBooker::analyze") << " Number of trajectories in event = " << trajsize << "\n";
287 
289 
290  for (TrajTrackIter = TrajTrackMap->begin(); TrajTrackIter != TrajTrackMap->end();
291  TrajTrackIter++) { //loop on trajectories
292 
293  if (TrajTrackIter->key->foundHits() >= 5) {
294  TrackTree->Fill();
295 
296  ParticleCharge = -99;
297  Momentum = -99;
298  pt = -99;
299  chi2norm = -99;
300  HitPerTrack = -99;
301  EtaTrack = -99;
302  PhiTrack = -99;
303 
304  ParticleCharge = TrajTrackIter->val->charge();
305  pt = TrajTrackIter->val->pt();
306  Momentum = TrajTrackIter->val->p();
307  chi2norm = TrajTrackIter->val->normalizedChi2();
308  EtaTrack = TrajTrackIter->val->eta();
309  PhiTrack = TrajTrackIter->val->phi();
310  HitPerTrack = TrajTrackIter->key->foundHits();
311 
312  std::vector<TrajectoryMeasurement> TMeas = TrajTrackIter->key->measurements();
313  std::vector<TrajectoryMeasurement>::iterator itm;
314 
315  for (itm = TMeas.begin(); itm != TMeas.end(); itm++) { //loop on hits
316 
317  int i;
318  for (i = 0; i < 100; i++) {
319  Amplitudes[i] = 0;
320  }
321 
322  TanTrackAngle = -99;
323  TanTrackAngleParallel = -99;
324  ClSize = -99;
325  HitCharge = 0;
326  Type = -99;
327  Layer = -99;
328  Wheel = -99;
329  bw_fw = -99;
330  Ext_Int = -99;
331  MonoStereo = -99;
332  MagField = -99;
333  SignCorrection = -99;
334  XGlobal = -99;
335  YGlobal = -99;
336  ZGlobal = -99;
337  barycenter = -99;
338  hit_std_dev = -99;
339  sumx = 0;
340  id_detector = -1;
341  thick_detector = -1;
342  pitch_detector = -1;
343  HitNr = 1;
344 
345  SiStripRecHit2D lhit;
346  TrajectoryStateOnSurface tsos = itm->updatedState();
347  const TransientTrackingRecHit::ConstRecHitPointer thit = itm->recHit();
348  if ((thit->geographicalId().subdetId() == int(StripSubdetector::TIB)) ||
349  thit->geographicalId().subdetId() == int(StripSubdetector::TOB)) { //include only barrel
350  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>((*thit).hit());
351  const ProjectedSiStripRecHit2D* phit = dynamic_cast<const ProjectedSiStripRecHit2D*>((*thit).hit());
352  const SiStripRecHit2D* hit = dynamic_cast<const SiStripRecHit2D*>((*thit).hit());
353  if (phit) {
354  lhit = phit->originalHit();
355  hit = &lhit;
356  }
357 
358  LocalVector trackdirection = tsos.localDirection();
359 
360  if (matchedhit) { //if matched hit...
361 
362  GluedGeomDet* gdet = (GluedGeomDet*)tkGeom_->idToDet(matchedhit->geographicalId());
363 
364  GlobalVector gtrkdir = gdet->toGlobal(trackdirection);
365 
366  // THIS THE POINTER TO THE MONO HIT OF A MATCHED HIT
367 
368  // top be migrated to the more direct interface of matchedhit
369  cache.push_back(matchedhit->monoHit());
370  const SiStripRecHit2D* monohit = &cache.back();
371  const SiStripRecHit2D::ClusterRef& monocluster = monohit->cluster();
372  const GeomDetUnit* monodet = gdet->monoDet();
373  // this does not exists anymore! either project the matched or use CPE
374  const LocalPoint monoposition = monohit->localPosition();
375 
377  id_detector = detid.rawId();
379  const StripTopology& mtopol = (StripTopology&)monodet->topology();
380  pitch_detector = mtopol.localPitch(monoposition);
381  const GlobalPoint monogposition = (monodet->surface()).toGlobal(monoposition);
382  ClSize = (monocluster->amplitudes()).size();
383 
384  const auto& amplitudes = monocluster->amplitudes();
385 
386  barycenter = monocluster->barycenter() - 0.5;
387  uint16_t FirstStrip = monocluster->firstStrip();
388  auto begin = amplitudes.begin();
389  nstrip = 0;
390  for (auto idigi = begin; idigi != amplitudes.end(); idigi++) {
391  Amplitudes[nstrip] = *idigi;
392  sumx += pow(((FirstStrip + idigi - begin) - barycenter), 2) * (*idigi);
393  HitCharge += *idigi;
394  }
396 
397  XGlobal = monogposition.x();
398  YGlobal = monogposition.y();
399  ZGlobal = monogposition.z();
400 
401  Type = detid.subdetId();
402  MonoStereo = detid.stereo();
403 
404  if (detid.subdetId() == int(StripSubdetector::TIB)) {
405  Layer = tTopo->tibLayer(detid);
406  bw_fw = tTopo->tibStringInfo(detid)[0];
407  Ext_Int = tTopo->tibStringInfo(detid)[1];
408  }
409  if (detid.subdetId() == int(StripSubdetector::TOB)) {
410  Layer = tTopo->tobLayer(detid);
411  bw_fw = tTopo->tobRodInfo(detid)[0];
412  }
413  if (detid.subdetId() == int(StripSubdetector::TID)) {
414  Wheel = tTopo->tidWheel(detid);
415  bw_fw = tTopo->tidModuleInfo(detid)[0];
416  }
417  if (detid.subdetId() == int(StripSubdetector::TEC)) {
418  Wheel = tTopo->tecWheel(detid);
419  bw_fw = tTopo->tecPetalInfo(detid)[0];
420  }
421 
422  LocalVector monotkdir = monodet->toLocal(gtrkdir);
423 
424  if (monotkdir.z() != 0) {
425  // THE LOCAL ANGLE (MONO)
426  float tanangle = monotkdir.x() / monotkdir.z();
427  TanTrackAngleParallel = monotkdir.y() / monotkdir.z();
428  TanTrackAngle = tanangle;
429  detparmap::iterator TheDet = detmap.find(detid.rawId());
430  LocalVector localmagdir;
431  if (TheDet != detmap.end())
432  localmagdir = TheDet->second->magfield;
433  MagField = localmagdir.mag();
434  if (MagField != 0.) {
435  LocalVector monoylocal(0, 1, 0);
436  float signcorrection = (localmagdir * monoylocal) / (MagField);
437  if (signcorrection != 0)
438  SignCorrection = 1 / signcorrection;
439  }
440 
441  std::map<const SiStripRecHit2D*, std::pair<float, float>, DetIdLess>::iterator alreadystored =
442  hitangleassociation.find(monohit);
443 
444  if (alreadystored != hitangleassociation.end()) { //decide which hit take
445  if (itm->estimate() > alreadystored->second.first) {
447  }
448  if (itm->estimate() < alreadystored->second.first) {
450  hitangleassociation.insert(std::make_pair(monohit, std::make_pair(itm->estimate(), tanangle)));
451  }
452  } else {
453  hitangleassociation.insert(make_pair(monohit, std::make_pair(itm->estimate(), tanangle)));
454  HitsTree->Fill();
455  hitcounter++;
456  }
457 
458  // THIS THE POINTER TO THE STEREO HIT OF A MATCHED HIT
459 
460  // top be migrated to the more direct interface of matchedhit
461  cache.push_back(matchedhit->stereoHit());
462  const SiStripRecHit2D* stereohit = &cache.back();
463  const SiStripRecHit2D::ClusterRef& stereocluster = stereohit->cluster();
464  const GeomDetUnit* stereodet = gdet->stereoDet();
465  // this does not exists anymore! either project the matched or use CPE
466  const LocalPoint stereoposition = stereohit->localPosition();
467  StripSubdetector detid = (StripSubdetector)stereohit->geographicalId();
468  id_detector = detid.rawId();
469  thick_detector = stereodet->specificSurface().bounds().thickness();
470  const StripTopology& stopol = (StripTopology&)stereodet->topology();
471  pitch_detector = stopol.localPitch(stereoposition);
472  const GlobalPoint stereogposition = (stereodet->surface()).toGlobal(stereoposition);
473 
474  ClSize = (stereocluster->amplitudes()).size();
475 
476  const auto& amplitudes = stereocluster->amplitudes();
477 
478  barycenter = stereocluster->barycenter() - 0.5;
479  uint16_t FirstStrip = stereocluster->firstStrip();
480  auto begin = amplitudes.begin();
481  nstrip = 0;
482  for (auto idigi = begin; idigi != amplitudes.end(); idigi++) {
483  Amplitudes[nstrip] = *idigi;
484  sumx += pow(((FirstStrip + idigi - begin) - barycenter), 2) * (*idigi);
485  HitCharge += *idigi;
486  }
488 
489  XGlobal = stereogposition.x();
490  YGlobal = stereogposition.y();
491  ZGlobal = stereogposition.z();
492 
493  Type = detid.subdetId();
494  MonoStereo = detid.stereo();
495 
496  if (detid.subdetId() == int(StripSubdetector::TIB)) {
497  Layer = tTopo->tibLayer(detid);
498  bw_fw = tTopo->tibStringInfo(detid)[0];
499  Ext_Int = tTopo->tibStringInfo(detid)[1];
500  }
501  if (detid.subdetId() == int(StripSubdetector::TOB)) {
502  Layer = tTopo->tobLayer(detid);
503  bw_fw = tTopo->tobRodInfo(detid)[0];
504  }
505  if (detid.subdetId() == int(StripSubdetector::TID)) {
506  Wheel = tTopo->tidWheel(detid);
507  bw_fw = tTopo->tidModuleInfo(detid)[0];
508  }
509  if (detid.subdetId() == int(StripSubdetector::TEC)) {
510  Wheel = tTopo->tecWheel(detid);
511  bw_fw = tTopo->tecPetalInfo(detid)[0];
512  }
513 
514  LocalVector stereotkdir = stereodet->toLocal(gtrkdir);
515 
516  if (stereotkdir.z() != 0) {
517  // THE LOCAL ANGLE (STEREO)
518  float tanangle = stereotkdir.x() / stereotkdir.z();
519  TanTrackAngleParallel = stereotkdir.y() / stereotkdir.z();
520  TanTrackAngle = tanangle;
521  detparmap::iterator TheDet = detmap.find(detid.rawId());
522  LocalVector localmagdir;
523  if (TheDet != detmap.end())
524  localmagdir = TheDet->second->magfield;
525  MagField = localmagdir.mag();
526  LocalVector stereoylocal(0, 1, 0);
527  if (MagField != 0.) {
528  float signcorrection = (localmagdir * stereoylocal) / (MagField);
529  if (signcorrection != 0)
530  SignCorrection = 1 / signcorrection;
531  }
532 
533  std::map<const SiStripRecHit2D*, std::pair<float, float>, DetIdLess>::iterator alreadystored =
534  hitangleassociation.find(stereohit);
535 
536  if (alreadystored != hitangleassociation.end()) { //decide which hit take
537  if (itm->estimate() > alreadystored->second.first) {
539  }
540  if (itm->estimate() < alreadystored->second.first) {
542  hitangleassociation.insert(std::make_pair(stereohit, std::make_pair(itm->estimate(), tanangle)));
543  }
544  } else {
545  hitangleassociation.insert(std::make_pair(stereohit, std::make_pair(itm->estimate(), tanangle)));
546  HitsTree->Fill();
547  hitcounter++;
548  }
549  }
550  }
551  } else if (hit) {
552  // hit= POINTER TO THE RECHIT
553 
554  const SiStripRecHit2D::ClusterRef& cluster = hit->cluster();
555 
556  GeomDetUnit* gdet = (GeomDetUnit*)tkGeom_->idToDet(hit->geographicalId());
557  const LocalPoint position = hit->localPosition();
558  StripSubdetector detid = (StripSubdetector)hit->geographicalId();
559  id_detector = detid.rawId();
561  const StripTopology& topol = (StripTopology&)gdet->topology();
563  const GlobalPoint gposition = (gdet->surface()).toGlobal(position);
564 
565  ClSize = (cluster->amplitudes()).size();
566 
567  const auto& amplitudes = cluster->amplitudes();
568 
569  barycenter = cluster->barycenter() - 0.5;
570  uint16_t FirstStrip = cluster->firstStrip();
571  nstrip = 0;
572  auto begin = amplitudes.begin();
573  for (auto idigi = amplitudes.begin(); idigi != amplitudes.end(); idigi++) {
574  Amplitudes[nstrip] = *idigi;
575  sumx += pow(((FirstStrip + idigi - begin) - barycenter), 2) * (*idigi);
576  HitCharge += *idigi;
577  }
579 
580  XGlobal = gposition.x();
581  YGlobal = gposition.y();
582  ZGlobal = gposition.z();
583 
584  Type = detid.subdetId();
585  MonoStereo = detid.stereo();
586 
587  if (detid.subdetId() == int(StripSubdetector::TIB)) {
588  Layer = tTopo->tibLayer(detid);
589  bw_fw = tTopo->tibStringInfo(detid)[0];
590  Ext_Int = tTopo->tibStringInfo(detid)[1];
591  }
592  if (detid.subdetId() == int(StripSubdetector::TOB)) {
593  Layer = tTopo->tobLayer(detid);
594  bw_fw = tTopo->tobRodInfo(detid)[0];
595  }
596  if (detid.subdetId() == int(StripSubdetector::TID)) {
597  Wheel = tTopo->tidWheel(detid);
598  bw_fw = tTopo->tidModuleInfo(detid)[0];
599  }
600  if (detid.subdetId() == int(StripSubdetector::TEC)) {
601  Wheel = tTopo->tecWheel(detid);
602  bw_fw = tTopo->tecPetalInfo(detid)[0];
603  }
604 
605  if (trackdirection.z() != 0) {
606  // THE LOCAL ANGLE
607  float tanangle = trackdirection.x() / trackdirection.z();
608  TanTrackAngleParallel = trackdirection.y() / trackdirection.z();
609  TanTrackAngle = tanangle;
610  detparmap::iterator TheDet = detmap.find(detid.rawId());
611  LocalVector localmagdir;
612  if (TheDet != detmap.end())
613  localmagdir = TheDet->second->magfield;
614  MagField = localmagdir.mag();
615  if (MagField != 0.) {
616  LocalVector ylocal(0, 1, 0);
617  float signcorrection = (localmagdir * ylocal) / (MagField);
618  if (signcorrection != 0)
619  SignCorrection = 1 / signcorrection;
620  }
621 
622  std::map<const SiStripRecHit2D*, std::pair<float, float>, DetIdLess>::iterator alreadystored =
623  hitangleassociation.find(hit);
624 
625  if (alreadystored != hitangleassociation.end()) { //decide which hit take
626  if (itm->estimate() > alreadystored->second.first) {
628  }
629  if (itm->estimate() < alreadystored->second.first) {
631  hitangleassociation.insert(std::make_pair(hit, std::make_pair(itm->estimate(), tanangle)));
632  }
633  } else {
634  hitangleassociation.insert(std::make_pair(hit, std::make_pair(itm->estimate(), tanangle)));
635  HitsTree->Fill();
636  hitcounter++;
637  }
638  }
639  }
640  }
641  }
642  }
643  }
644  std::map<const SiStripRecHit2D*, std::pair<float, float>, DetIdLess>::iterator hitsiter;
645 
646  for (hitsiter = hitangleassociation.begin(); hitsiter != hitangleassociation.end(); hitsiter++) {
648 
649  const SiStripRecHit2D* hit = hitsiter->first;
650  const SiStripRecHit2D::ClusterRef& cluster = hit->cluster();
651 
652  size = (cluster->amplitudes()).size();
653 
654  StripSubdetector detid = (StripSubdetector)hit->geographicalId();
655 
656  float tangent = hitsiter->second.second;
657 
658  //Sign and XZ plane projection correction applied in TrackLocalAngle (TIB|TOB layers)
659 
660  detparmap::iterator thedet = detmap.find(detid.rawId());
661  LocalVector localmagdir;
662  if (thedet != detmap.end())
663  localmagdir = thedet->second->magfield;
664  float localmagfield = localmagdir.mag();
665 
666  if (localmagfield != 0.) {
667  LocalVector ylocal(0, 1, 0);
668 
669  float normprojection = (localmagdir * ylocal) / (localmagfield);
670 
671  if (normprojection == 0.)
672  LogDebug("SiStripLAProfileBooker::analyze") << "Error: YBprojection = 0";
673 
674  else {
675  float signprojcorrection = 1 / normprojection;
676  tangent *= signprojcorrection;
677  }
678  }
679 
680  //Filling histograms
681 
682  histomap::iterator thehisto = histos.find(detid.rawId());
683 
684  if (thehisto == histos.end())
685  edm::LogError("SiStripLAProfileBooker::analyze")
686  << "Error: the profile associated to" << detid.rawId() << "does not exist! ";
687  else
688  thehisto->second->Fill(tangent, size);
689 
690  //Summary histograms
692  unsigned int layerid;
693  getlayer(detid, tTopo, name, layerid);
694  histomap::iterator thesummaryhisto = summaryhisto.find(layerid);
695  if (thesummaryhisto == summaryhisto.end())
696  edm::LogError("SiStripLAProfileBooker::analyze")
697  << "Error: the profile associated to subdet " << name << "does not exist! ";
698  else
699  thesummaryhisto->second->Fill(tangent, size);
700  }
701 }
static constexpr auto TEC
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
unsigned int tobLayer(const DetId &id) const
SiStripRecHit2D stereoHit() const
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
unsigned int stereo() const
stereo
T z() const
Definition: PV3DBase.h:61
virtual const Topology & topology() const
Definition: GeomDet.cc:67
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
ClusterRef cluster() const
const_iterator end() const
last iterator over the map (read only)
virtual float thickness() const =0
T x() const
Definition: PV3DBase.h:59
virtual float localPitch(const LocalPoint &) const =0
T y() const
Definition: PV3DBase.h:60
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
void getlayer(const DetId &detid, const TrackerTopology *tTopo, std::string &name, unsigned int &layerid)
T sqrt(T t)
Definition: SSEVec.h:23
LocalVector localDirection() const
T mag() const
Definition: PV3DBase.h:64
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
trackCollection
Definition: JetHT_cfg.py:51
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
Log< level::Info, false > LogInfo
std::vector< unsigned int > tibStringInfo(const DetId &id) const
static constexpr auto TIB
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
const_iterator begin() const
first iterator over the map (read only)
std::vector< unsigned int > tobRodInfo(const DetId &id) const
SiStripRecHit2D originalHit() const
LocalPoint localPosition() const override
static int position[264][3]
Definition: ReadPGInfo.cc:289
def cache(function)
Definition: utilities.py:3
std::vector< Trajectory > TrajectoryCollection
SiStripRecHit2D monoHit() const
unsigned int tibLayer(const DetId &id) const
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
static constexpr auto TID
const TrackerGeometry * tkGeom_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
#define LogDebug(id)
const Bounds & bounds() const
Definition: Surface.h:87

◆ beginRun()

void SiStripLAProfileBooker::beginRun ( edm::Run const &  ,
const edm::EventSetup c 
)
override

Definition at line 66 of file SiStripLAProfileBooker.cc.

References Amplitudes, better_double_hit, dqm::implementation::IBooker::bookProfile(), bw_fw, DummyCfis::c, chi2norm, ClSize, conf_, SiStripHistoId::createHistoId(), dbe_, detCablingToken_, TrackerGeometry::detIds(), detmap, EtaTrack, Event_Tree, eventcounter, EventCounter, EventNumber, EventTree, Ext_Int, getlayer(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hFile, histos, hit_std_dev, Hit_Tree, HitCharge, hitcounter, hitcounter_2ndloop, HitNr, HitPerTrack, HitsTree, id_detector, TrackerGeometry::idToDet(), createfilelist::int, Layer, StripTopology::localPitch(), SiStripLAProfileBooker::detparameters::magfield, MagField, magFieldToken_, Momentum, MonoStereo, Skims_PA_cff::name, Utilities::operator, AlCaHLTBitMon_ParallelJobs::p, ParticleCharge, PhiTrack, SiStripLAProfileBooker::detparameters::pitch, pitch_detector, PostProcessor_cff::profile, pt, DetId::rawId(), RunNumber, dqm::impl::MonitorElement::setAxisTitle(), SiStripFolderOrganizer::setDetectorFolder(), SiStripFolderOrganizer::setSiStripFolder(), SignCorrection, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), summarydetmap, summaryhisto, TanTrackAngle, TanTrackAngleParallel, StripSubdetector::TEC, thick_detector, SiStripLAProfileBooker::detparameters::thickness, Calorimetry_cff::thickness, StripSubdetector::TIB, StripSubdetector::TID, tkGeom_, tkGeomToken_, Zmumu_cfg::TkTag, StripSubdetector::TOB, toLocal(), Track_Tree, trackcollsize, TrackCounter, TrackTree, trajsize, tTopoToken_, Type, Wheel, worse_double_hit, XGlobal, YGlobal, and ZGlobal.

66  {
67  const TrackerTopology* const tTopo = &c.getData(tTopoToken_);
68  tkGeom_ = &c.getData(tkGeomToken_);
69  const auto& magField = c.getData(magFieldToken_);
70 
71  std::vector<uint32_t> activeDets;
72  if (conf_.getParameter<bool>("UseStripCablingDB")) {
73  activeDets.clear();
74  c.getData(detCablingToken_).addActiveDetectorsRawIds(activeDets);
75  } else {
77  TrackerGeometry::DetIdContainer::const_iterator Iditer;
78  activeDets.clear();
79  for (Iditer = Id.begin(); Iditer != Id.end(); Iditer++) {
80  activeDets.push_back(Iditer->rawId());
81  }
82  }
83 
85  //Get Ids;
86  double ModuleRangeMin = conf_.getParameter<double>("ModuleXMin");
87  double ModuleRangeMax = conf_.getParameter<double>("ModuleXMax");
88  double TIBRangeMin = conf_.getParameter<double>("TIBXMin");
89  double TIBRangeMax = conf_.getParameter<double>("TIBXMax");
90  double TOBRangeMin = conf_.getParameter<double>("TOBXMin");
91  double TOBRangeMax = conf_.getParameter<double>("TOBXMax");
92  int TIB_bin = conf_.getParameter<int>("TIB_bin");
93  int TOB_bin = conf_.getParameter<int>("TOB_bin");
94  int SUM_bin = conf_.getParameter<int>("SUM_bin");
95 
96  hFile = new TFile(conf_.getUntrackedParameter<std::string>("treeName").c_str(), "RECREATE");
97 
98  Hit_Tree = hFile->mkdir("Hit_Tree");
99  Track_Tree = hFile->mkdir("Track_Tree");
100  Event_Tree = hFile->mkdir("Event_Tree");
101 
102  HitsTree = new TTree("HitsTree", "HitsTree");
103 
104  HitsTree->Branch("RunNumber", &RunNumber, "RunNumber/I");
105  HitsTree->Branch("EventNumber", &EventNumber, "EventNumber/I");
106  HitsTree->Branch("TanTrackAngle", &TanTrackAngle, "TanTrackAngle/F");
107  HitsTree->Branch("TanTrackAngleParallel", &TanTrackAngleParallel, "TanTrackAngleParallel/F");
108  HitsTree->Branch("ClSize", &ClSize, "ClSize/I");
109  HitsTree->Branch("HitCharge", &HitCharge, "HitCharge/I");
110  HitsTree->Branch("Hit_Std_Dev", &hit_std_dev, "hit_std_dev/F");
111  HitsTree->Branch("Type", &Type, "Type/I");
112  HitsTree->Branch("Layer", &Layer, "Layer/I");
113  HitsTree->Branch("Wheel", &Wheel, "Wheel/I");
114  HitsTree->Branch("bw_fw", &bw_fw, "bw_fw/I");
115  HitsTree->Branch("Ext_Int", &Ext_Int, "Ext_Int/I");
116  HitsTree->Branch("MonoStereo", &MonoStereo, "MonoStereo/I");
117  HitsTree->Branch("MagField", &MagField, "MagField/F");
118  HitsTree->Branch("SignCorrection", &SignCorrection, "SignCorrection/F");
119  HitsTree->Branch("XGlobal", &XGlobal, "XGlobal/F");
120  HitsTree->Branch("YGlobal", &YGlobal, "YGlobal/F");
121  HitsTree->Branch("ZGlobal", &ZGlobal, "ZGlobal/F");
122  HitsTree->Branch("ParticleCharge", &ParticleCharge, "ParticleCharge/I");
123  HitsTree->Branch("Momentum", &Momentum, "Momentum/F");
124  HitsTree->Branch("pt", &pt, "pt/F");
125  HitsTree->Branch("chi2norm", &chi2norm, "chi2norm/F");
126  HitsTree->Branch("EtaTrack", &EtaTrack, "EtaTrack/F");
127  HitsTree->Branch("PhiTrack", &PhiTrack, "PhiTrack/F");
128  HitsTree->Branch("TrajSize", &trajsize, "trajsize/I");
129  HitsTree->Branch("HitNr", &HitNr, "HitNr/I");
130  HitsTree->Branch("HitPerTrack", &HitPerTrack, "HitPerTrack/I");
131  HitsTree->Branch("id_detector", &id_detector, "id_detector/I");
132  HitsTree->Branch("thick_detector", &thick_detector, "thick_detector/F");
133  HitsTree->Branch("pitch_detector", &pitch_detector, "pitch_detector/F");
134  HitsTree->Branch("Amplitudes", Amplitudes, "Amplitudes[ClSize]/I");
135 
136  HitsTree->SetDirectory(Hit_Tree);
137 
138  TrackTree = new TTree("TrackTree", "TrackTree");
139 
140  TrackTree->Branch("TrackCounter", &TrackCounter, "TrackCounter/I");
141 
142  TrackTree->SetDirectory(Track_Tree);
143 
144  EventTree = new TTree("EventTree", "EventTree");
145 
146  EventTree->Branch("EventCounter", &EventCounter, "EventCounter/I");
147 
148  EventTree->SetDirectory(Event_Tree);
149 
150  // use SistripHistoId for producing histogram id (and title)
151  SiStripHistoId hidmanager;
152 
153  // create SiStripFolderOrganizer
154  SiStripFolderOrganizer folder_organizer;
155 
157 
158  //get all detids
159 
160  for (std::vector<uint32_t>::const_iterator Id = activeDets.begin(); Id != activeDets.end(); Id++) {
161  // for(Iditer=Id.begin();Iditer!=Id.end();Iditer++){ //loop on detids
162  DetId Iditero = DetId(*Id);
163  DetId* Iditer = &Iditero;
164  if ((Iditer->subdetId() == int(StripSubdetector::TIB)) ||
165  (Iditer->subdetId() == int(StripSubdetector::TOB))) { //include only barrel
166 
167  int module_bin = 0;
168  if (Iditer->subdetId() == int(StripSubdetector::TIB)) {
169  module_bin = TIB_bin;
170  } else {
171  module_bin = TOB_bin;
172  }
173 
174  // create a TProfile for each module
175  StripSubdetector subid(*Iditer);
176  std::string hid;
177  //Mono single sided detectors
178  LocalPoint p;
179  auto stripdet = tkGeom_->idToDet(subid);
180  if (!stripdet->isLeaf())
181  continue;
182  const StripTopology& topol = (const StripTopology&)stripdet->topology();
183  float thickness = stripdet->specificSurface().bounds().thickness();
184 
185  folder_organizer.setDetectorFolder(Iditer->rawId(), tTopo);
186  hid = hidmanager.createHistoId(TkTag.label(), "det", Iditer->rawId());
187  MonitorElement* profile = dbe_->bookProfile(hid, hid, module_bin, ModuleRangeMin, ModuleRangeMax, 20, 0, 5, "");
188  detparameters* param = new detparameters;
189  histos[Iditer->rawId()] = profile;
190  detmap[Iditer->rawId()] = param;
191  param->thickness = thickness * 10000;
192  param->pitch = topol.localPitch(p) * 10000;
193 
194  const GlobalPoint globalp = (stripdet->surface()).toGlobal(p);
195  GlobalVector globalmagdir = magField.inTesla(globalp);
196  param->magfield = (stripdet->surface()).toLocal(globalmagdir);
197 
198  profile->setAxisTitle("tan(#theta_{t})", 1);
199  profile->setAxisTitle("Cluster size", 2);
200 
201  // create a summary histo if it does not exist already
203  unsigned int layerid;
204  getlayer(subid, tTopo, name, layerid);
205  name += TkTag.label();
206  if (summaryhisto.find(layerid) == (summaryhisto.end())) {
207  folder_organizer.setSiStripFolder();
208  MonitorElement* summaryprofile = nullptr;
209  if (subid.subdetId() == int(StripSubdetector::TIB) || subid.subdetId() == int(StripSubdetector::TID))
210  summaryprofile = dbe_->bookProfile(name, name, SUM_bin, TIBRangeMin, TIBRangeMax, 20, 0, 5, "");
211  else if (subid.subdetId() == int(StripSubdetector::TOB) || subid.subdetId() == int(StripSubdetector::TEC))
212  summaryprofile = dbe_->bookProfile(name, name, SUM_bin, TOBRangeMin, TOBRangeMax, 20, 0, 5, "");
213  if (summaryprofile) {
214  detparameters* summaryparam = new detparameters;
215  summaryhisto[layerid] = summaryprofile;
216  summarydetmap[layerid] = summaryparam;
217  summaryparam->thickness = thickness * 10000;
218  summaryparam->pitch = topol.localPitch(p) * 10000;
219  summaryprofile->setAxisTitle("tan(#theta_{t})", 1);
220  summaryprofile->setAxisTitle("Cluster size", 2);
221  }
222  }
223  }
224  }
225 
226  trackcollsize = 0;
227  trajsize = 0;
228  RunNumber = 0;
229  EventNumber = 0;
230  hitcounter = 0;
231  hitcounter_2ndloop = 0;
232  worse_double_hit = 0;
233  better_double_hit = 0;
234  eventcounter = 0;
235 
236  EventCounter = 1;
237  TrackCounter = 1;
238 }
static constexpr auto TEC
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
T getUntrackedParameter(std::string const &, T const &) const
virtual float localPitch(const LocalPoint &) const =0
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
void getlayer(const DetId &detid, const TrackerTopology *tTopo, std::string &name, unsigned int &layerid)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
const TrackerGeomDet * idToDet(DetId) const override
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
Definition: DetId.h:17
static constexpr auto TIB
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< DetId > DetIdContainer
static constexpr auto TID
const TrackerGeometry * tkGeom_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ endJob()

void SiStripLAProfileBooker::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 737 of file SiStripLAProfileBooker.cc.

References conf_, dbe_, edm::ParameterSet::getUntrackedParameter(), hFile, dqm::implementation::DQMStore::save(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by o2olib.O2ORunMgr::executeJob().

737  {
738  std::string outputFile_ = conf_.getUntrackedParameter<std::string>("fileName", "LorentzAngle.root");
739  dbe_->save(outputFile_);
740 
741  hFile->Write();
742  hFile->Close();
743 }
T getUntrackedParameter(std::string const &, T const &) const
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824

◆ endRun()

void SiStripLAProfileBooker::endRun ( edm::Run const &  ,
const edm::EventSetup c 
)
override

Definition at line 240 of file SiStripLAProfileBooker.cc.

240 {}

◆ getlayer()

void SiStripLAProfileBooker::getlayer ( const DetId detid,
const TrackerTopology tTopo,
std::string &  name,
unsigned int &  layerid 
)

Definition at line 705 of file SiStripLAProfileBooker.cc.

References createfilelist::int, nano_mu_digi_cff::layer, Skims_PA_cff::name, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecRing(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidRing(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

Referenced by analyze(), and beginRun().

708  {
709  int layer = 0;
710  std::stringstream layernum;
711 
712  if (detid.subdetId() == int(StripSubdetector::TIB)) {
713  name += "TIB_Layer_";
714  layer = tTopo->tibLayer(detid);
715  }
716 
717  else if (detid.subdetId() == int(StripSubdetector::TID)) {
718  name += "TID_Ring_";
719  layer = tTopo->tidRing(detid);
720  }
721 
722  else if (detid.subdetId() == int(StripSubdetector::TOB)) {
723  name += "TOB_Layer_";
724  layer = tTopo->tobLayer(detid);
725 
726  }
727 
728  else if (detid.subdetId() == int(StripSubdetector::TEC)) {
729  name += "TEC_Ring_";
730  layer = tTopo->tecRing(detid);
731  }
732  layernum << layer;
733  name += layernum.str();
734  layerid = detid.subdetId() * 10 + layer;
735 }
static constexpr auto TEC
unsigned int tobLayer(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
static constexpr auto TIB
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
static constexpr auto TID

Member Data Documentation

◆ Amplitudes

uint8_t SiStripLAProfileBooker::Amplitudes[100]
private

Definition at line 68 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ barycenter

float SiStripLAProfileBooker::barycenter
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze().

◆ better_double_hit

int SiStripLAProfileBooker::better_double_hit
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ bw_fw

int SiStripLAProfileBooker::bw_fw
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ chi2norm

float SiStripLAProfileBooker::chi2norm
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ ClSize

int SiStripLAProfileBooker::ClSize
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ conf_

edm::ParameterSet SiStripLAProfileBooker::conf_
private

Definition at line 82 of file SiStripLAProfileBooker.h.

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

◆ dbe_

DQMStore* SiStripLAProfileBooker::dbe_
private

Definition at line 78 of file SiStripLAProfileBooker.h.

Referenced by beginRun(), and endJob().

◆ detCablingToken_

edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> SiStripLAProfileBooker::detCablingToken_
private

Definition at line 89 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ detmap

detparmap SiStripLAProfileBooker::detmap
private

Definition at line 80 of file SiStripLAProfileBooker.h.

Referenced by analyze(), beginRun(), and ~SiStripLAProfileBooker().

◆ EtaTrack

float SiStripLAProfileBooker::EtaTrack
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ Event_Tree

TDirectory * SiStripLAProfileBooker::Event_Tree
private

Definition at line 73 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ eventcounter

int SiStripLAProfileBooker::eventcounter
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ EventCounter

int SiStripLAProfileBooker::EventCounter
private

Definition at line 66 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ EventNumber

int SiStripLAProfileBooker::EventNumber
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ EventTree

TTree * SiStripLAProfileBooker::EventTree
private

Definition at line 70 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ Ext_Int

int SiStripLAProfileBooker::Ext_Int
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ hFile

TFile* SiStripLAProfileBooker::hFile
private

Definition at line 71 of file SiStripLAProfileBooker.h.

Referenced by beginRun(), endJob(), and ~SiStripLAProfileBooker().

◆ histos

histomap SiStripLAProfileBooker::histos
private

Definition at line 75 of file SiStripLAProfileBooker.h.

Referenced by analyze(), beginRun(), and DisplayManager.DisplayManager::Draw().

◆ hit_std_dev

float SiStripLAProfileBooker::hit_std_dev
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ Hit_Tree

TDirectory* SiStripLAProfileBooker::Hit_Tree
private

Definition at line 73 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ HitCharge

int SiStripLAProfileBooker::HitCharge
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ hitcounter

int SiStripLAProfileBooker::hitcounter
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ hitcounter_2ndloop

int SiStripLAProfileBooker::hitcounter_2ndloop
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ HitNr

int SiStripLAProfileBooker::HitNr
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ HitPerTrack

int SiStripLAProfileBooker::HitPerTrack
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ HitsTree

TTree* SiStripLAProfileBooker::HitsTree
private

Definition at line 70 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ id_detector

int SiStripLAProfileBooker::id_detector
private

Definition at line 66 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ Layer

int SiStripLAProfileBooker::Layer
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ MagField

float SiStripLAProfileBooker::MagField
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ magFieldToken_

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

Definition at line 88 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ Momentum

float SiStripLAProfileBooker::Momentum
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ MonoStereo

int SiStripLAProfileBooker::MonoStereo
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ nstrip

int SiStripLAProfileBooker::nstrip
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze().

◆ ParticleCharge

int SiStripLAProfileBooker::ParticleCharge
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ PhiTrack

float SiStripLAProfileBooker::PhiTrack
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ pitch_detector

float SiStripLAProfileBooker::pitch_detector
private

Definition at line 67 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ pt

float SiStripLAProfileBooker::pt
private

◆ RunNumber

int SiStripLAProfileBooker::RunNumber
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), beginRun(), and Page1Parser.Page1Parser::ParsePage1().

◆ SignCorrection

float SiStripLAProfileBooker::SignCorrection
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ size

int SiStripLAProfileBooker::size
private

◆ summarydetmap

detparmap SiStripLAProfileBooker::summarydetmap
private

Definition at line 81 of file SiStripLAProfileBooker.h.

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

◆ summaryhisto

histomap SiStripLAProfileBooker::summaryhisto
private

Definition at line 76 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ sumx

float SiStripLAProfileBooker::sumx
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze().

◆ TanTrackAngle

float SiStripLAProfileBooker::TanTrackAngle
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ TanTrackAngleParallel

float SiStripLAProfileBooker::TanTrackAngleParallel
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ thick_detector

float SiStripLAProfileBooker::thick_detector
private

Definition at line 67 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ tkGeom_

const TrackerGeometry* SiStripLAProfileBooker::tkGeom_ = nullptr
private

Definition at line 85 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ tkGeomToken_

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

Definition at line 87 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ Track_Tree

TDirectory * SiStripLAProfileBooker::Track_Tree
private

Definition at line 73 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ trackcollsize

int SiStripLAProfileBooker::trackcollsize
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ TrackCounter

int SiStripLAProfileBooker::TrackCounter
private

Definition at line 66 of file SiStripLAProfileBooker.h.

Referenced by beginRun().

◆ TrackTree

TTree * SiStripLAProfileBooker::TrackTree
private

Definition at line 70 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ trajsize

int SiStripLAProfileBooker::trajsize
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ treename_

std::string SiStripLAProfileBooker::treename_
private

Definition at line 83 of file SiStripLAProfileBooker.h.

◆ tTopoToken_

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

Definition at line 86 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ Type

int SiStripLAProfileBooker::Type
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), beginRun(), and BeamSpotObj.BeamSpot::Reset().

◆ Wheel

int SiStripLAProfileBooker::Wheel
private

Definition at line 60 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ worse_double_hit

int SiStripLAProfileBooker::worse_double_hit
private

Definition at line 64 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ XGlobal

float SiStripLAProfileBooker::XGlobal
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ YGlobal

float SiStripLAProfileBooker::YGlobal
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().

◆ ZGlobal

float SiStripLAProfileBooker::ZGlobal
private

Definition at line 62 of file SiStripLAProfileBooker.h.

Referenced by analyze(), and beginRun().