CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
thread_unsafe::DQMEDAnalyzer edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  LayerMEs
 
struct  ModMEs
 
struct  SubDetMEs
 

Public Types

typedef
TrackingRecHit::ConstRecHitPointer 
ConstRecHitPointer
 
enum  RecHitType { Single =0, Matched =1, Projected =2, Null =3 }
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &run, const edm::EventSetup &es)
 
virtual void endJob (void)
 
 SiStripMonitorTrack (const edm::ParameterSet &)
 
 ~SiStripMonitorTrack ()
 
- Public Member Functions inherited from thread_unsafe::DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
 DQMEDAnalyzer (void)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 *, const char *)
 
void bookModMEs (DQMStore::IBooker &, const uint32_t &)
 
void bookSubDetMEs (DQMStore::IBooker &, std::string &name)
 
bool clusterInfos (SiStripClusterInfo *cluster, const uint32_t &detid, const TrackerTopology *tTopo, enum ClusterFlags flags, LocalVector LV)
 
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)
 
void fillMEs (SiStripClusterInfo *, uint32_t detid, const TrackerTopology *tTopo, float, enum ClusterFlags)
 
void fillModMEs (SiStripClusterInfo *, std::string, float)
 
void getSubDetTag (std::string &folder_name, std::string &tag)
 
template<class T >
void RecHitInfo (const T *tkrecHit, LocalVector LV, reco::TrackRef track_ref, const edm::EventSetup &)
 
void trackStudy (const edm::Event &ev, const edm::EventSetup &es)
 
void trackStudyFromTrack (edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::EventSetup &es)
 
void trackStudyFromTrajectory (edm::Handle< TrajTrackAssociationCollection > TItkAssociatorCollection, const edm::EventSetup &es)
 
void trajectoryStudy (const edm::Ref< std::vector< Trajectory > > traj, reco::TrackRef trackref, const edm::EventSetup &es)
 

Private Attributes

bool applyClusterQuality_
 
edm::InputTag Cluster_src_
 
edm::EDGetTokenT
< edmNew::DetSetVector
< SiStripCluster > > 
clusterToken_
 
edm::ParameterSet conf_
 
DQMStoredbe
 
SiStripDCSStatusdcsStatus_
 
int eventNb
 
int firstEvent
 
bool flag_ring
 
SiStripFolderOrganizer folderOrganizer_
 
GenericTriggerEventFlaggenTriggerEventFlag_
 
std::string histname
 
bool HistoFlag_On_
 
float iOrbitSec
 
std::map< std::string, LayerMEsLayerMEsMap
 
LocalVector LV
 
bool Mod_On_
 
std::map< std::string, ModMEsModMEsMap
 
std::vector< uint32_t > ModulesToBeExcluded_
 
bool OffHisto_On_
 
edm::ParameterSet Parameters
 
bool ring_flag
 
int runNb
 
edm::ESHandle< SiStripDetCablingSiStripDetCabling_
 
double sToNLowerLimit_
 
double sToNUpperLimit_
 
std::map< std::string, SubDetMEsSubDetMEsMap
 
edm::ESHandle< TrackerGeometrytkgeom
 
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::TrackCollection
trackToken_
 
edm::EDGetTokenT
< TrajTrackAssociationCollection
trackTrajToken_
 
bool Trend_On_
 
std::vector< const
SiStripCluster * > 
vPSiStripCluster
 
double widthLowerLimit_
 
double widthUpperLimit_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 60 of file SiStripMonitorTrack.h.

Member Typedef Documentation

Definition at line 62 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 23 of file SiStripMonitorTrack.cc.

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

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

Definition at line 61 of file SiStripMonitorTrack.cc.

References dcsStatus_, and genTriggerEventFlag_.

61  {
62  if (dcsStatus_) delete dcsStatus_;
64 }
SiStripDCSStatus * dcsStatus_
GenericTriggerEventFlag * genTriggerEventFlag_

Member Function Documentation

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

Definition at line 610 of file SiStripMonitorTrack.cc.

References clusterInfos(), clusterToken_, cond::rpcobgas::detid, edmNew::DetSet< T >::end(), spr::find(), edm::EventSetup::get(), edm::Event::getByToken(), edm::HandleBase::isValid(), LogDebug, ModulesToBeExcluded_, OffTrack, edm::ESHandle< class >::product(), and vPSiStripCluster.

Referenced by analyze().

611 {
612 
613  // std::cout << "[SiStripMonitorTrack::AllClusters] starting .. " << std::endl;
614  //Retrieve tracker topology from geometry
615  edm::ESHandle<TrackerTopology> tTopoHandle;
616  es.get<IdealGeometryRecord>().get(tTopoHandle);
617  const TrackerTopology* const tTopo = tTopoHandle.product();
618 
620  ev.getByToken( clusterToken_, siStripClusterHandle);
621  if (!siStripClusterHandle.isValid()){
622  edm::LogError("SiStripMonitorTrack")<< "ClusterCollection is not valid!!" << std::endl;
623  return;
624  } else {
625  // std::cout << "[SiStripMonitorTrack::AllClusters] OK cluster collection: " << siStripClusterHandle->size() << std::endl;
626 
627  //Loop on Dets
628  for ( edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter=siStripClusterHandle->begin(); DSViter!=siStripClusterHandle->end();DSViter++){
629  uint32_t detid=DSViter->id();
630  if (find(ModulesToBeExcluded_.begin(),ModulesToBeExcluded_.end(),detid)!=ModulesToBeExcluded_.end()) continue;
631  //Loop on Clusters
632  LogDebug("SiStripMonitorTrack") << "on detid "<< detid << " N Cluster= " << DSViter->size();
634  for(; ClusIter!=DSViter->end(); ClusIter++) {
636  SiStripClusterInfo SiStripClusterInfo_(*ClusIter,es,detid);
637  clusterInfos(&SiStripClusterInfo_,detid,tTopo,OffTrack,LV);
638  }
639  }
640  }
641  }
642 }
#define LogDebug(id)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
data_type const * const_iterator
Definition: DetSetNew.h:30
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
math::XYZTLorentzVectorD LV
std::vector< const SiStripCluster * > vPSiStripCluster
bool isValid() const
Definition: HandleBase.h:76
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t &detid, const TrackerTopology *tTopo, enum ClusterFlags flags, LocalVector LV)
iterator end()
Definition: DetSetNew.h:70
std::vector< uint32_t > ModulesToBeExcluded_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
void SiStripMonitorTrack::analyze ( const edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 98 of file SiStripMonitorTrack.cc.

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

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

Definition at line 147 of file SiStripMonitorTrack.cc.

References bookLayerMEs(), bookModMEs(), bookSubDetMEs(), cond::rpcobgas::detid, flag_ring, SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), LayerMEsMap, Mod_On_, mergeVDriftHistosByStation::name, DQMStore::IBooker::setCurrentFolder(), SiStripFolderOrganizer::setDetectorFolder(), SiStripFolderOrganizer::setLayerFolder(), SiStripFolderOrganizer::setSiStripFolderName(), SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, tkhisto_NumOffTrack, tkhisto_NumOnTrack, tkhisto_StoNCorrOnTrack, TkHistoMap_On_, and topFolderName_.

Referenced by bookHistograms().

148 {
149 
150  SiStripFolderOrganizer folder_organizer;
151  folder_organizer.setSiStripFolderName(topFolderName_);
152  //******** TkHistoMaps
153  if (TkHistoMap_On_) {
154  tkhisto_StoNCorrOnTrack = new TkHistoMap(ibooker , topFolderName_ ,"TkHMap_StoNCorrOnTrack", 0.0,true);
155  tkhisto_NumOnTrack = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberOfOnTrackCluster", 0.0,true);
156  tkhisto_NumOffTrack = new TkHistoMap(ibooker , topFolderName_, "TkHMap_NumberOfOfffTrackCluster",0.0,true);
157  }
158  //******** TkHistoMaps
159 
160  std::vector<uint32_t> vdetId_;
161  SiStripDetCabling_->addActiveDetectorsRawIds(vdetId_);
162  //Histos for each detector, layer and module
163  for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin();detid_iter!=vdetId_.end();detid_iter++){ //loop on all the active detid
164  uint32_t detid = *detid_iter;
165 
166  if (detid < 1){
167  edm::LogError("SiStripMonitorTrack")<< "[" <<__PRETTY_FUNCTION__ << "] invalid detid " << detid<< std::endl;
168  continue;
169  }
170 
171 
173 
174  // book Layer and RING plots
175  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,flag_ring);
176 
177  SiStripHistoId hidmanager;
178  std::string layer_id = hidmanager.getSubdetid(detid, tTopo, flag_ring);
179  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_id);
180  if(iLayerME==LayerMEsMap.end()){
181  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, flag_ring);
182  bookLayerMEs(ibooker , detid, layer_id);
183  }
184  // book sub-detector plots
185  std::pair<std::string,std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
186  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()){
187  ibooker.setCurrentFolder(sdet_pair.first);
188  bookSubDetMEs(ibooker , sdet_pair.second);
189  }
190  // book module plots
191  if(Mod_On_) {
192  folder_organizer.setDetectorFolder(detid,tTopo);
193  bookModMEs(ibooker , *detid_iter);
194  }
195  }//end loop on detectors detid
196 }
TkHistoMap * tkhisto_NumOffTrack
void setSiStripFolderName(std::string name)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
void bookLayerMEs(DQMStore::IBooker &, const uint32_t &, std::string &)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
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 setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
void bookModMEs(DQMStore::IBooker &, const uint32_t &)
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
TkHistoMap * tkhisto_NumOnTrack
TkHistoMap * tkhisto_StoNCorrOnTrack
std::map< std::string, LayerMEs > LayerMEsMap
void SiStripMonitorTrack::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements thread_unsafe::DQMEDAnalyzer.

Definition at line 79 of file SiStripMonitorTrack.cc.

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

80 {
81  //Retrieve tracker topology from geometry
83  es.get<IdealGeometryRecord>().get(tTopoHandle);
84  const TrackerTopology* const tTopo = tTopoHandle.product();
85  book(ibooker , tTopo);
86 }
void book(DQMStore::IBooker &, const TrackerTopology *tTopo)
T const * product() const
Definition: ESHandle.h:62
void SiStripMonitorTrack::bookLayerMEs ( DQMStore::IBooker ibooker,
const uint32_t &  mod_id,
std::string &  layer_id 
)
private

Definition at line 240 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book1D(), bookME1D(), SiStripMonitorTrack::LayerMEs::ClusterChargeCorrOnTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeOffTrack, SiStripMonitorTrack::LayerMEs::ClusterChargeOnTrack, SiStripMonitorTrack::LayerMEs::ClusterNoiseOffTrack, SiStripMonitorTrack::LayerMEs::ClusterNoiseOnTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOffTrack, SiStripMonitorTrack::LayerMEs::ClusterPosOnTrack, SiStripMonitorTrack::LayerMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOffTrack, SiStripMonitorTrack::LayerMEs::ClusterWidthOnTrack, SiStripHistoId::createHistoLayer(), flag_ring, LayerMEsMap, mergeVDriftHistosByStation::name, SiStripDetCabling_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by book().

241 {
242  std::string name = "layer";
243  std::string hname;
244  SiStripHistoId hidmanager;
245 
246  LayerMEs theLayerMEs;
247  theLayerMEs.ClusterStoNCorrOnTrack = 0;
248  theLayerMEs.ClusterChargeCorrOnTrack = 0;
249  theLayerMEs.ClusterChargeOnTrack = 0;
250  theLayerMEs.ClusterChargeOffTrack = 0;
251  theLayerMEs.ClusterNoiseOnTrack = 0;
252  theLayerMEs.ClusterNoiseOffTrack = 0;
253  theLayerMEs.ClusterWidthOnTrack = 0;
254  theLayerMEs.ClusterWidthOffTrack = 0;
255  theLayerMEs.ClusterPosOnTrack = 0;
256  theLayerMEs.ClusterPosOffTrack = 0;
257 
258  // Cluster StoN Corrected
259  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr",name,layer_id,"OnTrack");
260  theLayerMEs.ClusterStoNCorrOnTrack = bookME1D(ibooker , "TH1ClusterStoNCorr", hname.c_str());
261 
262  // Cluster Charge Corrected
263  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr",name,layer_id,"OnTrack");
264  theLayerMEs.ClusterChargeCorrOnTrack = bookME1D(ibooker , "TH1ClusterChargeCorr", hname.c_str());
265 
266  // Cluster Charge (On and Off Track)
267  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,layer_id,"OnTrack");
268  theLayerMEs.ClusterChargeOnTrack = bookME1D(ibooker , "TH1ClusterCharge", hname.c_str());
269 
270  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,layer_id,"OffTrack");
271  theLayerMEs.ClusterChargeOffTrack = bookME1D(ibooker , "TH1ClusterCharge", hname.c_str());
272 
273  // Cluster Noise (On and Off Track)
274  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,layer_id,"OnTrack");
275  theLayerMEs.ClusterNoiseOnTrack = bookME1D(ibooker , "TH1ClusterNoise", hname.c_str());
276 
277  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,layer_id,"OffTrack");
278  theLayerMEs.ClusterNoiseOffTrack = bookME1D(ibooker , "TH1ClusterNoise", hname.c_str());
279 
280  // Cluster Width (On and Off Track)
281  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,layer_id,"OnTrack");
282  theLayerMEs.ClusterWidthOnTrack = bookME1D(ibooker , "TH1ClusterWidth", hname.c_str());
283 
284  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,layer_id,"OffTrack");
285  theLayerMEs.ClusterWidthOffTrack = bookME1D(ibooker , "TH1ClusterWidth", hname.c_str());
286 
287  //Cluster Position
288  short total_nr_strips = SiStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
289  if (layer_id.find("TEC") != std::string::npos && !flag_ring) total_nr_strips = 3 * 2 * 128;
290 
291  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,layer_id,"OnTrack");
292  theLayerMEs.ClusterPosOnTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
293 
294  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,layer_id,"OffTrack");
295  theLayerMEs.ClusterPosOffTrack = ibooker.book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
296 
297  //bookeeping
298  LayerMEsMap[layer_id]=theLayerMEs;
299 }
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
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 
)
private

Definition at line 354 of file SiStripMonitorTrack.cc.

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

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

355 {
356  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
357  // std::cout << "[SiStripMonitorTrack::bookME1D] pwd: " << dbe->pwd() << std::endl;
358  // std::cout << "[SiStripMonitorTrack::bookME1D] HistoName: " << HistoName << std::endl;
359  return ibooker.book1D(HistoName,HistoName,
360  Parameters.getParameter<int32_t>("Nbinx"),
361  Parameters.getParameter<double>("xmin"),
362  Parameters.getParameter<double>("xmax")
363  );
364 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME2D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 367 of file SiStripMonitorTrack.cc.

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

368 {
369  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
370  return ibooker.book2D(HistoName,HistoName,
371  Parameters.getParameter<int32_t>("Nbinx"),
372  Parameters.getParameter<double>("xmin"),
373  Parameters.getParameter<double>("xmax"),
374  Parameters.getParameter<int32_t>("Nbiny"),
375  Parameters.getParameter<double>("ymin"),
376  Parameters.getParameter<double>("ymax")
377  );
378 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:131
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME3D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 381 of file SiStripMonitorTrack.cc.

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

382 {
383  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
384  return ibooker.book3D(HistoName,HistoName,
385  Parameters.getParameter<int32_t>("Nbinx"),
386  Parameters.getParameter<double>("xmin"),
387  Parameters.getParameter<double>("xmax"),
388  Parameters.getParameter<int32_t>("Nbiny"),
389  Parameters.getParameter<double>("ymin"),
390  Parameters.getParameter<double>("ymax"),
391  Parameters.getParameter<int32_t>("Nbinz"),
392  Parameters.getParameter<double>("zmin"),
393  Parameters.getParameter<double>("zmax")
394  );
395 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * book3D(Args &&...args)
Definition: DQMStore.h:149
MonitorElement * SiStripMonitorTrack::bookMEProfile ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 398 of file SiStripMonitorTrack.cc.

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

Referenced by bookModMEs().

399 {
400  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
401  return ibooker.bookProfile(HistoName,HistoName,
402  Parameters.getParameter<int32_t>("Nbinx"),
403  Parameters.getParameter<double>("xmin"),
404  Parameters.getParameter<double>("xmax"),
405  Parameters.getParameter<int32_t>("Nbiny"),
406  Parameters.getParameter<double>("ymin"),
407  Parameters.getParameter<double>("ymax"),
408  "" );
409 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookMETrend ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 412 of file SiStripMonitorTrack.cc.

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

Referenced by bookSubDetMEs().

413 {
414  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
415  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
417  ParametersTrend.getParameter<int32_t>("Nbins"),
418  0,
419  ParametersTrend.getParameter<int32_t>("Nbins"),
420  100, //that parameter should not be there !?
421  Parameters.getParameter<double>("xmin"),
422  Parameters.getParameter<double>("xmax"),
423  "" );
424  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetBit(TH1::kCanRebin);
425 
426  if(!me) return me;
427  me->setAxisTitle("Event Time in Seconds",1);
428  return me;
429 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
edm::ParameterSet conf_
vector< ParameterSet > Parameters
TH1 * getTH1(void) const
std::string HistoName
void SiStripMonitorTrack::bookModMEs ( DQMStore::IBooker ibooker,
const uint32_t &  id 
)
private

Definition at line 199 of file SiStripMonitorTrack.cc.

References DQMStore::IBooker::book1D(), bookME1D(), bookMEProfile(), SiStripMonitorTrack::ModMEs::ClusterCharge, SiStripMonitorTrack::ModMEs::ClusterChargeCorr, SiStripMonitorTrack::ModMEs::ClusterPGV, SiStripMonitorTrack::ModMEs::ClusterPos, SiStripMonitorTrack::ModMEs::ClusterStoNCorr, SiStripMonitorTrack::ModMEs::ClusterWidth, SiStripHistoId::createHistoId(), ModMEsMap, mergeVDriftHistosByStation::name, SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, and DQMStore::IBooker::tag().

Referenced by book().

200 {
201  std::string name = "det";
202  SiStripHistoId hidmanager;
203  std::string hid = hidmanager.createHistoId("",name,id);
204  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(hid);
205  if(iModME==ModMEsMap.end()){
206  ModMEs theModMEs;
207  theModMEs.ClusterStoNCorr = 0;
208  theModMEs.ClusterCharge = 0;
209  theModMEs.ClusterChargeCorr = 0;
210  theModMEs.ClusterWidth = 0;
211  theModMEs.ClusterPos = 0;
212  theModMEs.ClusterPGV = 0;
213 
214  // Cluster Width
215  theModMEs.ClusterWidth=bookME1D(ibooker , "TH1ClusterWidth", hidmanager.createHistoId("ClusterWidth_OnTrack",name,id).c_str());
216  ibooker.tag(theModMEs.ClusterWidth,id);
217  // Cluster Charge
218  theModMEs.ClusterCharge=bookME1D(ibooker , "TH1ClusterCharge", hidmanager.createHistoId("ClusterCharge_OnTrack",name,id).c_str());
219  ibooker.tag(theModMEs.ClusterCharge,id);
220  // Cluster Charge Corrected
221  theModMEs.ClusterChargeCorr=bookME1D(ibooker , "TH1ClusterChargeCorr", hidmanager.createHistoId("ClusterChargeCorr_OnTrack",name,id).c_str());
222  ibooker.tag(theModMEs.ClusterChargeCorr,id);
223  // Cluster StoN Corrected
224  theModMEs.ClusterStoNCorr=bookME1D(ibooker , "TH1ClusterStoNCorrMod", hidmanager.createHistoId("ClusterStoNCorr_OnTrack",name,id).c_str());
225  ibooker.tag(theModMEs.ClusterStoNCorr,id);
226  // Cluster Position
227  short total_nr_strips = SiStripDetCabling_->nApvPairs(id) * 2 * 128;
228  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);
229  ibooker.tag(theModMEs.ClusterPos,id);
230  // Cluster PGV
231  theModMEs.ClusterPGV=bookMEProfile(ibooker , "TProfileClusterPGV", hidmanager.createHistoId("PGV_OnTrack",name,id).c_str());
232  ibooker.tag(theModMEs.ClusterPGV,id);
233 
234  ModMEsMap[hid]=theModMEs;
235  }
236 }
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:286
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::map< std::string, ModMEs > ModMEsMap
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
void SiStripMonitorTrack::bookSubDetMEs ( DQMStore::IBooker ibooker,
std::string &  name 
)
private

Definition at line 303 of file SiStripMonitorTrack.cc.

References bookME1D(), bookMETrend(), SiStripMonitorTrack::SubDetMEs::ClusterChargeOffTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNCorrOnTrack, SiStripMonitorTrack::SubDetMEs::ClusterStoNOffTrack, MonitorElement::getTH1(), mergeVDriftHistosByStation::name, SiStripMonitorTrack::SubDetMEs::nClustersOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersOnTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOffTrack, SiStripMonitorTrack::SubDetMEs::nClustersTrendOnTrack, AlCaHLTBitMon_QueryRunRegistry::string, xuti::subdet_tag(), SubDetMEsMap, SiStripMonitorTrack::SubDetMEs::totNClustersOffTrack, SiStripMonitorTrack::SubDetMEs::totNClustersOnTrack, and Trend_On_.

Referenced by book().

303  {
304 
306  subdet_tag = "__" + name;
307  std::string completeName;
308 
309  SubDetMEs theSubDetMEs;
310  theSubDetMEs.totNClustersOnTrack = 0;
311  theSubDetMEs.totNClustersOffTrack = 0;
312  theSubDetMEs.nClustersOnTrack = 0;
313  theSubDetMEs.nClustersTrendOnTrack = 0;
314  theSubDetMEs.nClustersOffTrack = 0;
315  theSubDetMEs.nClustersTrendOffTrack = 0;
316  theSubDetMEs.ClusterStoNCorrOnTrack = 0;
317  theSubDetMEs.ClusterChargeOffTrack = 0;
318  theSubDetMEs.ClusterStoNOffTrack = 0;
319 
320  // TotalNumber of Cluster OnTrack
321  completeName = "Summary_TotalNumberOfClusters_OnTrack" + subdet_tag;
322  theSubDetMEs.nClustersOnTrack = bookME1D(ibooker , "TH1nClustersOn", completeName.c_str());
323  theSubDetMEs.nClustersOnTrack->getTH1()->StatOverflows(kTRUE);
324 
325  // TotalNumber of Cluster OffTrack
326  completeName = "Summary_TotalNumberOfClusters_OffTrack" + subdet_tag;
327  theSubDetMEs.nClustersOffTrack = bookME1D(ibooker , "TH1nClustersOff", completeName.c_str());
328  theSubDetMEs.nClustersOffTrack->getTH1()->StatOverflows(kTRUE);
329 
330  // Cluster StoN On Track
331  completeName = "Summary_ClusterStoNCorr_OnTrack" + subdet_tag;
332  theSubDetMEs.ClusterStoNCorrOnTrack = bookME1D(ibooker , "TH1ClusterStoNCorr", completeName.c_str());
333 
334  // Cluster Charge Off Track
335  completeName = "Summary_ClusterCharge_OffTrack" + subdet_tag;
336  theSubDetMEs.ClusterChargeOffTrack=bookME1D(ibooker , "TH1ClusterCharge", completeName.c_str());
337 
338  // Cluster Charge StoN Off Track
339  completeName = "Summary_ClusterStoN_OffTrack" + subdet_tag;
340  theSubDetMEs.ClusterStoNOffTrack = bookME1D(ibooker , "TH1ClusterStoN", completeName.c_str());
341 
342  if(Trend_On_){
343  // TotalNumber of Cluster
344  completeName = "Trend_TotalNumberOfClusters_OnTrack" + subdet_tag;
345  theSubDetMEs.nClustersTrendOnTrack = bookMETrend(ibooker , "TH1nClustersOn", completeName.c_str());
346  completeName = "Trend_TotalNumberOfClusters_OffTrack" + subdet_tag;
347  theSubDetMEs.nClustersTrendOffTrack = bookMETrend(ibooker , "TH1nClustersOff", completeName.c_str());
348  }
349  //bookeeping
350  SubDetMEsMap[name]=theSubDetMEs;
351 }
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *, const char *)
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
TH1 * getTH1(void) const
bool SiStripMonitorTrack::clusterInfos ( SiStripClusterInfo cluster,
const uint32_t &  detid,
const TrackerTopology tTopo,
enum ClusterFlags  flags,
LocalVector  LV 
)
private

Definition at line 645 of file SiStripMonitorTrack.cc.

References TkHistoMap::add(), applyClusterQuality_, SiStripClusterInfo::charge(), SiStripHistoId::createHistoId(), SiStripClusterInfo::detId(), eventNb, TkHistoMap::fill(), fillMEs(), fillModMEs(), folderOrganizer_, SiStripFolderOrganizer::getSubDetFolderAndTag(), LogDebug, PV3DBase< T, PVType, FrameType >::mag(), Mod_On_, mergeVDriftHistosByStation::name, SiStripClusterInfo::noiseRescaledByGain(), NULL, OffTrack, OnTrack, SiStripClusterInfo::signalOverNoise(), sToNLowerLimit_, sToNUpperLimit_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, tkhisto_NumOffTrack, tkhisto_NumOnTrack, tkhisto_StoNCorrOnTrack, TkHistoMap_On_, 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().

646 {
647 
648  // std::cout << "[SiStripMonitorTrack::clusterInfos] input collection: " << Cluster_src_ << std::endl;
649  // std::cout << "[SiStripMonitorTrack::clusterInfos] starting flag " << flag << std::endl;
650  if (cluster==NULL) return false;
651  // if one imposes a cut on the clusters, apply it
652  if( (applyClusterQuality_) &&
653  (cluster->signalOverNoise() < sToNLowerLimit_ ||
654  cluster->signalOverNoise() > sToNUpperLimit_ ||
655  cluster->width() < widthLowerLimit_ ||
656  cluster->width() > widthUpperLimit_) ) return false;
657  // std::cout << "[SiStripMonitorTrack::clusterInfos] pass clusterQuality detID: " << detid;
658  // start of the analysis
659 
660  std::pair<std::string,std::string> sdet_pair = folderOrganizer_.getSubDetFolderAndTag(detid,tTopo);
661  // std::cout << " --> " << sdet_pair.second << " " << sdet_pair.first << std::endl;
662  // std::cout << "[SiStripMonitorTrack::clusterInfos] SubDetMEsMap: " << SubDetMEsMap.size() << std::endl;
663  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_pair.second);
664  // std::cout << "[SiStripMonitorTrack::clusterInfos] iSubdet: " << iSubdet->first << std::endl;
665  if(iSubdet != SubDetMEsMap.end()){
666  // std::cout << "[SiStripMonitorTrack::clusterInfos] adding cluster" << std::endl;
667  if (flag == OnTrack) iSubdet->second.totNClustersOnTrack++;
668  else if (flag == OffTrack) iSubdet->second.totNClustersOffTrack++;
669  }
670 
671  // std::cout << "[SiStripMonitorTrack::clusterInfos] iSubdet->second.totNClustersOnTrack: " << iSubdet->second.totNClustersOnTrack << std::endl;
672  // std::cout << "[SiStripMonitorTrack::clusterInfos] iSubdet->second.totNClustersOffTrack: " << iSubdet->second.totNClustersOffTrack << std::endl;
673 
674  float cosRZ = -2;
675  LogDebug("SiStripMonitorTrack")<< "\n\tLV " << LV.x() << " " << LV.y() << " " << LV.z() << " " << LV.mag() << std::endl;
676  if (LV.mag()!=0){
677  cosRZ= fabs(LV.z())/LV.mag();
678  LogDebug("SiStripMonitorTrack")<< "\n\t cosRZ " << cosRZ << std::endl;
679  }
681 
682  // Filling SubDet/Layer Plots (on Track + off Track)
683  fillMEs(cluster,detid,tTopo,cosRZ,flag);
684 
685 
686  //******** TkHistoMaps
687  if (TkHistoMap_On_) {
688  uint32_t adet=cluster->detId();
689  float noise = cluster->noiseRescaledByGain();
690  if(flag==OnTrack){
691  tkhisto_NumOnTrack->add(adet,1.);
692  if(noise > 0.0) tkhisto_StoNCorrOnTrack->fill(adet,cluster->signalOverNoise()*cosRZ);
693  if(noise == 0.0)
694  LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise " << noise << std::endl;
695  }
696  else if(flag==OffTrack){
697  tkhisto_NumOffTrack->add(adet,1.);
698  if(cluster->charge() > 250){
699  LogDebug("SiStripMonitorTrack") << "Module firing " << detid << " in Event " << eventNb << std::endl;
700  }
701  }
702  }
703 
704  // Module plots filled only for onTrack Clusters
705  if(Mod_On_){
706  if(flag==OnTrack){
707  SiStripHistoId hidmanager2;
708  name =hidmanager2.createHistoId("","det",detid);
709  fillModMEs(cluster,name,cosRZ);
710  }
711  }
712  return true;
713 }
#define LogDebug(id)
TkHistoMap * tkhisto_NumOffTrack
float noiseRescaledByGain() const
T y() const
Definition: PV3DBase.h:63
#define NULL
Definition: scimark2.h:8
float signalOverNoise() const
void fillMEs(SiStripClusterInfo *, uint32_t detid, const TrackerTopology *tTopo, float, enum ClusterFlags)
T mag() const
Definition: PV3DBase.h:67
uint16_t charge() const
std::map< std::string, SubDetMEs > SubDetMEsMap
void fillModMEs(SiStripClusterInfo *, std::string, float)
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:180
T z() const
Definition: PV3DBase.h:64
uint16_t width() const
SiStripFolderOrganizer folderOrganizer_
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
TkHistoMap * tkhisto_NumOnTrack
uint32_t detId() const
TkHistoMap * tkhisto_StoNCorrOnTrack
T x() const
Definition: PV3DBase.h:62
void add(uint32_t &detid, float value)
Definition: TkHistoMap.cc:213
void SiStripMonitorTrack::dqmBeginRun ( const edm::Run run,
const edm::EventSetup es 
)
virtual

Reimplemented from thread_unsafe::DQMEDAnalyzer.

Definition at line 67 of file SiStripMonitorTrack.cc.

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

68 {
69  //get geom
71  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::beginRun] There are "<<tkgeom->detUnits().size() <<" detectors instantiated in the geometry" << std::endl;
73 
74 
75  // Initialize the GenericTriggerEventFlag
77 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
edm::ESHandle< TrackerGeometry > tkgeom
const T & get() const
Definition: EventSetup.h:55
GenericTriggerEventFlag * genTriggerEventFlag_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
void SiStripMonitorTrack::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file SiStripMonitorTrack.cc.

References conf_, dbe, edm::ParameterSet::getParameter(), DQMStore::save(), and AlCaHLTBitMon_QueryRunRegistry::string.

90 {
91  if(conf_.getParameter<bool>("OutputMEsInRootFile")){
92  //dbe->showDirStructure();
93  dbe->save(conf_.getParameter<std::string>("OutputFileName"));
94  }
95 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 99 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

Referenced by analyze(), fillMEs(), and fillModMEs().

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

Definition at line 100 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

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

Definition at line 101 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

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

Definition at line 102 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

102 {if (ME!=0)ME->Fill(value1,value2,value3,value4);}
void Fill(long long x)
void SiStripMonitorTrack::fillMEs ( SiStripClusterInfo cluster,
uint32_t  detid,
const TrackerTopology tTopo,
float  cos,
enum ClusterFlags  flag 
)
private

Definition at line 751 of file SiStripMonitorTrack.cc.

References SiStripClusterInfo::baryStrip(), DeDxDiscriminatorTools::charge(), SiStripClusterInfo::charge(), eventNb, fillME(), flag_ring, folderOrganizer_, SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), LayerMEsMap, LogDebug, SiStripClusterInfo::noiseRescaledByGain(), OnTrack, position, SiStripClusterInfo::signalOverNoise(), AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, SiStripClusterInfo::width(), and create_public_lumi_plots::width.

Referenced by clusterInfos().

752 {
753  std::pair<std::string,int32_t> SubDetAndLayer = folderOrganizer_.GetSubDetAndLayer(detid,tTopo,flag_ring);
754  SiStripHistoId hidmanager1;
755  std::string layer_id = hidmanager1.getSubdetid(detid,tTopo,flag_ring);
756 
757  std::pair<std::string,std::string> sdet_pair = folderOrganizer_.getSubDetFolderAndTag(detid,tTopo);
758  float StoN = cluster->signalOverNoise();
759  float noise = cluster->noiseRescaledByGain();
760  uint16_t charge = cluster->charge();
761  uint16_t width = cluster->width();
762  float position = cluster->baryStrip();
763 
764  std::map<std::string, LayerMEs>::iterator iLayer = LayerMEsMap.find(layer_id);
765  if (iLayer != LayerMEsMap.end()) {
766  if(flag==OnTrack){
767  // std::cout << "[SiStripMonitorTrack::fillMEs] filling OnTrack" << std::endl;
768  if(noise > 0.0) fillME(iLayer->second.ClusterStoNCorrOnTrack, StoN*cos);
769  if(noise == 0.0) LogDebug("SiStripMonitorTrack") << "Module " << detid << " in Event " << eventNb << " noise " << cluster->noiseRescaledByGain() << std::endl;
770  fillME(iLayer->second.ClusterChargeCorrOnTrack, charge*cos);
771  fillME(iLayer->second.ClusterChargeOnTrack, charge);
772  fillME(iLayer->second.ClusterNoiseOnTrack, noise);
773  fillME(iLayer->second.ClusterWidthOnTrack, width);
774  fillME(iLayer->second.ClusterPosOnTrack, position);
775  } else {
776  // std::cout << "[SiStripMonitorTrack::fillMEs] filling OffTrack" << std::endl;
777  fillME(iLayer->second.ClusterChargeOffTrack, charge);
778  fillME(iLayer->second.ClusterNoiseOffTrack, noise);
779  fillME(iLayer->second.ClusterWidthOffTrack, width);
780  fillME(iLayer->second.ClusterPosOffTrack, position);
781  }
782  }
783  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(sdet_pair.second);
784  if(iSubdet != SubDetMEsMap.end() ){
785  if(flag==OnTrack){
786  if(noise > 0.0) fillME(iSubdet->second.ClusterStoNCorrOnTrack,StoN*cos);
787  } else {
788  fillME(iSubdet->second.ClusterChargeOffTrack,charge);
789  if(noise > 0.0) fillME(iSubdet->second.ClusterStoNOffTrack,StoN);
790  }
791  }
792 }
#define LogDebug(id)
void fillME(MonitorElement *ME, float value1)
float noiseRescaledByGain() const
float baryStrip() const
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
double charge(const std::vector< uint8_t > &Ampls)
float signalOverNoise() const
uint16_t charge() const
std::map< std::string, SubDetMEs > SubDetMEsMap
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
uint16_t width() const
SiStripFolderOrganizer folderOrganizer_
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
static int position[264][3]
Definition: ReadPGInfo.cc:509
std::map< std::string, LayerMEs > LayerMEsMap
void SiStripMonitorTrack::fillModMEs ( SiStripClusterInfo cluster,
std::string  name,
float  cos 
)
private

Definition at line 716 of file SiStripMonitorTrack.cc.

References SiStripClusterInfo::baryStrip(), DeDxDiscriminatorTools::charge(), SiStripClusterInfo::charge(), conf_, eventNb, fillME(), edm::ParameterSet::getParameter(), i, LogDebug, SiStripClusterInfo::maxCharge(), SiStripClusterInfo::maxIndex(), ModMEsMap, SiStripClusterInfo::noiseRescaledByGain(), position, SiStripClusterInfo::signalOverNoise(), SiStripClusterInfo::stripCharges(), SiStripClusterInfo::width(), and create_public_lumi_plots::width.

Referenced by clusterInfos().

717 {
718  std::map<std::string, ModMEs>::iterator iModME = ModMEsMap.find(name);
719  if(iModME!=ModMEsMap.end()){
720 
721  float StoN = cluster->signalOverNoise();
722  uint16_t charge = cluster->charge();
723  uint16_t width = cluster->width();
724  float position = cluster->baryStrip();
725 
726  float noise = cluster->noiseRescaledByGain();
727  if(noise > 0.0) fillME(iModME->second.ClusterStoNCorr ,StoN*cos);
728  if(noise == 0.0) LogDebug("SiStripMonitorTrack") << "Module " << name << " in Event " << eventNb << " noise " << noise << std::endl;
729  fillME(iModME->second.ClusterCharge,charge);
730 
731  fillME(iModME->second.ClusterChargeCorr,charge*cos);
732 
733  fillME(iModME->second.ClusterWidth ,width);
734  fillME(iModME->second.ClusterPos ,position);
735 
736  //fill the PGV histo
737  float PGVmax = cluster->maxCharge();
738  int PGVposCounter = cluster->maxIndex();
739  for (int i= int(conf_.getParameter<edm::ParameterSet>("TProfileClusterPGV").getParameter<double>("xmin"));i<PGVposCounter;++i)
740  fillME(iModME->second.ClusterPGV, i,0.);
741  for (std::vector<uint8_t>::const_iterator it=cluster->stripCharges().begin();it<cluster->stripCharges().end();++it) {
742  fillME(iModME->second.ClusterPGV, PGVposCounter++,(*it)/PGVmax);
743  }
744  for (int i= PGVposCounter;i<int(conf_.getParameter<edm::ParameterSet>("TProfileClusterPGV").getParameter<double>("xmax"));++i)
745  fillME(iModME->second.ClusterPGV, i,0.);
746  //end fill the PGV histo
747  }
748 }
#define LogDebug(id)
uint8_t maxCharge() const
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void fillME(MonitorElement *ME, float value1)
float noiseRescaledByGain() const
float baryStrip() const
edm::ParameterSet conf_
uint16_t maxIndex() const
double charge(const std::vector< uint8_t > &Ampls)
float signalOverNoise() const
uint16_t charge() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
uint16_t width() const
std::map< std::string, ModMEs > ModMEsMap
const std::vector< uint8_t > & stripCharges() const
static int position[264][3]
Definition: ReadPGInfo.cc:509
void SiStripMonitorTrack::getSubDetTag ( std::string &  folder_name,
std::string &  tag 
)
private

Definition at line 797 of file SiStripMonitorTrack.cc.

797  {
798 
799  tag = folder_name.substr(folder_name.find("MechanicalView")+15);
800  if (tag.find("side_") != std::string::npos) {
801  tag.replace(tag.find_last_of("/"),1,"_");
802  }
803 }
template<class T >
void SiStripMonitorTrack::RecHitInfo ( const T tkrecHit,
LocalVector  LV,
reco::TrackRef  track_ref,
const edm::EventSetup es 
)
private

Definition at line 566 of file SiStripMonitorTrack.cc.

References clusterInfos(), cond::rpcobgas::detid, spr::find(), edm::EventSetup::get(), LogTrace, ModulesToBeExcluded_, NULL, OnTrack, edm::ESHandle< class >::product(), tkgeom, vPSiStripCluster, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

566  {
567 
568  // std::cout << "[SiStripMonitorTrack::RecHitInfo] starting" << std::endl;
569 
570  if(!tkrecHit->isValid()){
571  LogTrace("SiStripMonitorTrack") <<"\t\t Invalid Hit " << std::endl;
572  return;
573  }
574 
575  const uint32_t& detid = tkrecHit->geographicalId().rawId();
577  LogTrace("SiStripMonitorTrack") << "Modules Excluded" << std::endl;
578  return;
579  }
580 
581  LogTrace("SiStripMonitorTrack")
582  <<"\n\t\tRecHit on det "<<tkrecHit->geographicalId().rawId()
583  <<"\n\t\tRecHit in LP "<<tkrecHit->localPosition()
584  <<"\n\t\tRecHit in GP "<<tkgeom->idToDet(tkrecHit->geographicalId())->surface().toGlobal(tkrecHit->localPosition())
585  <<"\n\t\tRecHit trackLocal vector "<<LV.x() << " " << LV.y() << " " << LV.z() <<std::endl;
586 
587 
588  //Retrieve tracker topology from geometry
589  edm::ESHandle<TrackerTopology> tTopoHandle;
590  es.get<IdealGeometryRecord>().get(tTopoHandle);
591  const TrackerTopology* const tTopo = tTopoHandle.product();
592 
593  //Get SiStripCluster from SiStripRecHit
594  if ( tkrecHit != NULL ){
595  const SiStripCluster* SiStripCluster_ = &*(tkrecHit->cluster());
596  SiStripClusterInfo SiStripClusterInfo_(*SiStripCluster_,es,detid);
597 
598  // std::cout << "[SiStripMonitorTrack::RecHitInfo] SiStripClusterInfo DONE" << std::endl;
599 
600  if ( clusterInfos(&SiStripClusterInfo_,detid, tTopo, OnTrack, LV ) ) {
601  vPSiStripCluster.push_back(SiStripCluster_);
602  }
603  }else{
604  edm::LogError("SiStripMonitorTrack") << "NULL hit" << std::endl;
605  }
606  }
T y() const
Definition: PV3DBase.h:63
#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:7
T z() const
Definition: PV3DBase.h:64
std::vector< const SiStripCluster * > vPSiStripCluster
edm::ESHandle< TrackerGeometry > tkgeom
#define LogTrace(id)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t &detid, const TrackerTopology *tTopo, enum ClusterFlags flags, LocalVector LV)
std::vector< uint32_t > ModulesToBeExcluded_
T x() const
Definition: PV3DBase.h:62
void SiStripMonitorTrack::trackStudy ( const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 510 of file SiStripMonitorTrack.cc.

References edm::Event::getByToken(), edm::HandleBase::isValid(), TrackLabel_, trackStudyFromTrack(), trackStudyFromTrajectory(), trackToken_, and trackTrajToken_.

Referenced by analyze().

510  {
511 
512  // trajectory input
513  edm::Handle<TrajTrackAssociationCollection> TItkAssociatorCollection;
514  ev.getByToken(trackTrajToken_, TItkAssociatorCollection);
515  if( TItkAssociatorCollection.isValid()){
516  trackStudyFromTrajectory(TItkAssociatorCollection,es);
517  } else {
518  edm::LogError("SiStripMonitorTrack")<<"Association not found ... try w/ track collection"<<std::endl;
519 
520  // track input
521  edm::Handle<reco::TrackCollection > trackCollectionHandle;
522  ev.getByToken(trackToken_, trackCollectionHandle);//takes the track collection
523  if (!trackCollectionHandle.isValid()){
524  edm::LogError("SiStripMonitorTrack")<<"also Track Collection is not valid !! " << TrackLabel_<<std::endl;
525  return;
526  } else {
527  trackStudyFromTrack(trackCollectionHandle,es);
528  }
529  }
530 
531 }
void trackStudyFromTrack(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::EventSetup &es)
edm::EDGetTokenT< reco::TrackCollection > trackToken_
void trackStudyFromTrajectory(edm::Handle< TrajTrackAssociationCollection > TItkAssociatorCollection, const edm::EventSetup &es)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
bool isValid() const
Definition: HandleBase.h:76
edm::EDGetTokenT< TrajTrackAssociationCollection > trackTrajToken_
void SiStripMonitorTrack::trackStudyFromTrack ( edm::Handle< reco::TrackCollection trackCollectionHandle,
const edm::EventSetup es 
)
private

Definition at line 533 of file SiStripMonitorTrack.cc.

Referenced by trackStudy().

533  {
534 
535  reco::TrackCollection trackCollection = *trackCollectionHandle;
536  for (reco::TrackCollection::const_iterator track = trackCollection.begin(); track!=trackCollection.end(); ++track) {
537  }
538 
539 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
void SiStripMonitorTrack::trackStudyFromTrajectory ( edm::Handle< TrajTrackAssociationCollection TItkAssociatorCollection,
const edm::EventSetup es 
)
private

Definition at line 541 of file SiStripMonitorTrack.cc.

References edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, i, edm::Ref< C, T, F >::key(), LogDebug, and trajectoryStudy().

Referenced by trackStudy().

541  {
542  //Perform track study
543  int i=0;
544  for(TrajTrackAssociationCollection::const_iterator it = TItkAssociatorCollection->begin();it != TItkAssociatorCollection->end(); ++it){
545  const edm::Ref<std::vector<Trajectory> > traj_iterator = it->key;
546 
547  // Trajectory Map, extract Trajectory for this track
548  reco::TrackRef trackref = it->val;
549  LogDebug("SiStripMonitorTrack")
550  << "Track number "<< i+1
551  << "\n\tmomentum: " << trackref->momentum()
552  << "\n\tPT: " << trackref->pt()
553  << "\n\tvertex: " << trackref->vertex()
554  << "\n\timpact parameter: " << trackref->d0()
555  << "\n\tcharge: " << trackref->charge()
556  << "\n\tnormalizedChi2: " << trackref->normalizedChi2()
557  <<"\n\tFrom EXTRA : "
558  <<"\n\t\touter PT "<< trackref->outerPt()<<std::endl;
559  i++;
560 
561  trajectoryStudy(traj_iterator,trackref,es);
562 
563  }
564 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
key_type key() const
Accessor for product key.
Definition: Ref.h:266
void trajectoryStudy(const edm::Ref< std::vector< Trajectory > > traj, reco::TrackRef trackref, const edm::EventSetup &es)
void SiStripMonitorTrack::trajectoryStudy ( const edm::Ref< std::vector< Trajectory > >  traj,
reco::TrackRef  trackref,
const edm::EventSetup es 
)
private

Definition at line 432 of file SiStripMonitorTrack.cc.

References TrackingRecHit::geographicalId(), TrajectoryStateOnSurface::localMomentum(), LogDebug, LogTrace, 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 trackStudyFromTrajectory().

432  {
433 
434 
435  const std::vector<TrajectoryMeasurement> & measurements = traj->measurements();
436  std::vector<TrajectoryMeasurement>::const_iterator traj_mes_iterator;
437  for(std::vector<TrajectoryMeasurement>::const_iterator traj_mes_iterator= measurements.begin();traj_mes_iterator!=measurements.end();traj_mes_iterator++){//loop on measurements
438  //trajectory local direction and position on detector
439  LocalPoint stateposition;
440  LocalVector statedirection;
441 
442  TrajectoryStateOnSurface updatedtsos=traj_mes_iterator->updatedState();
443  ConstRecHitPointer ttrh=traj_mes_iterator->recHit();
444 
445  if (!ttrh->isValid()) continue;
446 
447  const ProjectedSiStripRecHit2D* phit = dynamic_cast<const ProjectedSiStripRecHit2D*>( ttrh->hit() );
448  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>( ttrh->hit() );
449  const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>( ttrh->hit() );
450  const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>( ttrh->hit() );
451  // std::cout << "[SiStripMonitorTrack::trajectoryStudy] RecHit DONE" << std::endl;
452 
453  // RecHitType type=Single;
454 
455  if(matchedhit){
456  LogTrace("SiStripMonitorTrack")<<"\nMatched recHit found"<< std::endl;
457  // type=Matched;
458 
459  GluedGeomDet * gdet=(GluedGeomDet *)tkgeom->idToDet(matchedhit->geographicalId());
460  GlobalVector gtrkdirup=gdet->toGlobal(updatedtsos.localMomentum());
461  //mono side
462  const GeomDetUnit * monodet=gdet->monoDet();
463  statedirection=monodet->toLocal(gtrkdirup);
464  SiStripRecHit2D m = matchedhit->monoHit();
465  if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&m,statedirection,trackref,es);
466  //stereo side
467  const GeomDetUnit * stereodet=gdet->stereoDet();
468  statedirection=stereodet->toLocal(gtrkdirup);
469  SiStripRecHit2D s = matchedhit->stereoHit();
470  if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&s,statedirection,trackref,es);
471  }
472  else if(phit){
473  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found"<< std::endl;
474  // type=Projected;
475  GluedGeomDet * gdet=(GluedGeomDet *)tkgeom->idToDet(phit->geographicalId());
476 
477  GlobalVector gtrkdirup=gdet->toGlobal(updatedtsos.localMomentum());
478  const SiStripRecHit2D originalhit=phit->originalHit();
479  const GeomDetUnit * det;
480  if(!StripSubdetector(originalhit.geographicalId().rawId()).stereo()){
481  //mono side
482  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found MONO"<< std::endl;
483  det=gdet->monoDet();
484  statedirection=det->toLocal(gtrkdirup);
485  if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,trackref,es);
486  }
487  else{
488  LogTrace("SiStripMonitorTrack")<<"\nProjected recHit found STEREO"<< std::endl;
489  //stereo side
490  det=gdet->stereoDet();
491  statedirection=det->toLocal(gtrkdirup);
492  if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,trackref,es);
493  }
494  }else if (hit2D){
495  statedirection=updatedtsos.localMomentum();
496  if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,trackref,es);
497  } else if (hit1D) {
498  statedirection=updatedtsos.localMomentum();
499  if(statedirection.mag() != 0) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,trackref,es);
500  } else {
501  LogDebug ("SiStrioMonitorTrack")
502  << " LocalMomentum: "<<statedirection
503  << "\nLocal x-z plane angle: "<<atan2(statedirection.x(),statedirection.z());
504  }
505 
506  }
507 
508 }
#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:47
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:62
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
LocalVector localMomentum() const
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
T mag() const
Definition: PV3DBase.h:67
T z() const
Definition: PV3DBase.h:64
edm::ESHandle< TrackerGeometry > tkgeom
#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

Member Data Documentation

bool SiStripMonitorTrack::applyClusterQuality_
private

Definition at line 185 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 161 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

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

Definition at line 163 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

edm::ParameterSet SiStripMonitorTrack::conf_
private
DQMStore* SiStripMonitorTrack::dbe
private

Definition at line 108 of file SiStripMonitorTrack.h.

Referenced by endJob().

SiStripDCSStatus* SiStripMonitorTrack::dcsStatus_
private

Definition at line 191 of file SiStripMonitorTrack.h.

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

int SiStripMonitorTrack::eventNb
private

Definition at line 182 of file SiStripMonitorTrack.h.

Referenced by analyze(), clusterInfos(), fillMEs(), and fillModMEs().

int SiStripMonitorTrack::firstEvent
private

Definition at line 183 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::flag_ring
private

Definition at line 181 of file SiStripMonitorTrack.h.

Referenced by book(), bookLayerMEs(), fillMEs(), and SiStripMonitorTrack().

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 193 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and fillMEs().

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 192 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::histname
private

Definition at line 110 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::HistoFlag_On_
private

Definition at line 170 of file SiStripMonitorTrack.h.

float SiStripMonitorTrack::iOrbitSec
private

Definition at line 112 of file SiStripMonitorTrack.h.

Referenced by analyze().

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

Definition at line 154 of file SiStripMonitorTrack.h.

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

LocalVector SiStripMonitorTrack::LV
private

Definition at line 111 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::Mod_On_
private

Definition at line 167 of file SiStripMonitorTrack.h.

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

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

Definition at line 153 of file SiStripMonitorTrack.h.

Referenced by bookModMEs(), and fillModMEs().

std::vector<uint32_t> SiStripMonitorTrack::ModulesToBeExcluded_
private

Definition at line 177 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and RecHitInfo().

bool SiStripMonitorTrack::OffHisto_On_
private

Definition at line 169 of file SiStripMonitorTrack.h.

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 160 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::ring_flag
private

Definition at line 171 of file SiStripMonitorTrack.h.

int SiStripMonitorTrack::runNb
private

Definition at line 182 of file SiStripMonitorTrack.h.

Referenced by analyze().

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

Definition at line 158 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 186 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 187 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

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

Definition at line 155 of file SiStripMonitorTrack.h.

Referenced by analyze(), book(), bookSubDetMEs(), clusterInfos(), and fillMEs().

edm::ESHandle<TrackerGeometry> SiStripMonitorTrack::tkgeom
private

Definition at line 157 of file SiStripMonitorTrack.h.

Referenced by dqmBeginRun(), RecHitInfo(), and trajectoryStudy().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOffTrack
private

Definition at line 117 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOnTrack
private

Definition at line 117 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap* SiStripMonitorTrack::tkhisto_StoNCorrOnTrack
private

Definition at line 117 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

bool SiStripMonitorTrack::TkHistoMap_On_
private

Definition at line 172 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::topFolderName_
private

Definition at line 114 of file SiStripMonitorTrack.h.

Referenced by book(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::trackAssociatorCollection_in_EventTree
private

Definition at line 180 of file SiStripMonitorTrack.h.

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 175 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 174 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 179 of file SiStripMonitorTrack.h.

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

Definition at line 164 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

edm::EDGetTokenT<TrajTrackAssociationCollection> SiStripMonitorTrack::trackTrajToken_
private

Definition at line 165 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 168 of file SiStripMonitorTrack.h.

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

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

Definition at line 178 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 188 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 189 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().