CMS 3D CMS Logo

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

#include <SiStripMonitorTrack.h>

Inheritance diagram for SiStripMonitorTrack:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  Det2MEs
 
struct  LayerMEs
 
struct  ModMEs
 
struct  RingMEs
 
struct  SubDetMEs
 

Public Types

typedef TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
 
enum  RecHitType { Single = 0, Matched = 1, Projected = 2, Null = 3 }
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override
 
void dqmBeginRun (const edm::Run &run, const edm::EventSetup &) override
 
 SiStripMonitorTrack (const edm::ParameterSet &)
 
 ~SiStripMonitorTrack () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Types

enum  ClusterFlags { OffTrack, OnTrack }
 

Private Member Functions

void AllClusters (const edm::Event &ev)
 
void book (DQMStore::IBooker &, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
 
void bookLayerMEs (DQMStore::IBooker &, const uint32_t, std::string &)
 
MonitorElementbookME1D (DQMStore::IBooker &, const char *, const char *)
 
MonitorElementbookME2D (DQMStore::IBooker &, const char *, const char *)
 
MonitorElementbookME3D (DQMStore::IBooker &, const char *, const char *)
 
MonitorElementbookMEProfile (DQMStore::IBooker &, const char *, const char *)
 
MonitorElementbookMETrend (DQMStore::IBooker &, const char *)
 
void bookModMEs (DQMStore::IBooker &, const uint32_t)
 
void bookRing (DQMStore::IBooker &, const uint32_t, std::string &)
 
void bookRingMEs (DQMStore::IBooker &, const uint32_t, std::string &)
 
void bookSubDetMEs (DQMStore::IBooker &, std::string &name)
 
bool clusterInfos (SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs &MEs, const TrackerTopology *tTopo, const SiStripGain *stripGain, const SiStripQuality *stripQuality, const edm::DetSetVector< SiStripDigi > &digilist, float clustZ, float clustPhi)
 
bool fillControlViewHistos (const edm::Event &ev)
 
void fillME (MonitorElement *ME, float value1)
 
void fillME (MonitorElement *ME, float value1, float value2)
 
void fillME (MonitorElement *ME, float value1, float value2, float value3)
 
void fillME (MonitorElement *ME, float value1, float value2, float value3, float value4)
 
Det2MEs findMEs (const TrackerTopology *tTopo, const uint32_t detid)
 
MonitorElementhandleBookMEs (DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)
 
void hitStudy (const edm::Event &ev, const edm::DetSetVector< SiStripDigi > &digilist, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum, const bool track_ok)
 
template<class T >
void RecHitInfo (const T *tkrecHit, LocalVector LV, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
 
void return2DME (MonitorElement *input1, MonitorElement *input2, int binx, int biny, double value)
 
bool trackFilter (const reco::Track &track)
 
void trackStudy (const edm::Event &ev)
 
void trackStudyFromTrack (edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
 
void trackStudyFromTrajectory (edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
 
void trajectoryStudy (const reco::Track &track, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
 

Private Attributes

bool applyClusterQuality_
 
bool clchCMoriginTkHmap_On_
 
edm::InputTag Cluster_src_
 
MonitorElementClusterCount_OnTrack_FECCratevsFECSlot = nullptr
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TECM = nullptr
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TECP = nullptr
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TIBTID = nullptr
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TOB = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_FECCratevsFECSlot = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_TECM = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_TECP = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_TIBTID = nullptr
 
MonitorElementClusterStoNCorr_OnTrack_TOB = nullptr
 
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
 
edm::ParameterSet conf_
 
SiStripDCSStatusdcsStatus_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
 
edm::EventNumber_t eventNb
 
int firstEvent
 
SiStripFolderOrganizer folderOrganizer_
 
GenericTriggerEventFlaggenTriggerEventFlag_
 
std::string histname
 
bool HistoFlag_On_
 
float iLumisection
 
float iOrbitSec
 
std::map< std::string, LayerMEsLayerMEsMap
 
LocalVector LV
 
bool Mod_On_
 
std::map< std::string, ModMEsModMEsMap
 
int numTracks
 
bool OffHisto_On_
 
edm::ParameterSet Parameters
 
bool ring_flag
 
std::map< std::string, RingMEsRingMEsMap
 
SiStripClusterInfo siStripClusterInfo_
 
const SiStripDetCablingsiStripDetCabling_ = nullptr
 
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcdsiStripDetCablingToken_
 
double sToNLowerLimit_
 
double sToNUpperLimit_
 
std::map< std::string, SubDetMEsSubDetMEsMap
 
edm::ESGetToken< TkDetMap, TrackerTopologyRcdtkDetMapToken_
 
const TrackerGeometrytkgeom_ = nullptr
 
std::unique_ptr< TkHistoMaptkhisto_ClChPerCMfromOrigin
 
std::unique_ptr< TkHistoMaptkhisto_ClChPerCMfromTrack
 
std::unique_ptr< TkHistoMaptkhisto_ClusterWidthOffTrack
 
std::unique_ptr< TkHistoMaptkhisto_ClusterWidthOnTrack
 
std::unique_ptr< TkHistoMaptkhisto_NoiseOffTrack
 
std::unique_ptr< TkHistoMaptkhisto_NoiseOnTrack
 
std::unique_ptr< TkHistoMaptkhisto_NumberInactiveHits
 
std::unique_ptr< TkHistoMaptkhisto_NumberValidHits
 
std::unique_ptr< TkHistoMaptkhisto_NumMissingHits
 
std::unique_ptr< TkHistoMaptkhisto_NumOffTrack
 
std::unique_ptr< TkHistoMaptkhisto_NumOnTrack
 
std::unique_ptr< TkHistoMaptkhisto_StoNCorrOnTrack
 
bool TkHistoMap_On_
 
std::string topFolderName_
 
bool trackAssociatorCollection_in_EventTree
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerGeometryToken_
 
const TrackerTopologytrackerTopology_ = nullptr
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtrackerTopologyEventToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtrackerTopologyRunToken_
 
std::string TrackLabel_
 
std::string TrackProducer_
 
bool tracksCollection_in_EventTree
 
edm::EDGetTokenT< reco::TrackCollectiontrackToken_
 
bool Trend_On_
 
std::unordered_set< const SiStripCluster * > vPSiStripCluster
 
double widthLowerLimit_
 
double widthUpperLimit_
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 64 of file SiStripMonitorTrack.h.

Member Typedef Documentation

◆ ConstRecHitPointer

Definition at line 66 of file SiStripMonitorTrack.h.

Member Enumeration Documentation

◆ ClusterFlags

Enumerator
OffTrack 
OnTrack 

Definition at line 75 of file SiStripMonitorTrack.h.

◆ RecHitType

Constructor & Destructor Documentation

◆ SiStripMonitorTrack()

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

Definition at line 24 of file SiStripMonitorTrack.cc.

References applyClusterQuality_, clchCMoriginTkHmap_On_, Cluster_src_, clusterToken_, conf_, dcsStatus_, digiToken_, edm::ParameterSet::getParameter(), ProducerED_cfi::InputTag, Mod_On_, sToNLowerLimit_, sToNUpperLimit_, AlCaHLTBitMon_QueryRunRegistry::string, TkHistoMap_On_, topFolderName_, TrackLabel_, TrackProducer_, trackToken_, Trend_On_, widthLowerLimit_, and widthUpperLimit_.

25  : conf_(conf),
26  siStripClusterInfo_(consumesCollector()),
27  trackerGeometryToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
28  siStripDetCablingToken_(esConsumes<SiStripDetCabling, SiStripDetCablingRcd, edm::Transition::BeginRun>()),
29  trackerTopologyRunToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
30  tkDetMapToken_(esConsumes<TkDetMap, TrackerTopologyRcd, edm::Transition::BeginRun>()),
31  trackerTopologyEventToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()),
33  firstEvent(-1),
35  conf.getParameter<edm::ParameterSet>("genericTriggerEventPSet"), consumesCollector(), *this)) {
36  Cluster_src_ = conf.getParameter<edm::InputTag>("Cluster_src");
37  Mod_On_ = conf.getParameter<bool>("Mod_On");
38  Trend_On_ = conf.getParameter<bool>("Trend_On");
39  TkHistoMap_On_ = conf.getParameter<bool>("TkHistoMap_On");
40  clchCMoriginTkHmap_On_ = conf.getParameter<bool>("clchCMoriginTkHmap_On");
41 
42  TrackProducer_ = conf_.getParameter<std::string>("TrackProducer");
43  TrackLabel_ = conf_.getParameter<std::string>("TrackLabel");
44 
45  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
46 
47  digiToken_ = consumes<edm::DetSetVector<SiStripDigi>>(conf.getParameter<edm::InputTag>("ADCDigi_src"));
48  clusterToken_ = consumes<edmNew::DetSetVector<SiStripCluster>>(Cluster_src_);
49  trackToken_ = consumes<reco::TrackCollection>(edm::InputTag(TrackProducer_, TrackLabel_));
50 
51  // cluster quality conditions
52  edm::ParameterSet cluster_condition = conf_.getParameter<edm::ParameterSet>("ClusterConditions");
53  applyClusterQuality_ = cluster_condition.getParameter<bool>("On");
54  sToNLowerLimit_ = cluster_condition.getParameter<double>("minStoN");
55  sToNUpperLimit_ = cluster_condition.getParameter<double>("maxStoN");
56  widthLowerLimit_ = cluster_condition.getParameter<double>("minWidth");
57  widthUpperLimit_ = cluster_condition.getParameter<double>("maxWidth");
58 
59  // Create DCS Status
60  bool checkDCS = conf_.getParameter<bool>("UseDCSFiltering");
61  if (checkDCS)
62  dcsStatus_ = new SiStripDCSStatus(consumesCollector());
63  else
64  dcsStatus_ = nullptr;
65 }
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyRunToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyEventToken_
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > siStripDetCablingToken_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
SiStripDCSStatus * dcsStatus_
edm::ParameterSet conf_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
SiStripClusterInfo siStripClusterInfo_
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
GenericTriggerEventFlag * genTriggerEventFlag_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_

◆ ~SiStripMonitorTrack()

SiStripMonitorTrack::~SiStripMonitorTrack ( )
override

Definition at line 68 of file SiStripMonitorTrack.cc.

References dcsStatus_, and genTriggerEventFlag_.

68  {
69  if (dcsStatus_)
70  delete dcsStatus_;
72  delete genTriggerEventFlag_;
73 }
SiStripDCSStatus * dcsStatus_
GenericTriggerEventFlag * genTriggerEventFlag_

Member Function Documentation

◆ AllClusters()

void SiStripMonitorTrack::AllClusters ( const edm::Event ev)
private

Definition at line 1272 of file SiStripMonitorTrack.cc.

References clusterInfos(), clusterToken_, digiToken_, makeMEIFBenchmarkPlots::ev, findMEs(), edm::HandleBase::isValid(), LogDebug, EcalMEFormatter_cfi::MEs, OffTrack, edm::Handle< T >::product(), SiStripClusterInfo::setCluster(), siStripClusterInfo_, SiStripClusterInfo::siStripGain(), SiStripClusterInfo::siStripQuality(), trackerTopology_, and vPSiStripCluster.

Referenced by analyze().

1272  {
1273  const TrackerTopology* tTopo = trackerTopology_;
1274 
1276  ev.getByToken(digiToken_, digihandle);
1277 
1279  auto& digilist = digihandle.isValid() ? *(digihandle.product()) : dummy;
1280 
1282  ev.getByToken(clusterToken_, siStripClusterHandle);
1283 
1284  /*edm::ESHandle<StripClusterParameterEstimator> parameterestimator;
1285  es.get<TkStripCPERecord>().get("StripCPEfromTrackAngle", parameterestimator);
1286  const StripClusterParameterEstimator &stripcpe(*parameterestimator);*/
1287 
1288  if (siStripClusterHandle.isValid()) {
1289  //Loop on Dets
1290  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = siStripClusterHandle->begin(),
1291  DSVEnd = siStripClusterHandle->end();
1292  DSViter != DSVEnd;
1293  ++DSViter) {
1294  uint32_t detid = DSViter->id();
1295  const Det2MEs MEs = findMEs(tTopo, detid);
1296 
1297  LogDebug("SiStripMonitorTrack") << "on detid " << detid << " N Cluster= " << DSViter->size();
1298 
1299  //Loop on Clusters
1300  for (edmNew::DetSet<SiStripCluster>::const_iterator ClusIter = DSViter->begin(), ClusEnd = DSViter->end();
1301  ClusIter != ClusEnd;
1302  ++ClusIter) {
1303  if (vPSiStripCluster.find(&*ClusIter) == vPSiStripCluster.end()) {
1305 
1306  /*const StripGeomDetUnit * stripdet = (const StripGeomDetUnit*) tkgeom->idToDetUnit(detid);
1307  StripClusterParameterEstimator::LocalValues parameters=stripcpe.localParameters(*ClusIter, *stripdet);
1308  LocalPoint lp = parameters.first;
1309  const Surface& surface = tracker->idToDet(detid)->surface();
1310  GlobalPoint gp = surface.toGlobal(lp);*/
1311 
1313  detid,
1314  OffTrack,
1315  /*track_ok*/ false,
1316  LV,
1317  MEs,
1318  tTopo,
1321  digilist,
1322  0,
1323  0);
1324  }
1325  }
1326  }
1327  } else {
1328  edm::LogError("SiStripMonitorTrack") << "ClusterCollection is not valid!!" << std::endl;
1329  return;
1330  }
1331 }
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
void setCluster(const SiStripCluster &cluster, int detId)
math::XYZTLorentzVectorD LV
T const * product() const
Definition: Handle.h:70
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs &MEs, const TrackerTopology *tTopo, const SiStripGain *stripGain, const SiStripQuality *stripQuality, const edm::DetSetVector< SiStripDigi > &digilist, float clustZ, float clustPhi)
const SiStripGain * siStripGain() const
data_type const * const_iterator
Definition: DetSetNew.h:31
Log< level::Error, false > LogError
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
std::unordered_set< const SiStripCluster * > vPSiStripCluster
const SiStripQuality * siStripQuality() const
SiStripClusterInfo siStripClusterInfo_
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool isValid() const
Definition: HandleBase.h:70
const TrackerTopology * trackerTopology_
#define LogDebug(id)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_

◆ analyze()

void SiStripMonitorTrack::analyze ( const edm::Event e,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 98 of file SiStripMonitorTrack.cc.

References GenericTriggerEventFlag::accept(), AllClusters(), dcsStatus_, MillePedeFileConverter_cfg::e, eventNb, fillControlViewHistos(), fillME(), genTriggerEventFlag_, edm::EventSetup::getData(), SiStripDCSStatus::getStatus(), iLumisection, SiStripClusterInfo::initEvent(), LogDebug, SiStripMonitorTrack::SubDetMEs::nClustersOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrackMono, SiStripMonitorTrack::SubDetMEs::nClustersOnTrackStereo, SiStripMonitorTrack::SubDetMEs::nClustersTrendOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOnTrack, GenericTriggerEventFlag::on(), siStripClusterInfo_, SubDetMEsMap, topFolderName_, SiStripMonitorTrack::SubDetMEs::totNClustersOffTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrackMono, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrackStereo, trackerTopology_, trackerTopologyEventToken_, trackStudy(), Trend_On_, and vPSiStripCluster.

98  {
100 
101  // Filter out events if DCS checking is requested
102  if (dcsStatus_ && !dcsStatus_->getStatus(e, iSetup))
103  return;
104 
105  // Filter out events if Trigger Filtering is requested
106  if (genTriggerEventFlag_->on() && !genTriggerEventFlag_->accept(e, iSetup))
107  return;
108 
109  //initialization of global quantities
110  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::analyse] "
111  << "Run " << e.id().run() << " Event " << e.id().event() << std::endl;
112  eventNb = e.id().event();
113  vPSiStripCluster.clear();
114 
115  iLumisection = e.orbitNumber() / 262144.0;
116 
117  // initialise # of clusters
118  for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin(); iSubDet != SubDetMEsMap.end();
119  iSubDet++) {
120  iSubDet->second.totNClustersOnTrack = 0;
121  iSubDet->second.totNClustersOffTrack = 0;
122  iSubDet->second.totNClustersOnTrackMono = 0;
123  iSubDet->second.totNClustersOnTrackStereo = 0;
124  }
125 
127 
128  //Perform track study
129  trackStudy(e);
130 
131  //Perform Cluster Study (irrespectively to tracks)
132 
133  AllClusters(e); //analyzes the off Track Clusters
134 
135  //Summary Counts of clusters
136  std::map<std::string, MonitorElement*>::iterator iME;
137  std::map<std::string, LayerMEs>::iterator iLayerME;
138 
139  if (!(topFolderName_.find("IsolatedBunches") != std::string::npos)) {
141  }
142 
143  if (Trend_On_) {
144  // for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin(), iterEnd=SubDetMEsMaps.end();
145  // iSubDet != iterEnd; ++iSubDet) {
146  for (auto const& iSubDet : SubDetMEsMap) {
147  SubDetMEs subdet_mes = iSubDet.second;
148  if (subdet_mes.totNClustersOnTrack > 0) {
149  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
150  }
151  if (subdet_mes.totNClustersOnTrackMono > 0) {
152  fillME(subdet_mes.nClustersOnTrackMono, subdet_mes.totNClustersOnTrackMono);
153  }
154  if (subdet_mes.totNClustersOnTrackStereo > 0) {
155  fillME(subdet_mes.nClustersOnTrackStereo, subdet_mes.totNClustersOnTrackStereo);
156  }
157  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
158  fillME(subdet_mes.nClustersTrendOnTrack, iLumisection, subdet_mes.totNClustersOnTrack);
159  fillME(subdet_mes.nClustersTrendOffTrack, iLumisection, subdet_mes.totNClustersOffTrack);
160  }
161  } else {
162  for (auto const& iSubDet : SubDetMEsMap) {
163  SubDetMEs subdet_mes = iSubDet.second;
164  if (subdet_mes.totNClustersOnTrack > 0) {
165  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
166  }
167  if (subdet_mes.totNClustersOnTrackMono > 0) {
168  fillME(subdet_mes.nClustersOnTrackMono, subdet_mes.totNClustersOnTrackMono);
169  }
170  if (subdet_mes.totNClustersOnTrackStereo > 0) {
171  fillME(subdet_mes.nClustersOnTrackStereo, subdet_mes.totNClustersOnTrackStereo);
172  }
173 
174  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
175  }
176  }
177 }
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyEventToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void fillME(MonitorElement *ME, float value1)
SiStripDCSStatus * dcsStatus_
bool getStatus(edm::Event const &e, edm::EventSetup const &eSetup)
edm::EventNumber_t eventNb
std::unordered_set< const SiStripCluster * > vPSiStripCluster
std::map< std::string, SubDetMEs > SubDetMEsMap
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
SiStripClusterInfo siStripClusterInfo_
void AllClusters(const edm::Event &ev)
bool fillControlViewHistos(const edm::Event &ev)
GenericTriggerEventFlag * genTriggerEventFlag_
void initEvent(const edm::EventSetup &iSetup)
void trackStudy(const edm::Event &ev)
const TrackerTopology * trackerTopology_
#define LogDebug(id)

◆ book()

void SiStripMonitorTrack::book ( DQMStore::IBooker ibooker,
const TrackerTopology tTopo,
const TkDetMap tkDetMap 
)
private

Definition at line 180 of file SiStripMonitorTrack.cc.

References SiStripDetCabling::addActiveDetectorsRawIds(), dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), bookLayerMEs(), bookModMEs(), bookRingMEs(), bookSubDetMEs(), clchCMoriginTkHmap_On_, ClusterCount_OnTrack_FECCratevsFECSlot, ClusterCount_OnTrack_FECSlotVsFECRing_TECM, ClusterCount_OnTrack_FECSlotVsFECRing_TECP, ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID, ClusterCount_OnTrack_FECSlotVsFECRing_TOB, ClusterStoNCorr_OnTrack_FECCratevsFECSlot, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB, ClusterStoNCorr_OnTrack_TECM, ClusterStoNCorr_OnTrack_TECP, ClusterStoNCorr_OnTrack_TIBTID, ClusterStoNCorr_OnTrack_TOB, SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), LayerMEsMap, Mod_On_, alignCSCRings::ring_id, RingMEsMap, TrackerTopology::second(), dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), SiStripFolderOrganizer::setDetectorFolder(), SiStripFolderOrganizer::setLayerFolder(), SiStripFolderOrganizer::setSiStripFolderName(), siStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, tkhisto_ClChPerCMfromOrigin, tkhisto_ClChPerCMfromTrack, tkhisto_ClusterWidthOffTrack, tkhisto_ClusterWidthOnTrack, tkhisto_NoiseOffTrack, tkhisto_NoiseOnTrack, tkhisto_NumberInactiveHits, tkhisto_NumberValidHits, tkhisto_NumMissingHits, tkhisto_NumOffTrack, tkhisto_NumOnTrack, tkhisto_StoNCorrOnTrack, TkHistoMap_On_, and topFolderName_.

Referenced by bookHistograms().

180  {
181  SiStripFolderOrganizer folder_organizer;
182  folder_organizer.setSiStripFolderName(topFolderName_);
183  //******** TkHistoMaps
184  if (TkHistoMap_On_) {
186  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_StoNCorrOnTrack", 0.0, true);
188  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberOfOnTrackCluster", 0.0, true);
190  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberOfOfffTrackCluster", 0.0, true);
192  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ChargePerCMfromTrack", 0.0, true);
194  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberMissingHits", 0.0, true, true);
196  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberInactiveHits", 0.0, true, true);
198  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberValidHits", 0.0, true, true);
199  tkhisto_NoiseOnTrack = std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NoiseOnTrack", 0.0, true);
200  tkhisto_NoiseOffTrack = std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NoiseOffTrack", 0.0, true);
202  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ClusterWidthOnTrack", 0.0, true);
204  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ClusterWidthOffTrack", 0.0, true);
205  }
208  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ChargePerCMfromOrigin", 0.0, true);
209  //******** TkHistoMaps
210 
211  std::vector<uint32_t> vdetId_;
213  const char* tec = "TEC";
214  const char* tid = "TID";
215  //Histos for each detector, layer and module
216  SiStripHistoId hidmanager;
217 
218  if (Mod_On_) {
219  for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
220  detid_iter != detid_end;
221  ++detid_iter) { //loop on all the active detid
222  uint32_t detid = *detid_iter;
223 
224  if (detid < 1) {
225  edm::LogError("SiStripMonitorTrack") << "[" << __PRETTY_FUNCTION__ << "] invalid detid " << detid << std::endl;
226  continue;
227  }
228 
229  //std::string name;
230 
231  // book Layer and RING plots
232  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, false);
233  /*
234  std::string thickness;
235  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
236  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
237  */
238 
239  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
240 
241  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
242  if (iLayerME == LayerMEsMap.end()) {
243  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
244  bookLayerMEs(ibooker, detid, layer_id);
245  }
246 
247  const char* subdet = det_layer_pair.first.c_str();
248  if (std::strstr(subdet, tec) != nullptr || std::strstr(subdet, tid) != nullptr) {
249  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
250  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
251  if (iRingME == RingMEsMap.end()) {
252  std::pair<std::string, int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
253  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
254  bookRingMEs(ibooker, detid, ring_id);
255  }
256  }
257 
258  // book sub-detector plots
259  std::pair<std::string, std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
260  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()) {
261  ibooker.setCurrentFolder(sdet_pair.first);
262  bookSubDetMEs(ibooker, sdet_pair.second);
263  }
264  // book module plots
265  folder_organizer.setDetectorFolder(detid, tTopo);
266  bookModMEs(ibooker, *detid_iter);
267  } //end loop on detectors detid
268  } else {
269  for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
270  detid_iter != detid_end;
271  ++detid_iter) { //loop on all the active detid
272  uint32_t detid = *detid_iter;
273 
274  if (detid < 1) {
275  edm::LogError("SiStripMonitorTrack") << "[" << __PRETTY_FUNCTION__ << "] invalid detid " << detid << std::endl;
276  continue;
277  }
278 
279  //std::string name;
280 
281  // book Layer and RING plots
282  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, false);
283  /*
284  std::string thickness;
285  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
286  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
287  */
288 
289  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
290 
291  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
292  if (iLayerME == LayerMEsMap.end()) {
293  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
294  bookLayerMEs(ibooker, detid, layer_id);
295  }
296 
297  const char* subdet = det_layer_pair.first.c_str();
298  if (std::strstr(subdet, tec) != nullptr || std::strstr(subdet, tid) != nullptr) {
299  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
300  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
301  if (iRingME == RingMEsMap.end()) {
302  std::pair<std::string, int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
303  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
304  bookRingMEs(ibooker, detid, ring_id);
305  }
306  }
307 
308  // book sub-detector plots
309  std::pair<std::string, std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
310  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()) {
311  ibooker.setCurrentFolder(sdet_pair.first);
312  bookSubDetMEs(ibooker, sdet_pair.second);
313  }
314  } //end loop on detectors detid
315  }
316 
317  //book control view plots
318  if (!(topFolderName_.find("IsolatedBunches") != std::string::npos)) {
319  ibooker.setCurrentFolder(topFolderName_ + "/ControlView/");
320 
322  ibooker.book1D("ClusterStoNCorr_OnTrack_TIBTID", "TIB/TID [FECCrate=1] (OnTrack)", 100, 0., 100.);
324 
326  ibooker.book1D("ClusterStoNCorr_OnTrack_TOB", "TOB [FECCrate=4] (OnTrack)", 100, 0., 100.);
328 
330  ibooker.book1D("ClusterStoNCorr_OnTrack_TECM", "TECM [FECCrate=3] (OnTrack)", 100, 0., 100.);
332 
334  ibooker.book1D("ClusterStoNCorr_OnTrack_TECP", "TECP [FECCrate=2] (OnTrack)", 100, 0., 100.);
336 
338  ibooker.book2D("ClusterStoNCorr_OnTrack_FECCratevsFECSlot", " S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
340  ClusterStoNCorr_OnTrack_FECCratevsFECSlot->setAxisTitle("FEC Crate (TTC partition)", 2);
345 
346  ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = ibooker.book2D("ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID",
347  "TIB/TID [FECCrate=1] (OnTrack)",
348  10,
349  -0.5,
350  9.5,
351  22,
352  0.5,
353  22.5);
356 
358  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB", "TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
361 
363  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM", "TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
366 
368  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP", "TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
371 
372  //----------------------------------------
373  // for conting the number of clusters, for the mean S/N calculation
374  //book control view plots
375 
377  ibooker.book2D("ClusterCount_OnTrack_FECCratevsFECSlot", " S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
379  ClusterCount_OnTrack_FECCratevsFECSlot->setAxisTitle("FEC Crate (TTC partition)", 2);
384 
386  "ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID", "TIB/TID [FECCrate=1] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
389 
391  "ClusterCount_OnTrack_FECSlotVsFECRing_TOB", "TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
394 
396  "ClusterCount_OnTrack_FECSlotVsFECRing_TECM", "TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
399 
401  "ClusterCount_OnTrack_FECSlotVsFECRing_TECP", "TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
404  }
405 }
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
std::unique_ptr< TkHistoMap > tkhisto_NoiseOffTrack
MonitorElement * ClusterStoNCorr_OnTrack_TECP
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromOrigin
void setSiStripFolderName(std::string name)
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::map< std::string, RingMEs > RingMEsMap
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
Log< level::Error, false > LogError
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_TOB
std::map< std::string, SubDetMEs > SubDetMEsMap
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromTrack
void bookSubDetMEs(DQMStore::IBooker &, std::string &name)
std::unique_ptr< TkHistoMap > tkhisto_NumOffTrack
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
void bookModMEs(DQMStore::IBooker &, const uint32_t)
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOffTrack
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
std::unique_ptr< TkHistoMap > tkhisto_StoNCorrOnTrack
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterStoNCorr_OnTrack_TIBTID
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
const SiStripDetCabling * siStripDetCabling_
std::unique_ptr< TkHistoMap > tkhisto_NoiseOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
std::unique_ptr< TkHistoMap > tkhisto_NumOnTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
MonitorElement * ClusterStoNCorr_OnTrack_TECM
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::map< std::string, LayerMEs > LayerMEsMap

◆ bookHistograms()

void SiStripMonitorTrack::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
const edm::EventSetup iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 88 of file SiStripMonitorTrack.cc.

References book(), edm::EventSetup::getData(), tkDetMapToken_, and trackerTopologyRunToken_.

90  {
91  const TrackerTopology* trackerTopology = &iSetup.getData(trackerTopologyRunToken_);
92  const TkDetMap* tkDetMap = &iSetup.getData(tkDetMapToken_);
93 
94  book(ibooker, trackerTopology, tkDetMap);
95 }
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyRunToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
void book(DQMStore::IBooker &, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)

◆ bookLayerMEs()

void SiStripMonitorTrack::bookLayerMEs ( DQMStore::IBooker ibooker,
const uint32_t  mod_id,
std::string &  layer_id 
)
private

Definition at line 479 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), SiStripMonitorTrack::LayerMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargePerCMfromOriginOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargePerCMfromOriginOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeRawOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeRawOnTrack, SiStripMonitorTrack::LayerMEs::ClusterGain, SiStripMonitorTrack::LayerMEs::ClusterNoiseOffTrack, SiStripMonitorTrack::LayerMEs::ClusterNoiseOnTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOffTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOnTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOnTrack2D, SiStripMonitorTrack::LayerMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOffTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOnTrack, conf_, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), SiStripHistoId::createHistoLayer(), edm::ParameterSet::getParameter(), handleBookMEs(), mps_fire::i, LayerMEsMap, Skims_PA_cff::name, SiStripDetCabling::nApvPairs(), siStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by book().

479  {
480  std::string name = "layer";
481  std::string view = "layerView";
482  std::string hname;
483  std::string hpar;
484  SiStripHistoId hidmanager;
485 
486  LayerMEs theLayerMEs;
487 
488  // Signal/Noise (w/ cluster harge corrected)
489  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr", name, layer_id, "OnTrack");
490  hpar = "TH1ClusterStoNCorr";
491  theLayerMEs.ClusterStoNCorrOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
492 
493  // Cluster Gain
494  hname = hidmanager.createHistoLayer("Summary_ClusterGain", name, layer_id, "");
495  hpar = "TH1ClusterGain";
496  theLayerMEs.ClusterGain = handleBookMEs(ibooker, view, layer_id, hpar, hname);
497 
498  // Cluster Charge Corrected
499  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr", name, layer_id, "OnTrack");
500  hpar = "TH1ClusterChargeCorr";
501  theLayerMEs.ClusterChargeCorrOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
502 
503  // Cluster Charge (On and Off Track)
504  hname = hidmanager.createHistoLayer("Summary_ClusterCharge", name, layer_id, "OnTrack");
505  hpar = "TH1ClusterCharge";
506  theLayerMEs.ClusterChargeOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
507 
508  hname = hidmanager.createHistoLayer("Summary_ClusterCharge", name, layer_id, "OffTrack");
509  hpar = "TH1ClusterCharge";
510  theLayerMEs.ClusterChargeOffTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
511 
512  // Cluster Charge Raw (On and Off Track)
513  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw", name, layer_id, "OnTrack");
514  hpar = "TH1ClusterChargeRaw";
515  theLayerMEs.ClusterChargeRawOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
516 
517  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw", name, layer_id, "OffTrack");
518  hpar = "TH1ClusterChargeRaw";
519  theLayerMEs.ClusterChargeRawOffTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
520 
521  // Cluster Noise (On and Off Track)
522  hname = hidmanager.createHistoLayer("Summary_ClusterNoise", name, layer_id, "OnTrack");
523  hpar = "TH1ClusterNoise";
524  theLayerMEs.ClusterNoiseOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
525 
526  hname = hidmanager.createHistoLayer("Summary_ClusterNoise", name, layer_id, "OffTrack");
527  hpar = "TH1ClusterNoise";
528  theLayerMEs.ClusterNoiseOffTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
529 
530  // Cluster Width (On and Off Track)
531  hname = hidmanager.createHistoLayer("Summary_ClusterWidth", name, layer_id, "OnTrack");
532  hpar = "TH1ClusterWidth";
533  theLayerMEs.ClusterWidthOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
534 
535  hname = hidmanager.createHistoLayer("Summary_ClusterWidth", name, layer_id, "OffTrack");
536  hpar = "TH1ClusterWidth";
537  theLayerMEs.ClusterWidthOffTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
538 
539  //Cluster Position
540  short total_nr_strips = siStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
541  if (layer_id.find("TEC") != std::string::npos)
542  total_nr_strips = 3 * 2 * 128;
543 
544  hname = hidmanager.createHistoLayer("Summary_ClusterPosition", name, layer_id, "OnTrack");
545  hpar = "TH1ClusterPos";
546  if (layer_id.find("TIB") != std::string::npos || layer_id.find("TOB") != std::string::npos ||
547  (conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()))
548  theLayerMEs.ClusterPosOnTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5, total_nr_strips + 0.5);
549 
550  //----------------------
551  //add 2D z-phi map per layer
552  hname = hidmanager.createHistoLayer("Summary_ClusterPosition2D", name, layer_id, "OnTrack");
553  hpar = "TH2ClusterPosTOB";
554  if (layer_id.find("TOB") != std::string::npos)
555  theLayerMEs.ClusterPosOnTrack2D = ibooker.book2D(hname, hname, 12, -110, 110, 300, -3.2, 3.2);
556 
557  hname = hidmanager.createHistoLayer("Summary_ClusterPosition2D", name, layer_id, "OnTrack");
558  hpar = "TH2ClusterPosTIB";
559  if (layer_id.find("TIB") != std::string::npos)
560  theLayerMEs.ClusterPosOnTrack2D = ibooker.book2D(hname, hname, 12, -65, 65, 450, -3.2, 3.2);
561 
562  hname = hidmanager.createHistoLayer("Summary_ClusterPosition2D", name, layer_id, "OnTrack");
563  hpar = "TH2ClusterPosTEC";
564  if (layer_id.find("TEC") != std::string::npos) {
565  static constexpr int nbinR = 8;
566  static constexpr float rval[9] = {0, 21.2, 30.8, 40.4, 50.0, 60.0, 75.0, 90.0, 110.0};
567  static constexpr int nmodulesPhi = 40 * 6; //max number of APV for a ring
568  float phival[nmodulesPhi];
569  for (int i = 0; i < nmodulesPhi; i++)
570  phival[i] = -3.2 + 2 * i * 3.2 / nmodulesPhi;
571 
572  TH2F* temp = new TH2F("tmp", "tmp", nbinR, rval, nmodulesPhi - 1, phival);
573  theLayerMEs.ClusterPosOnTrack2D = ibooker.book2D(hname, temp);
574  }
575 
576  hname = hidmanager.createHistoLayer("Summary_ClusterPosition2D", name, layer_id, "OnTrack");
577  hpar = "TH2ClusterPosTID";
578  if (layer_id.find("TID") != std::string::npos) {
579  static constexpr int nbinR = 4;
580  static constexpr float rval[5] = {0, 21.2, 30.8, 40.4, 50.0};
581  static constexpr int nmodulesPhi = 80 * 4; //max number of APV for a ring
582  float phival[nmodulesPhi];
583  for (int i = 0; i < nmodulesPhi; i++)
584  phival[i] = -3.2 + i * 2 * 3.2 / nmodulesPhi;
585 
586  TH2F* temp = new TH2F("tmp", "tmp", nbinR, rval, nmodulesPhi - 1, phival);
587  theLayerMEs.ClusterPosOnTrack2D = ibooker.book2D(hname, temp);
588  }
589 
590  hname = hidmanager.createHistoLayer("Summary_ClusterPosition", name, layer_id, "OffTrack");
591  hpar = "TH1ClusterPos";
592  if (layer_id.find("TIB") != std::string::npos || layer_id.find("TOB") != std::string::npos ||
593  (conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()))
594  theLayerMEs.ClusterPosOffTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5, total_nr_strips + 0.5);
595 
596  // dQ/dx
597  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromTrack", name, layer_id, "");
598  hpar = "TH1ClusterChargePerCM";
599  theLayerMEs.ClusterChargePerCMfromTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
600 
601  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin", name, layer_id, "OnTrack");
602  hpar = "TH1ClusterChargePerCM";
603  theLayerMEs.ClusterChargePerCMfromOriginOnTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
604 
605  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin", name, layer_id, "OffTrack");
606  hpar = "TH1ClusterChargePerCM";
607  theLayerMEs.ClusterChargePerCMfromOriginOffTrack = handleBookMEs(ibooker, view, layer_id, hpar, hname);
608 
609  //bookeeping
610  LayerMEsMap[layer_id] = theLayerMEs;
611 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
const SiStripDetCabling * siStripDetCabling_
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const uint16_t nApvPairs(uint32_t det_id) const
MonitorElement * handleBookMEs(DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)
std::map< std::string, LayerMEs > LayerMEsMap

◆ bookME1D()

SiStripMonitorTrack::MonitorElement * SiStripMonitorTrack::bookME1D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 828 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::book1D(), conf_, edm::ParameterSet::getParameter(), and Parameters.

Referenced by bookModMEs(), bookSubDetMEs(), and handleBookMEs().

830  {
831  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
832  return ibooker.book1D(HistoName,
833  HistoName,
834  Parameters.getParameter<int32_t>("Nbinx"),
835  Parameters.getParameter<double>("xmin"),
836  Parameters.getParameter<double>("xmax"));
837 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
std::string HistoName
edm::ParameterSet Parameters
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ bookME2D()

SiStripMonitorTrack::MonitorElement * SiStripMonitorTrack::bookME2D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 840 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::book2D(), conf_, edm::ParameterSet::getParameter(), and Parameters.

842  {
843  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
844  return ibooker.book2D(HistoName,
845  HistoName,
846  Parameters.getParameter<int32_t>("Nbinx"),
847  Parameters.getParameter<double>("xmin"),
848  Parameters.getParameter<double>("xmax"),
849  Parameters.getParameter<int32_t>("Nbiny"),
850  Parameters.getParameter<double>("ymin"),
851  Parameters.getParameter<double>("ymax"));
852 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
std::string HistoName
edm::ParameterSet Parameters

◆ bookME3D()

SiStripMonitorTrack::MonitorElement * SiStripMonitorTrack::bookME3D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 855 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::book3D(), conf_, edm::ParameterSet::getParameter(), and Parameters.

857  {
858  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
859  return ibooker.book3D(HistoName,
860  HistoName,
861  Parameters.getParameter<int32_t>("Nbinx"),
862  Parameters.getParameter<double>("xmin"),
863  Parameters.getParameter<double>("xmax"),
864  Parameters.getParameter<int32_t>("Nbiny"),
865  Parameters.getParameter<double>("ymin"),
866  Parameters.getParameter<double>("ymax"),
867  Parameters.getParameter<int32_t>("Nbinz"),
868  Parameters.getParameter<double>("zmin"),
869  Parameters.getParameter<double>("zmax"));
870 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
std::string HistoName
edm::ParameterSet Parameters
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
Definition: DQMStore.h:367

◆ bookMEProfile()

SiStripMonitorTrack::MonitorElement * SiStripMonitorTrack::bookMEProfile ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 873 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::bookProfile(), conf_, edm::ParameterSet::getParameter(), and Parameters.

Referenced by bookModMEs().

875  {
876  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
877  return ibooker.bookProfile(HistoName,
878  HistoName,
879  Parameters.getParameter<int32_t>("Nbinx"),
880  Parameters.getParameter<double>("xmin"),
881  Parameters.getParameter<double>("xmax"),
882  Parameters.getParameter<int32_t>("Nbiny"),
883  Parameters.getParameter<double>("ymin"),
884  Parameters.getParameter<double>("ymax"),
885  "");
886 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
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:399
std::string HistoName
edm::ParameterSet Parameters

◆ bookMETrend()

SiStripMonitorTrack::MonitorElement * SiStripMonitorTrack::bookMETrend ( DQMStore::IBooker ibooker,
const char *  HistoName 
)
private

Definition at line 889 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::bookProfile(), conf_, edm::ParameterSet::getParameter(), hlt_dqm_clientPB-live_cfg::me, and MonitorElementData::TPROFILE.

Referenced by bookSubDetMEs().

890  {
891  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
893  HistoName,
894  ParametersTrend.getParameter<int32_t>("Nbins"),
895  ParametersTrend.getParameter<double>("xmin"),
896  ParametersTrend.getParameter<double>("xmax"),
897  0,
898  0,
899  "");
900  if (me->kind() == MonitorElement::Kind::TPROFILE)
901  me->setCanExtend(TH1::kAllAxes);
902 
903  if (!me)
904  return me;
905  me->setAxisTitle("Lumisection", 1);
906  return me;
907 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
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:399
std::string HistoName

◆ bookModMEs()

void SiStripMonitorTrack::bookModMEs ( DQMStore::IBooker ibooker,
const uint32_t  id 
)
private

Definition at line 408 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::book1D(), bookME1D(), bookMEProfile(), SiStripMonitorTrack::ModMEs::ClusterCharge, SiStripMonitorTrack::ModMEs::ClusterChargeCorr, SiStripMonitorTrack::ModMEs::ClusterChargePerCMfromOrigin, SiStripMonitorTrack::ModMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::ModMEs::ClusterChargeRaw, SiStripMonitorTrack::ModMEs::ClusterGain, SiStripMonitorTrack::ModMEs::ClusterPGV, SiStripMonitorTrack::ModMEs::ClusterPos, SiStripMonitorTrack::ModMEs::ClusterStoNCorr, SiStripMonitorTrack::ModMEs::ClusterWidth, SiStripHistoId::createHistoId(), ModMEsMap, Skims_PA_cff::name, SiStripDetCabling::nApvPairs(), siStripDetCabling_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by book().

409 {
410  std::string name = "det";
411  SiStripHistoId hidmanager;
412  std::string hid = hidmanager.createHistoId("", name, id);
413  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(hid);
414  if (iModME == ModMEsMap.end()) {
415  ModMEs theModMEs;
416 
417  // Cluster Width
418  theModMEs.ClusterWidth =
419  bookME1D(ibooker, "TH1ClusterWidth", hidmanager.createHistoId("ClusterWidth_OnTrack", name, id).c_str());
420  // Cluster Gain
421  theModMEs.ClusterGain =
422  bookME1D(ibooker, "TH1ClusterGain", hidmanager.createHistoId("ClusterGain", name, id).c_str());
423  // Cluster Charge
424  theModMEs.ClusterCharge =
425  bookME1D(ibooker, "TH1ClusterCharge", hidmanager.createHistoId("ClusterCharge_OnTrack", name, id).c_str());
426  // Cluster Charge Raw (no gain )
427  theModMEs.ClusterChargeRaw = bookME1D(
428  ibooker, "TH1ClusterChargeRaw", hidmanager.createHistoId("ClusterChargeRaw_OnTrack", name, id).c_str());
429  // Cluster Charge Corrected
430  theModMEs.ClusterChargeCorr = bookME1D(
431  ibooker, "TH1ClusterChargeCorr", hidmanager.createHistoId("ClusterChargeCorr_OnTrack", name, id).c_str());
432  // Cluster StoN Corrected
433  theModMEs.ClusterStoNCorr = bookME1D(
434  ibooker, "TH1ClusterStoNCorrMod", hidmanager.createHistoId("ClusterStoNCorr_OnTrack", name, id).c_str());
435  // Cluster Position
436  short total_nr_strips = siStripDetCabling_->nApvPairs(id) * 2 * 128;
437  theModMEs.ClusterPos = ibooker.book1D(hidmanager.createHistoId("ClusterPosition_OnTrack", name, id).c_str(),
438  hidmanager.createHistoId("ClusterPosition_OnTrack", name, id).c_str(),
439  total_nr_strips,
440  0.5,
441  total_nr_strips + 0.5);
442  // Cluster PGV
443  theModMEs.ClusterPGV =
444  bookMEProfile(ibooker, "TProfileClusterPGV", hidmanager.createHistoId("PGV_OnTrack", name, id).c_str());
445  // Cluster Charge per cm
446  theModMEs.ClusterChargePerCMfromTrack = bookME1D(
447  ibooker, "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromTrack", name, id).c_str());
448 
449  theModMEs.ClusterChargePerCMfromOrigin = bookME1D(
450  ibooker, "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromOrigin", name, id).c_str());
451 
452  ModMEsMap[hid] = theModMEs;
453  }
454 }
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::map< std::string, ModMEs > ModMEsMap
const SiStripDetCabling * siStripDetCabling_
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const uint16_t nApvPairs(uint32_t det_id) const

◆ bookRing()

void SiStripMonitorTrack::bookRing ( DQMStore::IBooker ,
const uint32_t  ,
std::string &   
)
private

◆ bookRingMEs()

void SiStripMonitorTrack::bookRingMEs ( DQMStore::IBooker ibooker,
const uint32_t  mod_id,
std::string &  ring_id 
)
private

Definition at line 613 of file SiStripMonitorTrack.cc.

References dqm::implementation::IBooker::book1D(), SiStripMonitorTrack::RingMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargeOffTrack, SiStripMonitorTrack::RingMEs::ClusterChargeOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargePerCMfromOriginOffTrack, SiStripMonitorTrack::RingMEs::ClusterChargePerCMfromOriginOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::RingMEs::ClusterChargeRawOffTrack, SiStripMonitorTrack::RingMEs::ClusterChargeRawOnTrack, SiStripMonitorTrack::RingMEs::ClusterGain, SiStripMonitorTrack::RingMEs::ClusterNoiseOffTrack, SiStripMonitorTrack::RingMEs::ClusterNoiseOnTrack, SiStripMonitorTrack::RingMEs::ClusterPosOffTrack, SiStripMonitorTrack::RingMEs::ClusterPosOnTrack, SiStripMonitorTrack::RingMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::RingMEs::ClusterWidthOffTrack, SiStripMonitorTrack::RingMEs::ClusterWidthOnTrack, conf_, SiStripHistoId::createHistoLayer(), edm::ParameterSet::getParameter(), handleBookMEs(), Skims_PA_cff::name, SiStripDetCabling::nApvPairs(), alignCSCRings::ring_id, RingMEsMap, siStripDetCabling_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by book().

613  {
614  std::string name = "ring";
615  std::string view = "ringView";
616  std::string hname;
617  std::string hpar;
618  SiStripHistoId hidmanager;
619 
620  RingMEs theRingMEs;
621 
622  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr", name, ring_id, "OnTrack");
623  hpar = "TH1ClusterStoNCorr";
624  theRingMEs.ClusterStoNCorrOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
625 
626  // Cluster Gain
627  hname = hidmanager.createHistoLayer("Summary_ClusterGain", name, ring_id, "");
628  hpar = "TH1ClusterGain";
629  theRingMEs.ClusterGain = handleBookMEs(ibooker, view, ring_id, hpar, hname);
630 
631  // Cluster Charge Corrected
632  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr", name, ring_id, "OnTrack");
633  hpar = "TH1ClusterChargeCorr";
634  theRingMEs.ClusterChargeCorrOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
635 
636  // Cluster Charge (On and Off Track)
637  hname = hidmanager.createHistoLayer("Summary_ClusterCharge", name, ring_id, "OnTrack");
638  hpar = "TH1ClusterCharge";
639  theRingMEs.ClusterChargeOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
640 
641  hname = hidmanager.createHistoLayer("Summary_ClusterCharge", name, ring_id, "OffTrack");
642  hpar = "TH1ClusterCharge";
643  theRingMEs.ClusterChargeOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
644 
645  // Cluster Charge Raw (no-gain), On and off track
646  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw", name, ring_id, "OnTrack");
647  hpar = "TH1ClusterChargeRaw";
648  theRingMEs.ClusterChargeRawOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
649 
650  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw", name, ring_id, "OffTrack");
651  hpar = "TH1ClusterChargeRaw";
652  theRingMEs.ClusterChargeRawOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
653 
654  // Cluster Noise (On and Off Track)
655  hname = hidmanager.createHistoLayer("Summary_ClusterNoise", name, ring_id, "OnTrack");
656  hpar = "TH1ClusterNoise";
657  theRingMEs.ClusterNoiseOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
658 
659  hname = hidmanager.createHistoLayer("Summary_ClusterNoise", name, ring_id, "OffTrack");
660  hpar = "TH1ClusterNoise";
661  theRingMEs.ClusterNoiseOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
662 
663  // Cluster Width (On and Off Track)
664  hname = hidmanager.createHistoLayer("Summary_ClusterWidth", name, ring_id, "OnTrack");
665  hpar = "TH1ClusterWidth";
666  theRingMEs.ClusterWidthOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
667 
668  hname = hidmanager.createHistoLayer("Summary_ClusterWidth", name, ring_id, "OffTrack");
669  hpar = "TH1ClusterWidth";
670  theRingMEs.ClusterWidthOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
671 
672  //Cluster Position
673  short total_nr_strips = siStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
674  if (ring_id.find("TEC") != std::string::npos)
675  total_nr_strips = 3 * 2 * 128;
676 
677  hname = hidmanager.createHistoLayer("Summary_ClusterPosition", name, ring_id, "OnTrack");
678  hpar = "TH1ClusterPos";
679  if ((conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()))
680  theRingMEs.ClusterPosOnTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5, total_nr_strips + 0.5);
681 
682  hname = hidmanager.createHistoLayer("Summary_ClusterPosition", name, ring_id, "OffTrack");
683  hpar = "TH1ClusterPos";
684  if ((conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()))
685  theRingMEs.ClusterPosOffTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5, total_nr_strips + 0.5);
686 
687  // dQ/dx
688  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromTrack", name, ring_id, "");
689  hpar = "TH1ClusterChargePerCM";
690  theRingMEs.ClusterChargePerCMfromTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
691 
692  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin", name, ring_id, "OnTrack");
693  hpar = "TH1ClusterChargePerCM";
694  theRingMEs.ClusterChargePerCMfromOriginOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
695 
696  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin", name, ring_id, "OffTrack");
697  hpar = "TH1ClusterChargePerCM";
698  theRingMEs.ClusterChargePerCMfromOriginOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
699 
700  //bookeeping
701  RingMEsMap[ring_id] = theRingMEs;
702 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::map< std::string, RingMEs > RingMEsMap
edm::ParameterSet conf_
const SiStripDetCabling * siStripDetCabling_
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const uint16_t nApvPairs(uint32_t det_id) const
MonitorElement * handleBookMEs(DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)

◆ bookSubDetMEs()

void SiStripMonitorTrack::bookSubDetMEs ( DQMStore::IBooker ibooker,
std::string &  name 
)
private

Definition at line 707 of file SiStripMonitorTrack.cc.

References bookME1D(), bookMETrend(), SiStripMonitorTrack::SubDetMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeCorrThickOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeCorrThinOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargePerCMfromOriginOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargePerCMfromOriginOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeRawOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeRawOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterGain, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrThickOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrThinOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNOffTrack, Skims_PA_cff::name, SiStripMonitorTrack::SubDetMEs::nClustersOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrackStereo, SiStripMonitorTrack::SubDetMEs::nClustersTrendOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOnTrack, dqm::impl::MonitorElement::setAxisRange(), dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setStatOverflows(), AlCaHLTBitMon_QueryRunRegistry::string, xuti::subdet_tag(), SubDetMEsMap, and Trend_On_.

Referenced by book().

707  {
709  subdet_tag = "__" + name;
710  std::string completeName;
711  std::string axisName;
712 
713  SubDetMEs theSubDetMEs;
714 
715  // TotalNumber of Cluster OnTrack
716  completeName = "Summary_TotalNumberOfClusters_OnTrack" + subdet_tag;
717  axisName = "Number of on-track clusters in " + name;
718  theSubDetMEs.nClustersOnTrack = bookME1D(ibooker, "TH1nClustersOn", completeName.c_str());
719  theSubDetMEs.nClustersOnTrack->setAxisTitle(axisName);
720  theSubDetMEs.nClustersOnTrack->setStatOverflows(kTRUE);
721 
722  // TotalNumber of Cluster OnTrack
723  completeName = "Summary_TotalNumberOfClusters_OnTrackStereo" + subdet_tag;
724  axisName = "Number of on-track stereo clusters in " + name;
725  theSubDetMEs.nClustersOnTrackStereo = bookME1D(ibooker, "TH1nClustersOnStereo", completeName.c_str());
726  theSubDetMEs.nClustersOnTrackStereo->setAxisTitle(axisName);
727  theSubDetMEs.nClustersOnTrackStereo->setStatOverflows(kTRUE);
728 
729  // TotalNumber of Cluster OffTrack
730  completeName = "Summary_TotalNumberOfClusters_OffTrack" + subdet_tag;
731  axisName = "Number of off-track clusters in " + name;
732  theSubDetMEs.nClustersOffTrack = bookME1D(ibooker, "TH1nClustersOff", completeName.c_str());
733  theSubDetMEs.nClustersOffTrack->setAxisTitle(axisName);
734 
735  double xmaximum = 0;
736  if (name.find("TIB") != std::string::npos) {
737  xmaximum = 40000.0;
738  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
739  }
740  if (name.find("TOB") != std::string::npos) {
741  xmaximum = 40000.0;
742  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
743  }
744  if (name.find("TID") != std::string::npos) {
745  xmaximum = 10000.0;
746  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
747  }
748  if (name.find("TEC") != std::string::npos) {
749  xmaximum = 40000.0;
750  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
751  }
752 
753  theSubDetMEs.nClustersOffTrack->setStatOverflows(kTRUE);
754 
755  // Cluster Gain
756  completeName = "Summary_ClusterGain" + subdet_tag;
757  theSubDetMEs.ClusterGain = bookME1D(ibooker, "TH1ClusterGain", completeName.c_str());
758 
759  // Cluster StoN On Track
760  completeName = "Summary_ClusterStoNCorr_OnTrack" + subdet_tag;
761  theSubDetMEs.ClusterStoNCorrOnTrack = bookME1D(ibooker, "TH1ClusterStoNCorr", completeName.c_str());
762 
763  completeName = "Summary_ClusterStoNCorrThin_OnTrack" + subdet_tag;
764  if (subdet_tag.find("TEC") != std::string::npos)
765  theSubDetMEs.ClusterStoNCorrThinOnTrack = bookME1D(ibooker, "TH1ClusterStoNCorr", completeName.c_str());
766 
767  completeName = "Summary_ClusterStoNCorrThick_OnTrack" + subdet_tag;
768  if (subdet_tag.find("TEC") != std::string::npos)
769  theSubDetMEs.ClusterStoNCorrThickOnTrack = bookME1D(ibooker, "TH1ClusterStoNCorr", completeName.c_str());
770 
771  // Cluster Charge Corrected
772  completeName = "Summary_ClusterChargeCorr_OnTrack" + subdet_tag;
773  theSubDetMEs.ClusterChargeCorrOnTrack = bookME1D(ibooker, "TH1ClusterChargeCorr", completeName.c_str());
774 
775  completeName = "Summary_ClusterChargeCorrThin_OnTrack" + subdet_tag;
776  if (subdet_tag.find("TEC") != std::string::npos)
777  theSubDetMEs.ClusterChargeCorrThinOnTrack = bookME1D(ibooker, "TH1ClusterChargeCorr", completeName.c_str());
778 
779  completeName = "Summary_ClusterChargeCorrThick_OnTrack" + subdet_tag;
780  if (subdet_tag.find("TEC") != std::string::npos)
781  theSubDetMEs.ClusterChargeCorrThickOnTrack = bookME1D(ibooker, "TH1ClusterChargeCorr", completeName.c_str());
782 
783  // Cluster Charge On Track
784  completeName = "Summary_ClusterCharge_OnTrack" + subdet_tag;
785  theSubDetMEs.ClusterChargeOnTrack = bookME1D(ibooker, "TH1ClusterCharge", completeName.c_str());
786 
787  // Cluster Charge On Track, Raw (no-gain)
788  completeName = "Summary_ClusterChargeRaw_OnTrack" + subdet_tag;
789  theSubDetMEs.ClusterChargeRawOnTrack = bookME1D(ibooker, "TH1ClusterChargeRaw", completeName.c_str());
790 
791  // Cluster Charge Off Track
792  completeName = "Summary_ClusterCharge_OffTrack" + subdet_tag;
793  theSubDetMEs.ClusterChargeOffTrack = bookME1D(ibooker, "TH1ClusterCharge", completeName.c_str());
794 
795  // Cluster Charge Off Track, Raw (no-gain)
796  completeName = "Summary_ClusterChargeRaw_OffTrack" + subdet_tag;
797  theSubDetMEs.ClusterChargeRawOffTrack = bookME1D(ibooker, "TH1ClusterChargeRaw", completeName.c_str());
798 
799  // Cluster Charge StoN Off Track
800  completeName = "Summary_ClusterStoN_OffTrack" + subdet_tag;
801  theSubDetMEs.ClusterStoNOffTrack = bookME1D(ibooker, "TH1ClusterStoN", completeName.c_str());
802 
803  // cluster charge per cm on track
804  completeName = "Summary_ClusterChargePerCMfromTrack" + subdet_tag;
805  theSubDetMEs.ClusterChargePerCMfromTrack = bookME1D(ibooker, "TH1ClusterChargePerCM", completeName.c_str());
806 
807  // cluster charge per cm on track
808  completeName = "Summary_ClusterChargePerCMfromOrigin_OnTrack" + subdet_tag;
809  theSubDetMEs.ClusterChargePerCMfromOriginOnTrack = bookME1D(ibooker, "TH1ClusterChargePerCM", completeName.c_str());
810 
811  // cluster charge per cm off track
812  completeName = "Summary_ClusterChargePerCMfromOrigin_OffTrack" + subdet_tag;
813  theSubDetMEs.ClusterChargePerCMfromOriginOffTrack = bookME1D(ibooker, "TH1ClusterChargePerCM", completeName.c_str());
814 
815  if (Trend_On_) {
816  // TotalNumber of Cluster
817  completeName = "Trend_TotalNumberOfClusters_OnTrack" + subdet_tag;
818  theSubDetMEs.nClustersTrendOnTrack = bookMETrend(ibooker, completeName.c_str());
819  completeName = "Trend_TotalNumberOfClusters_OffTrack" + subdet_tag;
820  theSubDetMEs.nClustersTrendOffTrack = bookMETrend(ibooker, completeName.c_str());
821  }
822 
823  //bookeeping
824  SubDetMEsMap[name] = theSubDetMEs;
825 }
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *)
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ clusterInfos()

bool SiStripMonitorTrack::clusterInfos ( SiStripClusterInfo cluster,
const uint32_t  detid,
enum ClusterFlags  flags,
bool  track_ok,
LocalVector  LV,
const Det2MEs MEs,
const TrackerTopology tTopo,
const SiStripGain stripGain,
const SiStripQuality stripQuality,
const edm::DetSetVector< SiStripDigi > &  digilist,
float  clustZ,
float  clustPhi 
)
private

Definition at line 1494 of file SiStripMonitorTrack.cc.

References applyClusterQuality_, SiStripClusterInfo::baryStrip(), SiStripClusterInfo::charge(), ALCARECOTkAlJpsiMuMu_cff::charge, siStripClusterTools::chargePerCM(), clchCMoriginTkHmap_On_, conf_, SiStripHistoId::createHistoId(), SiStripClusterInfo::detId(), edm::DetSetVector< T >::end(), eventNb, fillME(), edm::DetSetVector< T >::find(), SiStripClusterInfo::firstStrip(), RemoveAddSevLevel::flag, edm::ParameterSet::getParameter(), SiStripBadStrip::getRange(), SiStripGain::getRange(), SiStripGain::getStripGain(), mps_fire::i, TrackerGeometry::idToDetUnit(), createfilelist::int, SiStripQuality::IsStripBad(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, LogDebug, SiStripClusterInfo::maxCharge(), SiStripClusterInfo::maxIndex(), EcalMEFormatter_cfi::MEs, Mod_On_, ModMEsMap, TrackerTopology::moduleGeometry(), Skims_PA_cff::name, hgchebackDigitizer_cfi::noise, SiStripClusterInfo::noiseRescaledByGain(), OffTrack, OnTrack, position, SiStripClusterInfo::signalOverNoise(), sToNLowerLimit_, sToNUpperLimit_, AlCaHLTBitMon_QueryRunRegistry::string, SiStripClusterInfo::stripCharges(), tkgeom_, tkhisto_ClChPerCMfromOrigin, tkhisto_ClChPerCMfromTrack, tkhisto_ClusterWidthOffTrack, tkhisto_ClusterWidthOnTrack, tkhisto_NoiseOffTrack, tkhisto_NoiseOnTrack, tkhisto_NumOffTrack, tkhisto_NumOnTrack, tkhisto_StoNCorrOnTrack, TkHistoMap_On_, GeomDet::toLocal(), W5, W6, W7, ApeEstimator_cff::width, SiStripClusterInfo::width(), widthLowerLimit_, widthUpperLimit_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by AllClusters(), and RecHitInfo().

1505  {
1506  if (cluster == nullptr)
1507  return false;
1508  // if one imposes a cut on the clusters, apply it
1509  if ((applyClusterQuality_) &&
1510  (cluster->signalOverNoise() < sToNLowerLimit_ || cluster->signalOverNoise() > sToNUpperLimit_ ||
1511  cluster->width() < widthLowerLimit_ || cluster->width() > widthUpperLimit_))
1512  return false;
1513  // start of the analysis
1514 
1515  float cosRZ = -2;
1516  LogDebug("SiStripMonitorTrack") << "\n\tLV " << LV.x() << " " << LV.y() << " " << LV.z() << " " << LV.mag()
1517  << std::endl;
1518  if (LV.mag()) {
1519  cosRZ = fabs(LV.z()) / LV.mag();
1520  LogDebug("SiStripMonitorTrack") << "\n\t cosRZ " << cosRZ << std::endl;
1521  }
1522 
1523  // Filling SubDet/Layer Plots (on Track + off Track)
1524  float StoN = cluster->signalOverNoise();
1525  float noise = cluster->noiseRescaledByGain();
1526  uint16_t charge = cluster->charge();
1527  uint16_t width = cluster->width();
1528  float position = cluster->baryStrip();
1529 
1530  // Getting raw charge with strip gain.
1531  double chargeraw = 0;
1532  double clustergain = 0;
1533  auto digi_it = digilist.find(detid); //(digilist.isValid() ? digilist.find(detid) : digilist.end());
1534  // SiStripClusterInfo.stripCharges() <==> SiStripCluster.amplitudes()
1535  for (size_t chidx = 0; chidx < cluster->stripCharges().size(); ++chidx) {
1536  if (cluster->stripCharges()[chidx] <= 0) {
1537  continue;
1538  } // nonzero amplitude
1539  if (stripQuality->IsStripBad(stripQuality->getRange(detid), cluster->firstStrip() + chidx)) {
1540  continue;
1541  }
1542  clustergain += stripGain->getStripGain(cluster->firstStrip() + chidx, stripGain->getRange(detid));
1543  // Getting raw adc charge from digi collections
1544  if (digi_it == digilist.end()) {
1545  continue;
1546  } // skipping if not found
1547  for (const auto& digiobj : *digi_it) {
1548  if (digiobj.strip() == cluster->firstStrip() + chidx) {
1549  chargeraw += digiobj.adc();
1550  }
1551  }
1552  }
1553 
1554  clustergain /= double(cluster->stripCharges().size()); // calculating average gain inside cluster
1555 
1556  // new dE/dx (chargePerCM)
1557  // https://indico.cern.ch/event/342236/session/5/contribution/10/material/slides/0.pdf
1558  float dQdx_fromTrack = siStripClusterTools::chargePerCM(detid, *cluster, LV);
1559  // from straigth line origin-sensor centre
1560  const StripGeomDetUnit* DetUnit = static_cast<const StripGeomDetUnit*>(tkgeom_->idToDetUnit(DetId(detid)));
1561  LocalPoint locVtx = DetUnit->toLocal(GlobalPoint(0.0, 0.0, 0.0));
1562  LocalVector locDir(locVtx.x(), locVtx.y(), locVtx.z());
1563  float dQdx_fromOrigin = siStripClusterTools::chargePerCM(detid, *cluster, locDir);
1564 
1565  if (TkHistoMap_On_ && (flag == OnTrack)) {
1566  uint32_t adet = cluster->detId();
1567  if (track_ok)
1568  tkhisto_ClChPerCMfromTrack->fill(adet, dQdx_fromTrack);
1569  }
1570  if (clchCMoriginTkHmap_On_ && (flag == OffTrack)) {
1571  uint32_t adet = cluster->detId();
1572  if (track_ok)
1573  tkhisto_ClChPerCMfromOrigin->fill(adet, dQdx_fromOrigin);
1574  }
1575 
1576  if (flag == OnTrack) {
1577  if (MEs.iSubdet != nullptr) {
1578  MEs.iSubdet->totNClustersOnTrack++;
1579  if (StripSubdetector(detid).stereo() == 1)
1580  MEs.iSubdet->totNClustersOnTrackStereo++;
1581  else
1582  MEs.iSubdet->totNClustersOnTrackMono++;
1583  }
1584  // layerMEs
1585  if (MEs.iLayer != nullptr) {
1586  if (noise > 0.0)
1587  fillME(MEs.iLayer->ClusterStoNCorrOnTrack, StoN * cosRZ);
1588  if (noise == 0.0)
1589  LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise "
1590  << cluster->noiseRescaledByGain() << std::endl;
1591  fillME(MEs.iLayer->ClusterGain, clustergain);
1592  fillME(MEs.iLayer->ClusterChargeCorrOnTrack, charge * cosRZ);
1593  fillME(MEs.iLayer->ClusterChargeOnTrack, charge);
1594  fillME(MEs.iLayer->ClusterChargeRawOnTrack, chargeraw);
1595  fillME(MEs.iLayer->ClusterNoiseOnTrack, noise);
1596  fillME(MEs.iLayer->ClusterWidthOnTrack, width);
1597  fillME(MEs.iLayer->ClusterPosOnTrack, position);
1598  //auto clustgp = cluster->globalPosition();
1599 
1600  fillME(MEs.iLayer->ClusterPosOnTrack2D, valX, valY);
1601 
1602  if (track_ok)
1603  fillME(MEs.iLayer->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1604  if (track_ok)
1605  fillME(MEs.iLayer->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1606  }
1607  // ringMEs
1608  if (MEs.iRing != nullptr) {
1609  if (noise > 0.0)
1610  fillME(MEs.iRing->ClusterStoNCorrOnTrack, StoN * cosRZ);
1611  if (noise == 0.0)
1612  LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise "
1613  << cluster->noiseRescaledByGain() << std::endl;
1614  fillME(MEs.iRing->ClusterGain, clustergain);
1615  fillME(MEs.iRing->ClusterChargeCorrOnTrack, charge * cosRZ);
1616  fillME(MEs.iRing->ClusterChargeOnTrack, charge);
1617  fillME(MEs.iRing->ClusterChargeRawOnTrack, chargeraw);
1618  fillME(MEs.iRing->ClusterNoiseOnTrack, noise);
1619  fillME(MEs.iRing->ClusterWidthOnTrack, width);
1620  fillME(MEs.iRing->ClusterPosOnTrack, position);
1621  if (track_ok)
1622  fillME(MEs.iRing->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1623  if (track_ok)
1624  fillME(MEs.iRing->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1625  }
1626  // subdetMEs
1627  if (MEs.iSubdet != nullptr) {
1628  fillME(MEs.iSubdet->ClusterGain, clustergain);
1629  fillME(MEs.iSubdet->ClusterChargeOnTrack, charge);
1630  fillME(MEs.iSubdet->ClusterChargeRawOnTrack, chargeraw);
1631  if (noise > 0.0)
1632  fillME(MEs.iSubdet->ClusterStoNCorrOnTrack, StoN * cosRZ);
1633  fillME(MEs.iSubdet->ClusterChargeCorrOnTrack, charge * cosRZ);
1634  if (track_ok)
1635  fillME(MEs.iSubdet->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1636  if (track_ok)
1637  fillME(MEs.iSubdet->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1638  if (tTopo->moduleGeometry(detid) == SiStripModuleGeometry::W5 ||
1639  tTopo->moduleGeometry(detid) == SiStripModuleGeometry::W6 ||
1640  tTopo->moduleGeometry(detid) == SiStripModuleGeometry::W7) {
1641  if (noise > 0.0)
1642  fillME(MEs.iSubdet->ClusterStoNCorrThickOnTrack, StoN * cosRZ);
1643  fillME(MEs.iSubdet->ClusterChargeCorrThickOnTrack, charge * cosRZ);
1644  } else {
1645  if (noise > 0.0)
1646  fillME(MEs.iSubdet->ClusterStoNCorrThinOnTrack, StoN * cosRZ);
1647  fillME(MEs.iSubdet->ClusterChargeCorrThinOnTrack, charge * cosRZ);
1648  }
1649  }
1650  //******** TkHistoMaps
1651  if (TkHistoMap_On_) {
1652  uint32_t adet = cluster->detId();
1653  tkhisto_NumOnTrack->add(adet, 1.);
1654  if (noise > 0.0)
1655  tkhisto_StoNCorrOnTrack->fill(adet, cluster->signalOverNoise() * cosRZ);
1656  if (noise == 0.0)
1657  LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise " << noise
1658  << std::endl;
1659  }
1660  if (TkHistoMap_On_ && (flag == OnTrack)) {
1661  uint32_t adet = cluster->detId();
1662  tkhisto_ClusterWidthOnTrack->fill(adet, cluster->width());
1663  if (noise > 0.0)
1664  tkhisto_NoiseOnTrack->fill(adet, cluster->noiseRescaledByGain() * cosRZ);
1665  }
1666 
1667  // Module plots filled only for onTrack Clusters
1668  if (Mod_On_) {
1669  SiStripHistoId hidmanager2;
1670  std::string name = hidmanager2.createHistoId("", "det", detid);
1671  //fillModMEs
1672  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(name);
1673  if (iModME != ModMEsMap.end()) {
1674  if (noise > 0.0)
1675  fillME(iModME->second.ClusterStoNCorr, StoN * cosRZ);
1676  if (noise == 0.0)
1677  LogDebug("SiStripMonitorTrack")
1678  << "Module " << name << " in Event " << eventNb << " noise " << noise << std::endl;
1679  fillME(iModME->second.ClusterGain, clustergain);
1680  fillME(iModME->second.ClusterCharge, charge);
1681  fillME(iModME->second.ClusterChargeRaw, chargeraw);
1682 
1683  fillME(iModME->second.ClusterChargeCorr, charge * cosRZ);
1684 
1685  fillME(iModME->second.ClusterWidth, width);
1686  fillME(iModME->second.ClusterPos, position);
1687 
1688  if (track_ok)
1689  fillME(iModME->second.ClusterChargePerCMfromTrack, dQdx_fromTrack);
1690  if (track_ok)
1691  fillME(iModME->second.ClusterChargePerCMfromOrigin, dQdx_fromOrigin);
1692 
1693  //fill the PGV histo
1694  float PGVmax = cluster->maxCharge();
1695  int PGVposCounter = cluster->maxIndex();
1696  for (int i = int(conf_.getParameter<edm::ParameterSet>("TProfileClusterPGV").getParameter<double>("xmin"));
1697  i < PGVposCounter;
1698  ++i)
1699  fillME(iModME->second.ClusterPGV, i, 0.);
1700  for (auto it = cluster->stripCharges().begin(); it < cluster->stripCharges().end(); ++it) {
1701  fillME(iModME->second.ClusterPGV, PGVposCounter++, (*it) / PGVmax);
1702  }
1703  for (int i = PGVposCounter;
1704  i < int(conf_.getParameter<edm::ParameterSet>("TProfileClusterPGV").getParameter<double>("xmax"));
1705  ++i)
1706  fillME(iModME->second.ClusterPGV, i, 0.);
1707  //end fill the PGV histo
1708  }
1709  }
1710  } else {
1711  if (flag == OffTrack) {
1712  if (MEs.iSubdet != nullptr)
1713  MEs.iSubdet->totNClustersOffTrack++;
1714  //******** TkHistoMaps
1715  if (TkHistoMap_On_) {
1716  uint32_t adet = cluster->detId();
1717  tkhisto_NumOffTrack->add(adet, 1.);
1718  if (charge > 250) {
1719  LogDebug("SiStripMonitorTrack") << "Module firing " << detid << " in Event " << eventNb << std::endl;
1720  }
1721  }
1722  if (TkHistoMap_On_) {
1723  uint32_t adet = cluster->detId();
1724  tkhisto_ClusterWidthOffTrack->fill(adet, cluster->width());
1725  if (noise > 0.0)
1726  tkhisto_NoiseOffTrack->fill(adet, cluster->noiseRescaledByGain());
1727  }
1728  }
1729  // layerMEs
1730  if (MEs.iLayer != nullptr) {
1731  fillME(MEs.iLayer->ClusterGain, clustergain);
1732  fillME(MEs.iLayer->ClusterChargeOffTrack, charge);
1733  fillME(MEs.iLayer->ClusterChargeRawOffTrack, chargeraw);
1734  fillME(MEs.iLayer->ClusterNoiseOffTrack, noise);
1735  fillME(MEs.iLayer->ClusterWidthOffTrack, width);
1736  fillME(MEs.iLayer->ClusterPosOffTrack, position);
1737  fillME(MEs.iLayer->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1738  }
1739  // ringMEs
1740  if (MEs.iRing != nullptr) {
1741  fillME(MEs.iRing->ClusterGain, clustergain);
1742  fillME(MEs.iRing->ClusterChargeOffTrack, charge);
1743  fillME(MEs.iRing->ClusterChargeRawOffTrack, chargeraw);
1744  fillME(MEs.iRing->ClusterNoiseOffTrack, noise);
1745  fillME(MEs.iRing->ClusterWidthOffTrack, width);
1746  fillME(MEs.iRing->ClusterPosOffTrack, position);
1747  fillME(MEs.iRing->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1748  }
1749  // subdetMEs
1750  if (MEs.iSubdet != nullptr) {
1751  fillME(MEs.iSubdet->ClusterGain, clustergain);
1752  fillME(MEs.iSubdet->ClusterChargeOffTrack, charge);
1753  fillME(MEs.iSubdet->ClusterChargeRawOffTrack, chargeraw);
1754  if (noise > 0.0)
1755  fillME(MEs.iSubdet->ClusterStoNOffTrack, StoN);
1756  fillME(MEs.iSubdet->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1757  }
1758  }
1759  return true;
1760 }
std::unique_ptr< TkHistoMap > tkhisto_NoiseOffTrack
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
iterator find(det_id_type id)
Definition: DetSetVector.h:255
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromOrigin
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void fillME(MonitorElement *ME, float value1)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
T z() const
Definition: PV3DBase.h:61
math::XYZTLorentzVectorD LV
const TrackerGeometry * tkgeom_
float chargePerCM(DetId detid, Iter a, Iter b)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::ParameterSet conf_
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:75
const Range getRange(const uint32_t detID) const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
float signalOverNoise() const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
edm::EventNumber_t eventNb
uint32_t detId() const
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
Definition: SiStripGain.h:77
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromTrack
uint8_t maxCharge() const
std::unique_ptr< TkHistoMap > tkhisto_NumOffTrack
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
float noiseRescaledByGain() const
uint16_t firstStrip() const
SiStripModuleGeometry moduleGeometry(const DetId &id) const
uint16_t maxIndex() const
Definition: DetId.h:17
bool IsStripBad(uint32_t detid, short strip) const
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOffTrack
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::map< std::string, ModMEs > ModMEsMap
uint16_t width() const
std::unique_ptr< TkHistoMap > tkhisto_StoNCorrOnTrack
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOnTrack
static int position[264][3]
Definition: ReadPGInfo.cc:289
std::unique_ptr< TkHistoMap > tkhisto_NoiseOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NumOnTrack
uint16_t charge() const
float baryStrip() const
#define LogDebug(id)

◆ dqmBeginRun()

void SiStripMonitorTrack::dqmBeginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 76 of file SiStripMonitorTrack.cc.

References TrackerGeometry::detUnits(), genTriggerEventFlag_, edm::EventSetup::getData(), GenericTriggerEventFlag::initRun(), LogDebug, GenericTriggerEventFlag::on(), writedatasetfile::run, siStripDetCabling_, siStripDetCablingToken_, tkgeom_, and trackerGeometryToken_.

76  {
78  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::beginRun] There are " << tkgeom_->detUnits().size()
79  << " detectors instantiated in the geometry" << std::endl;
81 
82  // Initialize the GenericTriggerEventFlag
83  if (genTriggerEventFlag_->on())
85 }
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > siStripDetCablingToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const TrackerGeometry * tkgeom_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
GenericTriggerEventFlag * genTriggerEventFlag_
const SiStripDetCabling * siStripDetCabling_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
#define LogDebug(id)

◆ fillControlViewHistos()

bool SiStripMonitorTrack::fillControlViewHistos ( const edm::Event ev)
private

Definition at line 1364 of file SiStripMonitorTrack.cc.

References SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), ClusterCount_OnTrack_FECCratevsFECSlot, ClusterCount_OnTrack_FECSlotVsFECRing_TECM, ClusterCount_OnTrack_FECSlotVsFECRing_TECP, ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID, ClusterCount_OnTrack_FECSlotVsFECRing_TOB, ClusterStoNCorr_OnTrack_FECCratevsFECSlot, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID, ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB, ClusterStoNCorr_OnTrack_TECM, ClusterStoNCorr_OnTrack_TECP, ClusterStoNCorr_OnTrack_TIBTID, ClusterStoNCorr_OnTrack_TOB, makeMEIFBenchmarkPlots::ev, dqm::impl::MonitorElement::Fill(), SiStripDetCabling::getConnections(), return2DME(), SiStripClusterInfo::setCluster(), SiStripClusterInfo::signalOverNoise(), siStripClusterInfo_, siStripDetCabling_, SiStripDetId::TEC, TrackerTopology::tecSide(), SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, HLT_2024v10_cff::track, trackerTopology_, DiMuonV_cfg::tracks, and trackToken_.

Referenced by analyze().

1364  {
1365  const TrackerTopology* tTopo = trackerTopology_;
1366 
1368  ev.getByToken(trackToken_, tracks); //takes the track collection
1369 
1370  //check that tracks are valid
1371  if (!tracks.isValid())
1372  return false;
1373 
1374  // loop over the tracks
1375  for (const auto& track : *tracks) {
1376  // loop over the rechits of this track
1377  for (trackingRecHit_iterator hit = track.recHitsBegin(), ehit = track.recHitsEnd(); hit != ehit; ++hit) {
1378  uint32_t thedetid = (*hit)->rawId();
1379  if (!(DetId(thedetid).subdetId() >= 3 && DetId(thedetid).subdetId() <= 6)) {
1380  continue;
1381  }
1382 
1383  if (!(*hit)->isValid())
1384  continue;
1385 
1386  const TrackingRecHit* theHit = (*hit);
1387  if (theHit == nullptr) {
1388  continue;
1389  }
1390 
1391  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(theHit);
1392  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(theHit);
1393 
1394  float sovn = -1.;
1395  if (hit1D && !hit2D) {
1396  const SiStripCluster* SiStripCluster_ = &*(hit1D->cluster());
1397  siStripClusterInfo_.setCluster(*SiStripCluster_, thedetid);
1399  }
1400 
1401  else if (!hit1D && hit2D) {
1402  const SiStripCluster* SiStripCluster_ = &*(hit2D->cluster());
1403  siStripClusterInfo_.setCluster(*SiStripCluster_, thedetid);
1405  }
1406 
1407  std::vector<const FedChannelConnection*> getFedChanConnections;
1408  getFedChanConnections = siStripDetCabling_->getConnections(thedetid);
1409 
1410  // SiStripFolderOrganizer folder_organizer;
1411  // std::string sistripsubdet = folder_organizer.getSubDetFolderAndTag(thedetid, tTopo).second;
1412 
1413  // loop over the fed chan connections
1414  for (const auto& getFedChanConnection : getFedChanConnections) {
1415  if (getFedChanConnection == nullptr) {
1416  continue;
1417  }
1418 
1419  int binfeccrate = getFedChanConnection->fecCrate();
1420  int binfecslot = getFedChanConnection->fecSlot();
1421  int binfecring = getFedChanConnection->fecRing();
1422  //int binccuchan = getFedChanConnections[i0]->ccuChan(); //will be used in a new PR
1423  //int binccuadd = getFedChanConnections[i0]->ccuAddr(); //will be used in a new PR
1424 
1427  binfecslot,
1428  binfeccrate,
1429  sovn);
1430 
1431  // TIB/TID
1432  // if ((sistripsubdet.find("TIB")) || (sistripsubdet.find("TID"))) {
1433  if ((DetId(thedetid).subdetId() == SiStripDetId::TIB) || ((DetId(thedetid).subdetId() == SiStripDetId::TID))) {
1437  binfecring,
1438  binfecslot,
1439  sovn);
1440  }
1441 
1442  // TOB
1443  if (DetId(thedetid).subdetId() == SiStripDetId::TOB) {
1447  binfecring,
1448  binfecslot,
1449  sovn);
1450  }
1451 
1452  // TECM
1453  if ((DetId(thedetid).subdetId() == SiStripDetId::TEC) && (tTopo->tecSide(thedetid) == 1)) {
1457  binfecring,
1458  binfecslot,
1459  sovn);
1460  }
1461 
1462  // TECP
1463  if ((DetId(thedetid).subdetId() == SiStripDetId::TEC) && (tTopo->tecSide(thedetid) == 2)) {
1467  binfecring,
1468  binfecslot,
1469  sovn);
1470  }
1471 
1472  } // end of looping over the fed chan connections
1473  } // end of looping over the rechits of the track
1474  } // end of looping over the tracks
1475 
1476  return true;
1477 }
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
void return2DME(MonitorElement *input1, MonitorElement *input2, int binx, int biny, double value)
MonitorElement * ClusterStoNCorr_OnTrack_TECP
void setCluster(const SiStripCluster &cluster, int detId)
edm::EDGetTokenT< reco::TrackCollection > trackToken_
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
static constexpr auto TID
Definition: SiStripDetId.h:38
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
ClusterRef cluster() const
float signalOverNoise() const
void Fill(long long x)
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_TOB
unsigned int tecSide(const DetId &id) const
SiStripClusterInfo siStripClusterInfo_
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
static constexpr auto TOB
Definition: SiStripDetId.h:39
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
Definition: DetId.h:17
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
static constexpr auto TIB
Definition: SiStripDetId.h:37
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterStoNCorr_OnTrack_TIBTID
const SiStripDetCabling * siStripDetCabling_
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID
ClusterRef cluster() const
static constexpr auto TEC
Definition: SiStripDetId.h:40
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
MonitorElement * ClusterStoNCorr_OnTrack_TECM
const TrackerTopology * trackerTopology_

◆ fillME() [1/4]

void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 141 of file SiStripMonitorTrack.h.

References HLT_2024v10_cff::value1.

Referenced by analyze(), and clusterInfos().

141  {
142  if (ME != nullptr)
143  ME->Fill(value1);
144  }
Definition: ME.h:11

◆ fillME() [2/4]

void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2 
)
inlineprivate

Definition at line 145 of file SiStripMonitorTrack.h.

References HLT_2024v10_cff::value1, and HLT_2024v10_cff::value2.

145  {
146  if (ME != nullptr)
147  ME->Fill(value1, value2);
148  }
Definition: ME.h:11

◆ fillME() [3/4]

void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3 
)
inlineprivate

Definition at line 149 of file SiStripMonitorTrack.h.

References HLT_2024v10_cff::value1, and HLT_2024v10_cff::value2.

149  {
150  if (ME != nullptr)
151  ME->Fill(value1, value2, value3);
152  }
Definition: ME.h:11

◆ fillME() [4/4]

void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3,
float  value4 
)
inlineprivate

Definition at line 153 of file SiStripMonitorTrack.h.

References HLT_2024v10_cff::value1, and HLT_2024v10_cff::value2.

153  {
154  if (ME != nullptr)
155  ME->Fill(value1, value2, value3, value4);
156  }
Definition: ME.h:11

◆ findMEs()

SiStripMonitorTrack::Det2MEs SiStripMonitorTrack::findMEs ( const TrackerTopology tTopo,
const uint32_t  detid 
)
private

Definition at line 1334 of file SiStripMonitorTrack.cc.

References folderOrganizer_, SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), LayerMEsMap, hlt_dqm_clientPB-live_cfg::me, alignCSCRings::ring_id, RingMEsMap, AlCaHLTBitMon_QueryRunRegistry::string, and SubDetMEsMap.

Referenced by AllClusters(), and RecHitInfo().

1334  {
1335  SiStripHistoId hidmanager1;
1336 
1337  std::string layer_id = hidmanager1.getSubdetid(detid, tTopo, false);
1338  std::string ring_id = hidmanager1.getSubdetid(detid, tTopo, true);
1339  std::string sdet_tag = folderOrganizer_.getSubDetFolderAndTag(detid, tTopo).second;
1340 
1341  Det2MEs me;
1342  me.iLayer = nullptr;
1343  me.iRing = nullptr;
1344  me.iSubdet = nullptr;
1345 
1346  std::map<std::string, LayerMEs>::iterator iLayer = LayerMEsMap.find(layer_id);
1347  if (iLayer != LayerMEsMap.end()) {
1348  me.iLayer = &(iLayer->second);
1349  }
1350 
1351  std::map<std::string, RingMEs>::iterator iRing = RingMEsMap.find(ring_id);
1352  if (iRing != RingMEsMap.end()) {
1353  me.iRing = &(iRing->second);
1354  }
1355 
1356  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_tag);
1357  if (iSubdet != SubDetMEsMap.end()) {
1358  me.iSubdet = &(iSubdet->second);
1359  }
1360 
1361  return me;
1362 }
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
std::map< std::string, RingMEs > RingMEsMap
std::map< std::string, SubDetMEs > SubDetMEsMap
SiStripFolderOrganizer folderOrganizer_
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
std::map< std::string, LayerMEs > LayerMEsMap

◆ handleBookMEs()

SiStripMonitorTrack::MonitorElement * SiStripMonitorTrack::handleBookMEs ( DQMStore::IBooker ibooker,
std::string &  viewParameter,
std::string &  id,
std::string &  histoParameters,
std::string &  histoName 
)
private

Definition at line 456 of file SiStripMonitorTrack.cc.

References bookME1D(), conf_, spr::find(), edm::ParameterSet::getParameter(), HltBtagPostValidation_cff::histoName, anotherprimaryvertexanalyzer_cfi::histoParameters, and hlt_dqm_clientPB-live_cfg::me.

Referenced by bookLayerMEs(), and bookRingMEs().

460  {
461  MonitorElement* me = nullptr;
462  bool view = false;
463  view = (conf_.getParameter<edm::ParameterSet>(histoParameters.c_str())).getParameter<bool>(viewParameter.c_str());
464  if (id.find("TEC") == std::string::npos && id.find("TID") == std::string::npos) {
465  me = bookME1D(ibooker, histoParameters.c_str(), histoName.c_str());
466  } else {
467  if (view) {
468  // histoName = histoName + "__" + thickness;
469  me = bookME1D(ibooker, histoParameters.c_str(), histoName.c_str());
470  }
471  }
472  return me;
473 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ParameterSet conf_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)

◆ hitStudy()

void SiStripMonitorTrack::hitStudy ( const edm::Event ev,
const edm::DetSetVector< SiStripDigi > &  digilist,
const ProjectedSiStripRecHit2D projhit,
const SiStripMatchedRecHit2D matchedhit,
const SiStripRecHit2D hit2D,
const SiStripRecHit1D hit1D,
LocalVector  localMomentum,
const bool  track_ok 
)
private

Definition at line 1002 of file SiStripMonitorTrack.cc.

References makeMEIFBenchmarkPlots::ev, TrackingRecHit::geographicalId(), TrackerGeometry::idToDet(), LogDebug, LogTrace, visualization-live-secondInstance_cfg::m, PV3DBase< T, PVType, FrameType >::mag(), GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), ProjectedSiStripRecHit2D::originalHit(), DetId::rawId(), alignCSCRings::s, GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), tkgeom_, GeomDet::toGlobal(), GeomDet::toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by trackStudyFromTrack().

1009  {
1010  LocalVector statedirection;
1011  if (matchedhit) { // type=Matched;
1012  LogTrace("SiStripMonitorTrack") << "\nMatched recHit found" << std::endl;
1013 
1014  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(matchedhit->geographicalId()));
1015 
1016  GlobalVector gtrkdirup = gdet->toGlobal(localMomentum);
1017 
1018  //mono side
1019  const GeomDetUnit* monodet = gdet->monoDet();
1020  statedirection = monodet->toLocal(gtrkdirup);
1021  SiStripRecHit2D m = matchedhit->monoHit();
1022  if (statedirection.mag())
1023  RecHitInfo<SiStripRecHit2D>(&m, statedirection, digilist, ev, track_ok);
1024 
1025  //stereo side
1026  const GeomDetUnit* stereodet = gdet->stereoDet();
1027  statedirection = stereodet->toLocal(gtrkdirup);
1028  SiStripRecHit2D s = matchedhit->stereoHit();
1029  if (statedirection.mag())
1030  RecHitInfo<SiStripRecHit2D>(&s, statedirection, digilist, ev, track_ok);
1031  } else if (projhit) { // type=Projected;
1032  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found" << std::endl;
1033 
1034  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(projhit->geographicalId()));
1035 
1036  GlobalVector gtrkdirup = gdet->toGlobal(localMomentum);
1037  const SiStripRecHit2D originalhit = projhit->originalHit();
1038 
1039  const GeomDetUnit* det;
1040  if (!StripSubdetector(originalhit.geographicalId().rawId()).stereo()) {
1041  //mono side
1042  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found MONO" << std::endl;
1043  det = gdet->monoDet();
1044  statedirection = det->toLocal(gtrkdirup);
1045  if (statedirection.mag())
1046  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
1047  } else {
1048  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found STEREO" << std::endl;
1049  //stereo side
1050  det = gdet->stereoDet();
1051  statedirection = det->toLocal(gtrkdirup);
1052  if (statedirection.mag())
1053  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
1054  }
1055  } else if (hit2D) { // type=2D
1056  statedirection = localMomentum;
1057  if (statedirection.mag())
1058  RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist, ev, track_ok);
1059  } else if (hit1D) { // type=1D
1060  statedirection = localMomentum;
1061  if (statedirection.mag())
1062  RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist, ev, track_ok);
1063  } else {
1064  LogDebug("SiStripMonitorTrack") << " LocalMomentum: " << statedirection
1065  << "\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
1066  }
1067 }
SiStripRecHit2D stereoHit() const
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
T z() const
Definition: PV3DBase.h:61
const TrackerGeometry * tkgeom_
#define LogTrace(id)
T x() const
Definition: PV3DBase.h:59
T mag() const
Definition: PV3DBase.h:64
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
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
SiStripRecHit2D originalHit() const
SiStripRecHit2D monoHit() const
#define LogDebug(id)

◆ RecHitInfo()

template<class T >
void SiStripMonitorTrack::RecHitInfo ( const T tkrecHit,
LocalVector  LV,
const edm::DetSetVector< SiStripDigi > &  digilist,
const edm::Event ev,
bool  track_ok 
)
private

Definition at line 1213 of file SiStripMonitorTrack.cc.

References clusterInfos(), findMEs(), TrackerGeometry::idToDet(), LogTrace, EcalMEFormatter_cfi::MEs, OnTrack, PV3DBase< T, PVType, FrameType >::phi(), funct::pow(), SiStripClusterInfo::setCluster(), siStripClusterInfo_, SiStripClusterInfo::siStripGain(), SiStripClusterInfo::siStripQuality(), DetId::subdetId(), SiStripDetId::TIB, tkgeom_, SiStripDetId::TOB, GeomDet::toGlobal(), trackerTopology_, vPSiStripCluster, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

1217  {
1218  if (!tkrecHit->isValid()) {
1219  LogTrace("SiStripMonitorTrack") << "\t\t Invalid Hit " << std::endl;
1220  return;
1221  }
1222 
1223  const uint32_t& detid = tkrecHit->geographicalId().rawId();
1224 
1225  LogTrace("SiStripMonitorTrack")
1226  << "\n\t\tRecHit on det " << detid << "\n\t\tRecHit in LP " << tkrecHit->localPosition() << "\n\t\tRecHit in GP "
1227  << tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition())
1228  << "\n\t\tRecHit trackLocal vector " << LV.x() << " " << LV.y() << " " << LV.z() << std::endl;
1229 
1230  //Get SiStripCluster from SiStripRecHit
1231  if (tkrecHit != nullptr && tkrecHit->isValid()) {
1232  const DetId detid = tkrecHit->geographicalId();
1233  int subDet = detid.subdetId();
1234  //std::cout << __LINE__ << std::endl;
1235  float clust_Pos1 = -1000;
1236  float clust_Pos2 = -1000;
1237 
1238  GlobalPoint theGlobalPos =
1239  tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition());
1240  if (subDet == SiStripDetId::TIB || subDet == SiStripDetId::TOB) {
1241  clust_Pos1 = theGlobalPos.z();
1242  clust_Pos2 = theGlobalPos.phi();
1243  } else {
1244  clust_Pos1 = pow(theGlobalPos.x() * theGlobalPos.x() + theGlobalPos.y() * theGlobalPos.y(), 0.5);
1245  clust_Pos2 = theGlobalPos.phi();
1246  }
1247 
1248  const SiStripCluster* SiStripCluster_ = &*(tkrecHit->cluster());
1249  siStripClusterInfo_.setCluster(*SiStripCluster_, detid);
1250 
1251  const Det2MEs MEs = findMEs(trackerTopology_, detid);
1253  detid,
1254  OnTrack,
1255  track_ok,
1256  LV,
1257  MEs,
1261  digilist,
1262  clust_Pos1,
1263  clust_Pos2)) {
1264  vPSiStripCluster.insert(SiStripCluster_);
1265  }
1266  } else {
1267  edm::LogError("SiStripMonitorTrack") << "NULL hit" << std::endl;
1268  }
1269 }
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
void setCluster(const SiStripCluster &cluster, int detId)
T z() const
Definition: PV3DBase.h:61
math::XYZTLorentzVectorD LV
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
const TrackerGeometry * tkgeom_
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs &MEs, const TrackerTopology *tTopo, const SiStripGain *stripGain, const SiStripQuality *stripQuality, const edm::DetSetVector< SiStripDigi > &digilist, float clustZ, float clustPhi)
const SiStripGain * siStripGain() const
Log< level::Error, false > LogError
#define LogTrace(id)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
std::unordered_set< const SiStripCluster * > vPSiStripCluster
const SiStripQuality * siStripQuality() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
SiStripClusterInfo siStripClusterInfo_
static constexpr auto TOB
Definition: SiStripDetId.h:39
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
Definition: DetId.h:17
static constexpr auto TIB
Definition: SiStripDetId.h:37
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
const TrackerTopology * trackerTopology_

◆ return2DME()

void SiStripMonitorTrack::return2DME ( MonitorElement input1,
MonitorElement input2,
int  binx,
int  biny,
double  value 
)
private

Definition at line 1479 of file SiStripMonitorTrack.cc.

References input1, input2, and relativeConstraints::value.

Referenced by fillControlViewHistos().

1479  {
1480  if (input1->getBinContent(binx, biny) == 0.) {
1481  input1->setBinContent(binx, biny, value);
1482  input2->setBinContent(binx, biny, 1);
1483  } else {
1484  double nentries = input2->getBinContent(binx, biny);
1485  double theMeanSoN = (input1->getBinContent(binx, biny) * nentries + value) / (nentries + 1);
1486  //input1->setBinContent(binx,biny,((input1->getBinContent(binx,biny)+value)/2.));
1487  input1->setBinContent(binx, biny, theMeanSoN);
1488  input2->setBinContent(binx, biny, input2->getBinContent(binx, biny) + 1);
1489  }
1490 }
#define input2
Definition: AMPTWrapper.h:159
#define input1
Definition: AMPTWrapper.h:139
Definition: value.py:1

◆ trackFilter()

bool SiStripMonitorTrack::trackFilter ( const reco::Track track)
private

Definition at line 1097 of file SiStripMonitorTrack.cc.

References HLT_2024v10_cff::track.

Referenced by trackStudyFromTrack(), and trackStudyFromTrajectory().

1097  {
1098  if (track.pt() < 0.8)
1099  return false;
1100  if (track.p() < 2.0)
1101  return false;
1102  if (track.hitPattern().numberOfValidTrackerHits() <= 6)
1103  return false;
1104  if (track.normalizedChi2() > 10.0)
1105  return false;
1106  return true;
1107 }

◆ trackStudy()

void SiStripMonitorTrack::trackStudy ( const edm::Event ev)
private

Definition at line 1069 of file SiStripMonitorTrack.cc.

References digiToken_, makeMEIFBenchmarkPlots::ev, edm::HandleBase::isValid(), edm::Handle< T >::product(), TrackLabel_, trackStudyFromTrajectory(), and trackToken_.

Referenced by analyze().

1069  {
1070  using namespace std;
1071  using namespace edm;
1072  using namespace reco;
1073 
1074  // edm::Handle<std::vector<Trajectory> > trajectories;
1075  // ev.getByToken(trajectoryToken_, trajectories);
1076 
1077  // track input
1078  edm::Handle<reco::TrackCollection> trackCollectionHandle;
1079  ev.getByToken(trackToken_, trackCollectionHandle); //takes the track collection
1080 
1081  // digis list
1083  ev.getByToken(digiToken_, digihandle);
1085  auto& digilist = digihandle.isValid() ? *(digihandle.product()) : dummy;
1086 
1087  if (trackCollectionHandle.isValid()) {
1088  trackStudyFromTrajectory(trackCollectionHandle, digilist, ev);
1089  } else {
1090  edm::LogError("SiStripMonitorTrack") << "also Track Collection is not valid !! " << TrackLabel_ << std::endl;
1091  return;
1092  }
1093 }
edm::EDGetTokenT< reco::TrackCollection > trackToken_
T const * product() const
Definition: Handle.h:70
Log< level::Error, false > LogError
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
bool isValid() const
Definition: HandleBase.h:70
void trackStudyFromTrajectory(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
fixed size matrix
HLT enums.

◆ trackStudyFromTrack()

void SiStripMonitorTrack::trackStudyFromTrack ( edm::Handle< reco::TrackCollection trackCollectionHandle,
const edm::DetSetVector< SiStripDigi > &  digilist,
const edm::Event ev 
)
private

Definition at line 1109 of file SiStripMonitorTrack.cc.

References DetId::det(), makeMEIFBenchmarkPlots::ev, hitStudy(), tkhisto_NumberInactiveHits, tkhisto_NumberValidHits, tkhisto_NumMissingHits, TkHistoMap_On_, HLT_2024v10_cff::track, JetHT_cfg::trackCollection, DetId::Tracker, and trackFilter().

1111  {
1112  //numTracks = trackCollectionHandle->size();
1113  reco::TrackCollection trackCollection = *trackCollectionHandle;
1114  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
1115  track != etrack;
1116  ++track) {
1117  bool track_ok = trackFilter(*track);
1118  // const reco::TransientTrack transientTrack = transientTrackBuilder->build(track);
1119 
1120  for (trackingRecHit_iterator hit = track->recHitsBegin(), ehit = track->recHitsEnd(); hit != ehit; ++hit) {
1121  if (TkHistoMap_On_) {
1122  uint32_t thedetid = (*hit)->rawId();
1123  if (SiStripDetId(thedetid).subDetector() >= 3 &&
1124  SiStripDetId(thedetid).subDetector() <= 6) { //TIB/TID + TOB + TEC only
1125  if (((*hit)->getType() == 1))
1126  tkhisto_NumMissingHits->add(thedetid, 1.);
1127  if (((*hit)->getType() == 2))
1128  tkhisto_NumberInactiveHits->add(thedetid, 1.);
1129  if (((*hit)->getType() == 0))
1130  tkhisto_NumberValidHits->add(thedetid, 1.);
1131  }
1132  }
1133 
1134  if (!(*hit)->isValid())
1135  continue;
1136  DetId detID = (*hit)->geographicalId();
1137  if (detID.det() != DetId::Tracker)
1138  continue;
1139  const TrackingRecHit* theHit = (*hit);
1140  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>((theHit));
1141  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>((theHit));
1142  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>((theHit));
1143  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>((theHit));
1144 
1145  // GlobalPoint globalPoint = hit->globalPosition();
1146  // reco::TrajectoryStateOnSurface stateOnSurface = transientTrack->stateOnSurface(globalPoint);
1147 
1148  LocalVector localMomentum;
1149  hitStudy(ev, digilist, projhit, matchedhit, hit2D, hit1D, localMomentum, track_ok);
1150  }
1151 
1152  // hit pattern of the track
1153  // const reco::HitPattern & hitsPattern = track->hitPattern();
1154  // loop over the hits of the track
1155  // for (int i=0; i<hitsPattern.numberOfAllHits(); i++) {
1156  // for (int i=0; i<hitsPattern.numberOfAllHits(reco::HitPattern::TRACK_HITS); i++) {
1157  // uint32_t hit = hitsPattern.getHitPattern(reco::HitPattern::TRACK_HITS,i);
1158 
1159  // if the hit is valid and in pixel barrel, print out the layer
1160  // if (hitsPattern.validHitFilter(hit) && hitsPattern.pixelBarrelHitFilter(hit))
1161 
1162  // if (!hitsPattern.validHitFilter(hit)) continue;
1163  // if (hitsPattern.pixelHitFilter(hit)) std::cout << "pixel" << std::endl; // pixel
1164  // if (hitsPattern.pixelBarrelHitFilter(hit)) std::cout << "pixel barrel" << std::endl; // pixel barrel
1165  // if (hitsPattern.pixelEndcapHitFilter(hit)) std::cout << "pixel endcap" << std::endl; // pixel endcap
1166  // if (hitsPattern.stripHitFilter(hit)) std::cout << "strip" << std::endl; // strip
1167  // if (hitsPattern.stripTIBHitFilter(hit)) std::cout << "TIB" << std::endl; // strip TIB
1168  // if (hitsPattern.stripTIDHitFilter(hit)) std::cout << "TID" << std::endl; // strip TID
1169  // if (hitsPattern.stripTOBHitFilter(hit)) std::cout << "TOB" << std::endl; // strip TOB
1170  // if (hitsPattern.stripTECHitFilter(hit)) std::cout << "TEC" << std::endl; // strip TEC
1171  // if (hitsPattern.muonDTHitFilter(hit)) std::cout << "DT" << std::endl; // muon DT
1172  // if (hitsPattern.muonCSCHitFilter(hit)) std::cout << "CSC" << std::endl; // muon CSC
1173  // if (hitsPattern.muonRPCHitFilter(hit)) std::cout << "RPC" << std::endl; // muon RPC
1174  //
1175  // // expert level: printout the hit in 10-bit binary format
1176  // std::cout << "hit in 10-bit binary format = ";
1177  // for (int j=9; j>=0; j--) {
1178  // int bit = (hit >> j) & 0x1;
1179  // std::cout << bit;
1180  // }
1181  // std::cout << std::endl;
1182  // }
1183  }
1184 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool trackFilter(const reco::Track &track)
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
trackCollection
Definition: JetHT_cfg.py:51
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
Definition: DetId.h:17
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
void hitStudy(const edm::Event &ev, const edm::DetSetVector< SiStripDigi > &digilist, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum, const bool track_ok)

◆ trackStudyFromTrajectory()

void SiStripMonitorTrack::trackStudyFromTrajectory ( edm::Handle< reco::TrackCollection trackCollectionHandle,
const edm::DetSetVector< SiStripDigi > &  digilist,
const edm::Event ev 
)
private

Definition at line 1186 of file SiStripMonitorTrack.cc.

References makeMEIFBenchmarkPlots::ev, mps_fire::i, LogDebug, numTracks, HLT_2024v10_cff::track, JetHT_cfg::trackCollection, trackFilter(), and trajectoryStudy().

Referenced by trackStudy().

1188  {
1189  //Perform track study
1190  int i = 0;
1191  reco::TrackCollection trackCollection = *trackCollectionHandle;
1192  numTracks = trackCollection.size();
1193  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
1194  track != etrack;
1195  ++track) {
1196  LogDebug("SiStripMonitorTrack") << "Track number " << ++i << std::endl;
1197  // << "\n\tmomentum: " << trackref->momentum()
1198  // << "\n\tPT: " << trackref->pt()
1199  // << "\n\tvertex: " << trackref->vertex()
1200  // << "\n\timpact parameter: " << trackref->d0()
1201  // << "\n\tcharge: " << trackref->charge()
1202  // << "\n\tnormalizedChi2: " << trackref->normalizedChi2()
1203  // <<"\n\tFrom EXTRA : "
1204  // <<"\n\t\touter PT "<< trackref->outerPt()<<std::endl;
1205 
1206  // trajectoryStudy(traj_iterator,trackref);
1207  bool track_ok = trackFilter(*track);
1208  trajectoryStudy(*track, digilist, ev, track_ok);
1209  }
1210 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool trackFilter(const reco::Track &track)
trackCollection
Definition: JetHT_cfg.py:51
void trajectoryStudy(const reco::Track &track, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
#define LogDebug(id)

◆ trajectoryStudy()

void SiStripMonitorTrack::trajectoryStudy ( const reco::Track track,
const edm::DetSetVector< SiStripDigi > &  digilist,
const edm::Event ev,
bool  track_ok 
)
private

Definition at line 910 of file SiStripMonitorTrack.cc.

References cms::cuda::assert(), makeMEIFBenchmarkPlots::ev, TrackingRecHit::geographicalId(), h, hcalSimParameters_cfi::hb, TrackerGeometry::idToDet(), LogDebug, LogTrace, visualization-live-secondInstance_cfg::m, GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), ProjectedSiStripRecHit2D::originalHit(), DetId::rawId(), alignCSCRings::s, GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), tkgeom_, tkhisto_NumberInactiveHits, tkhisto_NumberValidHits, tkhisto_NumMissingHits, TkHistoMap_On_, GeomDet::toGlobal(), GeomDet::toLocal(), and HLT_2024v10_cff::track.

Referenced by trackStudyFromTrajectory().

913  {
914  auto const& trajParams = track.extra()->trajParams();
915  assert(trajParams.size() == track.recHitsSize());
916  auto hb = track.recHitsBegin();
917  for (unsigned int h = 0; h < track.recHitsSize(); h++) {
918  auto ttrh = *(hb + h);
919 
920  if (TkHistoMap_On_) {
921  uint32_t thedetid = ttrh->rawId();
922  if (SiStripDetId(thedetid).subDetector() >= 3 &&
923  SiStripDetId(thedetid).subDetector() <= 6) { //TIB/TID + TOB + TEC only
924  if ((ttrh->getType() == 1))
925  tkhisto_NumMissingHits->fill(thedetid, 1.);
926  if ((ttrh->getType() == 2))
927  tkhisto_NumberInactiveHits->fill(thedetid, 1.);
928  if ((ttrh->getType() == 0))
929  tkhisto_NumberValidHits->fill(thedetid, 1.);
930  }
931  }
932 
933  if (!ttrh->isValid())
934  continue;
935 
936  //trajectory local direction and position on detector
937  auto statedirection = trajParams[h].momentum();
938 
939  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>(ttrh->hit());
940  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(ttrh->hit());
941  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(ttrh->hit());
942  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(ttrh->hit());
943 
944  // RecHitType type=Single;
945 
946  if (matchedhit) {
947  LogTrace("SiStripMonitorTrack") << "\nMatched recHit found" << std::endl;
948  // type=Matched;
949 
950  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(matchedhit->geographicalId()));
951  GlobalVector gtrkdirup = gdet->toGlobal(statedirection);
952  //mono side
953  const GeomDetUnit* monodet = gdet->monoDet();
954  statedirection = monodet->toLocal(gtrkdirup);
955  SiStripRecHit2D m = matchedhit->monoHit();
956  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&m,statedirection,trackref);
957  if (statedirection.mag())
958  RecHitInfo<SiStripRecHit2D>(&m, statedirection, digilist, ev, track_ok);
959  //stereo side
960  const GeomDetUnit* stereodet = gdet->stereoDet();
961  statedirection = stereodet->toLocal(gtrkdirup);
962  SiStripRecHit2D s = matchedhit->stereoHit();
963  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&s,statedirection,trackref);
964  if (statedirection.mag())
965  RecHitInfo<SiStripRecHit2D>(&s, statedirection, digilist, ev, track_ok);
966  } else if (projhit) {
967  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found" << std::endl;
968  // type=Projected;
969  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(projhit->geographicalId()));
970 
971  GlobalVector gtrkdirup = gdet->toGlobal(statedirection);
972  const SiStripRecHit2D originalhit = projhit->originalHit();
973  const GeomDetUnit* det;
974  if (!StripSubdetector(originalhit.geographicalId().rawId()).stereo()) {
975  //mono side
976  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found MONO" << std::endl;
977  det = gdet->monoDet();
978  statedirection = det->toLocal(gtrkdirup);
979  if (statedirection.mag())
980  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
981  } else {
982  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found STEREO" << std::endl;
983  //stereo side
984  det = gdet->stereoDet();
985  statedirection = det->toLocal(gtrkdirup);
986  if (statedirection.mag())
987  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
988  }
989  } else if (hit2D) {
990  if (statedirection.mag())
991  RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist, ev, track_ok);
992  } else if (hit1D) {
993  if (statedirection.mag())
994  RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist, ev, track_ok);
995  } else {
996  LogDebug("SiStripMonitorTrack") << " LocalMomentum: " << statedirection
997  << "\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
998  }
999  }
1000 }
SiStripRecHit2D stereoHit() const
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
const TrackerGeometry * tkgeom_
assert(be >=bs)
#define LogTrace(id)
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
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
SiStripRecHit2D originalHit() const
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
SiStripRecHit2D monoHit() const
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define LogDebug(id)

Member Data Documentation

◆ applyClusterQuality_

bool SiStripMonitorTrack::applyClusterQuality_
private

Definition at line 303 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ clchCMoriginTkHmap_On_

bool SiStripMonitorTrack::clchCMoriginTkHmap_On_
private

Definition at line 292 of file SiStripMonitorTrack.h.

Referenced by book(), clusterInfos(), and SiStripMonitorTrack().

◆ Cluster_src_

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 270 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

◆ ClusterCount_OnTrack_FECCratevsFECSlot

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECCratevsFECSlot = nullptr
private

Definition at line 324 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TECM

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TECM = nullptr
private

Definition at line 327 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TECP

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TECP = nullptr
private

Definition at line 328 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID = nullptr
private

Definition at line 325 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TOB

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TOB = nullptr
private

Definition at line 326 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECCratevsFECSlot

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECCratevsFECSlot = nullptr
private

Definition at line 318 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM = nullptr
private

Definition at line 321 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP = nullptr
private

Definition at line 322 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = nullptr
private

Definition at line 319 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB = nullptr
private

Definition at line 320 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TECM

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TECM = nullptr
private

Definition at line 316 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TECP

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TECP = nullptr
private

Definition at line 317 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TIBTID

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TIBTID = nullptr
private

Definition at line 314 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TOB

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TOB = nullptr
private

Definition at line 315 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ clusterToken_

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

Definition at line 273 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

◆ conf_

edm::ParameterSet SiStripMonitorTrack::conf_
private

◆ dcsStatus_

SiStripDCSStatus* SiStripMonitorTrack::dcsStatus_
private

Definition at line 309 of file SiStripMonitorTrack.h.

Referenced by analyze(), SiStripMonitorTrack(), and ~SiStripMonitorTrack().

◆ digiToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > SiStripMonitorTrack::digiToken_
private

Definition at line 272 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), SiStripMonitorTrack(), and trackStudy().

◆ eventNb

edm::EventNumber_t SiStripMonitorTrack::eventNb
private

Definition at line 300 of file SiStripMonitorTrack.h.

Referenced by analyze(), and clusterInfos().

◆ firstEvent

int SiStripMonitorTrack::firstEvent
private

Definition at line 301 of file SiStripMonitorTrack.h.

Referenced by looper.Looper::loop(), and Printer.Printer::process().

◆ folderOrganizer_

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 311 of file SiStripMonitorTrack.h.

Referenced by findMEs().

◆ genTriggerEventFlag_

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 310 of file SiStripMonitorTrack.h.

Referenced by analyze(), dqmBeginRun(), and ~SiStripMonitorTrack().

◆ histname

std::string SiStripMonitorTrack::histname
private

Definition at line 163 of file SiStripMonitorTrack.h.

◆ HistoFlag_On_

bool SiStripMonitorTrack::HistoFlag_On_
private

Definition at line 289 of file SiStripMonitorTrack.h.

◆ iLumisection

float SiStripMonitorTrack::iLumisection
private

Definition at line 165 of file SiStripMonitorTrack.h.

Referenced by analyze().

◆ iOrbitSec

float SiStripMonitorTrack::iOrbitSec
private

Definition at line 165 of file SiStripMonitorTrack.h.

◆ LayerMEsMap

std::map<std::string, LayerMEs> SiStripMonitorTrack::LayerMEsMap
private

Definition at line 259 of file SiStripMonitorTrack.h.

Referenced by book(), bookLayerMEs(), and findMEs().

◆ LV

LocalVector SiStripMonitorTrack::LV
private

Definition at line 164 of file SiStripMonitorTrack.h.

◆ Mod_On_

bool SiStripMonitorTrack::Mod_On_
private

Definition at line 286 of file SiStripMonitorTrack.h.

Referenced by book(), clusterInfos(), and SiStripMonitorTrack().

◆ ModMEsMap

std::map<std::string, ModMEs> SiStripMonitorTrack::ModMEsMap
private

Definition at line 258 of file SiStripMonitorTrack.h.

Referenced by bookModMEs(), and clusterInfos().

◆ numTracks

int SiStripMonitorTrack::numTracks
private

Definition at line 178 of file SiStripMonitorTrack.h.

Referenced by trackStudyFromTrajectory().

◆ OffHisto_On_

bool SiStripMonitorTrack::OffHisto_On_
private

Definition at line 288 of file SiStripMonitorTrack.h.

◆ Parameters

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 269 of file SiStripMonitorTrack.h.

Referenced by bookME1D(), bookME2D(), bookME3D(), and bookMEProfile().

◆ ring_flag

bool SiStripMonitorTrack::ring_flag
private

Definition at line 290 of file SiStripMonitorTrack.h.

◆ RingMEsMap

std::map<std::string, RingMEs> SiStripMonitorTrack::RingMEsMap
private

Definition at line 260 of file SiStripMonitorTrack.h.

Referenced by book(), bookRingMEs(), and findMEs().

◆ siStripClusterInfo_

SiStripClusterInfo SiStripMonitorTrack::siStripClusterInfo_
private

Definition at line 169 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), analyze(), fillControlViewHistos(), and RecHitInfo().

◆ siStripDetCabling_

const SiStripDetCabling* SiStripMonitorTrack::siStripDetCabling_ = nullptr
private

◆ siStripDetCablingToken_

edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> SiStripMonitorTrack::siStripDetCablingToken_
private

Definition at line 277 of file SiStripMonitorTrack.h.

Referenced by dqmBeginRun().

◆ sToNLowerLimit_

double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 304 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ sToNUpperLimit_

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 305 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ SubDetMEsMap

std::map<std::string, SubDetMEs> SiStripMonitorTrack::SubDetMEsMap
private

Definition at line 261 of file SiStripMonitorTrack.h.

Referenced by analyze(), book(), bookSubDetMEs(), and findMEs().

◆ tkDetMapToken_

edm::ESGetToken<TkDetMap, TrackerTopologyRcd> SiStripMonitorTrack::tkDetMapToken_
private

Definition at line 279 of file SiStripMonitorTrack.h.

Referenced by bookHistograms().

◆ tkgeom_

const TrackerGeometry* SiStripMonitorTrack::tkgeom_ = nullptr
private

◆ tkhisto_ClChPerCMfromOrigin

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_ClChPerCMfromOrigin
private

Definition at line 173 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_ClChPerCMfromTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_ClChPerCMfromTrack
private

Definition at line 173 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_ClusterWidthOffTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_ClusterWidthOffTrack
private

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_ClusterWidthOnTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_ClusterWidthOnTrack
private

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_NoiseOffTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NoiseOffTrack
private

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_NoiseOnTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NoiseOnTrack
private

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_NumberInactiveHits

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NumberInactiveHits
private

Definition at line 174 of file SiStripMonitorTrack.h.

Referenced by book(), trackStudyFromTrack(), and trajectoryStudy().

◆ tkhisto_NumberValidHits

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NumberValidHits
private

Definition at line 174 of file SiStripMonitorTrack.h.

Referenced by book(), trackStudyFromTrack(), and trajectoryStudy().

◆ tkhisto_NumMissingHits

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NumMissingHits
private

Definition at line 174 of file SiStripMonitorTrack.h.

Referenced by book(), trackStudyFromTrack(), and trajectoryStudy().

◆ tkhisto_NumOffTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NumOffTrack
private

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_NumOnTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_NumOnTrack
private

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ tkhisto_StoNCorrOnTrack

std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_StoNCorrOnTrack
private

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

◆ TkHistoMap_On_

bool SiStripMonitorTrack::TkHistoMap_On_
private

◆ topFolderName_

std::string SiStripMonitorTrack::topFolderName_
private

Definition at line 167 of file SiStripMonitorTrack.h.

Referenced by analyze(), book(), and SiStripMonitorTrack().

◆ trackAssociatorCollection_in_EventTree

bool SiStripMonitorTrack::trackAssociatorCollection_in_EventTree
private

Definition at line 299 of file SiStripMonitorTrack.h.

◆ trackerGeometryToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripMonitorTrack::trackerGeometryToken_
private

Definition at line 276 of file SiStripMonitorTrack.h.

Referenced by dqmBeginRun().

◆ trackerTopology_

const TrackerTopology* SiStripMonitorTrack::trackerTopology_ = nullptr
private

Definition at line 284 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), analyze(), fillControlViewHistos(), and RecHitInfo().

◆ trackerTopologyEventToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripMonitorTrack::trackerTopologyEventToken_
private

Definition at line 280 of file SiStripMonitorTrack.h.

Referenced by analyze().

◆ trackerTopologyRunToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripMonitorTrack::trackerTopologyRunToken_
private

Definition at line 278 of file SiStripMonitorTrack.h.

Referenced by bookHistograms().

◆ TrackLabel_

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 295 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

◆ TrackProducer_

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 294 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

◆ tracksCollection_in_EventTree

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 298 of file SiStripMonitorTrack.h.

◆ trackToken_

edm::EDGetTokenT<reco::TrackCollection> SiStripMonitorTrack::trackToken_
private

Definition at line 274 of file SiStripMonitorTrack.h.

Referenced by fillControlViewHistos(), SiStripMonitorTrack(), and trackStudy().

◆ Trend_On_

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 287 of file SiStripMonitorTrack.h.

Referenced by analyze(), bookSubDetMEs(), and SiStripMonitorTrack().

◆ vPSiStripCluster

std::unordered_set<const SiStripCluster*> SiStripMonitorTrack::vPSiStripCluster
private

Definition at line 297 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), analyze(), and RecHitInfo().

◆ widthLowerLimit_

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 306 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ widthUpperLimit_

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 307 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().