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(), HLT_2022v15_cff::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:303
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 1250 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().

1250  {
1251  const TrackerTopology* tTopo = trackerTopology_;
1252 
1254  ev.getByToken(digiToken_, digihandle);
1255 
1257  auto& digilist = digihandle.isValid() ? *(digihandle.product()) : dummy;
1258 
1260  ev.getByToken(clusterToken_, siStripClusterHandle);
1261 
1262  /*edm::ESHandle<StripClusterParameterEstimator> parameterestimator;
1263  es.get<TkStripCPERecord>().get("StripCPEfromTrackAngle", parameterestimator);
1264  const StripClusterParameterEstimator &stripcpe(*parameterestimator);*/
1265 
1266  if (siStripClusterHandle.isValid()) {
1267  //Loop on Dets
1268  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = siStripClusterHandle->begin(),
1269  DSVEnd = siStripClusterHandle->end();
1270  DSViter != DSVEnd;
1271  ++DSViter) {
1272  uint32_t detid = DSViter->id();
1273  const Det2MEs MEs = findMEs(tTopo, detid);
1274 
1275  LogDebug("SiStripMonitorTrack") << "on detid " << detid << " N Cluster= " << DSViter->size();
1276 
1277  //Loop on Clusters
1278  for (edmNew::DetSet<SiStripCluster>::const_iterator ClusIter = DSViter->begin(), ClusEnd = DSViter->end();
1279  ClusIter != ClusEnd;
1280  ++ClusIter) {
1281  if (vPSiStripCluster.find(&*ClusIter) == vPSiStripCluster.end()) {
1283 
1284  /*const StripGeomDetUnit * stripdet = (const StripGeomDetUnit*) tkgeom->idToDetUnit(detid);
1285  StripClusterParameterEstimator::LocalValues parameters=stripcpe.localParameters(*ClusIter, *stripdet);
1286  LocalPoint lp = parameters.first;
1287  const Surface& surface = tracker->idToDet(detid)->surface();
1288  GlobalPoint gp = surface.toGlobal(lp);*/
1289 
1291  detid,
1292  OffTrack,
1293  /*track_ok*/ false,
1294  LV,
1295  MEs,
1296  tTopo,
1299  digilist,
1300  0,
1301  0);
1302  }
1303  }
1304  }
1305  } else {
1306  edm::LogError("SiStripMonitorTrack") << "ClusterCollection is not valid!!" << std::endl;
1307  return;
1308  }
1309 }
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::nClustersTrendOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOnTrack, GenericTriggerEventFlag::on(), siStripClusterInfo_, SubDetMEsMap, topFolderName_, SiStripMonitorTrack::SubDetMEs::totNClustersOffTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrack, 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  }
123 
125 
126  //Perform track study
127  trackStudy(e);
128 
129  //Perform Cluster Study (irrespectively to tracks)
130 
131  AllClusters(e); //analyzes the off Track Clusters
132 
133  //Summary Counts of clusters
134  std::map<std::string, MonitorElement*>::iterator iME;
135  std::map<std::string, LayerMEs>::iterator iLayerME;
136 
137  if (!(topFolderName_.find("IsolatedBunches") != std::string::npos)) {
139  }
140 
141  if (Trend_On_) {
142  // for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin(), iterEnd=SubDetMEsMaps.end();
143  // iSubDet != iterEnd; ++iSubDet) {
144  for (auto const& iSubDet : SubDetMEsMap) {
145  SubDetMEs subdet_mes = iSubDet.second;
146  if (subdet_mes.totNClustersOnTrack > 0) {
147  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
148  }
149  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
150  fillME(subdet_mes.nClustersTrendOnTrack, iLumisection, subdet_mes.totNClustersOnTrack);
151  fillME(subdet_mes.nClustersTrendOffTrack, iLumisection, subdet_mes.totNClustersOffTrack);
152  }
153  } else {
154  for (auto const& iSubDet : SubDetMEsMap) {
155  SubDetMEs subdet_mes = iSubDet.second;
156  if (subdet_mes.totNClustersOnTrack > 0) {
157  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
158  }
159  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
160  }
161  }
162 }
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 165 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, 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().

165  {
166  SiStripFolderOrganizer folder_organizer;
167  folder_organizer.setSiStripFolderName(topFolderName_);
168  //******** TkHistoMaps
169  if (TkHistoMap_On_) {
171  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_StoNCorrOnTrack", 0.0, true);
173  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberOfOnTrackCluster", 0.0, true);
175  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberOfOfffTrackCluster", 0.0, true);
177  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ChargePerCMfromTrack", 0.0, true);
179  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberMissingHits", 0.0, true, true);
181  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberInactiveHits", 0.0, true, true);
183  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberValidHits", 0.0, true, true);
184  tkhisto_NoiseOnTrack = std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NoiseOnTrack", 0.0, true);
185  tkhisto_NoiseOffTrack = std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NoiseOffTrack", 0.0, true);
187  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ClusterWidthOnTrack", 0.0, true);
189  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ClusterWidthOffTrack", 0.0, true);
190  }
193  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ChargePerCMfromOrigin", 0.0, true);
194  //******** TkHistoMaps
195 
196  std::vector<uint32_t> vdetId_;
198  const char* tec = "TEC";
199  const char* tid = "TID";
200  //Histos for each detector, layer and module
201  SiStripHistoId hidmanager;
202 
203  if (Mod_On_) {
204  for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
205  detid_iter != detid_end;
206  ++detid_iter) { //loop on all the active detid
207  uint32_t detid = *detid_iter;
208 
209  if (detid < 1) {
210  edm::LogError("SiStripMonitorTrack") << "[" << __PRETTY_FUNCTION__ << "] invalid detid " << detid << std::endl;
211  continue;
212  }
213 
214  //std::string name;
215 
216  // book Layer and RING plots
217  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, false);
218  /*
219  std::string thickness;
220  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
221  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
222  */
223 
224  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
225 
226  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
227  if (iLayerME == LayerMEsMap.end()) {
228  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
229  bookLayerMEs(ibooker, detid, layer_id);
230  }
231 
232  const char* subdet = det_layer_pair.first.c_str();
233  if (std::strstr(subdet, tec) != nullptr || std::strstr(subdet, tid) != nullptr) {
234  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
235  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
236  if (iRingME == RingMEsMap.end()) {
237  std::pair<std::string, int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
238  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
239  bookRingMEs(ibooker, detid, ring_id);
240  }
241  }
242 
243  // book sub-detector plots
244  std::pair<std::string, std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
245  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()) {
246  ibooker.setCurrentFolder(sdet_pair.first);
247  bookSubDetMEs(ibooker, sdet_pair.second);
248  }
249  // book module plots
250  folder_organizer.setDetectorFolder(detid, tTopo);
251  bookModMEs(ibooker, *detid_iter);
252  } //end loop on detectors detid
253  } else {
254  for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
255  detid_iter != detid_end;
256  ++detid_iter) { //loop on all the active detid
257  uint32_t detid = *detid_iter;
258 
259  if (detid < 1) {
260  edm::LogError("SiStripMonitorTrack") << "[" << __PRETTY_FUNCTION__ << "] invalid detid " << detid << std::endl;
261  continue;
262  }
263 
264  //std::string name;
265 
266  // book Layer and RING plots
267  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, false);
268  /*
269  std::string thickness;
270  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
271  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
272  */
273 
274  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
275 
276  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
277  if (iLayerME == LayerMEsMap.end()) {
278  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
279  bookLayerMEs(ibooker, detid, layer_id);
280  }
281 
282  const char* subdet = det_layer_pair.first.c_str();
283  if (std::strstr(subdet, tec) != nullptr || std::strstr(subdet, tid) != nullptr) {
284  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
285  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
286  if (iRingME == RingMEsMap.end()) {
287  std::pair<std::string, int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
288  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
289  bookRingMEs(ibooker, detid, ring_id);
290  }
291  }
292 
293  // book sub-detector plots
294  std::pair<std::string, std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
295  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()) {
296  ibooker.setCurrentFolder(sdet_pair.first);
297  bookSubDetMEs(ibooker, sdet_pair.second);
298  }
299  } //end loop on detectors detid
300  }
301 
302  //book control view plots
303  if (!(topFolderName_.find("IsolatedBunches") != std::string::npos)) {
304  ibooker.setCurrentFolder(topFolderName_ + "/ControlView/");
305 
307  ibooker.book1D("ClusterStoNCorr_OnTrack_TIBTID", "TIB/TID [FECCrate=1] (OnTrack)", 100, 0., 100.);
309 
311  ibooker.book1D("ClusterStoNCorr_OnTrack_TOB", "TOB [FECCrate=4] (OnTrack)", 100, 0., 100.);
313 
315  ibooker.book1D("ClusterStoNCorr_OnTrack_TECM", "TECM [FECCrate=3] (OnTrack)", 100, 0., 100.);
317 
319  ibooker.book1D("ClusterStoNCorr_OnTrack_TECP", "TECP [FECCrate=2] (OnTrack)", 100, 0., 100.);
321 
323  ibooker.book2D("ClusterStoNCorr_OnTrack_FECCratevsFECSlot", " S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
325  ClusterStoNCorr_OnTrack_FECCratevsFECSlot->setAxisTitle("FEC Crate (TTC partition)", 2);
330 
331  ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = ibooker.book2D("ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID",
332  "TIB/TID [FECCrate=1] (OnTrack)",
333  10,
334  -0.5,
335  9.5,
336  22,
337  0.5,
338  22.5);
341 
343  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB", "TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
346 
348  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM", "TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
351 
353  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP", "TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
356 
357  //----------------------------------------
358  // for conting the number of clusters, for the mean S/N calculation
359  //book control view plots
360 
362  ibooker.book2D("ClusterCount_OnTrack_FECCratevsFECSlot", " S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
364  ClusterCount_OnTrack_FECCratevsFECSlot->setAxisTitle("FEC Crate (TTC partition)", 2);
369 
371  "ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID", "TIB/TID [FECCrate=1] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
374 
376  "ClusterCount_OnTrack_FECSlotVsFECRing_TOB", "TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
379 
381  "ClusterCount_OnTrack_FECSlotVsFECRing_TECM", "TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
384 
386  "ClusterCount_OnTrack_FECSlotVsFECRing_TECP", "TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
389  }
390 }
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 464 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_, 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().

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

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

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

808  {
809  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
810  return ibooker.book1D(HistoName,
811  HistoName,
812  Parameters.getParameter<int32_t>("Nbinx"),
813  Parameters.getParameter<double>("xmin"),
814  Parameters.getParameter<double>("xmax"));
815 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 818 of file SiStripMonitorTrack.cc.

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

820  {
821  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
822  return ibooker.book2D(HistoName,
823  HistoName,
824  Parameters.getParameter<int32_t>("Nbinx"),
825  Parameters.getParameter<double>("xmin"),
826  Parameters.getParameter<double>("xmax"),
827  Parameters.getParameter<int32_t>("Nbiny"),
828  Parameters.getParameter<double>("ymin"),
829  Parameters.getParameter<double>("ymax"));
830 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 833 of file SiStripMonitorTrack.cc.

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

835  {
836  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
837  return ibooker.book3D(HistoName,
838  HistoName,
839  Parameters.getParameter<int32_t>("Nbinx"),
840  Parameters.getParameter<double>("xmin"),
841  Parameters.getParameter<double>("xmax"),
842  Parameters.getParameter<int32_t>("Nbiny"),
843  Parameters.getParameter<double>("ymin"),
844  Parameters.getParameter<double>("ymax"),
845  Parameters.getParameter<int32_t>("Nbinz"),
846  Parameters.getParameter<double>("zmin"),
847  Parameters.getParameter<double>("zmax"));
848 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 851 of file SiStripMonitorTrack.cc.

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

Referenced by bookModMEs().

853  {
854  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
855  return ibooker.bookProfile(HistoName,
856  HistoName,
857  Parameters.getParameter<int32_t>("Nbinx"),
858  Parameters.getParameter<double>("xmin"),
859  Parameters.getParameter<double>("xmax"),
860  Parameters.getParameter<int32_t>("Nbiny"),
861  Parameters.getParameter<double>("ymin"),
862  Parameters.getParameter<double>("ymax"),
863  "");
864 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 867 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().

868  {
869  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
871  HistoName,
872  ParametersTrend.getParameter<int32_t>("Nbins"),
873  ParametersTrend.getParameter<double>("xmin"),
874  ParametersTrend.getParameter<double>("xmax"),
875  0,
876  0,
877  "");
878  if (me->kind() == MonitorElement::Kind::TPROFILE)
879  me->setCanExtend(TH1::kAllAxes);
880 
881  if (!me)
882  return me;
883  me->setAxisTitle("Lumisection", 1);
884  return me;
885 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 393 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().

394 {
395  std::string name = "det";
396  SiStripHistoId hidmanager;
397  std::string hid = hidmanager.createHistoId("", name, id);
398  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(hid);
399  if (iModME == ModMEsMap.end()) {
400  ModMEs theModMEs;
401 
402  // Cluster Width
403  theModMEs.ClusterWidth =
404  bookME1D(ibooker, "TH1ClusterWidth", hidmanager.createHistoId("ClusterWidth_OnTrack", name, id).c_str());
405  // Cluster Gain
406  theModMEs.ClusterGain =
407  bookME1D(ibooker, "TH1ClusterGain", hidmanager.createHistoId("ClusterGain", name, id).c_str());
408  // Cluster Charge
409  theModMEs.ClusterCharge =
410  bookME1D(ibooker, "TH1ClusterCharge", hidmanager.createHistoId("ClusterCharge_OnTrack", name, id).c_str());
411  // Cluster Charge Raw (no gain )
412  theModMEs.ClusterChargeRaw = bookME1D(
413  ibooker, "TH1ClusterChargeRaw", hidmanager.createHistoId("ClusterChargeRaw_OnTrack", name, id).c_str());
414  // Cluster Charge Corrected
415  theModMEs.ClusterChargeCorr = bookME1D(
416  ibooker, "TH1ClusterChargeCorr", hidmanager.createHistoId("ClusterChargeCorr_OnTrack", name, id).c_str());
417  // Cluster StoN Corrected
418  theModMEs.ClusterStoNCorr = bookME1D(
419  ibooker, "TH1ClusterStoNCorrMod", hidmanager.createHistoId("ClusterStoNCorr_OnTrack", name, id).c_str());
420  // Cluster Position
421  short total_nr_strips = siStripDetCabling_->nApvPairs(id) * 2 * 128;
422  theModMEs.ClusterPos = ibooker.book1D(hidmanager.createHistoId("ClusterPosition_OnTrack", name, id).c_str(),
423  hidmanager.createHistoId("ClusterPosition_OnTrack", name, id).c_str(),
424  total_nr_strips,
425  0.5,
426  total_nr_strips + 0.5);
427  // Cluster PGV
428  theModMEs.ClusterPGV =
429  bookMEProfile(ibooker, "TProfileClusterPGV", hidmanager.createHistoId("PGV_OnTrack", name, id).c_str());
430  // Cluster Charge per cm
431  theModMEs.ClusterChargePerCMfromTrack = bookME1D(
432  ibooker, "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromTrack", name, id).c_str());
433 
434  theModMEs.ClusterChargePerCMfromOrigin = bookME1D(
435  ibooker, "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromOrigin", name, id).c_str());
436 
437  ModMEsMap[hid] = theModMEs;
438  }
439 }
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 598 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().

598  {
599  std::string name = "ring";
600  std::string view = "ringView";
601  std::string hname;
602  std::string hpar;
603  SiStripHistoId hidmanager;
604 
605  RingMEs theRingMEs;
606 
607  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr", name, ring_id, "OnTrack");
608  hpar = "TH1ClusterStoNCorr";
609  theRingMEs.ClusterStoNCorrOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
610 
611  // Cluster Gain
612  hname = hidmanager.createHistoLayer("Summary_ClusterGain", name, ring_id, "");
613  hpar = "TH1ClusterGain";
614  theRingMEs.ClusterGain = handleBookMEs(ibooker, view, ring_id, hpar, hname);
615 
616  // Cluster Charge Corrected
617  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr", name, ring_id, "OnTrack");
618  hpar = "TH1ClusterChargeCorr";
619  theRingMEs.ClusterChargeCorrOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
620 
621  // Cluster Charge (On and Off Track)
622  hname = hidmanager.createHistoLayer("Summary_ClusterCharge", name, ring_id, "OnTrack");
623  hpar = "TH1ClusterCharge";
624  theRingMEs.ClusterChargeOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
625 
626  hname = hidmanager.createHistoLayer("Summary_ClusterCharge", name, ring_id, "OffTrack");
627  hpar = "TH1ClusterCharge";
628  theRingMEs.ClusterChargeOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
629 
630  // Cluster Charge Raw (no-gain), On and off track
631  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw", name, ring_id, "OnTrack");
632  hpar = "TH1ClusterChargeRaw";
633  theRingMEs.ClusterChargeRawOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
634 
635  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw", name, ring_id, "OffTrack");
636  hpar = "TH1ClusterChargeRaw";
637  theRingMEs.ClusterChargeRawOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
638 
639  // Cluster Noise (On and Off Track)
640  hname = hidmanager.createHistoLayer("Summary_ClusterNoise", name, ring_id, "OnTrack");
641  hpar = "TH1ClusterNoise";
642  theRingMEs.ClusterNoiseOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
643 
644  hname = hidmanager.createHistoLayer("Summary_ClusterNoise", name, ring_id, "OffTrack");
645  hpar = "TH1ClusterNoise";
646  theRingMEs.ClusterNoiseOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
647 
648  // Cluster Width (On and Off Track)
649  hname = hidmanager.createHistoLayer("Summary_ClusterWidth", name, ring_id, "OnTrack");
650  hpar = "TH1ClusterWidth";
651  theRingMEs.ClusterWidthOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
652 
653  hname = hidmanager.createHistoLayer("Summary_ClusterWidth", name, ring_id, "OffTrack");
654  hpar = "TH1ClusterWidth";
655  theRingMEs.ClusterWidthOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
656 
657  //Cluster Position
658  short total_nr_strips = siStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
659  if (ring_id.find("TEC") != std::string::npos)
660  total_nr_strips = 3 * 2 * 128;
661 
662  hname = hidmanager.createHistoLayer("Summary_ClusterPosition", name, ring_id, "OnTrack");
663  hpar = "TH1ClusterPos";
664  if ((conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()))
665  theRingMEs.ClusterPosOnTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5, total_nr_strips + 0.5);
666 
667  hname = hidmanager.createHistoLayer("Summary_ClusterPosition", name, ring_id, "OffTrack");
668  hpar = "TH1ClusterPos";
669  if ((conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()))
670  theRingMEs.ClusterPosOffTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5, total_nr_strips + 0.5);
671 
672  // dQ/dx
673  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromTrack", name, ring_id, "");
674  hpar = "TH1ClusterChargePerCM";
675  theRingMEs.ClusterChargePerCMfromTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
676 
677  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin", name, ring_id, "OnTrack");
678  hpar = "TH1ClusterChargePerCM";
679  theRingMEs.ClusterChargePerCMfromOriginOnTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
680 
681  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin", name, ring_id, "OffTrack");
682  hpar = "TH1ClusterChargePerCM";
683  theRingMEs.ClusterChargePerCMfromOriginOffTrack = handleBookMEs(ibooker, view, ring_id, hpar, hname);
684 
685  //bookeeping
686  RingMEsMap[ring_id] = theRingMEs;
687 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 692 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::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().

692  {
694  subdet_tag = "__" + name;
695  std::string completeName;
696  std::string axisName;
697 
698  SubDetMEs theSubDetMEs;
699 
700  // TotalNumber of Cluster OnTrack
701  completeName = "Summary_TotalNumberOfClusters_OnTrack" + subdet_tag;
702  axisName = "Number of on-track clusters in " + name;
703  theSubDetMEs.nClustersOnTrack = bookME1D(ibooker, "TH1nClustersOn", completeName.c_str());
704  theSubDetMEs.nClustersOnTrack->setAxisTitle(axisName);
705  theSubDetMEs.nClustersOnTrack->setStatOverflows(kTRUE);
706 
707  // TotalNumber of Cluster OffTrack
708  completeName = "Summary_TotalNumberOfClusters_OffTrack" + subdet_tag;
709  axisName = "Number of off-track clusters in " + name;
710  theSubDetMEs.nClustersOffTrack = bookME1D(ibooker, "TH1nClustersOff", completeName.c_str());
711  theSubDetMEs.nClustersOffTrack->setAxisTitle(axisName);
712 
713  double xmaximum = 0;
714  if (name.find("TIB") != std::string::npos) {
715  xmaximum = 40000.0;
716  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
717  }
718  if (name.find("TOB") != std::string::npos) {
719  xmaximum = 40000.0;
720  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
721  }
722  if (name.find("TID") != std::string::npos) {
723  xmaximum = 10000.0;
724  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
725  }
726  if (name.find("TEC") != std::string::npos) {
727  xmaximum = 40000.0;
728  theSubDetMEs.nClustersOffTrack->setAxisRange(0.0, xmaximum, 1);
729  }
730 
731  theSubDetMEs.nClustersOffTrack->setStatOverflows(kTRUE);
732 
733  // Cluster Gain
734  completeName = "Summary_ClusterGain" + subdet_tag;
735  theSubDetMEs.ClusterGain = bookME1D(ibooker, "TH1ClusterGain", completeName.c_str());
736 
737  // Cluster StoN On Track
738  completeName = "Summary_ClusterStoNCorr_OnTrack" + subdet_tag;
739  theSubDetMEs.ClusterStoNCorrOnTrack = bookME1D(ibooker, "TH1ClusterStoNCorr", completeName.c_str());
740 
741  completeName = "Summary_ClusterStoNCorrThin_OnTrack" + subdet_tag;
742  if (subdet_tag.find("TEC") != std::string::npos)
743  theSubDetMEs.ClusterStoNCorrThinOnTrack = bookME1D(ibooker, "TH1ClusterStoNCorr", completeName.c_str());
744 
745  completeName = "Summary_ClusterStoNCorrThick_OnTrack" + subdet_tag;
746  if (subdet_tag.find("TEC") != std::string::npos)
747  theSubDetMEs.ClusterStoNCorrThickOnTrack = bookME1D(ibooker, "TH1ClusterStoNCorr", completeName.c_str());
748 
749  // Cluster Charge Corrected
750  completeName = "Summary_ClusterChargeCorr_OnTrack" + subdet_tag;
751  theSubDetMEs.ClusterChargeCorrOnTrack = bookME1D(ibooker, "TH1ClusterChargeCorr", completeName.c_str());
752 
753  completeName = "Summary_ClusterChargeCorrThin_OnTrack" + subdet_tag;
754  if (subdet_tag.find("TEC") != std::string::npos)
755  theSubDetMEs.ClusterChargeCorrThinOnTrack = bookME1D(ibooker, "TH1ClusterChargeCorr", completeName.c_str());
756 
757  completeName = "Summary_ClusterChargeCorrThick_OnTrack" + subdet_tag;
758  if (subdet_tag.find("TEC") != std::string::npos)
759  theSubDetMEs.ClusterChargeCorrThickOnTrack = bookME1D(ibooker, "TH1ClusterChargeCorr", completeName.c_str());
760 
761  // Cluster Charge On Track
762  completeName = "Summary_ClusterCharge_OnTrack" + subdet_tag;
763  theSubDetMEs.ClusterChargeOnTrack = bookME1D(ibooker, "TH1ClusterCharge", completeName.c_str());
764 
765  // Cluster Charge On Track, Raw (no-gain)
766  completeName = "Summary_ClusterChargeRaw_OnTrack" + subdet_tag;
767  theSubDetMEs.ClusterChargeRawOnTrack = bookME1D(ibooker, "TH1ClusterChargeRaw", completeName.c_str());
768 
769  // Cluster Charge Off Track
770  completeName = "Summary_ClusterCharge_OffTrack" + subdet_tag;
771  theSubDetMEs.ClusterChargeOffTrack = bookME1D(ibooker, "TH1ClusterCharge", completeName.c_str());
772 
773  // Cluster Charge Off Track, Raw (no-gain)
774  completeName = "Summary_ClusterChargeRaw_OffTrack" + subdet_tag;
775  theSubDetMEs.ClusterChargeRawOffTrack = bookME1D(ibooker, "TH1ClusterChargeRaw", completeName.c_str());
776 
777  // Cluster Charge StoN Off Track
778  completeName = "Summary_ClusterStoN_OffTrack" + subdet_tag;
779  theSubDetMEs.ClusterStoNOffTrack = bookME1D(ibooker, "TH1ClusterStoN", completeName.c_str());
780 
781  // cluster charge per cm on track
782  completeName = "Summary_ClusterChargePerCMfromTrack" + subdet_tag;
783  theSubDetMEs.ClusterChargePerCMfromTrack = bookME1D(ibooker, "TH1ClusterChargePerCM", completeName.c_str());
784 
785  // cluster charge per cm on track
786  completeName = "Summary_ClusterChargePerCMfromOrigin_OnTrack" + subdet_tag;
787  theSubDetMEs.ClusterChargePerCMfromOriginOnTrack = bookME1D(ibooker, "TH1ClusterChargePerCM", completeName.c_str());
788 
789  // cluster charge per cm off track
790  completeName = "Summary_ClusterChargePerCMfromOrigin_OffTrack" + subdet_tag;
791  theSubDetMEs.ClusterChargePerCMfromOriginOffTrack = bookME1D(ibooker, "TH1ClusterChargePerCM", completeName.c_str());
792 
793  if (Trend_On_) {
794  // TotalNumber of Cluster
795  completeName = "Trend_TotalNumberOfClusters_OnTrack" + subdet_tag;
796  theSubDetMEs.nClustersTrendOnTrack = bookMETrend(ibooker, completeName.c_str());
797  completeName = "Trend_TotalNumberOfClusters_OffTrack" + subdet_tag;
798  theSubDetMEs.nClustersTrendOffTrack = bookMETrend(ibooker, completeName.c_str());
799  }
800 
801  //bookeeping
802  SubDetMEsMap[name] = theSubDetMEs;
803 }
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 1472 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(), 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().

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

Referenced by analyze().

1342  {
1343  const TrackerTopology* tTopo = trackerTopology_;
1344 
1346  ev.getByToken(trackToken_, tracks); //takes the track collection
1347 
1348  //check that tracks are valid
1349  if (!tracks.isValid())
1350  return false;
1351 
1352  // loop over the tracks
1353  for (const auto& track : *tracks) {
1354  // loop over the rechits of this track
1355  for (trackingRecHit_iterator hit = track.recHitsBegin(), ehit = track.recHitsEnd(); hit != ehit; ++hit) {
1356  uint32_t thedetid = (*hit)->rawId();
1357  if (!(DetId(thedetid).subdetId() >= 3 && DetId(thedetid).subdetId() <= 6)) {
1358  continue;
1359  }
1360 
1361  if (!(*hit)->isValid())
1362  continue;
1363 
1364  const TrackingRecHit* theHit = (*hit);
1365  if (theHit == nullptr) {
1366  continue;
1367  }
1368 
1369  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(theHit);
1370  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(theHit);
1371 
1372  float sovn = -1.;
1373  if (hit1D && !hit2D) {
1374  const SiStripCluster* SiStripCluster_ = &*(hit1D->cluster());
1375  siStripClusterInfo_.setCluster(*SiStripCluster_, thedetid);
1377  }
1378 
1379  else if (!hit1D && hit2D) {
1380  const SiStripCluster* SiStripCluster_ = &*(hit2D->cluster());
1381  siStripClusterInfo_.setCluster(*SiStripCluster_, thedetid);
1383  }
1384 
1385  std::vector<const FedChannelConnection*> getFedChanConnections;
1386  getFedChanConnections = siStripDetCabling_->getConnections(thedetid);
1387 
1388  // SiStripFolderOrganizer folder_organizer;
1389  // std::string sistripsubdet = folder_organizer.getSubDetFolderAndTag(thedetid, tTopo).second;
1390 
1391  // loop over the fed chan connections
1392  for (const auto& getFedChanConnection : getFedChanConnections) {
1393  if (getFedChanConnection == nullptr) {
1394  continue;
1395  }
1396 
1397  int binfeccrate = getFedChanConnection->fecCrate();
1398  int binfecslot = getFedChanConnection->fecSlot();
1399  int binfecring = getFedChanConnection->fecRing();
1400  //int binccuchan = getFedChanConnections[i0]->ccuChan(); //will be used in a new PR
1401  //int binccuadd = getFedChanConnections[i0]->ccuAddr(); //will be used in a new PR
1402 
1405  binfecslot,
1406  binfeccrate,
1407  sovn);
1408 
1409  // TIB/TID
1410  // if ((sistripsubdet.find("TIB")) || (sistripsubdet.find("TID"))) {
1411  if ((DetId(thedetid).subdetId() == SiStripDetId::TIB) || ((DetId(thedetid).subdetId() == SiStripDetId::TID))) {
1415  binfecring,
1416  binfecslot,
1417  sovn);
1418  }
1419 
1420  // TOB
1421  if (DetId(thedetid).subdetId() == SiStripDetId::TOB) {
1425  binfecring,
1426  binfecslot,
1427  sovn);
1428  }
1429 
1430  // TECM
1431  if ((DetId(thedetid).subdetId() == SiStripDetId::TEC) && (tTopo->tecSide(thedetid) == 1)) {
1435  binfecring,
1436  binfecslot,
1437  sovn);
1438  }
1439 
1440  // TECP
1441  if ((DetId(thedetid).subdetId() == SiStripDetId::TEC) && (tTopo->tecSide(thedetid) == 2)) {
1445  binfecring,
1446  binfecslot,
1447  sovn);
1448  }
1449 
1450  } // end of looping over the fed chan connections
1451  } // end of looping over the rechits of the track
1452  } // end of looping over the tracks
1453 
1454  return true;
1455 }
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_2022v15_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_2022v15_cff::value1, and HLT_2022v15_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_2022v15_cff::value1, and HLT_2022v15_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_2022v15_cff::value1, and HLT_2022v15_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 1312 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().

1312  {
1313  SiStripHistoId hidmanager1;
1314 
1315  std::string layer_id = hidmanager1.getSubdetid(detid, tTopo, false);
1316  std::string ring_id = hidmanager1.getSubdetid(detid, tTopo, true);
1317  std::string sdet_tag = folderOrganizer_.getSubDetFolderAndTag(detid, tTopo).second;
1318 
1319  Det2MEs me;
1320  me.iLayer = nullptr;
1321  me.iRing = nullptr;
1322  me.iSubdet = nullptr;
1323 
1324  std::map<std::string, LayerMEs>::iterator iLayer = LayerMEsMap.find(layer_id);
1325  if (iLayer != LayerMEsMap.end()) {
1326  me.iLayer = &(iLayer->second);
1327  }
1328 
1329  std::map<std::string, RingMEs>::iterator iRing = RingMEsMap.find(ring_id);
1330  if (iRing != RingMEsMap.end()) {
1331  me.iRing = &(iRing->second);
1332  }
1333 
1334  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_tag);
1335  if (iSubdet != SubDetMEsMap.end()) {
1336  me.iSubdet = &(iSubdet->second);
1337  }
1338 
1339  return me;
1340 }
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 441 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().

445  {
446  MonitorElement* me = nullptr;
447  bool view = false;
448  view = (conf_.getParameter<edm::ParameterSet>(histoParameters.c_str())).getParameter<bool>(viewParameter.c_str());
449  if (id.find("TEC") == std::string::npos && id.find("TID") == std::string::npos) {
450  me = bookME1D(ibooker, histoParameters.c_str(), histoName.c_str());
451  } else {
452  if (view) {
453  // histoName = histoName + "__" + thickness;
454  me = bookME1D(ibooker, histoParameters.c_str(), histoName.c_str());
455  }
456  }
457  return me;
458 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 980 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().

987  {
988  LocalVector statedirection;
989  if (matchedhit) { // type=Matched;
990  LogTrace("SiStripMonitorTrack") << "\nMatched recHit found" << std::endl;
991 
992  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(matchedhit->geographicalId()));
993 
994  GlobalVector gtrkdirup = gdet->toGlobal(localMomentum);
995 
996  //mono side
997  const GeomDetUnit* monodet = gdet->monoDet();
998  statedirection = monodet->toLocal(gtrkdirup);
999  SiStripRecHit2D m = matchedhit->monoHit();
1000  if (statedirection.mag())
1001  RecHitInfo<SiStripRecHit2D>(&m, statedirection, digilist, ev, track_ok);
1002 
1003  //stereo side
1004  const GeomDetUnit* stereodet = gdet->stereoDet();
1005  statedirection = stereodet->toLocal(gtrkdirup);
1006  SiStripRecHit2D s = matchedhit->stereoHit();
1007  if (statedirection.mag())
1008  RecHitInfo<SiStripRecHit2D>(&s, statedirection, digilist, ev, track_ok);
1009  } else if (projhit) { // type=Projected;
1010  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found" << std::endl;
1011 
1012  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(projhit->geographicalId()));
1013 
1014  GlobalVector gtrkdirup = gdet->toGlobal(localMomentum);
1015  const SiStripRecHit2D originalhit = projhit->originalHit();
1016 
1017  const GeomDetUnit* det;
1018  if (!StripSubdetector(originalhit.geographicalId().rawId()).stereo()) {
1019  //mono side
1020  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found MONO" << std::endl;
1021  det = gdet->monoDet();
1022  statedirection = det->toLocal(gtrkdirup);
1023  if (statedirection.mag())
1024  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
1025  } else {
1026  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found STEREO" << std::endl;
1027  //stereo side
1028  det = gdet->stereoDet();
1029  statedirection = det->toLocal(gtrkdirup);
1030  if (statedirection.mag())
1031  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
1032  }
1033  } else if (hit2D) { // type=2D
1034  statedirection = localMomentum;
1035  if (statedirection.mag())
1036  RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist, ev, track_ok);
1037  } else if (hit1D) { // type=1D
1038  statedirection = localMomentum;
1039  if (statedirection.mag())
1040  RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist, ev, track_ok);
1041  } else {
1042  LogDebug("SiStripMonitorTrack") << " LocalMomentum: " << statedirection
1043  << "\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
1044  }
1045 }
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 1191 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().

1195  {
1196  if (!tkrecHit->isValid()) {
1197  LogTrace("SiStripMonitorTrack") << "\t\t Invalid Hit " << std::endl;
1198  return;
1199  }
1200 
1201  const uint32_t& detid = tkrecHit->geographicalId().rawId();
1202 
1203  LogTrace("SiStripMonitorTrack")
1204  << "\n\t\tRecHit on det " << detid << "\n\t\tRecHit in LP " << tkrecHit->localPosition() << "\n\t\tRecHit in GP "
1205  << tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition())
1206  << "\n\t\tRecHit trackLocal vector " << LV.x() << " " << LV.y() << " " << LV.z() << std::endl;
1207 
1208  //Get SiStripCluster from SiStripRecHit
1209  if (tkrecHit != nullptr && tkrecHit->isValid()) {
1210  const DetId detid = tkrecHit->geographicalId();
1211  int subDet = detid.subdetId();
1212  //std::cout << __LINE__ << std::endl;
1213  float clust_Pos1 = -1000;
1214  float clust_Pos2 = -1000;
1215 
1216  GlobalPoint theGlobalPos =
1217  tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition());
1218  if (subDet == SiStripDetId::TIB || subDet == SiStripDetId::TOB) {
1219  clust_Pos1 = theGlobalPos.z();
1220  clust_Pos2 = theGlobalPos.phi();
1221  } else {
1222  clust_Pos1 = pow(theGlobalPos.x() * theGlobalPos.x() + theGlobalPos.y() * theGlobalPos.y(), 0.5);
1223  clust_Pos2 = theGlobalPos.phi();
1224  }
1225 
1226  const SiStripCluster* SiStripCluster_ = &*(tkrecHit->cluster());
1227  siStripClusterInfo_.setCluster(*SiStripCluster_, detid);
1228 
1229  const Det2MEs MEs = findMEs(trackerTopology_, detid);
1231  detid,
1232  OnTrack,
1233  track_ok,
1234  LV,
1235  MEs,
1239  digilist,
1240  clust_Pos1,
1241  clust_Pos2)) {
1242  vPSiStripCluster.insert(SiStripCluster_);
1243  }
1244  } else {
1245  edm::LogError("SiStripMonitorTrack") << "NULL hit" << std::endl;
1246  }
1247 }
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 1457 of file SiStripMonitorTrack.cc.

References input1, input2, and relativeConstraints::value.

Referenced by fillControlViewHistos().

1457  {
1458  if (input1->getBinContent(binx, biny) == 0.) {
1459  input1->setBinContent(binx, biny, value);
1460  input2->setBinContent(binx, biny, 1);
1461  } else {
1462  double nentries = input2->getBinContent(binx, biny);
1463  double theMeanSoN = (input1->getBinContent(binx, biny) * nentries + value) / (nentries + 1);
1464  //input1->setBinContent(binx,biny,((input1->getBinContent(binx,biny)+value)/2.));
1465  input1->setBinContent(binx, biny, theMeanSoN);
1466  input2->setBinContent(binx, biny, input2->getBinContent(binx, biny) + 1);
1467  }
1468 }
#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 1075 of file SiStripMonitorTrack.cc.

References HLT_2022v15_cff::track.

Referenced by trackStudyFromTrack(), and trackStudyFromTrajectory().

1075  {
1076  if (track.pt() < 0.8)
1077  return false;
1078  if (track.p() < 2.0)
1079  return false;
1080  if (track.hitPattern().numberOfValidTrackerHits() <= 6)
1081  return false;
1082  if (track.normalizedChi2() > 10.0)
1083  return false;
1084  return true;
1085 }

◆ trackStudy()

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

Definition at line 1047 of file SiStripMonitorTrack.cc.

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

Referenced by analyze().

1047  {
1048  using namespace std;
1049  using namespace edm;
1050  using namespace reco;
1051 
1052  // edm::Handle<std::vector<Trajectory> > trajectories;
1053  // ev.getByToken(trajectoryToken_, trajectories);
1054 
1055  // track input
1056  edm::Handle<reco::TrackCollection> trackCollectionHandle;
1057  ev.getByToken(trackToken_, trackCollectionHandle); //takes the track collection
1058 
1059  // digis list
1061  ev.getByToken(digiToken_, digihandle);
1063  auto& digilist = digihandle.isValid() ? *(digihandle.product()) : dummy;
1064 
1065  if (trackCollectionHandle.isValid()) {
1066  trackStudyFromTrajectory(trackCollectionHandle, digilist, ev);
1067  } else {
1068  edm::LogError("SiStripMonitorTrack") << "also Track Collection is not valid !! " << TrackLabel_ << std::endl;
1069  return;
1070  }
1071 }
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 1087 of file SiStripMonitorTrack.cc.

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

1089  {
1090  //numTracks = trackCollectionHandle->size();
1091  reco::TrackCollection trackCollection = *trackCollectionHandle;
1092  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
1093  track != etrack;
1094  ++track) {
1095  bool track_ok = trackFilter(*track);
1096  // const reco::TransientTrack transientTrack = transientTrackBuilder->build(track);
1097 
1098  for (trackingRecHit_iterator hit = track->recHitsBegin(), ehit = track->recHitsEnd(); hit != ehit; ++hit) {
1099  if (TkHistoMap_On_) {
1100  uint32_t thedetid = (*hit)->rawId();
1101  if (SiStripDetId(thedetid).subDetector() >= 3 &&
1102  SiStripDetId(thedetid).subDetector() <= 6) { //TIB/TID + TOB + TEC only
1103  if (((*hit)->getType() == 1))
1104  tkhisto_NumMissingHits->add(thedetid, 1.);
1105  if (((*hit)->getType() == 2))
1106  tkhisto_NumberInactiveHits->add(thedetid, 1.);
1107  if (((*hit)->getType() == 0))
1108  tkhisto_NumberValidHits->add(thedetid, 1.);
1109  }
1110  }
1111 
1112  if (!(*hit)->isValid())
1113  continue;
1114  DetId detID = (*hit)->geographicalId();
1115  if (detID.det() != DetId::Tracker)
1116  continue;
1117  const TrackingRecHit* theHit = (*hit);
1118  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>((theHit));
1119  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>((theHit));
1120  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>((theHit));
1121  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>((theHit));
1122 
1123  // GlobalPoint globalPoint = hit->globalPosition();
1124  // reco::TrajectoryStateOnSurface stateOnSurface = transientTrack->stateOnSurface(globalPoint);
1125 
1126  LocalVector localMomentum;
1127  hitStudy(ev, digilist, projhit, matchedhit, hit2D, hit1D, localMomentum, track_ok);
1128  }
1129 
1130  // hit pattern of the track
1131  // const reco::HitPattern & hitsPattern = track->hitPattern();
1132  // loop over the hits of the track
1133  // for (int i=0; i<hitsPattern.numberOfAllHits(); i++) {
1134  // for (int i=0; i<hitsPattern.numberOfAllHits(reco::HitPattern::TRACK_HITS); i++) {
1135  // uint32_t hit = hitsPattern.getHitPattern(reco::HitPattern::TRACK_HITS,i);
1136 
1137  // if the hit is valid and in pixel barrel, print out the layer
1138  // if (hitsPattern.validHitFilter(hit) && hitsPattern.pixelBarrelHitFilter(hit))
1139 
1140  // if (!hitsPattern.validHitFilter(hit)) continue;
1141  // if (hitsPattern.pixelHitFilter(hit)) std::cout << "pixel" << std::endl; // pixel
1142  // if (hitsPattern.pixelBarrelHitFilter(hit)) std::cout << "pixel barrel" << std::endl; // pixel barrel
1143  // if (hitsPattern.pixelEndcapHitFilter(hit)) std::cout << "pixel endcap" << std::endl; // pixel endcap
1144  // if (hitsPattern.stripHitFilter(hit)) std::cout << "strip" << std::endl; // strip
1145  // if (hitsPattern.stripTIBHitFilter(hit)) std::cout << "TIB" << std::endl; // strip TIB
1146  // if (hitsPattern.stripTIDHitFilter(hit)) std::cout << "TID" << std::endl; // strip TID
1147  // if (hitsPattern.stripTOBHitFilter(hit)) std::cout << "TOB" << std::endl; // strip TOB
1148  // if (hitsPattern.stripTECHitFilter(hit)) std::cout << "TEC" << std::endl; // strip TEC
1149  // if (hitsPattern.muonDTHitFilter(hit)) std::cout << "DT" << std::endl; // muon DT
1150  // if (hitsPattern.muonCSCHitFilter(hit)) std::cout << "CSC" << std::endl; // muon CSC
1151  // if (hitsPattern.muonRPCHitFilter(hit)) std::cout << "RPC" << std::endl; // muon RPC
1152  //
1153  // // expert level: printout the hit in 10-bit binary format
1154  // std::cout << "hit in 10-bit binary format = ";
1155  // for (int j=9; j>=0; j--) {
1156  // int bit = (hit >> j) & 0x1;
1157  // std::cout << bit;
1158  // }
1159  // std::cout << std::endl;
1160  // }
1161  }
1162 }
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 1164 of file SiStripMonitorTrack.cc.

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

Referenced by trackStudy().

1166  {
1167  //Perform track study
1168  int i = 0;
1169  reco::TrackCollection trackCollection = *trackCollectionHandle;
1170  numTracks = trackCollection.size();
1171  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
1172  track != etrack;
1173  ++track) {
1174  LogDebug("SiStripMonitorTrack") << "Track number " << ++i << std::endl;
1175  // << "\n\tmomentum: " << trackref->momentum()
1176  // << "\n\tPT: " << trackref->pt()
1177  // << "\n\tvertex: " << trackref->vertex()
1178  // << "\n\timpact parameter: " << trackref->d0()
1179  // << "\n\tcharge: " << trackref->charge()
1180  // << "\n\tnormalizedChi2: " << trackref->normalizedChi2()
1181  // <<"\n\tFrom EXTRA : "
1182  // <<"\n\t\touter PT "<< trackref->outerPt()<<std::endl;
1183 
1184  // trajectoryStudy(traj_iterator,trackref);
1185  bool track_ok = trackFilter(*track);
1186  trajectoryStudy(*track, digilist, ev, track_ok);
1187  }
1188 }
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 888 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_2022v15_cff::track.

Referenced by trackStudyFromTrajectory().

891  {
892  auto const& trajParams = track.extra()->trajParams();
893  assert(trajParams.size() == track.recHitsSize());
894  auto hb = track.recHitsBegin();
895  for (unsigned int h = 0; h < track.recHitsSize(); h++) {
896  auto ttrh = *(hb + h);
897 
898  if (TkHistoMap_On_) {
899  uint32_t thedetid = ttrh->rawId();
900  if (SiStripDetId(thedetid).subDetector() >= 3 &&
901  SiStripDetId(thedetid).subDetector() <= 6) { //TIB/TID + TOB + TEC only
902  if ((ttrh->getType() == 1))
903  tkhisto_NumMissingHits->fill(thedetid, 1.);
904  if ((ttrh->getType() == 2))
905  tkhisto_NumberInactiveHits->fill(thedetid, 1.);
906  if ((ttrh->getType() == 0))
907  tkhisto_NumberValidHits->fill(thedetid, 1.);
908  }
909  }
910 
911  if (!ttrh->isValid())
912  continue;
913 
914  //trajectory local direction and position on detector
915  auto statedirection = trajParams[h].momentum();
916 
917  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>(ttrh->hit());
918  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(ttrh->hit());
919  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(ttrh->hit());
920  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(ttrh->hit());
921 
922  // RecHitType type=Single;
923 
924  if (matchedhit) {
925  LogTrace("SiStripMonitorTrack") << "\nMatched recHit found" << std::endl;
926  // type=Matched;
927 
928  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(matchedhit->geographicalId()));
929  GlobalVector gtrkdirup = gdet->toGlobal(statedirection);
930  //mono side
931  const GeomDetUnit* monodet = gdet->monoDet();
932  statedirection = monodet->toLocal(gtrkdirup);
933  SiStripRecHit2D m = matchedhit->monoHit();
934  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&m,statedirection,trackref);
935  if (statedirection.mag())
936  RecHitInfo<SiStripRecHit2D>(&m, statedirection, digilist, ev, track_ok);
937  //stereo side
938  const GeomDetUnit* stereodet = gdet->stereoDet();
939  statedirection = stereodet->toLocal(gtrkdirup);
940  SiStripRecHit2D s = matchedhit->stereoHit();
941  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&s,statedirection,trackref);
942  if (statedirection.mag())
943  RecHitInfo<SiStripRecHit2D>(&s, statedirection, digilist, ev, track_ok);
944  } else if (projhit) {
945  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found" << std::endl;
946  // type=Projected;
947  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(projhit->geographicalId()));
948 
949  GlobalVector gtrkdirup = gdet->toGlobal(statedirection);
950  const SiStripRecHit2D originalhit = projhit->originalHit();
951  const GeomDetUnit* det;
952  if (!StripSubdetector(originalhit.geographicalId().rawId()).stereo()) {
953  //mono side
954  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found MONO" << std::endl;
955  det = gdet->monoDet();
956  statedirection = det->toLocal(gtrkdirup);
957  if (statedirection.mag())
958  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
959  } else {
960  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found STEREO" << std::endl;
961  //stereo side
962  det = gdet->stereoDet();
963  statedirection = det->toLocal(gtrkdirup);
964  if (statedirection.mag())
965  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, track_ok);
966  }
967  } else if (hit2D) {
968  if (statedirection.mag())
969  RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist, ev, track_ok);
970  } else if (hit1D) {
971  if (statedirection.mag())
972  RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist, ev, track_ok);
973  } else {
974  LogDebug("SiStripMonitorTrack") << " LocalMomentum: " << statedirection
975  << "\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
976  }
977  }
978 }
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 299 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ clchCMoriginTkHmap_On_

bool SiStripMonitorTrack::clchCMoriginTkHmap_On_
private

Definition at line 288 of file SiStripMonitorTrack.h.

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

◆ Cluster_src_

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 266 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

◆ ClusterCount_OnTrack_FECCratevsFECSlot

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECCratevsFECSlot = nullptr
private

Definition at line 320 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TECM

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TECM = nullptr
private

Definition at line 323 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TECP

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TECP = nullptr
private

Definition at line 324 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID = nullptr
private

Definition at line 321 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterCount_OnTrack_FECSlotVsFECRing_TOB

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TOB = nullptr
private

Definition at line 322 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECCratevsFECSlot

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECCratevsFECSlot = nullptr
private

Definition at line 314 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM = nullptr
private

Definition at line 317 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP = nullptr
private

Definition at line 318 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = nullptr
private

Definition at line 315 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB = nullptr
private

Definition at line 316 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TECM

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TECM = nullptr
private

Definition at line 312 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TECP

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TECP = nullptr
private

Definition at line 313 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TIBTID

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TIBTID = nullptr
private

Definition at line 310 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ ClusterStoNCorr_OnTrack_TOB

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TOB = nullptr
private

Definition at line 311 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

◆ clusterToken_

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

Definition at line 269 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

◆ conf_

edm::ParameterSet SiStripMonitorTrack::conf_
private

◆ dcsStatus_

SiStripDCSStatus* SiStripMonitorTrack::dcsStatus_
private

Definition at line 305 of file SiStripMonitorTrack.h.

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

◆ digiToken_

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

Definition at line 268 of file SiStripMonitorTrack.h.

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

◆ eventNb

edm::EventNumber_t SiStripMonitorTrack::eventNb
private

Definition at line 296 of file SiStripMonitorTrack.h.

Referenced by analyze(), and clusterInfos().

◆ firstEvent

int SiStripMonitorTrack::firstEvent
private

Definition at line 297 of file SiStripMonitorTrack.h.

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

◆ folderOrganizer_

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 307 of file SiStripMonitorTrack.h.

Referenced by findMEs().

◆ genTriggerEventFlag_

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 306 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 285 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 255 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 282 of file SiStripMonitorTrack.h.

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

◆ ModMEsMap

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

Definition at line 254 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 284 of file SiStripMonitorTrack.h.

◆ Parameters

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 265 of file SiStripMonitorTrack.h.

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

◆ ring_flag

bool SiStripMonitorTrack::ring_flag
private

Definition at line 286 of file SiStripMonitorTrack.h.

◆ RingMEsMap

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

Definition at line 256 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 273 of file SiStripMonitorTrack.h.

Referenced by dqmBeginRun().

◆ sToNLowerLimit_

double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 300 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ sToNUpperLimit_

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 301 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ SubDetMEsMap

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

Definition at line 257 of file SiStripMonitorTrack.h.

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

◆ tkDetMapToken_

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

Definition at line 275 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 295 of file SiStripMonitorTrack.h.

◆ trackerGeometryToken_

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

Definition at line 272 of file SiStripMonitorTrack.h.

Referenced by dqmBeginRun().

◆ trackerTopology_

const TrackerTopology* SiStripMonitorTrack::trackerTopology_ = nullptr
private

Definition at line 280 of file SiStripMonitorTrack.h.

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

◆ trackerTopologyEventToken_

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

Definition at line 276 of file SiStripMonitorTrack.h.

Referenced by analyze().

◆ trackerTopologyRunToken_

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

Definition at line 274 of file SiStripMonitorTrack.h.

Referenced by bookHistograms().

◆ TrackLabel_

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 291 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

◆ TrackProducer_

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 290 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

◆ tracksCollection_in_EventTree

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 294 of file SiStripMonitorTrack.h.

◆ trackToken_

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

Definition at line 270 of file SiStripMonitorTrack.h.

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

◆ Trend_On_

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 283 of file SiStripMonitorTrack.h.

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

◆ vPSiStripCluster

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

Definition at line 293 of file SiStripMonitorTrack.h.

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

◆ widthLowerLimit_

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 302 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

◆ widthUpperLimit_

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 303 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().