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
 
 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 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::Event &, const edm::EventSetup &, 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::Event &ev, const edm::EventSetup &es)
 
void trackStudyFromTrajectory (edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::Event &ev, const edm::EventSetup &es)
 
void trajectoryStudy (const reco::Track &track, 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_
 
bool Digi_On_
 
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_, Digi_On_, 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  Digi_On_ = conf.getParameter<bool>("Digi_On");
38 
39  TrackProducer_ = conf_.getParameter<std::string>("TrackProducer");
40  TrackLabel_ = conf_.getParameter<std::string>("TrackLabel");
41 
42  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
43 
44  if (Digi_On_)
45  digiToken_ = consumes<edm::DetSetVector<SiStripDigi>> ( conf.getParameter<edm::InputTag>("ADCDigi_src") );
46  clusterToken_ = consumes<edmNew::DetSetVector<SiStripCluster> >(Cluster_src_);
47  trackToken_ = consumes<reco::TrackCollection>(edm::InputTag(TrackProducer_,TrackLabel_) );
48 
49  // cluster quality conditions
50  edm::ParameterSet cluster_condition = conf_.getParameter<edm::ParameterSet>("ClusterConditions");
51  applyClusterQuality_ = cluster_condition.getParameter<bool>("On");
52  sToNLowerLimit_ = cluster_condition.getParameter<double>("minStoN");
53  sToNUpperLimit_ = cluster_condition.getParameter<double>("maxStoN");
54  widthLowerLimit_ = cluster_condition.getParameter<double>("minWidth");
55  widthUpperLimit_ = cluster_condition.getParameter<double>("maxWidth");
56 
57 
58  // Create DCS Status
59  bool checkDCS = conf_.getParameter<bool>("UseDCSFiltering");
60  if (checkDCS) dcsStatus_ = new SiStripDCSStatus(consumesCollector());
61  else dcsStatus_ = 0;
62 }
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 65 of file SiStripMonitorTrack.cc.

References dcsStatus_, and genTriggerEventFlag_.

65  {
66  if (dcsStatus_) delete dcsStatus_;
68 }
SiStripDCSStatus * dcsStatus_
GenericTriggerEventFlag * genTriggerEventFlag_

Member Function Documentation

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

Definition at line 1054 of file SiStripMonitorTrack.cc.

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

Referenced by analyze().

1055 {
1056 
1057  //Retrieve tracker topology from geometry
1058  edm::ESHandle<TrackerTopology> tTopoHandle;
1059  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1060  const TrackerTopology* const tTopo = tTopoHandle.product();
1061 
1062  edm::ESHandle<SiStripGain> gainHandle;
1063  es.get<SiStripGainRcd>().get( gainHandle );
1064  const SiStripGain* stripGain = gainHandle.product();
1065 
1066  edm::ESHandle<SiStripQuality> qualityHandle;
1067  es.get<SiStripQualityRcd>().get("",qualityHandle);
1068  const SiStripQuality* stripQuality = qualityHandle.product();
1069 
1071  if (Digi_On_)
1072  ev.getByToken( digiToken_, digihandle );
1074  auto digilist = ( digihandle.isValid() ? *digihandle : dummy );
1075 
1077  ev.getByToken( clusterToken_, siStripClusterHandle);
1078  if (siStripClusterHandle.isValid()){
1079  //Loop on Dets
1080  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter=siStripClusterHandle->begin(), DSVEnd=siStripClusterHandle->end();
1081  DSViter!=DSVEnd; ++DSViter) {
1082 
1083  uint32_t detid=DSViter->id();
1084  const Det2MEs MEs = findMEs(tTopo, detid);
1085 
1086  LogDebug("SiStripMonitorTrack") << "on detid "<< detid << " N Cluster= " << DSViter->size();
1087 
1088  //Loop on Clusters
1089  for(edmNew::DetSet<SiStripCluster>::const_iterator ClusIter = DSViter->begin(), ClusEnd = DSViter->end();
1090  ClusIter!=ClusEnd; ++ClusIter) {
1091 
1092  if (vPSiStripCluster.find(&*ClusIter) == vPSiStripCluster.end()) {
1093  SiStripClusterInfo SiStripClusterInfo_(*ClusIter,es,detid);
1094  // clusterInfos(&SiStripClusterInfo_,detid,OffTrack, /*track_ok*/ false,LV,MEs, tTopo,stripGain,stripQuality,*digihandle);
1095  clusterInfos(&SiStripClusterInfo_,detid,OffTrack, /*track_ok*/ false,LV,MEs, tTopo,stripGain,stripQuality,digilist);
1096  }
1097  }
1098  }
1099  } else {
1100  edm::LogError("SiStripMonitorTrack")<< "ClusterCollection is not valid!!" << std::endl;
1101  return;
1102  }
1103 }
#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_
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 94 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.

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

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

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

85 {
86  //Retrieve tracker topology from geometry
88  es.get<TrackerTopologyRcd>().get(tTopoHandle);
89  const TrackerTopology* const tTopo = tTopoHandle.product();
90  book(ibooker , tTopo);
91 }
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 343 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().

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

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

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

622 {
623  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
624  return ibooker.book1D(HistoName,HistoName,
625  Parameters.getParameter<int32_t>("Nbinx"),
626  Parameters.getParameter<double>("xmin"),
627  Parameters.getParameter<double>("xmax")
628  );
629 }
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 632 of file SiStripMonitorTrack.cc.

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

633 {
634  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
635  return ibooker.book2D(HistoName,HistoName,
636  Parameters.getParameter<int32_t>("Nbinx"),
637  Parameters.getParameter<double>("xmin"),
638  Parameters.getParameter<double>("xmax"),
639  Parameters.getParameter<int32_t>("Nbiny"),
640  Parameters.getParameter<double>("ymin"),
641  Parameters.getParameter<double>("ymax")
642  );
643 }
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 646 of file SiStripMonitorTrack.cc.

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

647 {
648  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
649  return ibooker.book3D(HistoName,HistoName,
650  Parameters.getParameter<int32_t>("Nbinx"),
651  Parameters.getParameter<double>("xmin"),
652  Parameters.getParameter<double>("xmax"),
653  Parameters.getParameter<int32_t>("Nbiny"),
654  Parameters.getParameter<double>("ymin"),
655  Parameters.getParameter<double>("ymax"),
656  Parameters.getParameter<int32_t>("Nbinz"),
657  Parameters.getParameter<double>("zmin"),
658  Parameters.getParameter<double>("zmax")
659  );
660 }
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 663 of file SiStripMonitorTrack.cc.

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

Referenced by bookModMEs().

664 {
665  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
666  return ibooker.bookProfile(HistoName,HistoName,
667  Parameters.getParameter<int32_t>("Nbinx"),
668  Parameters.getParameter<double>("xmin"),
669  Parameters.getParameter<double>("xmax"),
670  Parameters.getParameter<int32_t>("Nbiny"),
671  Parameters.getParameter<double>("ymin"),
672  Parameters.getParameter<double>("ymax"),
673  "" );
674 }
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 677 of file SiStripMonitorTrack.cc.

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

Referenced by bookSubDetMEs().

678 {
679  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
681  ParametersTrend.getParameter<int32_t>("Nbins"),
682  ParametersTrend.getParameter<double>("xmin"),
683  ParametersTrend.getParameter<double>("xmax"),
684  0 , 0 , "" );
685  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetCanExtend(TH1::kAllAxes);
686 
687  if(!me) return me;
688  me->setAxisTitle("Lumisection",1);
689  return me;
690 }
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 276 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().

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

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

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

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

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

72 {
73  //get geom
75  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::beginRun] There are "<<tkgeom_->detUnits().size() <<" detectors instantiated in the geometry" << std::endl;
77 
78 
79  // Initialize the GenericTriggerEventFlag
81 }
#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 127 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

Referenced by analyze(), and clusterInfos().

127 {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
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3,
float  value4 
)
inlineprivate
SiStripMonitorTrack::Det2MEs SiStripMonitorTrack::findMEs ( const TrackerTopology tTopo,
const uint32_t  detid 
)
private

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

1106  {
1107  SiStripHistoId hidmanager1;
1108 
1109  std::string layer_id = hidmanager1.getSubdetid(detid, tTopo, false);
1110  std::string ring_id = hidmanager1.getSubdetid(detid, tTopo, true);
1111  std::string sdet_tag = folderOrganizer_.getSubDetFolderAndTag(detid, tTopo).second;
1112 
1113  Det2MEs me;
1114  me.iLayer = nullptr;
1115  me.iRing = nullptr;
1116  me.iSubdet = nullptr;
1117 
1118  std::map<std::string, LayerMEs>::iterator iLayer = LayerMEsMap.find(layer_id);
1119  if (iLayer != LayerMEsMap.end()) {
1120  me.iLayer = &(iLayer->second);
1121  }
1122 
1123  std::map<std::string, RingMEs>::iterator iRing = RingMEsMap.find(ring_id);
1124  if (iRing != RingMEsMap.end()) {
1125  me.iRing = &(iRing->second);
1126  }
1127 
1128  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_tag);
1129  if (iSubdet != SubDetMEsMap.end()) {
1130  me.iSubdet = &(iSubdet->second);
1131  }
1132 
1133  return me;
1134 }
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 323 of file SiStripMonitorTrack.cc.

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

Referenced by bookLayerMEs(), and bookRingMEs().

323  {
324 
325  MonitorElement* me = NULL;
326  bool view = false;
327  view = (conf_.getParameter<edm::ParameterSet>(histoParameters.c_str())).getParameter<bool>(viewParameter.c_str());
328  if ( id.find("TEC") == std::string::npos && id.find("TID") == std::string::npos ) {
329  me = bookME1D(ibooker , histoParameters.c_str(), histoName.c_str());
330  } else {
331  if (view) {
332  // histoName = histoName + "__" + thickness;
333  me = bookME1D(ibooker , histoParameters.c_str(), histoName.c_str());
334  }
335  }
336  return me;
337 }
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 ProjectedSiStripRecHit2D projhit,
const SiStripMatchedRecHit2D matchedhit,
const SiStripRecHit2D hit2D,
const SiStripRecHit1D hit1D,
LocalVector  localMomentum,
const bool  track_ok 
)
private

Definition at line 787 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,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,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,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,ev,es,track_ok);
839  }
840  } else if (hit2D){ // type=2D
841  statedirection=localMomentum;
842  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,ev,es,track_ok);
843  } else if (hit1D) { // type=1D
844  statedirection=localMomentum;
845  if(statedirection.mag()) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,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::Event ev,
const edm::EventSetup es,
bool  ok 
)
private

Definition at line 998 of file SiStripMonitorTrack.cc.

References clusterInfos(), Digi_On_, digiToken_, findMEs(), edm::EventSetup::get(), edm::Event::getByToken(), TrackerGeometry::idToDet(), edm::HandleBase::isValid(), 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().

998  {
999 
1000  if(!tkrecHit->isValid()){
1001  LogTrace("SiStripMonitorTrack") <<"\t\t Invalid Hit " << std::endl;
1002  return;
1003  }
1004 
1005  const uint32_t& detid = tkrecHit->geographicalId().rawId();
1006 
1007  LogTrace("SiStripMonitorTrack")
1008  <<"\n\t\tRecHit on det "<<detid
1009  <<"\n\t\tRecHit in LP "<<tkrecHit->localPosition()
1010  <<"\n\t\tRecHit in GP "<<tkgeom_->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition())
1011  <<"\n\t\tRecHit trackLocal vector "<<LV.x() << " " << LV.y() << " " << LV.z() <<std::endl;
1012 
1013  // FIXME: MOVE ALL THE EV AND ES ACCESS OUTSIDE THE LOOP!!!!
1014 
1015  //Retrieve tracker topology from geometry
1016  edm::ESHandle<TrackerTopology> tTopoHandle;
1017  es.get<TrackerTopologyRcd>().get(tTopoHandle);
1018  const TrackerTopology* const tTopo = tTopoHandle.product();
1019 
1020  // Getting SiStrip Gain settings
1021  edm::ESHandle<SiStripGain> gainHandle;
1022  es.get<SiStripGainRcd>().get( gainHandle );
1023  const SiStripGain* const stripGain = gainHandle.product();
1024 
1025  edm::ESHandle<SiStripQuality> qualityHandle;
1026  es.get<SiStripQualityRcd>().get("",qualityHandle);
1027  const SiStripQuality* stripQuality = qualityHandle.product();
1028 
1030  if (Digi_On_)
1031  ev.getByToken( digiToken_, digihandle );
1033  auto const & digilist = ( digihandle.isValid() ? *digihandle : dummy );
1034 
1035  //Get SiStripCluster from SiStripRecHit
1036  if ( tkrecHit != NULL ){
1037  const SiStripCluster* SiStripCluster_ = &*(tkrecHit->cluster());
1038  SiStripClusterInfo SiStripClusterInfo_(*SiStripCluster_,es,detid);
1039 
1040  const Det2MEs MEs = findMEs(tTopo, detid);
1041  // if (clusterInfos(&SiStripClusterInfo_,detid, OnTrack, track_ok, LV, MEs, tTopo,stripGain,stripQuality,*digihandle))
1042  if (clusterInfos(&SiStripClusterInfo_,detid, OnTrack, track_ok, LV, MEs, tTopo,stripGain,stripQuality,digilist))
1043  {
1044  vPSiStripCluster.insert(SiStripCluster_);
1045  }
1046  }
1047  else
1048  {
1049  edm::LogError("SiStripMonitorTrack") << "NULL hit" << std::endl;
1050  }
1051  }
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
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
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
#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 877 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().

877  {
878  if (track.pt() < 0.8) return false;
879  if (track.p() < 2.0) return false;
880  if (track.hitPattern().numberOfValidTrackerHits() <= 6) return false;
881  if (track.normalizedChi2() > 10.0) return false;
882  return true;
883 }
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 edm::Event::getByToken(), edm::HandleBase::isValid(), 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  if (trackCollectionHandle.isValid()){
868  trackStudyFromTrajectory(trackCollectionHandle,ev, es);
869  } else {
870  edm::LogError("SiStripMonitorTrack")<<"also Track Collection is not valid !! " << TrackLabel_<<std::endl;
871  return;
872  }
873 }
edm::EDGetTokenT< reco::TrackCollection > trackToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
bool isValid() const
Definition: HandleBase.h:74
void trackStudyFromTrajectory(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::Event &ev, const edm::EventSetup &es)
fixed size matrix
HLT enums.
void SiStripMonitorTrack::trackStudyFromTrack ( edm::Handle< reco::TrackCollection trackCollectionHandle,
const edm::Event ev,
const edm::EventSetup es 
)
private

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

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

Definition at line 968 of file SiStripMonitorTrack.cc.

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

Referenced by trackStudy().

972  {
973  //Perform track study
974  int i=0;
975  reco::TrackCollection trackCollection = *trackCollectionHandle;
976  numTracks = trackCollection.size();
977  for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
978  track!=etrack; ++track) {
979 
980  LogDebug("SiStripMonitorTrack")
981  << "Track number "<< ++i << std::endl;
982  // << "\n\tmomentum: " << trackref->momentum()
983  // << "\n\tPT: " << trackref->pt()
984  // << "\n\tvertex: " << trackref->vertex()
985  // << "\n\timpact parameter: " << trackref->d0()
986  // << "\n\tcharge: " << trackref->charge()
987  // << "\n\tnormalizedChi2: " << trackref->normalizedChi2()
988  // <<"\n\tFrom EXTRA : "
989  // <<"\n\t\touter PT "<< trackref->outerPt()<<std::endl;
990 
991  // trajectoryStudy(traj_iterator,trackref,es);
992  bool track_ok = trackFilter(*track);
993  trajectoryStudy(*track,ev,es,track_ok);
994 
995  }
996 }
#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::Event &ev, const edm::EventSetup &es, bool track_ok)
void SiStripMonitorTrack::trajectoryStudy ( const reco::Track track,
const edm::Event ev,
const edm::EventSetup es,
bool  track_ok 
)
private

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

698  {
699 
700  auto const & trajParams = track.extra()->trajParams();
701  assert(trajParams.size()==track.recHitsSize());
702  auto hb = track.recHitsBegin();
703  for(unsigned int h=0;h<track.recHitsSize();h++){
704  auto ttrh = *(hb+h);
705 
706 
707  if (TkHistoMap_On_ ) {
708  uint32_t thedetid=ttrh->rawId();
709  if ( SiStripDetId(thedetid).subDetector() >=3 && SiStripDetId(thedetid).subDetector() <=6) { //TIB/TID + TOB + TEC only
710  if ( (ttrh->getType()==1) )
711  tkhisto_NumMissingHits->add(thedetid,1.);
712  if ( (ttrh->getType()==2) )
713  tkhisto_NumberInactiveHits->add(thedetid,1.);
714  if ( (ttrh->getType()==0) )
715  tkhisto_NumberValidHits->add(thedetid,1.);
716  }
717  }
718 
719  if (!ttrh->isValid()) continue;
720 
721  //trajectory local direction and position on detector
722  auto statedirection = trajParams[h].momentum();
723 
724 
725  const ProjectedSiStripRecHit2D* projhit = dynamic_cast<const ProjectedSiStripRecHit2D*>( ttrh->hit() );
726  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>( ttrh->hit() );
727  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>( ttrh->hit() );
728  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>( ttrh->hit() );
729 
730  // RecHitType type=Single;
731 
732  if(matchedhit){
733  LogTrace("SiStripMonitorTrack")<<"\nMatched recHit found"<< std::endl;
734  // type=Matched;
735 
736  const GluedGeomDet * gdet=static_cast<const GluedGeomDet *>(tkgeom_->idToDet(matchedhit->geographicalId()));
737  GlobalVector gtrkdirup=gdet->toGlobal(statedirection);
738  //mono side
739  const GeomDetUnit * monodet=gdet->monoDet();
740  statedirection=monodet->toLocal(gtrkdirup);
741  SiStripRecHit2D m = matchedhit->monoHit();
742  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&m,statedirection,trackref,es);
743  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&m,statedirection,ev,es,track_ok);
744  //stereo side
745  const GeomDetUnit * stereodet=gdet->stereoDet();
746  statedirection=stereodet->toLocal(gtrkdirup);
747  SiStripRecHit2D s = matchedhit->stereoHit();
748  // if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&s,statedirection,trackref,es);
749  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&s,statedirection,ev,es,track_ok);
750  }
751  else if(projhit){
752  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found"<< std::endl;
753  // type=Projected;
754  const GluedGeomDet * gdet=static_cast<const GluedGeomDet *>(tkgeom_->idToDet(projhit->geographicalId()));
755 
756  GlobalVector gtrkdirup=gdet->toGlobal(statedirection);
757  const SiStripRecHit2D originalhit=projhit->originalHit();
758  const GeomDetUnit * det;
759  if(!StripSubdetector(originalhit.geographicalId().rawId()).stereo()){
760  //mono side
761  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found MONO"<< std::endl;
762  det=gdet->monoDet();
763  statedirection=det->toLocal(gtrkdirup);
764  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,ev,es,track_ok);
765  }
766  else{
767  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found STEREO"<< std::endl;
768  //stereo side
769  det=gdet->stereoDet();
770  statedirection=det->toLocal(gtrkdirup);
771  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,ev,es,track_ok);
772  }
773  }else if (hit2D){
774  if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,ev,es,track_ok);
775  } else if (hit1D) {
776  if(statedirection.mag()) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,ev,es,track_ok);
777  } else {
778  LogDebug ("SiStripMonitorTrack")
779  << " LocalMomentum: "<<statedirection
780  << "\nLocal x-z plane angle: "<<atan2(statedirection.x(),statedirection.z());
781  }
782 
783  }
784 
785 }
#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 261 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::clchCMoriginTkHmap_On_
private

Definition at line 249 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 237 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

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

Definition at line 240 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

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

Definition at line 267 of file SiStripMonitorTrack.h.

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

bool SiStripMonitorTrack::Digi_On_
private

Definition at line 250 of file SiStripMonitorTrack.h.

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

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

Definition at line 239 of file SiStripMonitorTrack.h.

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

edm::EventNumber_t SiStripMonitorTrack::eventNb
private

Definition at line 258 of file SiStripMonitorTrack.h.

Referenced by analyze(), and clusterInfos().

int SiStripMonitorTrack::firstEvent
private

Definition at line 259 of file SiStripMonitorTrack.h.

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

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 269 of file SiStripMonitorTrack.h.

Referenced by findMEs().

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 268 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::histname
private

Definition at line 137 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::HistoFlag_On_
private

Definition at line 246 of file SiStripMonitorTrack.h.

float SiStripMonitorTrack::iLumisection
private

Definition at line 139 of file SiStripMonitorTrack.h.

Referenced by analyze().

float SiStripMonitorTrack::iOrbitSec
private

Definition at line 139 of file SiStripMonitorTrack.h.

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

Definition at line 223 of file SiStripMonitorTrack.h.

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

LocalVector SiStripMonitorTrack::LV
private

Definition at line 138 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::Mod_On_
private

Definition at line 243 of file SiStripMonitorTrack.h.

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

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

Definition at line 222 of file SiStripMonitorTrack.h.

Referenced by bookModMEs(), and clusterInfos().

int SiStripMonitorTrack::numTracks
private

Definition at line 148 of file SiStripMonitorTrack.h.

Referenced by trackStudyFromTrajectory().

bool SiStripMonitorTrack::OffHisto_On_
private

Definition at line 245 of file SiStripMonitorTrack.h.

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 236 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::ring_flag
private

Definition at line 247 of file SiStripMonitorTrack.h.

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

Definition at line 224 of file SiStripMonitorTrack.h.

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

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

Definition at line 234 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 262 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 263 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

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

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

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_ClChPerCMfromTrack
private

Definition at line 145 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumberInactiveHits
private

Definition at line 146 of file SiStripMonitorTrack.h.

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

TkHistoMap * SiStripMonitorTrack::tkhisto_NumberValidHits
private

Definition at line 146 of file SiStripMonitorTrack.h.

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

TkHistoMap* SiStripMonitorTrack::tkhisto_NumMissingHits
private

Definition at line 146 of file SiStripMonitorTrack.h.

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

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOffTrack
private

Definition at line 144 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOnTrack
private

Definition at line 144 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap* SiStripMonitorTrack::tkhisto_StoNCorrOnTrack
private

Definition at line 144 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

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

Definition at line 141 of file SiStripMonitorTrack.h.

Referenced by book(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::trackAssociatorCollection_in_EventTree
private

Definition at line 257 of file SiStripMonitorTrack.h.

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 253 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 252 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 256 of file SiStripMonitorTrack.h.

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

Definition at line 241 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 244 of file SiStripMonitorTrack.h.

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

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

Definition at line 255 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 264 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 265 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().