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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

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 Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &run, const edm::EventSetup &es) override
 
 SiStripMonitorTrack (const edm::ParameterSet &)
 
 ~SiStripMonitorTrack () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Types

enum  ClusterFlags { OffTrack, OnTrack }
 

Private Member Functions

void AllClusters (const edm::Event &ev, const edm::EventSetup &es)
 
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, const edm::EventSetup &es)
 
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::EventSetup &es, 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, const edm::EventSetup &es, 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, const edm::EventSetup &es)
 
void trackStudyFromTrack (edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es)
 
void trackStudyFromTrajectory (edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es)
 
void trajectoryStudy (const reco::Track &track, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es, bool track_ok)
 

Private Attributes

bool applyClusterQuality_
 
bool clchCMoriginTkHmap_On_
 
edm::InputTag Cluster_src_
 
MonitorElementClusterCount_OnTrack_FECCratevsFECSlot = 0
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TECM = 0
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TECP = 0
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TIBTID = 0
 
MonitorElementClusterCount_OnTrack_FECSlotVsFECRing_TOB = 0
 
MonitorElementClusterStoNCorr_OnTrack_FECCratevsFECSlot = 0
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM = 0
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP = 0
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = 0
 
MonitorElementClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB = 0
 
MonitorElementClusterStoNCorr_OnTrack_TECM = 0
 
MonitorElementClusterStoNCorr_OnTrack_TECP = 0
 
MonitorElementClusterStoNCorr_OnTrack_TIBTID = 0
 
MonitorElementClusterStoNCorr_OnTrack_TOB = 0
 
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
 
edm::ESHandle< SiStripDetCablingSiStripDetCabling_
 
double sToNLowerLimit_
 
double sToNUpperLimit_
 
std::map< std::string, SubDetMEsSubDetMEsMap
 
edm::ESHandle< TrackerGeometrytkgeom_
 
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
 
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_
 

Detailed Description

Definition at line 61 of file SiStripMonitorTrack.h.

Member Typedef Documentation

Definition at line 63 of file SiStripMonitorTrack.h.

Member Enumeration Documentation

Enumerator
OffTrack 
OnTrack 

Definition at line 72 of file SiStripMonitorTrack.h.

Constructor & Destructor Documentation

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

Definition at line 30 of file SiStripMonitorTrack.cc.

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

31  : conf_(conf),
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 }
T getParameter(std::string const &) const
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::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
GenericTriggerEventFlag * genTriggerEventFlag_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
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

void SiStripMonitorTrack::AllClusters ( const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 1276 of file SiStripMonitorTrack.cc.

References clusterInfos(), clusterToken_, digiToken_, findMEs(), edm::EventSetup::get(), edm::Event::getByToken(), edm::HandleBase::isValid(), LogDebug, OffTrack, edm::Handle< T >::product(), edm::ESHandle< T >::product(), and vPSiStripCluster.

Referenced by analyze().

1276  {
1277  //Retrieve tracker topology from geometry
1278  edm::ESHandle<TrackerTopology> tTopoHandle;
1279  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1280  const TrackerTopology* const tTopo = tTopoHandle.product();
1281 
1282  /*edm::ESHandle<TrackerGeometry> tracker;
1283  es.get<TrackerDigiGeometryRecord>().get(tracker);
1284  const TrackerGeometry *tkgeom = &(*tracker); */
1285 
1286  edm::ESHandle<SiStripGain> gainHandle;
1287  es.get<SiStripGainRcd>().get(gainHandle);
1288  const SiStripGain* stripGain = gainHandle.product();
1289 
1290  edm::ESHandle<SiStripQuality> qualityHandle;
1291  es.get<SiStripQualityRcd>().get("", qualityHandle);
1292  const SiStripQuality* stripQuality = qualityHandle.product();
1293 
1295  ev.getByToken(digiToken_, digihandle);
1296 
1298  auto& digilist = digihandle.isValid() ? *(digihandle.product()) : dummy;
1299 
1301  ev.getByToken(clusterToken_, siStripClusterHandle);
1302 
1303 
1304  /*edm::ESHandle<StripClusterParameterEstimator> parameterestimator;
1305  es.get<TkStripCPERecord>().get("StripCPEfromTrackAngle", parameterestimator);
1306  const StripClusterParameterEstimator &stripcpe(*parameterestimator);*/
1307 
1308  if (siStripClusterHandle.isValid()) {
1309  //Loop on Dets
1310  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = siStripClusterHandle->begin(),
1311  DSVEnd = siStripClusterHandle->end();
1312  DSViter != DSVEnd;
1313  ++DSViter) {
1314  uint32_t detid = DSViter->id();
1315  const Det2MEs MEs = findMEs(tTopo, detid);
1316 
1317  LogDebug("SiStripMonitorTrack") << "on detid " << detid << " N Cluster= " << DSViter->size();
1318 
1319  //Loop on Clusters
1320  for (edmNew::DetSet<SiStripCluster>::const_iterator ClusIter = DSViter->begin(), ClusEnd = DSViter->end();
1321  ClusIter != ClusEnd;
1322  ++ClusIter) {
1323  if (vPSiStripCluster.find(&*ClusIter) == vPSiStripCluster.end()) {
1324  SiStripClusterInfo SiStripClusterInfo_(*ClusIter, es, detid);
1325 
1326  /*const StripGeomDetUnit * stripdet = (const StripGeomDetUnit*) tkgeom->idToDetUnit(detid);
1327  StripClusterParameterEstimator::LocalValues parameters=stripcpe.localParameters(*ClusIter, *stripdet);
1328  LocalPoint lp = parameters.first;
1329  const Surface& surface = tracker->idToDet(detid)->surface();
1330  GlobalPoint gp = surface.toGlobal(lp);*/
1331 
1332  clusterInfos(&SiStripClusterInfo_,
1333  detid,
1334  OffTrack,
1335  /*track_ok*/ false,
1336  LV,
1337  MEs,
1338  tTopo,
1339  stripGain,
1340  stripQuality,
1341  digilist,
1342  0,
1343  0);
1344  }
1345  }
1346  }
1347  } else {
1348  edm::LogError("SiStripMonitorTrack") << "ClusterCollection is not valid!!" << std::endl;
1349  return;
1350  }
1351 }
#define LogDebug(id)
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
math::XYZTLorentzVectorD LV
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)
data_type const * const_iterator
Definition: DetSetNew.h:30
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
std::unordered_set< const SiStripCluster * > vPSiStripCluster
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
T const * product() const
Definition: Handle.h:74
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
void SiStripMonitorTrack::analyze ( const edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 101 of file SiStripMonitorTrack.cc.

References GenericTriggerEventFlag::accept(), AllClusters(), dcsStatus_, edm::EventID::event(), eventNb, fillControlViewHistos(), fillME(), genTriggerEventFlag_, SiStripDCSStatus::getStatus(), edm::EventBase::id(), iLumisection, LogDebug, SiStripMonitorTrack::SubDetMEs::nClustersOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOnTrack, GenericTriggerEventFlag::on(), edm::EventBase::orbitNumber(), edm::EventID::run(), SubDetMEsMap, topFolderName_, SiStripMonitorTrack::SubDetMEs::totNClustersOffTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrack, trackStudy(), Trend_On_, and vPSiStripCluster.

101  {
102  // Filter out events if DCS checking is requested
103  if (dcsStatus_ && !dcsStatus_->getStatus(e, es))
104  return;
105 
106  // Filter out events if Trigger Filtering is requested
108  return;
109 
110  //initialization of global quantities
111  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::analyse] "
112  << "Run " << e.id().run() << " Event " << e.id().event() << std::endl;
113  eventNb = e.id().event();
114  vPSiStripCluster.clear();
115 
116  iLumisection = e.orbitNumber() / 262144.0;
117 
118  // initialise # of clusters
119  for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin(); iSubDet != SubDetMEsMap.end();
120  iSubDet++) {
121  iSubDet->second.totNClustersOnTrack = 0;
122  iSubDet->second.totNClustersOffTrack = 0;
123  }
124 
125  //Perform track study
126  trackStudy(e, es);
127 
128  //Perform Cluster Study (irrespectively to tracks)
129 
130  AllClusters(e, es); //analyzes the off Track Clusters
131 
132  //Summary Counts of clusters
133  std::map<std::string, MonitorElement*>::iterator iME;
134  std::map<std::string, LayerMEs>::iterator iLayerME;
135 
136  if (!(topFolderName_.find("IsolatedBunches") != std::string::npos)) {
137  fillControlViewHistos(e, es);
138  }
139 
140  if (Trend_On_) {
141  // for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin(), iterEnd=SubDetMEsMaps.end();
142  // iSubDet != iterEnd; ++iSubDet) {
143  for (auto const& iSubDet : SubDetMEsMap) {
144  SubDetMEs subdet_mes = iSubDet.second;
145  if (subdet_mes.totNClustersOnTrack > 0) {
146  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
147  }
148  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
149  fillME(subdet_mes.nClustersTrendOnTrack, iLumisection, subdet_mes.totNClustersOnTrack);
150  fillME(subdet_mes.nClustersTrendOffTrack, iLumisection, subdet_mes.totNClustersOffTrack);
151  }
152  } else {
153  for (auto const& iSubDet : SubDetMEsMap) {
154  SubDetMEs subdet_mes = iSubDet.second;
155  if (subdet_mes.totNClustersOnTrack > 0) {
156  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
157  }
158  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
159  }
160  }
161 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
void trackStudy(const edm::Event &ev, const edm::EventSetup &es)
void fillME(MonitorElement *ME, float value1)
SiStripDCSStatus * dcsStatus_
void AllClusters(const edm::Event &ev, const edm::EventSetup &es)
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.
int orbitNumber() const
Definition: EventBase.h:65
GenericTriggerEventFlag * genTriggerEventFlag_
edm::EventID id() const
Definition: EventBase.h:59
bool fillControlViewHistos(const edm::Event &ev, const edm::EventSetup &es)
void SiStripMonitorTrack::book ( DQMStore::IBooker ibooker,
const TrackerTopology tTopo,
const TkDetMap tkDetMap 
)
private

Definition at line 164 of file SiStripMonitorTrack.cc.

References SiStripDetCabling::addActiveDetectorsRawIds(), DQMStore::IBooker::book1D(), DQMStore::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, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::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().

164  {
165  SiStripFolderOrganizer folder_organizer;
166  folder_organizer.setSiStripFolderName(topFolderName_);
167  //******** TkHistoMaps
168  if (TkHistoMap_On_) {
170  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_StoNCorrOnTrack", 0.0, true);
172  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberOfOnTrackCluster", 0.0, true);
174  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberOfOfffTrackCluster", 0.0, true);
176  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ChargePerCMfromTrack", 0.0, true);
178  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberMissingHits", 0.0, true, true);
180  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberInactiveHits", 0.0, true, true);
182  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NumberValidHits", 0.0, true, true);
183  tkhisto_NoiseOnTrack = std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NoiseOnTrack", 0.0, true);
184  tkhisto_NoiseOffTrack = std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_NoiseOffTrack", 0.0, true);
186  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ClusterWidthOnTrack", 0.0, true);
188  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ClusterWidthOffTrack", 0.0, true);
189  }
192  std::make_unique<TkHistoMap>(tkDetMap, topFolderName_, "TkHMap_ChargePerCMfromOrigin", 0.0, true);
193  //******** TkHistoMaps
194 
195  std::vector<uint32_t> vdetId_;
197  const char* tec = "TEC";
198  const char* tid = "TID";
199  //Histos for each detector, layer and module
200  SiStripHistoId hidmanager;
201 
202  if (Mod_On_) {
203  for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
204  detid_iter != detid_end;
205  ++detid_iter) { //loop on all the active detid
206  uint32_t detid = *detid_iter;
207 
208  if (detid < 1) {
209  edm::LogError("SiStripMonitorTrack") << "[" << __PRETTY_FUNCTION__ << "] invalid detid " << detid << std::endl;
210  continue;
211  }
212 
213  //std::string name;
214 
215  // book Layer and RING plots
216  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, false);
217  /*
218  std::string thickness;
219  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
220  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
221  */
222 
223  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
224 
225  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
226  if (iLayerME == LayerMEsMap.end()) {
227  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
228  bookLayerMEs(ibooker, detid, layer_id);
229  }
230 
231  const char* subdet = det_layer_pair.first.c_str();
232  if (std::strstr(subdet, tec) != nullptr || std::strstr(subdet, tid) != nullptr) {
233  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
234  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
235  if (iRingME == RingMEsMap.end()) {
236  std::pair<std::string, int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
237  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
238  bookRingMEs(ibooker, detid, ring_id);
239  }
240  }
241 
242  // book sub-detector plots
243  std::pair<std::string, std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
244  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()) {
245  ibooker.setCurrentFolder(sdet_pair.first);
246  bookSubDetMEs(ibooker, sdet_pair.second);
247  }
248  // book module plots
249  folder_organizer.setDetectorFolder(detid, tTopo);
250  bookModMEs(ibooker, *detid_iter);
251  } //end loop on detectors detid
252  } else {
253  for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
254  detid_iter != detid_end;
255  ++detid_iter) { //loop on all the active detid
256  uint32_t detid = *detid_iter;
257 
258  if (detid < 1) {
259  edm::LogError("SiStripMonitorTrack") << "[" << __PRETTY_FUNCTION__ << "] invalid detid " << detid << std::endl;
260  continue;
261  }
262 
263  //std::string name;
264 
265  // book Layer and RING plots
266  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, false);
267  /*
268  std::string thickness;
269  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
270  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
271  */
272 
273  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
274 
275  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
276  if (iLayerME == LayerMEsMap.end()) {
277  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
278  bookLayerMEs(ibooker, detid, layer_id);
279  }
280 
281  const char* subdet = det_layer_pair.first.c_str();
282  if (std::strstr(subdet, tec) != nullptr || std::strstr(subdet, tid) != nullptr) {
283  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
284  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
285  if (iRingME == RingMEsMap.end()) {
286  std::pair<std::string, int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
287  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
288  bookRingMEs(ibooker, detid, ring_id);
289  }
290  }
291 
292  // book sub-detector plots
293  std::pair<std::string, std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
294  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()) {
295  ibooker.setCurrentFolder(sdet_pair.first);
296  bookSubDetMEs(ibooker, sdet_pair.second);
297  }
298  } //end loop on detectors detid
299  }
300 
301  //book control view plots
302  if (!(topFolderName_.find("IsolatedBunches") != std::string::npos)) {
303  ibooker.setCurrentFolder(topFolderName_ + "/ControlView/");
304 
306  ibooker.book1D("ClusterStoNCorr_OnTrack_TIBTID", "TIB/TID [FECCrate=1] (OnTrack)", 100, 0., 100.);
308 
310  ibooker.book1D("ClusterStoNCorr_OnTrack_TOB", "TOB [FECCrate=4] (OnTrack)", 100, 0., 100.);
312 
314  ibooker.book1D("ClusterStoNCorr_OnTrack_TECM", "TECM [FECCrate=3] (OnTrack)", 100, 0., 100.);
316 
318  ibooker.book1D("ClusterStoNCorr_OnTrack_TECP", "TECP [FECCrate=2] (OnTrack)", 100, 0., 100.);
320 
322  ibooker.book2D("ClusterStoNCorr_OnTrack_FECCratevsFECSlot", " S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
324  ClusterStoNCorr_OnTrack_FECCratevsFECSlot->setAxisTitle("FEC Crate (TTC partition)", 2);
329 
330  ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = ibooker.book2D("ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID",
331  "TIB/TID [FECCrate=1] (OnTrack)",
332  10,
333  -0.5,
334  9.5,
335  22,
336  0.5,
337  22.5);
340 
342  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB", "TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
345 
347  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM", "TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
350 
352  "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP", "TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
355 
356  //----------------------------------------
357  // for conting the number of clusters, for the mean S/N calculation
358  //book control view plots
359 
361  ibooker.book2D("ClusterCount_OnTrack_FECCratevsFECSlot", " S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
363  ClusterCount_OnTrack_FECCratevsFECSlot->setAxisTitle("FEC Crate (TTC partition)", 2);
368 
370  "ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID", "TIB/TID [FECCrate=1] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
373 
375  "ClusterCount_OnTrack_FECSlotVsFECRing_TOB", "TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
378 
380  "ClusterCount_OnTrack_FECSlotVsFECRing_TECM", "TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
383 
385  "ClusterCount_OnTrack_FECSlotVsFECRing_TECP", "TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
388  }
389 }
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
std::unique_ptr< TkHistoMap > tkhisto_NoiseOffTrack
MonitorElement * ClusterStoNCorr_OnTrack_TECP
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
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)
std::map< std::string, RingMEs > RingMEsMap
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)
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_TOB
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
std::map< std::string, SubDetMEs > SubDetMEsMap
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromTrack
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
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)
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
void bookModMEs(DQMStore::IBooker &, const uint32_t)
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOffTrack
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
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
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
MonitorElement * ClusterStoNCorr_OnTrack_TECM
std::map< std::string, LayerMEs > LayerMEsMap
void SiStripMonitorTrack::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 89 of file SiStripMonitorTrack.cc.

References book(), edm::EventSetup::get(), and edm::ESHandle< T >::product().

89  {
90  // Retrieve tracker topology from geometry
92  es.get<TrackerTopologyRcd>().get(tTopoHandle);
93 
94  edm::ESHandle<TkDetMap> tkDetMapHandle;
95  es.get<TrackerTopologyRcd>().get(tkDetMapHandle);
96 
97  book(ibooker, tTopoHandle.product(), tkDetMapHandle.product());
98 }
void book(DQMStore::IBooker &, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
T const * product() const
Definition: ESHandle.h:86
void SiStripMonitorTrack::bookLayerMEs ( DQMStore::IBooker ibooker,
const uint32_t  mod_id,
std::string &  layer_id 
)
private

Definition at line 473 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book1D(), DQMStore::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_, constexpr, SiStripHistoId::createHistoLayer(), edm::ParameterSet::getParameter(), handleBookMEs(), mps_fire::i, LayerMEsMap, dataset::name, SiStripDetCabling::nApvPairs(), SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by book().

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

Definition at line 816 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book1D(), conf_, and edm::ParameterSet::getParameter().

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

818  {
819  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
820  return ibooker.book1D(HistoName,
821  HistoName,
822  Parameters.getParameter<int32_t>("Nbinx"),
823  Parameters.getParameter<double>("xmin"),
824  Parameters.getParameter<double>("xmax"));
825 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME2D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 828 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book2D(), conf_, and edm::ParameterSet::getParameter().

830  {
831  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
832  return ibooker.book2D(HistoName,
833  HistoName,
834  Parameters.getParameter<int32_t>("Nbinx"),
835  Parameters.getParameter<double>("xmin"),
836  Parameters.getParameter<double>("xmax"),
837  Parameters.getParameter<int32_t>("Nbiny"),
838  Parameters.getParameter<double>("ymin"),
839  Parameters.getParameter<double>("ymax"));
840 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME3D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 843 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book3D(), conf_, and edm::ParameterSet::getParameter().

845  {
846  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
847  return ibooker.book3D(HistoName,
848  HistoName,
849  Parameters.getParameter<int32_t>("Nbinx"),
850  Parameters.getParameter<double>("xmin"),
851  Parameters.getParameter<double>("xmax"),
852  Parameters.getParameter<int32_t>("Nbiny"),
853  Parameters.getParameter<double>("ymin"),
854  Parameters.getParameter<double>("ymax"),
855  Parameters.getParameter<int32_t>("Nbinz"),
856  Parameters.getParameter<double>("zmin"),
857  Parameters.getParameter<double>("zmax"));
858 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * book3D(Args &&...args)
Definition: DQMStore.h:112
MonitorElement * SiStripMonitorTrack::bookMEProfile ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 861 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::bookProfile(), conf_, and edm::ParameterSet::getParameter().

Referenced by bookModMEs().

863  {
864  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
865  return ibooker.bookProfile(HistoName,
866  HistoName,
867  Parameters.getParameter<int32_t>("Nbinx"),
868  Parameters.getParameter<double>("xmin"),
869  Parameters.getParameter<double>("xmax"),
870  Parameters.getParameter<int32_t>("Nbiny"),
871  Parameters.getParameter<double>("ymin"),
872  Parameters.getParameter<double>("ymax"),
873  "");
874 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookMETrend ( DQMStore::IBooker ibooker,
const char *  HistoName 
)
private

Definition at line 877 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::bookProfile(), conf_, MonitorElement::DQM_KIND_TPROFILE, edm::ParameterSet::getParameter(), and MonitorElement::getTH1().

Referenced by bookSubDetMEs().

877  {
878  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
879  MonitorElement* me = ibooker.bookProfile(HistoName,
880  HistoName,
881  ParametersTrend.getParameter<int32_t>("Nbins"),
882  ParametersTrend.getParameter<double>("xmin"),
883  ParametersTrend.getParameter<double>("xmax"),
884  0,
885  0,
886  "");
887  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE)
888  me->getTH1()->SetCanExtend(TH1::kAllAxes);
889 
890  if (!me)
891  return me;
892  me->setAxisTitle("Lumisection", 1);
893  return me;
894 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
TH1 * getTH1() const
edm::ParameterSet conf_
std::string HistoName
void SiStripMonitorTrack::bookModMEs ( DQMStore::IBooker ibooker,
const uint32_t  id 
)
private

Definition at line 392 of file SiStripMonitorTrack.cc.

References DQMStore::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, dataset::name, SiStripDetCabling::nApvPairs(), SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, and DQMStore::IBooker::tag().

Referenced by book().

393 {
394  std::string name = "det";
395  SiStripHistoId hidmanager;
396  std::string hid = hidmanager.createHistoId("", name, id);
397  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(hid);
398  if (iModME == ModMEsMap.end()) {
399  ModMEs theModMEs;
400 
401  // Cluster Width
402  theModMEs.ClusterWidth =
403  bookME1D(ibooker, "TH1ClusterWidth", hidmanager.createHistoId("ClusterWidth_OnTrack", name, id).c_str());
404  ibooker.tag(theModMEs.ClusterWidth, id);
405  // Cluster Gain
406  theModMEs.ClusterGain =
407  bookME1D(ibooker, "TH1ClusterGain", hidmanager.createHistoId("ClusterGain", name, id).c_str());
408  ibooker.tag(theModMEs.ClusterGain, id);
409  // Cluster Charge
410  theModMEs.ClusterCharge =
411  bookME1D(ibooker, "TH1ClusterCharge", hidmanager.createHistoId("ClusterCharge_OnTrack", name, id).c_str());
412  ibooker.tag(theModMEs.ClusterCharge, id);
413  // Cluster Charge Raw (no gain )
414  theModMEs.ClusterChargeRaw = bookME1D(
415  ibooker, "TH1ClusterChargeRaw", hidmanager.createHistoId("ClusterChargeRaw_OnTrack", name, id).c_str());
416  ibooker.tag(theModMEs.ClusterChargeRaw, id);
417  // Cluster Charge Corrected
418  theModMEs.ClusterChargeCorr = bookME1D(
419  ibooker, "TH1ClusterChargeCorr", hidmanager.createHistoId("ClusterChargeCorr_OnTrack", name, id).c_str());
420  ibooker.tag(theModMEs.ClusterChargeCorr, id);
421  // Cluster StoN Corrected
422  theModMEs.ClusterStoNCorr = bookME1D(
423  ibooker, "TH1ClusterStoNCorrMod", hidmanager.createHistoId("ClusterStoNCorr_OnTrack", name, id).c_str());
424  ibooker.tag(theModMEs.ClusterStoNCorr, id);
425  // Cluster Position
426  short total_nr_strips = SiStripDetCabling_->nApvPairs(id) * 2 * 128;
427  theModMEs.ClusterPos = ibooker.book1D(hidmanager.createHistoId("ClusterPosition_OnTrack", name, id).c_str(),
428  hidmanager.createHistoId("ClusterPosition_OnTrack", name, id).c_str(),
429  total_nr_strips,
430  0.5,
431  total_nr_strips + 0.5);
432  ibooker.tag(theModMEs.ClusterPos, id);
433  // Cluster PGV
434  theModMEs.ClusterPGV =
435  bookMEProfile(ibooker, "TProfileClusterPGV", hidmanager.createHistoId("PGV_OnTrack", name, id).c_str());
436  ibooker.tag(theModMEs.ClusterPGV, id);
437  // Cluster Charge per cm
438  theModMEs.ClusterChargePerCMfromTrack = bookME1D(
439  ibooker, "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromTrack", name, id).c_str());
440  ibooker.tag(theModMEs.ClusterChargePerCMfromTrack, id);
441 
442  theModMEs.ClusterChargePerCMfromOrigin = bookME1D(
443  ibooker, "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromOrigin", name, id).c_str());
444  ibooker.tag(theModMEs.ClusterChargePerCMfromOrigin, id);
445 
446  ModMEsMap[hid] = theModMEs;
447  }
448 }
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:283
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::map< std::string, ModMEs > ModMEsMap
const uint16_t nApvPairs(uint32_t det_id) const
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
void SiStripMonitorTrack::bookRing ( DQMStore::IBooker ,
const uint32_t  ,
std::string &   
)
private
void SiStripMonitorTrack::bookRingMEs ( DQMStore::IBooker ibooker,
const uint32_t  mod_id,
std::string &  ring_id 
)
private

Definition at line 608 of file SiStripMonitorTrack.cc.

References DQMStore::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(), dataset::name, SiStripDetCabling::nApvPairs(), alignCSCRings::ring_id, RingMEsMap, SiStripDetCabling_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by book().

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

Definition at line 702 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, MonitorElement::getTH1(), dataset::name, SiStripMonitorTrack::SubDetMEs::nClustersOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOnTrack, MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), AlCaHLTBitMon_QueryRunRegistry::string, xuti::subdet_tag(), SubDetMEsMap, and Trend_On_.

Referenced by book().

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

References applyClusterQuality_, SiStripClusterInfo::baryStrip(), SiStripClusterInfo::charge(), ALCARECOTkAlJpsiMuMu_cff::charge, siStripClusterTools::chargePerCM(), clchCMoriginTkHmap_On_, SiStripMonitorTrack::LayerMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeCorrThickOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeCorrThinOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeOffTrack, SiStripMonitorTrack::RingMEs::ClusterChargeOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargeOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargePerCMfromOriginOffTrack, SiStripMonitorTrack::RingMEs::ClusterChargePerCMfromOriginOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargePerCMfromOriginOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargePerCMfromOriginOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargePerCMfromOriginOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargePerCMfromOriginOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::RingMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargePerCMfromTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeRawOffTrack, SiStripMonitorTrack::RingMEs::ClusterChargeRawOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeRawOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeRawOnTrack, SiStripMonitorTrack::RingMEs::ClusterChargeRawOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterChargeRawOnTrack, SiStripMonitorTrack::LayerMEs::ClusterGain, SiStripMonitorTrack::RingMEs::ClusterGain, SiStripMonitorTrack::SubDetMEs::ClusterGain, SiStripMonitorTrack::LayerMEs::ClusterNoiseOffTrack, SiStripMonitorTrack::RingMEs::ClusterNoiseOffTrack, SiStripMonitorTrack::LayerMEs::ClusterNoiseOnTrack, SiStripMonitorTrack::RingMEs::ClusterNoiseOnTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOffTrack, SiStripMonitorTrack::RingMEs::ClusterPosOffTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOnTrack, SiStripMonitorTrack::RingMEs::ClusterPosOnTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOnTrack2D, SiStripMonitorTrack::LayerMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::RingMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrThickOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrThinOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNOffTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOffTrack, SiStripMonitorTrack::RingMEs::ClusterWidthOffTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOnTrack, SiStripMonitorTrack::RingMEs::ClusterWidthOnTrack, conf_, SiStripHistoId::createHistoId(), SiStripClusterInfo::detId(), edm::DetSetVector< T >::end(), eventNb, fillME(), edm::DetSetVector< T >::find(), SiStripClusterInfo::firstStrip(), edm::ParameterSet::getParameter(), SiStripBadStrip::getRange(), SiStripGain::getRange(), SiStripGain::getStripGain(), mps_fire::i, TrackerGeometry::idToDetUnit(), SiStripMonitorTrack::Det2MEs::iLayer, createfilelist::int, SiStripMonitorTrack::Det2MEs::iRing, SiStripQuality::IsStripBad(), SiStripMonitorTrack::Det2MEs::iSubdet, LogDebug, PV3DBase< T, PVType, FrameType >::mag(), SiStripClusterInfo::maxCharge(), SiStripClusterInfo::maxIndex(), Mod_On_, ModMEsMap, TrackerTopology::moduleGeometry(), dataset::name, 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(), SiStripMonitorTrack::SubDetMEs::totNClustersOffTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrack, 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().

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

Definition at line 76 of file SiStripMonitorTrack.cc.

References TrackerGeometry::detUnits(), genTriggerEventFlag_, edm::EventSetup::get(), GenericTriggerEventFlag::initRun(), LogDebug, GenericTriggerEventFlag::on(), SiStripDetCabling_, and tkgeom_.

76  {
77  //get geom
79  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::beginRun] There are " << tkgeom_->detUnits().size()
80  << " detectors instantiated in the geometry" << std::endl;
82 
83  // Initialize the GenericTriggerEventFlag
84  if (genTriggerEventFlag_->on())
85  genTriggerEventFlag_->initRun(run, es);
86 }
#define LogDebug(id)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
edm::ESHandle< TrackerGeometry > tkgeom_
GenericTriggerEventFlag * genTriggerEventFlag_
T get() const
Definition: EventSetup.h:71
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
bool SiStripMonitorTrack::fillControlViewHistos ( const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 1384 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, MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), SiStripDetCabling::getConnections(), edm::HandleBase::isValid(), edm::ESHandle< T >::product(), return2DME(), SiStripClusterInfo::signalOverNoise(), SiStripDetCabling_, SiStripDetId::TEC, TrackerTopology::tecSide(), SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, HiIsolationCommonParameters_cff::track, l1t::tracks, and trackToken_.

Referenced by analyze().

1384  {
1386  ev.getByToken(trackToken_, tracks); //takes the track collection
1387 
1388  //check that tracks are valid
1389  if (!tracks.isValid())
1390  return false;
1391 
1392  // loop over the tracks
1393  for (const auto& track : *tracks) {
1394  // loop over the rechits of this track
1395  for (trackingRecHit_iterator hit = track.recHitsBegin(), ehit = track.recHitsEnd(); hit != ehit; ++hit) {
1396  uint32_t thedetid = (*hit)->rawId();
1397  if (!(DetId(thedetid).subdetId() >= 3 && DetId(thedetid).subdetId() <= 6)) {
1398  continue;
1399  }
1400 
1401  if (!(*hit)->isValid())
1402  continue;
1403 
1404  const TrackingRecHit* theHit = (*hit);
1405  if (theHit == nullptr) {
1406  continue;
1407  }
1408 
1409  edm::ESHandle<TrackerTopology> tTopoHandle;
1410  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1411  const TrackerTopology* const tTopo = tTopoHandle.product();
1412 
1413  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(theHit);
1414  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(theHit);
1415 
1416  float sovn = -1.;
1417  if (hit1D && !hit2D) {
1418  const SiStripCluster* SiStripCluster_ = &*(hit1D->cluster());
1419  SiStripClusterInfo SiStripClusterInfo_(*SiStripCluster_, es, thedetid);
1420  sovn = SiStripClusterInfo_.signalOverNoise();
1421  }
1422 
1423  else if (!hit1D && hit2D) {
1424  const SiStripCluster* SiStripCluster_ = &*(hit2D->cluster());
1425  SiStripClusterInfo SiStripClusterInfo_(*SiStripCluster_, es, thedetid);
1426  sovn = SiStripClusterInfo_.signalOverNoise();
1427  }
1428 
1429  std::vector<const FedChannelConnection*> getFedChanConnections;
1430  getFedChanConnections = SiStripDetCabling_->getConnections(thedetid);
1431 
1432  // SiStripFolderOrganizer folder_organizer;
1433  // std::string sistripsubdet = folder_organizer.getSubDetFolderAndTag(thedetid, tTopo).second;
1434 
1435  // loop over the fed chan connections
1436  for (const auto& getFedChanConnection : getFedChanConnections) {
1437  if (getFedChanConnection == nullptr) {
1438  continue;
1439  }
1440 
1441  int binfeccrate = getFedChanConnection->fecCrate();
1442  int binfecslot = getFedChanConnection->fecSlot();
1443  int binfecring = getFedChanConnection->fecRing();
1444  //int binccuchan = getFedChanConnections[i0]->ccuChan(); //will be used in a new PR
1445  //int binccuadd = getFedChanConnections[i0]->ccuAddr(); //will be used in a new PR
1446 
1449  binfecslot,
1450  binfeccrate,
1451  sovn);
1452 
1453  // TIB/TID
1454  // if ((sistripsubdet.find("TIB")) || (sistripsubdet.find("TID"))) {
1455  if ((DetId(thedetid).subdetId() == SiStripDetId::TIB) || ((DetId(thedetid).subdetId() == SiStripDetId::TID))) {
1459  binfecring,
1460  binfecslot,
1461  sovn);
1462  }
1463 
1464  // TOB
1465  if (DetId(thedetid).subdetId() == SiStripDetId::TOB) {
1469  binfecring,
1470  binfecslot,
1471  sovn);
1472  }
1473 
1474  // TECM
1475  if ((DetId(thedetid).subdetId() == SiStripDetId::TEC) && (tTopo->tecSide(thedetid) == 1)) {
1479  binfecring,
1480  binfecslot,
1481  sovn);
1482  }
1483 
1484  // TECP
1485  if ((DetId(thedetid).subdetId() == SiStripDetId::TEC) && (tTopo->tecSide(thedetid) == 2)) {
1489  binfecring,
1490  binfecslot,
1491  sovn);
1492  }
1493 
1494  } // end of looping over the fed chan connections
1495  } // end of looping over the rechits of the track
1496  } // end of looping over the tracks
1497 
1498  return true;
1499 }
ClusterRef cluster() const
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
void return2DME(MonitorElement *input1, MonitorElement *input2, int binx, int biny, double value)
MonitorElement * ClusterStoNCorr_OnTrack_TECP
edm::EDGetTokenT< reco::TrackCollection > trackToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
void Fill(long long x)
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_TOB
ClusterRef cluster() const
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
Definition: DetId.h:18
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterStoNCorr_OnTrack_TIBTID
T get() const
Definition: EventSetup.h:71
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID
T const * product() const
Definition: ESHandle.h:86
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
MonitorElement * ClusterStoNCorr_OnTrack_TECM
unsigned int tecSide(const DetId &id) const
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 143 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

Referenced by analyze(), and clusterInfos().

143  {
144  if (ME != nullptr)
145  ME->Fill(value1);
146  }
void Fill(long long x)
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2 
)
inlineprivate

Definition at line 147 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

147  {
148  if (ME != nullptr)
149  ME->Fill(value1, value2);
150  }
void Fill(long long x)
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3 
)
inlineprivate

Definition at line 151 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

151  {
152  if (ME != nullptr)
153  ME->Fill(value1, value2, value3);
154  }
void Fill(long long x)
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3,
float  value4 
)
inlineprivate

Definition at line 155 of file SiStripMonitorTrack.h.

References MonitorElement::Fill(), and findMEs().

155  {
156  if (ME != nullptr)
157  ME->Fill(value1, value2, value3, value4);
158  }
void Fill(long long x)
SiStripMonitorTrack::Det2MEs SiStripMonitorTrack::findMEs ( const TrackerTopology tTopo,
const uint32_t  detid 
)
private

Definition at line 1354 of file SiStripMonitorTrack.cc.

References folderOrganizer_, SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), SiStripMonitorTrack::Det2MEs::iLayer, SiStripMonitorTrack::Det2MEs::iRing, SiStripMonitorTrack::Det2MEs::iSubdet, LayerMEsMap, alignCSCRings::ring_id, RingMEsMap, AlCaHLTBitMon_QueryRunRegistry::string, and SubDetMEsMap.

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

1354  {
1355  SiStripHistoId hidmanager1;
1356 
1357  std::string layer_id = hidmanager1.getSubdetid(detid, tTopo, false);
1358  std::string ring_id = hidmanager1.getSubdetid(detid, tTopo, true);
1359  std::string sdet_tag = folderOrganizer_.getSubDetFolderAndTag(detid, tTopo).second;
1360 
1361  Det2MEs me;
1362  me.iLayer = nullptr;
1363  me.iRing = nullptr;
1364  me.iSubdet = nullptr;
1365 
1366  std::map<std::string, LayerMEs>::iterator iLayer = LayerMEsMap.find(layer_id);
1367  if (iLayer != LayerMEsMap.end()) {
1368  me.iLayer = &(iLayer->second);
1369  }
1370 
1371  std::map<std::string, RingMEs>::iterator iRing = RingMEsMap.find(ring_id);
1372  if (iRing != RingMEsMap.end()) {
1373  me.iRing = &(iRing->second);
1374  }
1375 
1376  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_tag);
1377  if (iSubdet != SubDetMEsMap.end()) {
1378  me.iSubdet = &(iSubdet->second);
1379  }
1380 
1381  return me;
1382 }
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
MonitorElement * SiStripMonitorTrack::handleBookMEs ( DQMStore::IBooker ibooker,
std::string &  viewParameter,
std::string &  id,
std::string &  histoParameters,
std::string &  histoName 
)
private

Definition at line 450 of file SiStripMonitorTrack.cc.

References bookME1D(), conf_, spr::find(), and edm::ParameterSet::getParameter().

Referenced by bookLayerMEs(), and bookRingMEs().

454  {
455  MonitorElement* me = nullptr;
456  bool view = false;
457  view = (conf_.getParameter<edm::ParameterSet>(histoParameters.c_str())).getParameter<bool>(viewParameter.c_str());
458  if (id.find("TEC") == std::string::npos && id.find("TID") == std::string::npos) {
459  me = bookME1D(ibooker, histoParameters.c_str(), histoName.c_str());
460  } else {
461  if (view) {
462  // histoName = histoName + "__" + thickness;
463  me = bookME1D(ibooker, histoParameters.c_str(), histoName.c_str());
464  }
465  }
466  return me;
467 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void SiStripMonitorTrack::hitStudy ( const edm::Event ev,
const edm::EventSetup es,
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 990 of file SiStripMonitorTrack.cc.

References ev, TrackingRecHit::geographicalId(), TrackerGeometry::idToDet(), LogDebug, LogTrace, funct::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().

998  {
999  LocalVector statedirection;
1000  if (matchedhit) { // type=Matched;
1001  LogTrace("SiStripMonitorTrack") << "\nMatched recHit found" << std::endl;
1002 
1003  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(matchedhit->geographicalId()));
1004 
1005  GlobalVector gtrkdirup = gdet->toGlobal(localMomentum);
1006 
1007  //mono side
1008  const GeomDetUnit* monodet = gdet->monoDet();
1009  statedirection = monodet->toLocal(gtrkdirup);
1010  SiStripRecHit2D m = matchedhit->monoHit();
1011  if (statedirection.mag())
1012  RecHitInfo<SiStripRecHit2D>(&m, statedirection, digilist, ev, es, track_ok);
1013 
1014  //stereo side
1015  const GeomDetUnit* stereodet = gdet->stereoDet();
1016  statedirection = stereodet->toLocal(gtrkdirup);
1017  SiStripRecHit2D s = matchedhit->stereoHit();
1018  if (statedirection.mag())
1019  RecHitInfo<SiStripRecHit2D>(&s, statedirection, digilist, ev, es, track_ok);
1020  } else if (projhit) { // type=Projected;
1021  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found" << std::endl;
1022 
1023  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(projhit->geographicalId()));
1024 
1025  GlobalVector gtrkdirup = gdet->toGlobal(localMomentum);
1026  const SiStripRecHit2D originalhit = projhit->originalHit();
1027 
1028  const GeomDetUnit* det;
1029  if (!StripSubdetector(originalhit.geographicalId().rawId()).stereo()) {
1030  //mono side
1031  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found MONO" << std::endl;
1032  det = gdet->monoDet();
1033  statedirection = det->toLocal(gtrkdirup);
1034  if (statedirection.mag())
1035  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, es, track_ok);
1036  } else {
1037  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found STEREO" << std::endl;
1038  //stereo side
1039  det = gdet->stereoDet();
1040  statedirection = det->toLocal(gtrkdirup);
1041  if (statedirection.mag())
1042  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, es, track_ok);
1043  }
1044  } else if (hit2D) { // type=2D
1045  statedirection = localMomentum;
1046  if (statedirection.mag())
1047  RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist, ev, es, track_ok);
1048  } else if (hit1D) { // type=1D
1049  statedirection = localMomentum;
1050  if (statedirection.mag())
1051  RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist, ev, es, track_ok);
1052  } else {
1053  LogDebug("SiStripMonitorTrack") << " LocalMomentum: " << statedirection
1054  << "\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
1055  }
1056 }
#define LogDebug(id)
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:69
bool ev
edm::ESHandle< TrackerGeometry > tkgeom_
T mag() const
Definition: PV3DBase.h:67
T z() const
Definition: PV3DBase.h:64
#define LogTrace(id)
SiStripRecHit2D originalHit() const
SiStripRecHit2D stereoHit() const
SiStripRecHit2D monoHit() const
const TrackerGeomDet * idToDet(DetId) const override
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:62
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
template<class T >
void SiStripMonitorTrack::RecHitInfo ( const T tkrecHit,
LocalVector  LV,
const edm::DetSetVector< SiStripDigi > &  digilist,
const edm::Event ev,
const edm::EventSetup es,
bool  track_ok 
)
private

Definition at line 1208 of file SiStripMonitorTrack.cc.

References clusterInfos(), findMEs(), edm::EventSetup::get(), TrackerGeometry::idToDet(), LogTrace, OnTrack, PV3DBase< T, PVType, FrameType >::phi(), funct::pow(), edm::ESHandle< T >::product(), DetId::subdetId(), SiStripDetId::TIB, tkgeom_, SiStripDetId::TOB, GeomDet::toGlobal(), vPSiStripCluster, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

1213  {
1214  if (!tkrecHit->isValid()) {
1215  LogTrace("SiStripMonitorTrack") << "\t\t Invalid Hit " << std::endl;
1216  return;
1217  }
1218 
1219  const uint32_t& detid = tkrecHit->geographicalId().rawId();
1220 
1221  LogTrace("SiStripMonitorTrack")
1222  << "\n\t\tRecHit on det " << detid << "\n\t\tRecHit in LP " << tkrecHit->localPosition() << "\n\t\tRecHit in GP "
1223  << tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition())
1224  << "\n\t\tRecHit trackLocal vector " << LV.x() << " " << LV.y() << " " << LV.z() << std::endl;
1225 
1226  // FIXME: MOVE ALL THE EV AND ES ACCESS OUTSIDE THE LOOP!!!!
1227 
1228  //Retrieve tracker topology from geometry
1229  edm::ESHandle<TrackerTopology> tTopoHandle;
1230  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1231  const TrackerTopology* const tTopo = tTopoHandle.product();
1232 
1233  // Getting SiStrip Gain settings
1234  edm::ESHandle<SiStripGain> gainHandle;
1235  es.get<SiStripGainRcd>().get(gainHandle);
1236  const SiStripGain* const stripGain = gainHandle.product();
1237 
1238  edm::ESHandle<SiStripQuality> qualityHandle;
1239  es.get<SiStripQualityRcd>().get("", qualityHandle);
1240  const SiStripQuality* stripQuality = qualityHandle.product();
1241 
1242  //Get SiStripCluster from SiStripRecHit
1243  if (tkrecHit != nullptr && tkrecHit->isValid()) {
1244  const DetId detid = tkrecHit->geographicalId();
1245  int subDet = detid.subdetId();
1246  //std::cout << __LINE__ << std::endl;
1247  float clust_Pos1 = -1000;
1248  float clust_Pos2 = -1000;
1249 
1250 
1251  GlobalPoint theGlobalPos = tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition());
1252  if(subDet == SiStripDetId::TIB || subDet == SiStripDetId::TOB ){
1253  clust_Pos1 = theGlobalPos.z();
1254  clust_Pos2 = theGlobalPos.phi();
1255  }else{
1256  clust_Pos1 = pow(theGlobalPos.x()*theGlobalPos.x() + theGlobalPos.y()*theGlobalPos.y(), 0.5);
1257  clust_Pos2 = theGlobalPos.phi();
1258  }
1259 
1260  const SiStripCluster* SiStripCluster_ = &*(tkrecHit->cluster());
1261  SiStripClusterInfo SiStripClusterInfo_(*SiStripCluster_, es, detid);
1262 
1263 
1264  const Det2MEs MEs = findMEs(tTopo, detid);
1265  if (clusterInfos(
1266  &SiStripClusterInfo_, detid, OnTrack, track_ok, LV, MEs, tTopo, stripGain, stripQuality, digilist, clust_Pos1, clust_Pos2)) {
1267  vPSiStripCluster.insert(SiStripCluster_);
1268  }
1269  } else {
1270  edm::LogError("SiStripMonitorTrack") << "NULL hit" << std::endl;
1271  }
1272 
1273 }
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
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)
edm::ESHandle< TrackerGeometry > tkgeom_
std::unordered_set< const SiStripCluster * > vPSiStripCluster
T z() const
Definition: PV3DBase.h:64
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
#define LogTrace(id)
Definition: DetId.h:18
T get() const
Definition: EventSetup.h:71
const TrackerGeomDet * idToDet(DetId) const override
T x() const
Definition: PV3DBase.h:62
T const * product() const
Definition: ESHandle.h:86
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void SiStripMonitorTrack::return2DME ( MonitorElement input1,
MonitorElement input2,
int  binx,
int  biny,
double  value 
)
private

Definition at line 1501 of file SiStripMonitorTrack.cc.

References MonitorElement::getBinContent(), MonitorElement::setBinContent(), and relativeConstraints::value.

Referenced by fillControlViewHistos().

1501  {
1502  if (input1->getBinContent(binx, biny) == 0.) {
1503  input1->setBinContent(binx, biny, value);
1504  input2->setBinContent(binx, biny, 1);
1505  } else {
1506  double nentries = input2->getBinContent(binx, biny);
1507  double theMeanSoN = (input1->getBinContent(binx, biny) * nentries + value) / (nentries + 1);
1508  //input1->setBinContent(binx,biny,((input1->getBinContent(binx,biny)+value)/2.));
1509  input1->setBinContent(binx, biny, theMeanSoN);
1510  input2->setBinContent(binx, biny, input2->getBinContent(binx, biny) + 1);
1511  }
1512 }
void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: value.py:1
double getBinContent(int binx) const
get content of bin (1-D)
bool SiStripMonitorTrack::trackFilter ( const reco::Track track)
private

Definition at line 1086 of file SiStripMonitorTrack.cc.

References reco::TrackBase::hitPattern(), reco::TrackBase::normalizedChi2(), reco::HitPattern::numberOfValidTrackerHits(), reco::TrackBase::p(), and reco::TrackBase::pt().

Referenced by trackStudyFromTrack(), and trackStudyFromTrajectory().

1086  {
1087  if (track.pt() < 0.8)
1088  return false;
1089  if (track.p() < 2.0)
1090  return false;
1091  if (track.hitPattern().numberOfValidTrackerHits() <= 6)
1092  return false;
1093  if (track.normalizedChi2() > 10.0)
1094  return false;
1095  return true;
1096 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:654
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:600
double pt() const
track transverse momentum
Definition: TrackBase.h:660
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:485
int numberOfValidTrackerHits() const
Definition: HitPattern.h:901
void SiStripMonitorTrack::trackStudy ( const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 1058 of file SiStripMonitorTrack.cc.

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

Referenced by analyze().

1058  {
1059  using namespace std;
1060  using namespace edm;
1061  using namespace reco;
1062 
1063  // edm::Handle<std::vector<Trajectory> > trajectories;
1064  // ev.getByToken(trajectoryToken_, trajectories);
1065 
1066  // track input
1067  edm::Handle<reco::TrackCollection> trackCollectionHandle;
1068  ev.getByToken(trackToken_, trackCollectionHandle); //takes the track collection
1069 
1070  // digis list
1072  ev.getByToken(digiToken_, digihandle);
1074  auto& digilist = digihandle.isValid() ? *(digihandle.product()) : dummy;
1075 
1076  if (trackCollectionHandle.isValid()) {
1077  trackStudyFromTrajectory(trackCollectionHandle, digilist, ev, es);
1078  } else {
1079  edm::LogError("SiStripMonitorTrack") << "also Track Collection is not valid !! " << TrackLabel_ << std::endl;
1080  return;
1081  }
1082 }
edm::EDGetTokenT< reco::TrackCollection > trackToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
void trackStudyFromTrajectory(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es)
T const * product() const
Definition: Handle.h:74
fixed size matrix
HLT enums.
void SiStripMonitorTrack::trackStudyFromTrack ( edm::Handle< reco::TrackCollection trackCollectionHandle,
const edm::DetSetVector< SiStripDigi > &  digilist,
const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 1098 of file SiStripMonitorTrack.cc.

References DetId::det(), hitStudy(), tkhisto_NumberInactiveHits, tkhisto_NumberValidHits, tkhisto_NumMissingHits, TkHistoMap_On_, HiIsolationCommonParameters_cff::track, findElectronsInSiStrips_cfi::trackCollection, DetId::Tracker, and trackFilter().

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

Definition at line 1180 of file SiStripMonitorTrack.cc.

References mps_fire::i, LogDebug, numTracks, HiIsolationCommonParameters_cff::track, findElectronsInSiStrips_cfi::trackCollection, trackFilter(), and trajectoryStudy().

Referenced by trackStudy().

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

Definition at line 897 of file SiStripMonitorTrack.cc.

References ev, reco::Track::extra(), TrackingRecHit::geographicalId(), h, hcalSimParameters_cfi::hb, TrackerGeometry::idToDet(), LogDebug, LogTrace, funct::m, GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), ProjectedSiStripRecHit2D::originalHit(), DetId::rawId(), reco::Track::recHitsBegin(), reco::Track::recHitsSize(), alignCSCRings::s, GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), tkgeom_, tkhisto_NumberInactiveHits, tkhisto_NumberValidHits, tkhisto_NumMissingHits, TkHistoMap_On_, GeomDet::toGlobal(), and GeomDet::toLocal().

Referenced by trackStudyFromTrajectory().

901  {
902  auto const& trajParams = track.extra()->trajParams();
903  assert(trajParams.size() == track.recHitsSize());
904  auto hb = track.recHitsBegin();
905  for (unsigned int h = 0; h < track.recHitsSize(); h++) {
906  auto ttrh = *(hb + h);
907 
908  if (TkHistoMap_On_) {
909  uint32_t thedetid = ttrh->rawId();
910  if (SiStripDetId(thedetid).subDetector() >= 3 &&
911  SiStripDetId(thedetid).subDetector() <= 6) { //TIB/TID + TOB + TEC only
912  if ((ttrh->getType() == 1))
913  tkhisto_NumMissingHits->fill(thedetid, 1.);
914  if ((ttrh->getType() == 2))
915  tkhisto_NumberInactiveHits->fill(thedetid, 1.);
916  if ((ttrh->getType() == 0))
917  tkhisto_NumberValidHits->fill(thedetid, 1.);
918  }
919  }
920 
921  if (!ttrh->isValid())
922  continue;
923 
924  //trajectory local direction and position on detector
925  auto statedirection = trajParams[h].momentum();
926 
927  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>(ttrh->hit());
928  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(ttrh->hit());
929  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(ttrh->hit());
930  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(ttrh->hit());
931 
932  // RecHitType type=Single;
933 
934  if (matchedhit) {
935  LogTrace("SiStripMonitorTrack") << "\nMatched recHit found" << std::endl;
936  // type=Matched;
937 
938  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(matchedhit->geographicalId()));
939  GlobalVector gtrkdirup = gdet->toGlobal(statedirection);
940  //mono side
941  const GeomDetUnit* monodet = gdet->monoDet();
942  statedirection = monodet->toLocal(gtrkdirup);
943  SiStripRecHit2D m = matchedhit->monoHit();
944  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&m,statedirection,trackref,es);
945  if (statedirection.mag())
946  RecHitInfo<SiStripRecHit2D>(&m, statedirection, digilist, ev, es, track_ok);
947  //stereo side
948  const GeomDetUnit* stereodet = gdet->stereoDet();
949  statedirection = stereodet->toLocal(gtrkdirup);
950  SiStripRecHit2D s = matchedhit->stereoHit();
951  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&s,statedirection,trackref,es);
952  if (statedirection.mag())
953  RecHitInfo<SiStripRecHit2D>(&s, statedirection, digilist, ev, es, track_ok);
954  } else if (projhit) {
955  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found" << std::endl;
956  // type=Projected;
957  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tkgeom_->idToDet(projhit->geographicalId()));
958 
959  GlobalVector gtrkdirup = gdet->toGlobal(statedirection);
960  const SiStripRecHit2D originalhit = projhit->originalHit();
961  const GeomDetUnit* det;
962  if (!StripSubdetector(originalhit.geographicalId().rawId()).stereo()) {
963  //mono side
964  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found MONO" << std::endl;
965  det = gdet->monoDet();
966  statedirection = det->toLocal(gtrkdirup);
967  if (statedirection.mag())
968  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, es, track_ok);
969  } else {
970  LogTrace("SiStripMonitorTrack") << "\nProjected recHit found STEREO" << std::endl;
971  //stereo side
972  det = gdet->stereoDet();
973  statedirection = det->toLocal(gtrkdirup);
974  if (statedirection.mag())
975  RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist, ev, es, track_ok);
976  }
977  } else if (hit2D) {
978  if (statedirection.mag())
979  RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist, ev, es, track_ok);
980  } else if (hit1D) {
981  if (statedirection.mag())
982  RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist, ev, es, track_ok);
983  } else {
984  LogDebug("SiStripMonitorTrack") << " LocalMomentum: " << statedirection
985  << "\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
986  }
987  }
988 }
#define LogDebug(id)
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:194
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:124
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:69
bool ev
edm::ESHandle< TrackerGeometry > tkgeom_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:109
#define LogTrace(id)
SiStripRecHit2D originalHit() const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SiStripRecHit2D stereoHit() const
SiStripRecHit2D monoHit() const
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
const TrackerGeomDet * idToDet(DetId) const override
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
DetId geographicalId() const
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21

Member Data Documentation

bool SiStripMonitorTrack::applyClusterQuality_
private

Definition at line 292 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::clchCMoriginTkHmap_On_
private

Definition at line 281 of file SiStripMonitorTrack.h.

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

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 269 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECCratevsFECSlot = 0
private

Definition at line 313 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TECM = 0
private

Definition at line 316 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TECP = 0
private

Definition at line 317 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID = 0
private

Definition at line 314 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterCount_OnTrack_FECSlotVsFECRing_TOB = 0
private

Definition at line 315 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECCratevsFECSlot = 0
private

Definition at line 307 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM = 0
private

Definition at line 310 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP = 0
private

Definition at line 311 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID = 0
private

Definition at line 308 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB = 0
private

Definition at line 309 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TECM = 0
private

Definition at line 305 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TECP = 0
private

Definition at line 306 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TIBTID = 0
private

Definition at line 303 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

MonitorElement* SiStripMonitorTrack::ClusterStoNCorr_OnTrack_TOB = 0
private

Definition at line 304 of file SiStripMonitorTrack.h.

Referenced by book(), and fillControlViewHistos().

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

Definition at line 272 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

edm::ParameterSet SiStripMonitorTrack::conf_
private
SiStripDCSStatus* SiStripMonitorTrack::dcsStatus_
private

Definition at line 298 of file SiStripMonitorTrack.h.

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

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

Definition at line 271 of file SiStripMonitorTrack.h.

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

edm::EventNumber_t SiStripMonitorTrack::eventNb
private

Definition at line 289 of file SiStripMonitorTrack.h.

Referenced by analyze(), and clusterInfos().

int SiStripMonitorTrack::firstEvent
private

Definition at line 290 of file SiStripMonitorTrack.h.

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

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 300 of file SiStripMonitorTrack.h.

Referenced by findMEs().

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 299 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::histname
private

Definition at line 165 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::HistoFlag_On_
private

Definition at line 278 of file SiStripMonitorTrack.h.

float SiStripMonitorTrack::iLumisection
private

Definition at line 167 of file SiStripMonitorTrack.h.

Referenced by analyze().

float SiStripMonitorTrack::iOrbitSec
private

Definition at line 167 of file SiStripMonitorTrack.h.

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

Definition at line 255 of file SiStripMonitorTrack.h.

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

LocalVector SiStripMonitorTrack::LV
private

Definition at line 166 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::Mod_On_
private

Definition at line 275 of file SiStripMonitorTrack.h.

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

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

Definition at line 254 of file SiStripMonitorTrack.h.

Referenced by bookModMEs(), and clusterInfos().

int SiStripMonitorTrack::numTracks
private

Definition at line 178 of file SiStripMonitorTrack.h.

Referenced by trackStudyFromTrajectory().

bool SiStripMonitorTrack::OffHisto_On_
private

Definition at line 277 of file SiStripMonitorTrack.h.

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 268 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::ring_flag
private

Definition at line 279 of file SiStripMonitorTrack.h.

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

Definition at line 256 of file SiStripMonitorTrack.h.

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

edm::ESHandle<SiStripDetCabling> SiStripMonitorTrack::SiStripDetCabling_
private
double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 293 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 294 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

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

Definition at line 257 of file SiStripMonitorTrack.h.

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

edm::ESHandle<TrackerGeometry> SiStripMonitorTrack::tkgeom_
private
std::unique_ptr<TkHistoMap> SiStripMonitorTrack::tkhisto_ClChPerCMfromOrigin
private

Definition at line 173 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 173 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 174 of file SiStripMonitorTrack.h.

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

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

Definition at line 174 of file SiStripMonitorTrack.h.

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

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

Definition at line 174 of file SiStripMonitorTrack.h.

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

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

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

bool SiStripMonitorTrack::TkHistoMap_On_
private
std::string SiStripMonitorTrack::topFolderName_
private

Definition at line 169 of file SiStripMonitorTrack.h.

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

bool SiStripMonitorTrack::trackAssociatorCollection_in_EventTree
private

Definition at line 288 of file SiStripMonitorTrack.h.

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 284 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 283 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 287 of file SiStripMonitorTrack.h.

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

Definition at line 273 of file SiStripMonitorTrack.h.

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

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 276 of file SiStripMonitorTrack.h.

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

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

Definition at line 286 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 295 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 296 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().