CMS 3D CMS Logo

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

#include <SiStripMonitorTrack.h>

Inheritance diagram for SiStripMonitorTrack:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  Det2MEs
 
struct  LayerMEs
 
struct  ModMEs
 
struct  RingMEs
 
struct  SubDetMEs
 

Public Types

typedef TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
 
enum  RecHitType { Single =0, Matched =1, Projected =2, Null =3 }
 
- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

virtual 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 ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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)
 
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)
 
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 ok)
 
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_
 
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_
 
TkHistoMaptkhisto_ClChPerCMfromOrigin
 
TkHistoMaptkhisto_ClChPerCMfromTrack
 
TkHistoMaptkhisto_NumberInactiveHits
 
TkHistoMaptkhisto_NumberValidHits
 
TkHistoMaptkhisto_NumMissingHits
 
TkHistoMaptkhisto_NumOffTrack
 
TkHistoMaptkhisto_NumOnTrack
 
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_
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 27 of file SiStripMonitorTrack.cc.

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

27  :
28  conf_(conf),
30  firstEvent(-1),
32 {
33  Cluster_src_ = conf.getParameter<edm::InputTag>("Cluster_src");
34  Mod_On_ = conf.getParameter<bool>("Mod_On");
35  Trend_On_ = conf.getParameter<bool>("Trend_On");
36  TkHistoMap_On_ = conf.getParameter<bool>("TkHistoMap_On");
37 
38  TrackProducer_ = conf_.getParameter<std::string>("TrackProducer");
39  TrackLabel_ = conf_.getParameter<std::string>("TrackLabel");
40 
41  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
42 
43  digiToken_ = consumes<edm::DetSetVector<SiStripDigi>> ( conf.getParameter<edm::InputTag>("ADCDigi_src") );
44  clusterToken_ = consumes<edmNew::DetSetVector<SiStripCluster> >(Cluster_src_);
45  trackToken_ = consumes<reco::TrackCollection>(edm::InputTag(TrackProducer_,TrackLabel_) );
46 
47  // cluster quality conditions
48  edm::ParameterSet cluster_condition = conf_.getParameter<edm::ParameterSet>("ClusterConditions");
49  applyClusterQuality_ = cluster_condition.getParameter<bool>("On");
50  sToNLowerLimit_ = cluster_condition.getParameter<double>("minStoN");
51  sToNUpperLimit_ = cluster_condition.getParameter<double>("maxStoN");
52  widthLowerLimit_ = cluster_condition.getParameter<double>("minWidth");
53  widthUpperLimit_ = cluster_condition.getParameter<double>("maxWidth");
54 
55 
56  // Create DCS Status
57  bool checkDCS = conf_.getParameter<bool>("UseDCSFiltering");
58  if (checkDCS) dcsStatus_ = new SiStripDCSStatus(consumesCollector());
59  else dcsStatus_ = 0;
60 }
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...
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
GenericTriggerEventFlag * genTriggerEventFlag_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
SiStripMonitorTrack::~SiStripMonitorTrack ( )

Definition at line 63 of file SiStripMonitorTrack.cc.

References dcsStatus_, and genTriggerEventFlag_.

63  {
64  if (dcsStatus_) delete dcsStatus_;
66 }
SiStripDCSStatus * dcsStatus_
GenericTriggerEventFlag * genTriggerEventFlag_

Member Function Documentation

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

Definition at line 1064 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().

1065 {
1066 
1067  //Retrieve tracker topology from geometry
1068  edm::ESHandle<TrackerTopology> tTopoHandle;
1069  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1070  const TrackerTopology* const tTopo = tTopoHandle.product();
1071 
1072  edm::ESHandle<SiStripGain> gainHandle;
1073  es.get<SiStripGainRcd>().get( gainHandle );
1074  const SiStripGain* stripGain = gainHandle.product();
1075 
1076  edm::ESHandle<SiStripQuality> qualityHandle;
1077  es.get<SiStripQualityRcd>().get("",qualityHandle);
1078  const SiStripQuality* stripQuality = qualityHandle.product();
1079 
1081  ev.getByToken( digiToken_, digihandle );
1083  auto& digilist = digihandle.isValid()? *(digihandle.product()) : dummy;
1084 
1086  ev.getByToken( clusterToken_, siStripClusterHandle);
1087  if (siStripClusterHandle.isValid()){
1088  //Loop on Dets
1089  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter=siStripClusterHandle->begin(), DSVEnd=siStripClusterHandle->end();
1090  DSViter!=DSVEnd; ++DSViter) {
1091 
1092  uint32_t detid=DSViter->id();
1093  const Det2MEs MEs = findMEs(tTopo, detid);
1094 
1095  LogDebug("SiStripMonitorTrack") << "on detid "<< detid << " N Cluster= " << DSViter->size();
1096 
1097  //Loop on Clusters
1098  for(edmNew::DetSet<SiStripCluster>::const_iterator ClusIter = DSViter->begin(), ClusEnd = DSViter->end();
1099  ClusIter!=ClusEnd; ++ClusIter) {
1100 
1101  if (vPSiStripCluster.find(&*ClusIter) == vPSiStripCluster.end()) {
1102  SiStripClusterInfo SiStripClusterInfo_(*ClusIter,es,detid);
1103  // clusterInfos(&SiStripClusterInfo_,detid,OffTrack, /*track_ok*/ false,LV,MEs, tTopo,stripGain,stripQuality,*digihandle);
1104  clusterInfos(&SiStripClusterInfo_,detid,OffTrack, /*track_ok*/ false,LV,MEs, tTopo,stripGain,stripQuality,digilist);
1105  }
1106  }
1107  }
1108  } else {
1109  edm::LogError("SiStripMonitorTrack")<< "ClusterCollection is not valid!!" << std::endl;
1110  return;
1111  }
1112 }
#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:460
data_type const * const_iterator
Definition: DetSetNew.h:30
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)
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
math::XYZTLorentzVectorD LV
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:81
const T & get() const
Definition: EventSetup.h:56
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 
)
overridevirtual

Definition at line 92 of file SiStripMonitorTrack.cc.

References GenericTriggerEventFlag::accept(), AllClusters(), dcsStatus_, edm::EventID::event(), eventNb, 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, SiStripMonitorTrack::SubDetMEs::totNClustersOffTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrack, trackStudy(), Trend_On_, and vPSiStripCluster.

93 {
94  // Filter out events if DCS checking is requested
95  if (dcsStatus_ && !dcsStatus_->getStatus(e,es)) return;
96 
97  // Filter out events if Trigger Filtering is requested
98  if (genTriggerEventFlag_->on()&& ! genTriggerEventFlag_->accept( e, es) ) return;
99 
100  //initialization of global quantities
101  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::analyse] " << "Run " << e.id().run() << " Event " << e.id().event() << std::endl;
102  eventNb = e.id().event();
103  vPSiStripCluster.clear();
104 
105  iLumisection = e.orbitNumber()/262144.0;
106 
107  // initialise # of clusters
108  for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin();
109  iSubDet != SubDetMEsMap.end(); iSubDet++) {
110  iSubDet->second.totNClustersOnTrack = 0;
111  iSubDet->second.totNClustersOffTrack = 0;
112  }
113 
114  //Perform track study
115  trackStudy(e, es);
116 
117  //Perform Cluster Study (irrespectively to tracks)
118 
119  AllClusters(e, es); //analyzes the off Track Clusters
120 
121  //Summary Counts of clusters
122  std::map<std::string, MonitorElement*>::iterator iME;
123  std::map<std::string, LayerMEs>::iterator iLayerME;
124 
125  if (Trend_On_) {
126  // for (std::map<std::string, SubDetMEs>::iterator iSubDet = SubDetMEsMap.begin(), iterEnd=SubDetMEsMaps.end();
127  // iSubDet != iterEnd; ++iSubDet) {
128  for (auto const &iSubDet : SubDetMEsMap) {
129  SubDetMEs subdet_mes = iSubDet.second;
130  if (subdet_mes.totNClustersOnTrack > 0) {
131  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
132  }
133  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
134  fillME(subdet_mes.nClustersTrendOnTrack,iLumisection,subdet_mes.totNClustersOnTrack);
135  fillME(subdet_mes.nClustersTrendOffTrack,iLumisection,subdet_mes.totNClustersOffTrack);
136  }
137  } else {
138  for (auto const &iSubDet : SubDetMEsMap) {
139  SubDetMEs subdet_mes = iSubDet.second;
140  if (subdet_mes.totNClustersOnTrack > 0) {
141  fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
142  }
143  fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
144  }
145  }
146 }
#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:67
GenericTriggerEventFlag * genTriggerEventFlag_
edm::EventID id() const
Definition: EventBase.h:60
void SiStripMonitorTrack::book ( DQMStore::IBooker ibooker,
const TrackerTopology tTopo 
)
private

Definition at line 149 of file SiStripMonitorTrack.cc.

References SiStripDetCabling::addActiveDetectorsRawIds(), bookLayerMEs(), bookModMEs(), bookRingMEs(), bookSubDetMEs(), clchCMoriginTkHmap_On_, SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), LayerMEsMap, Mod_On_, NULL, alignCSCRings::ring_id, RingMEsMap, DQMStore::IBooker::setCurrentFolder(), SiStripFolderOrganizer::setDetectorFolder(), SiStripFolderOrganizer::setLayerFolder(), SiStripFolderOrganizer::setSiStripFolderName(), SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, tkhisto_ClChPerCMfromOrigin, tkhisto_ClChPerCMfromTrack, tkhisto_NumberInactiveHits, tkhisto_NumberValidHits, tkhisto_NumMissingHits, tkhisto_NumOffTrack, tkhisto_NumOnTrack, tkhisto_StoNCorrOnTrack, TkHistoMap_On_, and topFolderName_.

Referenced by bookHistograms().

150 {
151 
152  SiStripFolderOrganizer folder_organizer;
153  folder_organizer.setSiStripFolderName(topFolderName_);
154  //******** TkHistoMaps
155  if (TkHistoMap_On_) {
156  tkhisto_StoNCorrOnTrack = new TkHistoMap(ibooker , topFolderName_ ,"TkHMap_StoNCorrOnTrack", 0.0,true);
157  tkhisto_NumOnTrack = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberOfOnTrackCluster", 0.0,true);
158  tkhisto_NumOffTrack = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberOfOfffTrackCluster",0.0,true);
159  tkhisto_ClChPerCMfromTrack = new TkHistoMap(ibooker , topFolderName_, "TkHMap_ChargePerCMfromTrack",0.0,true);
160  tkhisto_NumMissingHits = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberMissingHits",0.0,true);
161  tkhisto_NumberInactiveHits = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberInactiveHits",0.0,true);
162  tkhisto_NumberValidHits = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberValidHits",0.0,true);
163  }
165  tkhisto_ClChPerCMfromOrigin = new TkHistoMap(ibooker , topFolderName_, "TkHMap_ChargePerCMfromOrigin",0.0,true);
166  //******** TkHistoMaps
167 
168  std::vector<uint32_t> vdetId_;
170  const char* tec = "TEC";
171  const char* tid = "TID";
172  //Histos for each detector, layer and module
173  SiStripHistoId hidmanager;
174 
175  if(Mod_On_) {
176  for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin(),detid_end=vdetId_.end();detid_iter!=detid_end;++detid_iter){ //loop on all the active detid
177  uint32_t detid = *detid_iter;
178 
179  if (detid < 1){
180  edm::LogError("SiStripMonitorTrack")<< "[" <<__PRETTY_FUNCTION__ << "] invalid detid " << detid<< std::endl;
181  continue;
182  }
183 
184 
185  //std::string name;
186 
187  // book Layer and RING plots
188  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,false);
189  /*
190  std::string thickness;
191  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
192  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
193  */
194 
195  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
196 
197  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
198  if(iLayerME==LayerMEsMap.end()){
199  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
200  bookLayerMEs(ibooker , detid, layer_id);
201  }
202 
203  const char* subdet = det_layer_pair.first.c_str();
204  if ( std::strstr(subdet, tec) != NULL || std::strstr(subdet, tid) != NULL ) {
205  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
206  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
207  if(iRingME==RingMEsMap.end()){
208  std::pair<std::string,int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,true);
209  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
210  bookRingMEs(ibooker , detid, ring_id);
211  }
212  }
213 
214  // book sub-detector plots
215  std::pair<std::string,std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
216  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()){
217  ibooker.setCurrentFolder(sdet_pair.first);
218  bookSubDetMEs(ibooker , sdet_pair.second);
219  }
220  // book module plots
221  folder_organizer.setDetectorFolder(detid,tTopo);
222  bookModMEs(ibooker , *detid_iter);
223  }//end loop on detectors detid
224  } else {
225  for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin(),detid_end=vdetId_.end();detid_iter!=detid_end;++detid_iter){ //loop on all the active detid
226  uint32_t detid = *detid_iter;
227 
228  if (detid < 1){
229  edm::LogError("SiStripMonitorTrack")<< "[" <<__PRETTY_FUNCTION__ << "] invalid detid " << detid<< std::endl;
230  continue;
231  }
232 
233 
234  //std::string name;
235 
236  // book Layer and RING plots
237  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,false);
238  /*
239  std::string thickness;
240  std::pair<std::string,int32_t> det_layer_pair_test = folder_organizer.GetSubDetAndLayerThickness(detid,tTopo,thickness);
241  std::cout << "[SiStripMonitorTrack::book] det_layer_pair " << det_layer_pair.first << " " << det_layer_pair.second << " " << thickness << std::endl;
242  */
243 
244  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, false);
245 
246  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
247  if(iLayerME==LayerMEsMap.end()){
248  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, false);
249  bookLayerMEs(ibooker , detid, layer_id);
250  }
251 
252  const char* subdet = det_layer_pair.first.c_str();
253  if ( std::strstr(subdet, tec) != NULL || std::strstr(subdet, tid) != NULL ) {
254  std::string ring_id = hidmanager.getSubdetid(detid, tTopo, true);
255  std::map<std::string, RingMEs>::iterator iRingME = RingMEsMap.find(ring_id);
256  if(iRingME==RingMEsMap.end()){
257  std::pair<std::string,int32_t> det_ring_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,true);
258  folder_organizer.setLayerFolder(detid, tTopo, det_ring_pair.second, true);
259  bookRingMEs(ibooker , detid, ring_id);
260  }
261  }
262 
263  // book sub-detector plots
264  std::pair<std::string,std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
265  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()){
266  ibooker.setCurrentFolder(sdet_pair.first);
267  bookSubDetMEs(ibooker , sdet_pair.second);
268  }
269  }//end loop on detectors detid
270  }
271 }
TkHistoMap * tkhisto_NumOffTrack
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
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
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
#define NULL
Definition: scimark2.h:8
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
TkHistoMap * tkhisto_NumMissingHits
std::map< std::string, SubDetMEs > SubDetMEsMap
void bookSubDetMEs(DQMStore::IBooker &, std::string &name)
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
void bookModMEs(DQMStore::IBooker &, const uint32_t)
TkHistoMap * tkhisto_NumberInactiveHits
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
TkHistoMap * tkhisto_ClChPerCMfromOrigin
TkHistoMap * tkhisto_ClChPerCMfromTrack
TkHistoMap * tkhisto_NumOnTrack
TkHistoMap * tkhisto_StoNCorrOnTrack
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
TkHistoMap * tkhisto_NumberValidHits
std::map< std::string, LayerMEs > LayerMEsMap
void SiStripMonitorTrack::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 82 of file SiStripMonitorTrack.cc.

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

83 {
84  //Retrieve tracker topology from geometry
86  es.get<TrackerTopologyRcd>().get(tTopoHandle);
87  const TrackerTopology* const tTopo = tTopoHandle.product();
88  book(ibooker , tTopo);
89 }
void book(DQMStore::IBooker &, const TrackerTopology *tTopo)
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 341 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book1D(), 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::ClusterStoNCorrOnTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOffTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOnTrack, conf_, SiStripHistoId::createHistoLayer(), edm::ParameterSet::getParameter(), handleBookMEs(), LayerMEsMap, dataset::name, SiStripDetCabling::nApvPairs(), SiStripDetCabling_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by book().

342 {
343  std::string name = "layer";
344  std::string view = "layerView";
345  std::string hname;
346  std::string hpar;
347  SiStripHistoId hidmanager;
348 
349  LayerMEs theLayerMEs;
350 
351  // Signal/Noise (w/ cluster harge corrected)
352  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr",name,layer_id,"OnTrack");
353  hpar = "TH1ClusterStoNCorr";
354  theLayerMEs.ClusterStoNCorrOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
355 
356  // Cluster Gain
357  hname = hidmanager.createHistoLayer("Summary_ClusterGain",name,layer_id,"");
358  hpar = "TH1ClusterGain";
359  theLayerMEs.ClusterGain = handleBookMEs(ibooker,view,layer_id,hpar,hname);
360 
361  // Cluster Charge Corrected
362  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr",name,layer_id,"OnTrack");
363  hpar = "TH1ClusterChargeCorr";
364  theLayerMEs.ClusterChargeCorrOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
365 
366  // Cluster Charge (On and Off Track)
367  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,layer_id,"OnTrack");
368  hpar = "TH1ClusterCharge";
369  theLayerMEs.ClusterChargeOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
370 
371  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,layer_id,"OffTrack");
372  hpar = "TH1ClusterCharge";
373  theLayerMEs.ClusterChargeOffTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
374 
375  // Cluster Charge Raw (On and Off Track)
376  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw",name,layer_id,"OnTrack");
377  hpar = "TH1ClusterChargeRaw";
378  theLayerMEs.ClusterChargeRawOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
379 
380  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw",name,layer_id,"OffTrack");
381  hpar = "TH1ClusterChargeRaw";
382  theLayerMEs.ClusterChargeRawOffTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
383 
384  // Cluster Noise (On and Off Track)
385  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,layer_id,"OnTrack");
386  hpar = "TH1ClusterNoise";
387  theLayerMEs.ClusterNoiseOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
388 
389  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,layer_id,"OffTrack");
390  hpar = "TH1ClusterNoise";
391  theLayerMEs.ClusterNoiseOffTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
392 
393  // Cluster Width (On and Off Track)
394  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,layer_id,"OnTrack");
395  hpar = "TH1ClusterWidth";
396  theLayerMEs.ClusterWidthOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
397 
398  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,layer_id,"OffTrack");
399  hpar = "TH1ClusterWidth";
400  theLayerMEs.ClusterWidthOffTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
401 
402  //Cluster Position
403  short total_nr_strips = SiStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
404  if (layer_id.find("TEC") != std::string::npos) total_nr_strips = 3 * 2 * 128;
405 
406  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,layer_id,"OnTrack");
407  hpar = "TH1ClusterPos";
408  if ( layer_id.find("TIB") != std::string::npos || layer_id.find("TOB") != std::string::npos || (conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()) ) theLayerMEs.ClusterPosOnTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
409 
410  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,layer_id,"OffTrack");
411  hpar = "TH1ClusterPos";
412  if ( layer_id.find("TIB") != std::string::npos || layer_id.find("TOB") != std::string::npos || (conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()) ) theLayerMEs.ClusterPosOffTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
413 
414  // dQ/dx
415  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromTrack",name,layer_id,"");
416  hpar = "TH1ClusterChargePerCM";
417  theLayerMEs.ClusterChargePerCMfromTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
418 
419  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin",name,layer_id,"OnTrack");
420  hpar = "TH1ClusterChargePerCM";
421  theLayerMEs.ClusterChargePerCMfromOriginOnTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
422 
423  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin",name,layer_id,"OffTrack");
424  hpar = "TH1ClusterChargePerCM";
425  theLayerMEs.ClusterChargePerCMfromOriginOffTrack = handleBookMEs(ibooker,view,layer_id,hpar,hname);
426 
427  //bookeeping
428  LayerMEsMap[layer_id]=theLayerMEs;
429 
430 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
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)
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * SiStripMonitorTrack::bookME1D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 619 of file SiStripMonitorTrack.cc.

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

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

620 {
621  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
622  return ibooker.book1D(HistoName,HistoName,
623  Parameters.getParameter<int32_t>("Nbinx"),
624  Parameters.getParameter<double>("xmin"),
625  Parameters.getParameter<double>("xmax")
626  );
627 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME2D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 630 of file SiStripMonitorTrack.cc.

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

631 {
632  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
633  return ibooker.book2D(HistoName,HistoName,
634  Parameters.getParameter<int32_t>("Nbinx"),
635  Parameters.getParameter<double>("xmin"),
636  Parameters.getParameter<double>("xmax"),
637  Parameters.getParameter<int32_t>("Nbiny"),
638  Parameters.getParameter<double>("ymin"),
639  Parameters.getParameter<double>("ymax")
640  );
641 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME3D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 644 of file SiStripMonitorTrack.cc.

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

645 {
646  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
647  return ibooker.book3D(HistoName,HistoName,
648  Parameters.getParameter<int32_t>("Nbinx"),
649  Parameters.getParameter<double>("xmin"),
650  Parameters.getParameter<double>("xmax"),
651  Parameters.getParameter<int32_t>("Nbiny"),
652  Parameters.getParameter<double>("ymin"),
653  Parameters.getParameter<double>("ymax"),
654  Parameters.getParameter<int32_t>("Nbinz"),
655  Parameters.getParameter<double>("zmin"),
656  Parameters.getParameter<double>("zmax")
657  );
658 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * book3D(Args &&...args)
Definition: DQMStore.h:151
MonitorElement * SiStripMonitorTrack::bookMEProfile ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
inlineprivate

Definition at line 661 of file SiStripMonitorTrack.cc.

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

Referenced by bookModMEs().

662 {
663  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
664  return ibooker.bookProfile(HistoName,HistoName,
665  Parameters.getParameter<int32_t>("Nbinx"),
666  Parameters.getParameter<double>("xmin"),
667  Parameters.getParameter<double>("xmax"),
668  Parameters.getParameter<int32_t>("Nbiny"),
669  Parameters.getParameter<double>("ymin"),
670  Parameters.getParameter<double>("ymax"),
671  "" );
672 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookMETrend ( DQMStore::IBooker ibooker,
const char *  HistoName 
)
private

Definition at line 675 of file SiStripMonitorTrack.cc.

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

Referenced by bookSubDetMEs().

676 {
677  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
679  ParametersTrend.getParameter<int32_t>("Nbins"),
680  ParametersTrend.getParameter<double>("xmin"),
681  ParametersTrend.getParameter<double>("xmax"),
682  0 , 0 , "" );
683  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetCanExtend(TH1::kAllAxes);
684 
685  if(!me) return me;
686  me->setAxisTitle("Lumisection",1);
687  return me;
688 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
edm::ParameterSet conf_
TH1 * getTH1(void) const
std::string HistoName
void SiStripMonitorTrack::bookModMEs ( DQMStore::IBooker ibooker,
const uint32_t  id 
)
private

Definition at line 274 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().

275 {
276  std::string name = "det";
277  SiStripHistoId hidmanager;
278  std::string hid = hidmanager.createHistoId("",name,id);
279  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(hid);
280  if(iModME==ModMEsMap.end()){
281  ModMEs theModMEs;
282 
283  // Cluster Width
284  theModMEs.ClusterWidth=bookME1D(ibooker , "TH1ClusterWidth", hidmanager.createHistoId("ClusterWidth_OnTrack",name,id).c_str());
285  ibooker.tag(theModMEs.ClusterWidth,id);
286  // Cluster Gain
287  theModMEs.ClusterGain=bookME1D(ibooker , "TH1ClusterGain", hidmanager.createHistoId("ClusterGain",name,id).c_str());
288  ibooker.tag(theModMEs.ClusterGain,id);
289  // Cluster Charge
290  theModMEs.ClusterCharge=bookME1D(ibooker , "TH1ClusterCharge", hidmanager.createHistoId("ClusterCharge_OnTrack",name,id).c_str());
291  ibooker.tag(theModMEs.ClusterCharge,id);
292 
293  // Cluster Charge Raw (no gain )
294  theModMEs.ClusterChargeRaw=bookME1D(ibooker , "TH1ClusterChargeRaw", hidmanager.createHistoId("ClusterChargeRaw_OnTrack",name,id).c_str());
295  ibooker.tag(theModMEs.ClusterChargeRaw,id);
296 
297  // Cluster Charge Corrected
298  theModMEs.ClusterChargeCorr=bookME1D(ibooker , "TH1ClusterChargeCorr", hidmanager.createHistoId("ClusterChargeCorr_OnTrack",name,id).c_str());
299  ibooker.tag(theModMEs.ClusterChargeCorr,id);
300  // Cluster StoN Corrected
301  theModMEs.ClusterStoNCorr=bookME1D(ibooker , "TH1ClusterStoNCorrMod", hidmanager.createHistoId("ClusterStoNCorr_OnTrack",name,id).c_str());
302  ibooker.tag(theModMEs.ClusterStoNCorr,id);
303  // Cluster Position
304  short total_nr_strips = SiStripDetCabling_->nApvPairs(id) * 2 * 128;
305  theModMEs.ClusterPos=ibooker.book1D(hidmanager.createHistoId("ClusterPosition_OnTrack",name,id).c_str(),hidmanager.createHistoId("ClusterPosition_OnTrack",name,id).c_str(),total_nr_strips,0.5,total_nr_strips+0.5);
306  ibooker.tag(theModMEs.ClusterPos,id);
307  // Cluster PGV
308  theModMEs.ClusterPGV=bookMEProfile(ibooker , "TProfileClusterPGV", hidmanager.createHistoId("PGV_OnTrack",name,id).c_str());
309  ibooker.tag(theModMEs.ClusterPGV,id);
310  // Cluster Charge per cm
311  theModMEs.ClusterChargePerCMfromTrack = bookME1D(ibooker , "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromTrack",name,id).c_str());
312  ibooker.tag(theModMEs.ClusterChargePerCMfromTrack,id);
313 
314  theModMEs.ClusterChargePerCMfromOrigin = bookME1D(ibooker , "TH1ClusterChargePerCM", hidmanager.createHistoId("ClusterChargePerCMfromOrigin",name,id).c_str());
315  ibooker.tag(theModMEs.ClusterChargePerCMfromOrigin,id);
316 
317  ModMEsMap[hid]=theModMEs;
318  }
319 }
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:289
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 432 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().

433 {
434 
435  std::string name = "ring";
436  std::string view = "ringView";
437  std::string hname;
438  std::string hpar;
439  SiStripHistoId hidmanager;
440 
441  RingMEs theRingMEs;
442 
443  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr",name,ring_id,"OnTrack");
444  hpar = "TH1ClusterStoNCorr";
445  theRingMEs.ClusterStoNCorrOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
446 
447  // Cluster Gain
448  hname = hidmanager.createHistoLayer("Summary_ClusterGain",name,ring_id,"");
449  hpar = "TH1ClusterGain";
450  theRingMEs.ClusterGain = handleBookMEs(ibooker,view,ring_id,hpar,hname);
451 
452  // Cluster Charge Corrected
453  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr",name,ring_id,"OnTrack");
454  hpar = "TH1ClusterChargeCorr";
455  theRingMEs.ClusterChargeCorrOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
456 
457  // Cluster Charge (On and Off Track)
458  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,ring_id,"OnTrack");
459  hpar = "TH1ClusterCharge";
460  theRingMEs.ClusterChargeOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
461 
462  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,ring_id,"OffTrack");
463  hpar = "TH1ClusterCharge";
464  theRingMEs.ClusterChargeOffTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
465 
466  // Cluster Charge Raw (no-gain), On and off track
467  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw",name,ring_id,"OnTrack");
468  hpar = "TH1ClusterChargeRaw";
469  theRingMEs.ClusterChargeRawOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
470 
471  hname = hidmanager.createHistoLayer("Summary_ClusterChargeRaw",name,ring_id,"OffTrack");
472  hpar = "TH1ClusterChargeRaw";
473  theRingMEs.ClusterChargeRawOffTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
474 
475  // Cluster Noise (On and Off Track)
476  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,ring_id,"OnTrack");
477  hpar = "TH1ClusterNoise";
478  theRingMEs.ClusterNoiseOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
479 
480  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,ring_id,"OffTrack");
481  hpar = "TH1ClusterNoise";
482  theRingMEs.ClusterNoiseOffTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
483 
484  // Cluster Width (On and Off Track)
485  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,ring_id,"OnTrack");
486  hpar = "TH1ClusterWidth";
487  theRingMEs.ClusterWidthOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
488 
489  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,ring_id,"OffTrack");
490  hpar = "TH1ClusterWidth";
491  theRingMEs.ClusterWidthOffTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
492 
493  //Cluster Position
494  short total_nr_strips = SiStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
495  if (ring_id.find("TEC") != std::string::npos) total_nr_strips = 3 * 2 * 128;
496 
497  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,ring_id,"OnTrack");
498  hpar = "TH1ClusterPos";
499  if ( (conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()) ) theRingMEs.ClusterPosOnTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
500 
501  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,ring_id,"OffTrack");
502  hpar = "TH1ClusterPos";
503  if ( (conf_.getParameter<edm::ParameterSet>(hpar.c_str())).getParameter<bool>(view.c_str()) ) theRingMEs.ClusterPosOffTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
504 
505  // dQ/dx
506  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromTrack",name,ring_id,"");
507  hpar = "TH1ClusterChargePerCM";
508  theRingMEs.ClusterChargePerCMfromTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
509 
510  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin",name,ring_id,"OnTrack");
511  hpar = "TH1ClusterChargePerCM";
512  theRingMEs.ClusterChargePerCMfromOriginOnTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
513 
514  hname = hidmanager.createHistoLayer("Summary_ClusterChargePerCMfromOrigin",name,ring_id,"OffTrack");
515  hpar = "TH1ClusterChargePerCM";
516  theRingMEs.ClusterChargePerCMfromOriginOffTrack = handleBookMEs(ibooker,view,ring_id,hpar,hname);
517 
518  //bookeeping
519  RingMEsMap[ring_id]=theRingMEs;
520 
521 }
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:115
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 526 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::setAxisTitle(), AlCaHLTBitMon_QueryRunRegistry::string, xuti::subdet_tag(), SubDetMEsMap, and Trend_On_.

Referenced by book().

526  {
527 
529  subdet_tag = "__" + name;
530  std::string completeName;
531  std::string axisName;
532 
533  SubDetMEs theSubDetMEs;
534 
535  // TotalNumber of Cluster OnTrack
536  completeName = "Summary_TotalNumberOfClusters_OnTrack" + subdet_tag;
537  axisName = "Number of on-track clusters in " + name;
538  theSubDetMEs.nClustersOnTrack = bookME1D(ibooker , "TH1nClustersOn", completeName.c_str());
539  theSubDetMEs.nClustersOnTrack->setAxisTitle(axisName.c_str());
540  theSubDetMEs.nClustersOnTrack->getTH1()->StatOverflows(kTRUE);
541 
542  // TotalNumber of Cluster OffTrack
543  completeName = "Summary_TotalNumberOfClusters_OffTrack" + subdet_tag;
544  axisName = "Number of off-track clusters in " + name;
545  theSubDetMEs.nClustersOffTrack = bookME1D(ibooker , "TH1nClustersOff", completeName.c_str());
546  theSubDetMEs.nClustersOffTrack->setAxisTitle(axisName.c_str());
547  theSubDetMEs.nClustersOffTrack->getTH1()->StatOverflows(kTRUE);
548 
549  // Cluster Gain
550  completeName = "Summary_ClusterGain" + subdet_tag;
551  theSubDetMEs.ClusterGain=bookME1D(ibooker , "TH1ClusterGain", completeName.c_str());
552 
553  // Cluster StoN On Track
554  completeName = "Summary_ClusterStoNCorr_OnTrack" + subdet_tag;
555  theSubDetMEs.ClusterStoNCorrOnTrack = bookME1D(ibooker , "TH1ClusterStoNCorr", completeName.c_str());
556 
557  completeName = "Summary_ClusterStoNCorrThin_OnTrack" + subdet_tag;
558  if ( subdet_tag.find("TEC") != std::string::npos ) theSubDetMEs.ClusterStoNCorrThinOnTrack = bookME1D(ibooker , "TH1ClusterStoNCorr", completeName.c_str());
559 
560  completeName = "Summary_ClusterStoNCorrThick_OnTrack" + subdet_tag;
561  if ( subdet_tag.find("TEC") != std::string::npos ) theSubDetMEs.ClusterStoNCorrThickOnTrack = bookME1D(ibooker , "TH1ClusterStoNCorr", completeName.c_str());
562 
563  // Cluster Charge Corrected
564  completeName = "Summary_ClusterChargeCorr_OnTrack" + subdet_tag;
565  theSubDetMEs.ClusterChargeCorrOnTrack = bookME1D(ibooker , "TH1ClusterChargeCorr", completeName.c_str());
566 
567  completeName = "Summary_ClusterChargeCorrThin_OnTrack" + subdet_tag;
568  if ( subdet_tag.find("TEC") != std::string::npos ) theSubDetMEs.ClusterChargeCorrThinOnTrack = bookME1D(ibooker , "TH1ClusterChargeCorr", completeName.c_str());
569 
570  completeName = "Summary_ClusterChargeCorrThick_OnTrack" + subdet_tag;
571  if ( subdet_tag.find("TEC") != std::string::npos ) theSubDetMEs.ClusterChargeCorrThickOnTrack = bookME1D(ibooker , "TH1ClusterChargeCorr", completeName.c_str());
572 
573  // Cluster Charge On Track
574  completeName = "Summary_ClusterCharge_OnTrack" + subdet_tag;
575  theSubDetMEs.ClusterChargeOnTrack=bookME1D(ibooker , "TH1ClusterCharge", completeName.c_str());
576 
577  // Cluster Charge On Track, Raw (no-gain)
578  completeName = "Summary_ClusterChargeRaw_OnTrack" + subdet_tag;
579  theSubDetMEs.ClusterChargeRawOnTrack=bookME1D(ibooker , "TH1ClusterChargeRaw", completeName.c_str());
580 
581  // Cluster Charge Off Track
582  completeName = "Summary_ClusterCharge_OffTrack" + subdet_tag;
583  theSubDetMEs.ClusterChargeOffTrack=bookME1D(ibooker , "TH1ClusterCharge", completeName.c_str());
584 
585  // Cluster Charge Off Track, Raw (no-gain)
586  completeName = "Summary_ClusterChargeRaw_OffTrack" + subdet_tag;
587  theSubDetMEs.ClusterChargeRawOffTrack=bookME1D(ibooker , "TH1ClusterChargeRaw", completeName.c_str());
588 
589  // Cluster Charge StoN Off Track
590  completeName = "Summary_ClusterStoN_OffTrack" + subdet_tag;
591  theSubDetMEs.ClusterStoNOffTrack = bookME1D(ibooker , "TH1ClusterStoN", completeName.c_str());
592 
593  // cluster charge per cm on track
594  completeName = "Summary_ClusterChargePerCMfromTrack" + subdet_tag;
595  theSubDetMEs.ClusterChargePerCMfromTrack=bookME1D(ibooker , "TH1ClusterChargePerCM", completeName.c_str());
596 
597  // cluster charge per cm on track
598  completeName = "Summary_ClusterChargePerCMfromOrigin_OnTrack" + subdet_tag;
599  theSubDetMEs.ClusterChargePerCMfromOriginOnTrack=bookME1D(ibooker , "TH1ClusterChargePerCM", completeName.c_str());
600 
601  // cluster charge per cm off track
602  completeName = "Summary_ClusterChargePerCMfromOrigin_OffTrack" + subdet_tag;
603  theSubDetMEs.ClusterChargePerCMfromOriginOffTrack=bookME1D(ibooker , "TH1ClusterChargePerCM", completeName.c_str());
604 
605  if(Trend_On_){
606  // TotalNumber of Cluster
607  completeName = "Trend_TotalNumberOfClusters_OnTrack" + subdet_tag;
608  theSubDetMEs.nClustersTrendOnTrack = bookMETrend(ibooker , completeName.c_str());
609  completeName = "Trend_TotalNumberOfClusters_OffTrack" + subdet_tag;
610  theSubDetMEs.nClustersTrendOffTrack = bookMETrend(ibooker , completeName.c_str());
611  }
612 
613  //bookeeping
614  SubDetMEsMap[name]=theSubDetMEs;
615 
616 }
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 
)
private

Definition at line 1147 of file SiStripMonitorTrack.cc.

References TkHistoMap::add(), 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::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, TkHistoMap::fill(), fillME(), edm::DetSetVector< T >::find(), SiStripClusterInfo::firstStrip(), edm::ParameterSet::getParameter(), SiStripGain::getRange(), SiStripBadStrip::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(), NULL, OffTrack, OnTrack, position, SiStripClusterInfo::signalOverNoise(), sToNLowerLimit_, sToNUpperLimit_, AlCaHLTBitMon_QueryRunRegistry::string, SiStripClusterInfo::stripCharges(), tkgeom_, tkhisto_ClChPerCMfromOrigin, tkhisto_ClChPerCMfromTrack, 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().

1159 {
1160 
1161  if (cluster==NULL) return false;
1162  // if one imposes a cut on the clusters, apply it
1163  if( (applyClusterQuality_) &&
1164  (cluster->signalOverNoise() < sToNLowerLimit_ ||
1165  cluster->signalOverNoise() > sToNUpperLimit_ ||
1166  cluster->width() < widthLowerLimit_ ||
1167  cluster->width() > widthUpperLimit_) ) return false;
1168  // start of the analysis
1169 
1170  float cosRZ = -2;
1171  LogDebug("SiStripMonitorTrack")<< "\n\tLV " << LV.x() << " " << LV.y() << " " << LV.z() << " " << LV.mag() << std::endl;
1172  if (LV.mag()){
1173  cosRZ= fabs(LV.z())/LV.mag();
1174  LogDebug("SiStripMonitorTrack")<< "\n\t cosRZ " << cosRZ << std::endl;
1175  }
1176 
1177  // Filling SubDet/Layer Plots (on Track + off Track)
1178  float StoN = cluster->signalOverNoise();
1179  float noise = cluster->noiseRescaledByGain();
1180  uint16_t charge = cluster->charge();
1181  uint16_t width = cluster->width();
1182  float position = cluster->baryStrip();
1183 
1184  // Getting raw charge with strip gain.
1185  double chargeraw = 0;
1186  double clustergain = 0 ;
1187  auto digi_it = digilist.find(detid); //(digilist.isValid() ? digilist.find(detid) : digilist.end());
1188  // SiStripClusterInfo.stripCharges() <==> SiStripCluster.amplitudes()
1189  for( size_t chidx = 0 ; chidx < cluster->stripCharges().size() ; ++chidx ){
1190  if( cluster->stripCharges().at(chidx) <= 0 ){ continue ; } // nonzero amplitude
1191  if( stripQuality->IsStripBad(stripQuality->getRange(detid), cluster->firstStrip()+chidx)) { continue ; }
1192  clustergain += stripGain->getStripGain(cluster->firstStrip()+chidx, stripGain->getRange(detid));
1193  // Getting raw adc charge from digi collections
1194  if( digi_it == digilist.end() ){
1195  continue;
1196  } // skipping if not found
1197  for( const auto& digiobj : *digi_it ){
1198  if( digiobj.strip() == cluster->firstStrip() + chidx ){
1199  chargeraw += digiobj.adc();
1200  }
1201  }
1202  }
1203  clustergain /= double(cluster->stripCharges().size()) ; // calculating average gain inside cluster
1204 
1205 
1206  // new dE/dx (chargePerCM)
1207  // https://indico.cern.ch/event/342236/session/5/contribution/10/material/slides/0.pdf
1208  float dQdx_fromTrack = siStripClusterTools::chargePerCM(detid, *cluster, LV);
1209  // from straigth line origin-sensor centre
1210  const StripGeomDetUnit* DetUnit = static_cast<const StripGeomDetUnit*>(tkgeom_->idToDetUnit(DetId(detid)));
1211  LocalPoint locVtx = DetUnit->toLocal(GlobalPoint(0.0, 0.0, 0.0));
1212  LocalVector locDir(locVtx.x(), locVtx.y(), locVtx.z());
1213  float dQdx_fromOrigin = siStripClusterTools::chargePerCM(detid, *cluster, locDir);
1214 
1215  if (TkHistoMap_On_ && (flag == OnTrack)) {
1216  uint32_t adet=cluster->detId();
1217  if(track_ok) tkhisto_ClChPerCMfromTrack->fill(adet,dQdx_fromTrack);
1218  }
1219  if (clchCMoriginTkHmap_On_ && (flag == OffTrack)){
1220  uint32_t adet=cluster->detId();
1221  if(track_ok) tkhisto_ClChPerCMfromOrigin->fill(adet,dQdx_fromOrigin);
1222  }
1223 
1224  if(flag==OnTrack){
1225  if (MEs.iSubdet != nullptr) MEs.iSubdet->totNClustersOnTrack++;
1226  // layerMEs
1227  if (MEs.iLayer != nullptr) {
1228  if(noise > 0.0) fillME(MEs.iLayer->ClusterStoNCorrOnTrack, StoN*cosRZ);
1229  if(noise == 0.0) LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise " << cluster->noiseRescaledByGain() << std::endl;
1230  fillME(MEs.iLayer->ClusterGain, clustergain);
1231  fillME(MEs.iLayer->ClusterChargeCorrOnTrack, charge*cosRZ);
1232  fillME(MEs.iLayer->ClusterChargeOnTrack, charge);
1233  fillME(MEs.iLayer->ClusterChargeRawOnTrack, chargeraw);
1234  fillME(MEs.iLayer->ClusterNoiseOnTrack, noise);
1235  fillME(MEs.iLayer->ClusterWidthOnTrack, width);
1236  fillME(MEs.iLayer->ClusterPosOnTrack, position);
1237  if(track_ok) fillME(MEs.iLayer->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1238  if(track_ok) fillME(MEs.iLayer->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1239  }
1240  // ringMEs
1241  if (MEs.iRing != nullptr) {
1242  if(noise > 0.0) fillME(MEs.iRing->ClusterStoNCorrOnTrack, StoN*cosRZ);
1243  if(noise == 0.0) LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise " << cluster->noiseRescaledByGain() << std::endl;
1244  fillME(MEs.iRing->ClusterGain, clustergain);
1245  fillME(MEs.iRing->ClusterChargeCorrOnTrack, charge*cosRZ);
1246  fillME(MEs.iRing->ClusterChargeOnTrack, charge);
1247  fillME(MEs.iRing->ClusterChargeRawOnTrack, chargeraw);
1248  fillME(MEs.iRing->ClusterNoiseOnTrack, noise);
1249  fillME(MEs.iRing->ClusterWidthOnTrack, width);
1250  fillME(MEs.iRing->ClusterPosOnTrack, position);
1251  if(track_ok) fillME(MEs.iRing->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1252  if(track_ok) fillME(MEs.iRing->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1253  }
1254  // subdetMEs
1255  if(MEs.iSubdet != nullptr){
1256  fillME(MEs.iSubdet->ClusterGain, clustergain);
1257  fillME(MEs.iSubdet->ClusterChargeOnTrack,charge);
1258  fillME(MEs.iSubdet->ClusterChargeRawOnTrack,chargeraw);
1259  if(noise > 0.0) fillME(MEs.iSubdet->ClusterStoNCorrOnTrack,StoN*cosRZ);
1260  fillME(MEs.iSubdet->ClusterChargeCorrOnTrack, charge*cosRZ);
1261  if(track_ok) fillME(MEs.iSubdet->ClusterChargePerCMfromTrack,dQdx_fromTrack);
1262  if(track_ok) fillME(MEs.iSubdet->ClusterChargePerCMfromOriginOnTrack,dQdx_fromOrigin);
1263  if( tTopo->moduleGeometry(detid) == SiStripDetId::ModuleGeometry::W5 || tTopo->moduleGeometry(detid) == SiStripDetId::ModuleGeometry::W6 || tTopo->moduleGeometry(detid) == SiStripDetId::ModuleGeometry::W7) {
1264  if(noise > 0.0) fillME(MEs.iSubdet->ClusterStoNCorrThickOnTrack, StoN*cosRZ);
1265  fillME(MEs.iSubdet->ClusterChargeCorrThickOnTrack, charge*cosRZ);
1266  } else {
1267  if(noise > 0.0) fillME(MEs.iSubdet->ClusterStoNCorrThinOnTrack, StoN*cosRZ);
1268  fillME(MEs.iSubdet->ClusterChargeCorrThinOnTrack, charge*cosRZ);
1269  }
1270  }
1271  //******** TkHistoMaps
1272  if (TkHistoMap_On_) {
1273  uint32_t adet=cluster->detId();
1274  tkhisto_NumOnTrack->add(adet,1.);
1275  if(noise > 0.0) tkhisto_StoNCorrOnTrack->fill(adet,cluster->signalOverNoise()*cosRZ);
1276  if(noise == 0.0)
1277  LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise " << noise << std::endl;
1278  }
1279  // Module plots filled only for onTrack Clusters
1280  if(Mod_On_){
1281  SiStripHistoId hidmanager2;
1282  std::string name = hidmanager2.createHistoId("","det",detid);
1283  //fillModMEs
1284  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(name);
1285  if(iModME!=ModMEsMap.end()){
1286  if(noise > 0.0) fillME(iModME->second.ClusterStoNCorr ,StoN*cosRZ);
1287  if(noise == 0.0) LogDebug("SiStripMonitorTrack") << "Module " << name << " in Event " << eventNb << " noise " << noise << std::endl;
1288  fillME(iModME->second.ClusterGain, clustergain);
1289  fillME(iModME->second.ClusterCharge,charge);
1290  fillME(iModME->second.ClusterChargeRaw,chargeraw);
1291 
1292  fillME(iModME->second.ClusterChargeCorr,charge*cosRZ);
1293 
1294  fillME(iModME->second.ClusterWidth ,width);
1295  fillME(iModME->second.ClusterPos ,position);
1296 
1297  if(track_ok) fillME(iModME->second.ClusterChargePerCMfromTrack, dQdx_fromTrack);
1298  if(track_ok) fillME(iModME->second.ClusterChargePerCMfromOrigin, dQdx_fromOrigin);
1299 
1300  //fill the PGV histo
1301  float PGVmax = cluster->maxCharge();
1302  int PGVposCounter = cluster->maxIndex();
1303  for (int i= int(conf_.getParameter<edm::ParameterSet>("TProfileClusterPGV").getParameter<double>("xmin"));i<PGVposCounter;++i)
1304  fillME(iModME->second.ClusterPGV, i,0.);
1305  for (auto it=cluster->stripCharges().begin();it<cluster->stripCharges().end();++it) {
1306  fillME(iModME->second.ClusterPGV, PGVposCounter++,(*it)/PGVmax);
1307  }
1308  for (int i= PGVposCounter;i<int(conf_.getParameter<edm::ParameterSet>("TProfileClusterPGV").getParameter<double>("xmax"));++i)
1309  fillME(iModME->second.ClusterPGV, i,0.);
1310  //end fill the PGV histo
1311  }
1312  }
1313  } else {
1314  if (flag == OffTrack) {
1315  if (MEs.iSubdet != nullptr) MEs.iSubdet->totNClustersOffTrack++;
1316  //******** TkHistoMaps
1317  if (TkHistoMap_On_) {
1318  uint32_t adet=cluster->detId();
1319  tkhisto_NumOffTrack->add(adet,1.);
1320  if(charge > 250){
1321  LogDebug("SiStripMonitorTrack") << "Module firing " << detid << " in Event " << eventNb << std::endl;
1322  }
1323  }
1324  }
1325  // layerMEs
1326  if (MEs.iLayer != nullptr) {
1327  fillME(MEs.iLayer->ClusterGain, clustergain);
1328  fillME(MEs.iLayer->ClusterChargeOffTrack, charge);
1329  fillME(MEs.iLayer->ClusterChargeRawOffTrack, chargeraw);
1330  fillME(MEs.iLayer->ClusterNoiseOffTrack, noise);
1331  fillME(MEs.iLayer->ClusterWidthOffTrack, width);
1332  fillME(MEs.iLayer->ClusterPosOffTrack, position);
1333  fillME(MEs.iLayer->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1334  }
1335  // ringMEs
1336  if (MEs.iRing != nullptr) {
1337  fillME(MEs.iRing->ClusterGain, clustergain);
1338  fillME(MEs.iRing->ClusterChargeOffTrack, charge);
1339  fillME(MEs.iRing->ClusterChargeRawOffTrack, chargeraw);
1340  fillME(MEs.iRing->ClusterNoiseOffTrack, noise);
1341  fillME(MEs.iRing->ClusterWidthOffTrack, width);
1342  fillME(MEs.iRing->ClusterPosOffTrack, position);
1343  fillME(MEs.iRing->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1344  }
1345  // subdetMEs
1346  if(MEs.iSubdet != nullptr){
1347  fillME(MEs.iSubdet->ClusterGain, clustergain);
1348  fillME(MEs.iSubdet->ClusterChargeOffTrack,charge);
1349  fillME(MEs.iSubdet->ClusterChargeRawOffTrack,chargeraw);
1350  if(noise > 0.0) fillME(MEs.iSubdet->ClusterStoNOffTrack,StoN);
1351  fillME(MEs.iSubdet->ClusterChargePerCMfromOriginOffTrack,dQdx_fromOrigin);
1352  }
1353  }
1354  return true;
1355 }
#define LogDebug(id)
uint8_t maxCharge() const
T getParameter(std::string const &) const
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
TkHistoMap * tkhisto_NumOffTrack
uint16_t firstStrip() const
iterator find(det_id_type id)
Definition: DetSetVector.h:290
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
#define NULL
Definition: scimark2.h:8
SiStripDetId::ModuleGeometry moduleGeometry(const DetId &id) const
uint16_t maxIndex() const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
edm::ESHandle< TrackerGeometry > tkgeom_
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:68
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:180
T z() const
Definition: PV3DBase.h:64
uint16_t width() const
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:361
Definition: DetId.h:18
TkHistoMap * tkhisto_ClChPerCMfromOrigin
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::map< std::string, ModMEs > ModMEsMap
TkHistoMap * tkhisto_ClChPerCMfromTrack
TkHistoMap * tkhisto_NumOnTrack
uint32_t detId() const
const Range getRange(const uint32_t detID) const
static int position[264][3]
Definition: ReadPGInfo.cc:509
TkHistoMap * tkhisto_StoNCorrOnTrack
T x() const
Definition: PV3DBase.h:62
void add(uint32_t &detid, float value)
Definition: TkHistoMap.cc:213
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:66
void SiStripMonitorTrack::dqmBeginRun ( const edm::Run run,
const edm::EventSetup es 
)
override

Definition at line 69 of file SiStripMonitorTrack.cc.

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

70 {
71  //get geom
73  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::beginRun] There are "<<tkgeom_->detUnits().size() <<" detectors instantiated in the geometry" << std::endl;
75 
76 
77  // Initialize the GenericTriggerEventFlag
79 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
edm::ESHandle< TrackerGeometry > tkgeom_
const T & get() const
Definition: EventSetup.h:56
GenericTriggerEventFlag * genTriggerEventFlag_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 149 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

Referenced by analyze(), and clusterInfos().

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

Definition at line 151 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

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

Definition at line 152 of file SiStripMonitorTrack.h.

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

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

Definition at line 1115 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().

1115  {
1116  SiStripHistoId hidmanager1;
1117 
1118  std::string layer_id = hidmanager1.getSubdetid(detid, tTopo, false);
1119  std::string ring_id = hidmanager1.getSubdetid(detid, tTopo, true);
1120  std::string sdet_tag = folderOrganizer_.getSubDetFolderAndTag(detid, tTopo).second;
1121 
1122  Det2MEs me;
1123  me.iLayer = nullptr;
1124  me.iRing = nullptr;
1125  me.iSubdet = nullptr;
1126 
1127  std::map<std::string, LayerMEs>::iterator iLayer = LayerMEsMap.find(layer_id);
1128  if (iLayer != LayerMEsMap.end()) {
1129  me.iLayer = &(iLayer->second);
1130  }
1131 
1132  std::map<std::string, RingMEs>::iterator iRing = RingMEsMap.find(ring_id);
1133  if (iRing != RingMEsMap.end()) {
1134  me.iRing = &(iRing->second);
1135  }
1136 
1137  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_tag);
1138  if (iSubdet != SubDetMEsMap.end()) {
1139  me.iSubdet = &(iSubdet->second);
1140  }
1141 
1142  return me;
1143 }
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 321 of file SiStripMonitorTrack.cc.

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

Referenced by bookLayerMEs(), and bookRingMEs().

321  {
322 
323  MonitorElement* me = NULL;
324  bool view = false;
325  view = (conf_.getParameter<edm::ParameterSet>(histoParameters.c_str())).getParameter<bool>(viewParameter.c_str());
326  if ( id.find("TEC") == std::string::npos && id.find("TID") == std::string::npos ) {
327  me = bookME1D(ibooker , histoParameters.c_str(), histoName.c_str());
328  } else {
329  if (view) {
330  // histoName = histoName + "__" + thickness;
331  me = bookME1D(ibooker , histoParameters.c_str(), histoName.c_str());
332  }
333  }
334  return me;
335 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
#define NULL
Definition: scimark2.h:8
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 786 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().

796  {
797  LocalVector statedirection;
798  if(matchedhit){ // type=Matched;
799  LogTrace("SiStripMonitorTrack")<<"\nMatched recHit found"<< std::endl;
800 
801  const GluedGeomDet * gdet=static_cast<const GluedGeomDet *>(tkgeom_->idToDet(matchedhit->geographicalId()));
802 
803  GlobalVector gtrkdirup=gdet->toGlobal(localMomentum);
804 
805  //mono side
806  const GeomDetUnit * monodet=gdet->monoDet();
807  statedirection=monodet->toLocal(gtrkdirup);
808  SiStripRecHit2D m = matchedhit->monoHit();
809  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&m,statedirection,digilist,ev,es,track_ok);
810 
811  //stereo side
812  const GeomDetUnit * stereodet=gdet->stereoDet();
813  statedirection=stereodet->toLocal(gtrkdirup);
814  SiStripRecHit2D s = matchedhit->stereoHit();
815  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&s,statedirection,digilist,ev,es,track_ok);
816  }
817  else if(projhit){ // type=Projected;
818  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found"<< std::endl;
819 
820  const GluedGeomDet * gdet=static_cast<const GluedGeomDet *>(tkgeom_->idToDet(projhit->geographicalId()));
821 
822  GlobalVector gtrkdirup=gdet->toGlobal(localMomentum);
823  const SiStripRecHit2D originalhit=projhit->originalHit();
824 
825  const GeomDetUnit * det;
826  if(!StripSubdetector(originalhit.geographicalId().rawId()).stereo()){
827  //mono side
828  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found MONO"<< std::endl;
829  det=gdet->monoDet();
830  statedirection=det->toLocal(gtrkdirup);
831  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,ev,es,track_ok);
832  }
833  else{
834  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found STEREO"<< std::endl;
835  //stereo side
836  det=gdet->stereoDet();
837  statedirection=det->toLocal(gtrkdirup);
838  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,ev,es,track_ok);
839  }
840  } else if (hit2D){ // type=2D
841  statedirection=localMomentum;
842  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,digilist,ev,es,track_ok);
843  } else if (hit1D) { // type=1D
844  statedirection=localMomentum;
845  if(statedirection.mag()) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,digilist,ev,es,track_ok);
846  } else {
847  LogDebug ("SiStripMonitorTrack")
848  << " LocalMomentum: "<<statedirection
849  << "\nLocal x-z plane angle: "<<atan2(statedirection.x(),statedirection.z());
850  }
851 
852 }
#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
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:69
bool ev
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:62
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
const TrackerGeomDet * idToDet(DetId) const
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  ok 
)
private

Definition at line 1007 of file SiStripMonitorTrack.cc.

References clusterInfos(), findMEs(), edm::EventSetup::get(), TrackerGeometry::idToDet(), LogTrace, NULL, OnTrack, edm::ESHandle< T >::product(), tkgeom_, GeomDet::toGlobal(), vPSiStripCluster, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

1014  {
1015 
1016  if(!tkrecHit->isValid()){
1017  LogTrace("SiStripMonitorTrack") <<"\t\t Invalid Hit " << std::endl;
1018  return;
1019  }
1020 
1021  const uint32_t& detid = tkrecHit->geographicalId().rawId();
1022 
1023  LogTrace("SiStripMonitorTrack")
1024  <<"\n\t\tRecHit on det "<<detid
1025  <<"\n\t\tRecHit in LP "<<tkrecHit->localPosition()
1026  <<"\n\t\tRecHit in GP "<<tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition())
1027  <<"\n\t\tRecHit trackLocal vector "<<LV.x() << " " << LV.y() << " " << LV.z() <<std::endl;
1028 
1029  // FIXME: MOVE ALL THE EV AND ES ACCESS OUTSIDE THE LOOP!!!!
1030 
1031  //Retrieve tracker topology from geometry
1032  edm::ESHandle<TrackerTopology> tTopoHandle;
1033  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1034  const TrackerTopology* const tTopo = tTopoHandle.product();
1035 
1036  // Getting SiStrip Gain settings
1037  edm::ESHandle<SiStripGain> gainHandle;
1038  es.get<SiStripGainRcd>().get( gainHandle );
1039  const SiStripGain* const stripGain = gainHandle.product();
1040 
1041  edm::ESHandle<SiStripQuality> qualityHandle;
1042  es.get<SiStripQualityRcd>().get("",qualityHandle);
1043  const SiStripQuality* stripQuality = qualityHandle.product();
1044 
1045  //Get SiStripCluster from SiStripRecHit
1046  if ( tkrecHit != NULL ){
1047  const SiStripCluster* SiStripCluster_ = &*(tkrecHit->cluster());
1048  SiStripClusterInfo SiStripClusterInfo_(*SiStripCluster_,es,detid);
1049 
1050  const Det2MEs MEs = findMEs(tTopo, detid);
1051  // if (clusterInfos(&SiStripClusterInfo_,detid, OnTrack, track_ok, LV, MEs, tTopo,stripGain,stripQuality,*digihandle))
1052  if (clusterInfos(&SiStripClusterInfo_,detid, OnTrack, track_ok, LV, MEs, tTopo,stripGain,stripQuality,digilist))
1053  {
1054  vPSiStripCluster.insert(SiStripCluster_);
1055  }
1056  }
1057  else
1058  {
1059  edm::LogError("SiStripMonitorTrack") << "NULL hit" << std::endl;
1060  }
1061  }
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
T y() const
Definition: PV3DBase.h:63
#define NULL
Definition: scimark2.h:8
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)
edm::ESHandle< TrackerGeometry > tkgeom_
std::unordered_set< const SiStripCluster * > vPSiStripCluster
T z() const
Definition: PV3DBase.h:64
#define LogTrace(id)
const T & get() const
Definition: EventSetup.h:56
T x() const
Definition: PV3DBase.h:62
T const * product() const
Definition: ESHandle.h:86
const TrackerGeomDet * idToDet(DetId) const
bool SiStripMonitorTrack::trackFilter ( const reco::Track track)
private

Definition at line 884 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().

884  {
885  if (track.pt() < 0.8) return false;
886  if (track.p() < 2.0) return false;
887  if (track.hitPattern().numberOfValidTrackerHits() <= 6) return false;
888  if (track.normalizedChi2() > 10.0) return false;
889  return true;
890 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
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:556
double pt() const
track transverse momentum
Definition: TrackBase.h:616
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:445
int numberOfValidTrackerHits() const
Definition: HitPattern.h:828
void SiStripMonitorTrack::trackStudy ( const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 854 of file SiStripMonitorTrack.cc.

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

Referenced by analyze().

854  {
855 
856 using namespace std;
857 using namespace edm;
858 using namespace reco;
859 
860 
861  // edm::Handle<std::vector<Trajectory> > trajectories;
862  // ev.getByToken(trajectoryToken_, trajectories);
863 
864  // track input
865  edm::Handle<reco::TrackCollection > trackCollectionHandle;
866  ev.getByToken(trackToken_, trackCollectionHandle);//takes the track collection
867 
868  // digis list
870  ev.getByToken( digiToken_, digihandle );
872  auto& digilist = digihandle.isValid()? *(digihandle.product()) : dummy;
873 
874  if (trackCollectionHandle.isValid()){
875  trackStudyFromTrajectory(trackCollectionHandle,digilist,ev, es);
876  } else {
877  edm::LogError("SiStripMonitorTrack")<<"also Track Collection is not valid !! " << TrackLabel_<<std::endl;
878  return;
879  }
880 }
edm::EDGetTokenT< reco::TrackCollection > trackToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
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:81
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 892 of file SiStripMonitorTrack.cc.

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

897  {
898 
899  // edm::ESHandle<TransientTrackBuilder> builder;
900  // es.get<TransientTrackRecord>().get("TransientTrackBuilder",builder);
901  // const TransientTrackBuilder* transientTrackBuilder = builder.product();
902 
903  //numTracks = trackCollectionHandle->size();
904  reco::TrackCollection trackCollection = *trackCollectionHandle;
905  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
906  track!=etrack; ++track) {
907 
908  bool track_ok = trackFilter(*track);
909  // const reco::TransientTrack transientTrack = transientTrackBuilder->build(track);
910 
911  for (trackingRecHit_iterator hit = track->recHitsBegin(), ehit = track->recHitsEnd();
912  hit!=ehit; ++hit) {
913 
914  if (TkHistoMap_On_ ) {
915  uint32_t thedetid=(*hit)->rawId();
916  if ( SiStripDetId(thedetid).subDetector() >=3 && SiStripDetId(thedetid).subDetector() <=6) { //TIB/TID + TOB + TEC only
917  if ( ((*hit)->getType()==1) )
918  tkhisto_NumMissingHits->add(thedetid,1.);
919  if ( ((*hit)->getType()==2) )
920  tkhisto_NumberInactiveHits->add(thedetid,1.);
921  if ( ((*hit)->getType()==0) )
922  tkhisto_NumberValidHits->add(thedetid,1.);
923  }
924  }
925 
926  if (!(*hit)->isValid()) continue;
927  DetId detID = (*hit)->geographicalId();
928  if (detID.det() != DetId::Tracker) continue;
929  const TrackingRecHit* theHit = (*hit);
930  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>( (theHit) );
931  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*> ( (theHit) );
932  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*> ( (theHit) );
933  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*> ( (theHit) );
934 
935  // GlobalPoint globalPoint = hit->globalPosition();
936  // reco::TrajectoryStateOnSurface stateOnSurface = transientTrack->stateOnSurface(globalPoint);
937 
938  LocalVector localMomentum;
939  hitStudy(ev,es,digilist,projhit,matchedhit,hit2D,hit1D,localMomentum,track_ok);
940  }
941 
942  // hit pattern of the track
943  // const reco::HitPattern & hitsPattern = track->hitPattern();
944  // loop over the hits of the track
945  // for (int i=0; i<hitsPattern.numberOfHits(); i++) {
946  // for (int i=0; i<hitsPattern.numberOfHits(reco::HitPattern::TRACK_HITS); i++) {
947  // uint32_t hit = hitsPattern.getHitPattern(reco::HitPattern::TRACK_HITS,i);
948 
949  // if the hit is valid and in pixel barrel, print out the layer
950  // if (hitsPattern.validHitFilter(hit) && hitsPattern.pixelBarrelHitFilter(hit))
951 
952  // if (!hitsPattern.validHitFilter(hit)) continue;
953 // if (hitsPattern.pixelHitFilter(hit)) std::cout << "pixel" << std::endl; // pixel
954 // if (hitsPattern.pixelBarrelHitFilter(hit)) std::cout << "pixel barrel" << std::endl; // pixel barrel
955 // if (hitsPattern.pixelEndcapHitFilter(hit)) std::cout << "pixel endcap" << std::endl; // pixel endcap
956 // if (hitsPattern.stripHitFilter(hit)) std::cout << "strip" << std::endl; // strip
957 // if (hitsPattern.stripTIBHitFilter(hit)) std::cout << "TIB" << std::endl; // strip TIB
958 // if (hitsPattern.stripTIDHitFilter(hit)) std::cout << "TID" << std::endl; // strip TID
959 // if (hitsPattern.stripTOBHitFilter(hit)) std::cout << "TOB" << std::endl; // strip TOB
960 // if (hitsPattern.stripTECHitFilter(hit)) std::cout << "TEC" << std::endl; // strip TEC
961 // if (hitsPattern.muonDTHitFilter(hit)) std::cout << "DT" << std::endl; // muon DT
962 // if (hitsPattern.muonCSCHitFilter(hit)) std::cout << "CSC" << std::endl; // muon CSC
963 // if (hitsPattern.muonRPCHitFilter(hit)) std::cout << "RPC" << std::endl; // muon RPC
964 //
965 // // expert level: printout the hit in 10-bit binary format
966 // std::cout << "hit in 10-bit binary format = ";
967 // for (int j=9; j>=0; j--) {
968 // int bit = (hit >> j) & 0x1;
969 // std::cout << bit;
970 // }
971 // std::cout << std::endl;
972  // }
973  }
974 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool trackFilter(const reco::Track &track)
TkHistoMap * tkhisto_NumMissingHits
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
Definition: DetId.h:18
TkHistoMap * tkhisto_NumberInactiveHits
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)
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
void add(uint32_t &detid, float value)
Definition: TkHistoMap.cc:213
TkHistoMap * tkhisto_NumberValidHits
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
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 976 of file SiStripMonitorTrack.cc.

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

Referenced by trackStudy().

981  {
982  //Perform track study
983  int i=0;
984  reco::TrackCollection trackCollection = *trackCollectionHandle;
985  numTracks = trackCollection.size();
986  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
987  track!=etrack; ++track) {
988 
989  LogDebug("SiStripMonitorTrack")
990  << "Track number "<< ++i << std::endl;
991  // << "\n\tmomentum: " << trackref->momentum()
992  // << "\n\tPT: " << trackref->pt()
993  // << "\n\tvertex: " << trackref->vertex()
994  // << "\n\timpact parameter: " << trackref->d0()
995  // << "\n\tcharge: " << trackref->charge()
996  // << "\n\tnormalizedChi2: " << trackref->normalizedChi2()
997  // <<"\n\tFrom EXTRA : "
998  // <<"\n\t\touter PT "<< trackref->outerPt()<<std::endl;
999 
1000  // trajectoryStudy(traj_iterator,trackref,es);
1001  bool track_ok = trackFilter(*track);
1002  trajectoryStudy(*track,digilist,ev,es,track_ok);
1003 
1004  }
1005 }
#define LogDebug(id)
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
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 691 of file SiStripMonitorTrack.cc.

References TkHistoMap::add(), 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().

697  {
698 
699  auto const & trajParams = track.extra()->trajParams();
700  assert(trajParams.size()==track.recHitsSize());
701  auto hb = track.recHitsBegin();
702  for(unsigned int h=0;h<track.recHitsSize();h++){
703  auto ttrh = *(hb+h);
704 
705 
706  if (TkHistoMap_On_ ) {
707  uint32_t thedetid=ttrh->rawId();
708  if ( SiStripDetId(thedetid).subDetector() >=3 && SiStripDetId(thedetid).subDetector() <=6) { //TIB/TID + TOB + TEC only
709  if ( (ttrh->getType()==1) )
710  tkhisto_NumMissingHits->add(thedetid,1.);
711  if ( (ttrh->getType()==2) )
712  tkhisto_NumberInactiveHits->add(thedetid,1.);
713  if ( (ttrh->getType()==0) )
714  tkhisto_NumberValidHits->add(thedetid,1.);
715  }
716  }
717 
718  if (!ttrh->isValid()) continue;
719 
720  //trajectory local direction and position on detector
721  auto statedirection = trajParams[h].momentum();
722 
723 
724  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>( ttrh->hit() );
725  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>( ttrh->hit() );
726  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>( ttrh->hit() );
727  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>( ttrh->hit() );
728 
729  // RecHitType type=Single;
730 
731  if(matchedhit){
732  LogTrace("SiStripMonitorTrack")<<"\nMatched recHit found"<< std::endl;
733  // type=Matched;
734 
735  const GluedGeomDet * gdet=static_cast<const GluedGeomDet *>(tkgeom_->idToDet(matchedhit->geographicalId()));
736  GlobalVector gtrkdirup=gdet->toGlobal(statedirection);
737  //mono side
738  const GeomDetUnit * monodet=gdet->monoDet();
739  statedirection=monodet->toLocal(gtrkdirup);
740  SiStripRecHit2D m = matchedhit->monoHit();
741  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&m,statedirection,trackref,es);
742  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&m,statedirection,digilist,ev,es,track_ok);
743  //stereo side
744  const GeomDetUnit * stereodet=gdet->stereoDet();
745  statedirection=stereodet->toLocal(gtrkdirup);
746  SiStripRecHit2D s = matchedhit->stereoHit();
747  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&s,statedirection,trackref,es);
748  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&s,statedirection,digilist,ev,es,track_ok);
749  }
750  else if(projhit){
751  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found"<< std::endl;
752  // type=Projected;
753  const GluedGeomDet * gdet=static_cast<const GluedGeomDet *>(tkgeom_->idToDet(projhit->geographicalId()));
754 
755  GlobalVector gtrkdirup=gdet->toGlobal(statedirection);
756  const SiStripRecHit2D originalhit=projhit->originalHit();
757  const GeomDetUnit * det;
758  if(!StripSubdetector(originalhit.geographicalId().rawId()).stereo()){
759  //mono side
760  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found MONO"<< std::endl;
761  det=gdet->monoDet();
762  statedirection=det->toLocal(gtrkdirup);
763  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,ev,es,track_ok);
764  }
765  else{
766  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found STEREO"<< std::endl;
767  //stereo side
768  det=gdet->stereoDet();
769  statedirection=det->toLocal(gtrkdirup);
770  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,ev,es,track_ok);
771  }
772  }else if (hit2D){
773  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,digilist,ev,es,track_ok);
774  } else if (hit1D) {
775  if(statedirection.mag()) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,digilist,ev,es,track_ok);
776  } else {
777  LogDebug ("SiStripMonitorTrack")
778  << " LocalMomentum: "<<statedirection
779  << "\nLocal x-z plane angle: "<<atan2(statedirection.x(),statedirection.z());
780  }
781 
782  }
783 
784 }
#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:189
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:119
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:69
bool ev
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::ESHandle< TrackerGeometry > tkgeom_
TkHistoMap * tkhisto_NumMissingHits
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:104
#define LogTrace(id)
SiStripRecHit2D originalHit() const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
TkHistoMap * tkhisto_NumberInactiveHits
SiStripRecHit2D stereoHit() const
SiStripRecHit2D monoHit() const
DetId geographicalId() const
void add(uint32_t &detid, float value)
Definition: TkHistoMap.cc:213
TkHistoMap * tkhisto_NumberValidHits
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
const TrackerGeomDet * idToDet(DetId) const

Member Data Documentation

bool SiStripMonitorTrack::applyClusterQuality_
private

Definition at line 282 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::clchCMoriginTkHmap_On_
private

Definition at line 271 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 259 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

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

Definition at line 262 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

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

Definition at line 288 of file SiStripMonitorTrack.h.

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

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

Definition at line 261 of file SiStripMonitorTrack.h.

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

edm::EventNumber_t SiStripMonitorTrack::eventNb
private

Definition at line 279 of file SiStripMonitorTrack.h.

Referenced by analyze(), and clusterInfos().

int SiStripMonitorTrack::firstEvent
private

Definition at line 280 of file SiStripMonitorTrack.h.

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

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 290 of file SiStripMonitorTrack.h.

Referenced by findMEs().

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 289 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::histname
private

Definition at line 159 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::HistoFlag_On_
private

Definition at line 268 of file SiStripMonitorTrack.h.

float SiStripMonitorTrack::iLumisection
private

Definition at line 161 of file SiStripMonitorTrack.h.

Referenced by analyze().

float SiStripMonitorTrack::iOrbitSec
private

Definition at line 161 of file SiStripMonitorTrack.h.

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

Definition at line 245 of file SiStripMonitorTrack.h.

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

LocalVector SiStripMonitorTrack::LV
private

Definition at line 160 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::Mod_On_
private

Definition at line 265 of file SiStripMonitorTrack.h.

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

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

Definition at line 244 of file SiStripMonitorTrack.h.

Referenced by bookModMEs(), and clusterInfos().

int SiStripMonitorTrack::numTracks
private

Definition at line 170 of file SiStripMonitorTrack.h.

Referenced by trackStudyFromTrajectory().

bool SiStripMonitorTrack::OffHisto_On_
private

Definition at line 267 of file SiStripMonitorTrack.h.

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 258 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::ring_flag
private

Definition at line 269 of file SiStripMonitorTrack.h.

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

Definition at line 246 of file SiStripMonitorTrack.h.

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

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

Definition at line 256 of file SiStripMonitorTrack.h.

Referenced by book(), bookLayerMEs(), bookModMEs(), bookRingMEs(), and dqmBeginRun().

double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 283 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 284 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

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

Definition at line 247 of file SiStripMonitorTrack.h.

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

edm::ESHandle<TrackerGeometry> SiStripMonitorTrack::tkgeom_
private
TkHistoMap* SiStripMonitorTrack::tkhisto_ClChPerCMfromOrigin
private

Definition at line 167 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_ClChPerCMfromTrack
private

Definition at line 167 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumberInactiveHits
private

Definition at line 168 of file SiStripMonitorTrack.h.

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

TkHistoMap * SiStripMonitorTrack::tkhisto_NumberValidHits
private

Definition at line 168 of file SiStripMonitorTrack.h.

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

TkHistoMap* SiStripMonitorTrack::tkhisto_NumMissingHits
private

Definition at line 168 of file SiStripMonitorTrack.h.

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

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOffTrack
private

Definition at line 166 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOnTrack
private

Definition at line 166 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap* SiStripMonitorTrack::tkhisto_StoNCorrOnTrack
private

Definition at line 166 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 163 of file SiStripMonitorTrack.h.

Referenced by book(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::trackAssociatorCollection_in_EventTree
private

Definition at line 278 of file SiStripMonitorTrack.h.

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 274 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 273 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 277 of file SiStripMonitorTrack.h.

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

Definition at line 263 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 266 of file SiStripMonitorTrack.h.

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

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

Definition at line 276 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 285 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 286 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().