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:
edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  LayerMEs
 
struct  ModMEs
 
struct  SubDetMEs
 

Public Types

typedef
TransientTrackingRecHit::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 &)
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
virtual void endJob (void)
 
 SiStripMonitorTrack (const edm::ParameterSet &)
 
 ~SiStripMonitorTrack ()
 
- 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
 
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 (const TrackerTopology *tTopo)
 
void bookLayerMEs (const uint32_t &, std::string &)
 
MonitorElementbookME1D (const char *, const char *)
 
MonitorElementbookME2D (const char *, const char *)
 
MonitorElementbookME3D (const char *, const char *)
 
MonitorElementbookMEProfile (const char *, const char *)
 
MonitorElementbookMETrend (const char *, const char *)
 
void bookModMEs (const uint32_t &)
 
void bookSubDetMEs (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 58 of file SiStripMonitorTrack.h.

Member Typedef Documentation

Definition at line 60 of file SiStripMonitorTrack.h.

Member Enumeration Documentation

Enumerator
OffTrack 
OnTrack 

Definition at line 69 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_, 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();
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 609 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().

610 {
611 
612  // std::cout << "[SiStripMonitorTrack::AllClusters] starting .. " << std::endl;
613  //Retrieve tracker topology from geometry
614  edm::ESHandle<TrackerTopology> tTopoHandle;
615  es.get<IdealGeometryRecord>().get(tTopoHandle);
616  const TrackerTopology* const tTopo = tTopoHandle.product();
617 
619  // ev.getByLabel( Cluster_src_, siStripClusterHandle);
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 95 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.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 67 of file SiStripMonitorTrack.cc.

References book(), genTriggerEventFlag_, edm::EventSetup::get(), GenericTriggerEventFlag::initRun(), LogDebug, GenericTriggerEventFlag::on(), edm::ESHandle< class >::product(), SiStripDetCabling_, and tkgeom.

68 {
69  //Retrieve tracker topology from geometry
71  es.get<IdealGeometryRecord>().get(tTopoHandle);
72  const TrackerTopology* const tTopo = tTopoHandle.product();
73 
74  //get geom
75  es.get<TrackerDigiGeometryRecord>().get( tkgeom );
76  LogDebug("SiStripMonitorTrack") << "[SiStripMonitorTrack::beginRun] There are "<<tkgeom->detUnits().size() <<" detectors instantiated in the geometry" << std::endl;
78 
79  book(tTopo);
80 
81  // Initialize the GenericTriggerEventFlag
83 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
edm::ESHandle< TrackerGeometry > tkgeom
void book(const TrackerTopology *tTopo)
T const * product() const
Definition: ESHandle.h:62
GenericTriggerEventFlag * genTriggerEventFlag_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
void SiStripMonitorTrack::book ( const TrackerTopology tTopo)
private

Definition at line 144 of file SiStripMonitorTrack.cc.

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

Referenced by beginRun().

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

Definition at line 237 of file SiStripMonitorTrack.cc.

References DQMStore::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(), dbe, flag_ring, LayerMEsMap, mergeVDriftHistosByStation::name, SiStripDetCabling_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by book().

238 {
239  std::string name = "layer";
240  std::string hname;
241  SiStripHistoId hidmanager;
242 
243  LayerMEs theLayerMEs;
244  theLayerMEs.ClusterStoNCorrOnTrack = 0;
245  theLayerMEs.ClusterChargeCorrOnTrack = 0;
246  theLayerMEs.ClusterChargeOnTrack = 0;
247  theLayerMEs.ClusterChargeOffTrack = 0;
248  theLayerMEs.ClusterNoiseOnTrack = 0;
249  theLayerMEs.ClusterNoiseOffTrack = 0;
250  theLayerMEs.ClusterWidthOnTrack = 0;
251  theLayerMEs.ClusterWidthOffTrack = 0;
252  theLayerMEs.ClusterPosOnTrack = 0;
253  theLayerMEs.ClusterPosOffTrack = 0;
254 
255  // Cluster StoN Corrected
256  hname = hidmanager.createHistoLayer("Summary_ClusterStoNCorr",name,layer_id,"OnTrack");
257  theLayerMEs.ClusterStoNCorrOnTrack = bookME1D("TH1ClusterStoNCorr", hname.c_str());
258 
259  // Cluster Charge Corrected
260  hname = hidmanager.createHistoLayer("Summary_ClusterChargeCorr",name,layer_id,"OnTrack");
261  theLayerMEs.ClusterChargeCorrOnTrack = bookME1D("TH1ClusterChargeCorr", hname.c_str());
262 
263  // Cluster Charge (On and Off Track)
264  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,layer_id,"OnTrack");
265  theLayerMEs.ClusterChargeOnTrack = bookME1D("TH1ClusterCharge", hname.c_str());
266 
267  hname = hidmanager.createHistoLayer("Summary_ClusterCharge",name,layer_id,"OffTrack");
268  theLayerMEs.ClusterChargeOffTrack = bookME1D("TH1ClusterCharge", hname.c_str());
269 
270  // Cluster Noise (On and Off Track)
271  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,layer_id,"OnTrack");
272  theLayerMEs.ClusterNoiseOnTrack = bookME1D("TH1ClusterNoise", hname.c_str());
273 
274  hname = hidmanager.createHistoLayer("Summary_ClusterNoise",name,layer_id,"OffTrack");
275  theLayerMEs.ClusterNoiseOffTrack = bookME1D("TH1ClusterNoise", hname.c_str());
276 
277  // Cluster Width (On and Off Track)
278  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,layer_id,"OnTrack");
279  theLayerMEs.ClusterWidthOnTrack = bookME1D("TH1ClusterWidth", hname.c_str());
280 
281  hname = hidmanager.createHistoLayer("Summary_ClusterWidth",name,layer_id,"OffTrack");
282  theLayerMEs.ClusterWidthOffTrack = bookME1D("TH1ClusterWidth", hname.c_str());
283 
284  //Cluster Position
285  short total_nr_strips = SiStripDetCabling_->nApvPairs(mod_id) * 2 * 128;
286  if (layer_id.find("TEC") != std::string::npos && !flag_ring) total_nr_strips = 3 * 2 * 128;
287 
288  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,layer_id,"OnTrack");
289  theLayerMEs.ClusterPosOnTrack = dbe->book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
290 
291  hname = hidmanager.createHistoLayer("Summary_ClusterPosition",name,layer_id,"OffTrack");
292  theLayerMEs.ClusterPosOffTrack = dbe->book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
293 
294  //bookeeping
295  LayerMEsMap[layer_id]=theLayerMEs;
296 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
MonitorElement * bookME1D(const char *, const char *)
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * SiStripMonitorTrack::bookME1D ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 351 of file SiStripMonitorTrack.cc.

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

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

352 {
353  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
354  // std::cout << "[SiStripMonitorTrack::bookME1D] pwd: " << dbe->pwd() << std::endl;
355  // std::cout << "[SiStripMonitorTrack::bookME1D] HistoName: " << HistoName << std::endl;
356  return dbe->book1D(HistoName,HistoName,
357  Parameters.getParameter<int32_t>("Nbinx"),
358  Parameters.getParameter<double>("xmin"),
359  Parameters.getParameter<double>("xmax")
360  );
361 }
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookME2D ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 364 of file SiStripMonitorTrack.cc.

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

365 {
366  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
367  return dbe->book2D(HistoName,HistoName,
368  Parameters.getParameter<int32_t>("Nbinx"),
369  Parameters.getParameter<double>("xmin"),
370  Parameters.getParameter<double>("xmax"),
371  Parameters.getParameter<int32_t>("Nbiny"),
372  Parameters.getParameter<double>("ymin"),
373  Parameters.getParameter<double>("ymax")
374  );
375 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
MonitorElement * SiStripMonitorTrack::bookME3D ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 378 of file SiStripMonitorTrack.cc.

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

379 {
380  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
381  return dbe->book3D(HistoName,HistoName,
382  Parameters.getParameter<int32_t>("Nbinx"),
383  Parameters.getParameter<double>("xmin"),
384  Parameters.getParameter<double>("xmax"),
385  Parameters.getParameter<int32_t>("Nbiny"),
386  Parameters.getParameter<double>("ymin"),
387  Parameters.getParameter<double>("ymax"),
388  Parameters.getParameter<int32_t>("Nbinz"),
389  Parameters.getParameter<double>("zmin"),
390  Parameters.getParameter<double>("zmax")
391  );
392 }
T getParameter(std::string const &) const
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1134
edm::ParameterSet conf_
vector< ParameterSet > Parameters
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookMEProfile ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 395 of file SiStripMonitorTrack.cc.

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

Referenced by bookModMEs().

396 {
397  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
399  Parameters.getParameter<int32_t>("Nbinx"),
400  Parameters.getParameter<double>("xmin"),
401  Parameters.getParameter<double>("xmax"),
402  Parameters.getParameter<int32_t>("Nbiny"),
403  Parameters.getParameter<double>("ymin"),
404  Parameters.getParameter<double>("ymax"),
405  "" );
406 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1186
std::string HistoName
MonitorElement * SiStripMonitorTrack::bookMETrend ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 409 of file SiStripMonitorTrack.cc.

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

Referenced by bookSubDetMEs().

410 {
411  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
412  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
414  ParametersTrend.getParameter<int32_t>("Nbins"),
415  0,
416  ParametersTrend.getParameter<int32_t>("Nbins"),
417  100, //that parameter should not be there !?
418  Parameters.getParameter<double>("xmin"),
419  Parameters.getParameter<double>("xmax"),
420  "" );
421  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetBit(TH1::kCanRebin);
422 
423  if(!me) return me;
424  me->setAxisTitle("Event Time in Seconds",1);
425  return me;
426 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
vector< ParameterSet > Parameters
TH1 * getTH1(void) const
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1186
std::string HistoName
void SiStripMonitorTrack::bookModMEs ( const uint32_t &  id)
private

Definition at line 196 of file SiStripMonitorTrack.cc.

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

Referenced by book().

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

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

300  {
301 
303  subdet_tag = "__" + name;
304  std::string completeName;
305 
306  SubDetMEs theSubDetMEs;
307  theSubDetMEs.totNClustersOnTrack = 0;
308  theSubDetMEs.totNClustersOffTrack = 0;
309  theSubDetMEs.nClustersOnTrack = 0;
310  theSubDetMEs.nClustersTrendOnTrack = 0;
311  theSubDetMEs.nClustersOffTrack = 0;
312  theSubDetMEs.nClustersTrendOffTrack = 0;
313  theSubDetMEs.ClusterStoNCorrOnTrack = 0;
314  theSubDetMEs.ClusterChargeOffTrack = 0;
315  theSubDetMEs.ClusterStoNOffTrack = 0;
316 
317  // TotalNumber of Cluster OnTrack
318  completeName = "Summary_TotalNumberOfClusters_OnTrack" + subdet_tag;
319  theSubDetMEs.nClustersOnTrack = bookME1D("TH1nClustersOn", completeName.c_str());
320  theSubDetMEs.nClustersOnTrack->getTH1()->StatOverflows(kTRUE);
321 
322  // TotalNumber of Cluster OffTrack
323  completeName = "Summary_TotalNumberOfClusters_OffTrack" + subdet_tag;
324  theSubDetMEs.nClustersOffTrack = bookME1D("TH1nClustersOff", completeName.c_str());
325  theSubDetMEs.nClustersOffTrack->getTH1()->StatOverflows(kTRUE);
326 
327  // Cluster StoN On Track
328  completeName = "Summary_ClusterStoNCorr_OnTrack" + subdet_tag;
329  theSubDetMEs.ClusterStoNCorrOnTrack = bookME1D("TH1ClusterStoNCorr", completeName.c_str());
330 
331  // Cluster Charge Off Track
332  completeName = "Summary_ClusterCharge_OffTrack" + subdet_tag;
333  theSubDetMEs.ClusterChargeOffTrack=bookME1D("TH1ClusterCharge", completeName.c_str());
334 
335  // Cluster Charge StoN Off Track
336  completeName = "Summary_ClusterStoN_OffTrack" + subdet_tag;
337  theSubDetMEs.ClusterStoNOffTrack = bookME1D("TH1ClusterStoN", completeName.c_str());
338 
339  if(Trend_On_){
340  // TotalNumber of Cluster
341  completeName = "Trend_TotalNumberOfClusters_OnTrack" + subdet_tag;
342  theSubDetMEs.nClustersTrendOnTrack = bookMETrend("TH1nClustersOn", completeName.c_str());
343  completeName = "Trend_TotalNumberOfClusters_OffTrack" + subdet_tag;
344  theSubDetMEs.nClustersTrendOffTrack = bookMETrend("TH1nClustersOff", completeName.c_str());
345  }
346  //bookeeping
347  SubDetMEsMap[name]=theSubDetMEs;
348 }
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
TH1 * getTH1(void) const
MonitorElement * bookMETrend(const char *, const char *)
MonitorElement * bookME1D(const char *, const char *)
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:133
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:166
void SiStripMonitorTrack::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file SiStripMonitorTrack.cc.

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

87 {
88  if(conf_.getParameter<bool>("OutputMEsInRootFile")){
90  dbe->save(conf_.getParameter<std::string>("OutputFileName"));
91  }
92 }
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, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
void showDirStructure(void) const
Definition: DQMStore.cc:2961
void SiStripMonitorTrack::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 96 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

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

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

Definition at line 97 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

97 {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 98 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

98 {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 99 of file SiStripMonitorTrack.h.

References MonitorElement::Fill().

99 {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)
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
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)
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)
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
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
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 565 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().

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

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

Referenced by analyze().

507  {
508 
509  // trajectory input
510  edm::Handle<TrajTrackAssociationCollection> TItkAssociatorCollection;
511  // ev.getByLabel(TrackProducer_, TrackLabel_, TItkAssociatorCollection);
512  ev.getByToken(trackTrajToken_, TItkAssociatorCollection);
513  if( TItkAssociatorCollection.isValid()){
514  trackStudyFromTrajectory(TItkAssociatorCollection,es);
515  } else {
516  edm::LogError("SiStripMonitorTrack")<<"Association not found ... try w/ track collection"<<std::endl;
517 
518  // track input
519  edm::Handle<reco::TrackCollection > trackCollectionHandle;
520  // ev.getByLabel(TrackProducer_, TrackLabel_, trackCollectionHandle);//takes the track collection
521  ev.getByToken(trackToken_, trackCollectionHandle);//takes the track collection
522  if (!trackCollectionHandle.isValid()){
523  edm::LogError("SiStripMonitorTrack")<<"also Track Collection is not valid !! " << TrackLabel_<<std::endl;
524  return;
525  } else {
526  trackStudyFromTrack(trackCollectionHandle,es);
527  }
528  }
529 
530 }
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 532 of file SiStripMonitorTrack.cc.

Referenced by trackStudy().

532  {
533 
534  reco::TrackCollection trackCollection = *trackCollectionHandle;
535  for (reco::TrackCollection::const_iterator track = trackCollection.begin(); track!=trackCollection.end(); ++track) {
536  }
537 
538 }
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 540 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().

540  {
541  //Perform track study
542  int i=0;
543  for(TrajTrackAssociationCollection::const_iterator it = TItkAssociatorCollection->begin();it != TItkAssociatorCollection->end(); ++it){
544  const edm::Ref<std::vector<Trajectory> > traj_iterator = it->key;
545 
546  // Trajectory Map, extract Trajectory for this track
547  reco::TrackRef trackref = it->val;
548  LogDebug("SiStripMonitorTrack")
549  << "Track number "<< i+1
550  << "\n\tmomentum: " << trackref->momentum()
551  << "\n\tPT: " << trackref->pt()
552  << "\n\tvertex: " << trackref->vertex()
553  << "\n\timpact parameter: " << trackref->d0()
554  << "\n\tcharge: " << trackref->charge()
555  << "\n\tnormalizedChi2: " << trackref->normalizedChi2()
556  <<"\n\tFrom EXTRA : "
557  <<"\n\t\touter PT "<< trackref->outerPt()<<std::endl;
558  i++;
559 
560  trajectoryStudy(traj_iterator,trackref,es);
561 
562  }
563 }
#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 429 of file SiStripMonitorTrack.cc.

References TrackingRecHit::geographicalId(), TrajectoryStateOnSurface::localMomentum(), LogDebug, LogTrace, m, PV3DBase< T, PVType, FrameType >::mag(), GluedGeomDet::monoDet(), ProjectedSiStripRecHit2D::originalHit(), alignCSCRings::s, GluedGeomDet::stereoDet(), tkgeom, GeomDet::toGlobal(), GeomDet::toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by trackStudyFromTrajectory().

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

Member Data Documentation

bool SiStripMonitorTrack::applyClusterQuality_
private

Definition at line 182 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

edm::InputTag SiStripMonitorTrack::Cluster_src_
private

Definition at line 158 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

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

Definition at line 160 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and SiStripMonitorTrack().

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

Definition at line 188 of file SiStripMonitorTrack.h.

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

int SiStripMonitorTrack::eventNb
private

Definition at line 179 of file SiStripMonitorTrack.h.

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

int SiStripMonitorTrack::firstEvent
private

Definition at line 180 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::flag_ring
private

Definition at line 178 of file SiStripMonitorTrack.h.

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

SiStripFolderOrganizer SiStripMonitorTrack::folderOrganizer_
private

Definition at line 190 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and fillMEs().

GenericTriggerEventFlag* SiStripMonitorTrack::genTriggerEventFlag_
private

Definition at line 189 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::histname
private

Definition at line 107 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::HistoFlag_On_
private

Definition at line 167 of file SiStripMonitorTrack.h.

float SiStripMonitorTrack::iOrbitSec
private

Definition at line 109 of file SiStripMonitorTrack.h.

Referenced by analyze().

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

Definition at line 151 of file SiStripMonitorTrack.h.

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

LocalVector SiStripMonitorTrack::LV
private

Definition at line 108 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::Mod_On_
private

Definition at line 164 of file SiStripMonitorTrack.h.

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

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

Definition at line 150 of file SiStripMonitorTrack.h.

Referenced by bookModMEs(), and fillModMEs().

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

Definition at line 174 of file SiStripMonitorTrack.h.

Referenced by AllClusters(), and RecHitInfo().

bool SiStripMonitorTrack::OffHisto_On_
private

Definition at line 166 of file SiStripMonitorTrack.h.

edm::ParameterSet SiStripMonitorTrack::Parameters
private

Definition at line 157 of file SiStripMonitorTrack.h.

bool SiStripMonitorTrack::ring_flag
private

Definition at line 168 of file SiStripMonitorTrack.h.

int SiStripMonitorTrack::runNb
private

Definition at line 179 of file SiStripMonitorTrack.h.

Referenced by analyze().

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

Definition at line 155 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::sToNLowerLimit_
private

Definition at line 183 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::sToNUpperLimit_
private

Definition at line 184 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

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

Definition at line 152 of file SiStripMonitorTrack.h.

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

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

Definition at line 154 of file SiStripMonitorTrack.h.

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

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOffTrack
private

Definition at line 114 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap * SiStripMonitorTrack::tkhisto_NumOnTrack
private

Definition at line 114 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

TkHistoMap* SiStripMonitorTrack::tkhisto_StoNCorrOnTrack
private

Definition at line 114 of file SiStripMonitorTrack.h.

Referenced by book(), and clusterInfos().

bool SiStripMonitorTrack::TkHistoMap_On_
private

Definition at line 169 of file SiStripMonitorTrack.h.

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

std::string SiStripMonitorTrack::topFolderName_
private

Definition at line 111 of file SiStripMonitorTrack.h.

Referenced by book(), and SiStripMonitorTrack().

bool SiStripMonitorTrack::trackAssociatorCollection_in_EventTree
private

Definition at line 177 of file SiStripMonitorTrack.h.

std::string SiStripMonitorTrack::TrackLabel_
private

Definition at line 172 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

std::string SiStripMonitorTrack::TrackProducer_
private

Definition at line 171 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack().

bool SiStripMonitorTrack::tracksCollection_in_EventTree
private

Definition at line 176 of file SiStripMonitorTrack.h.

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

Definition at line 161 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

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

Definition at line 162 of file SiStripMonitorTrack.h.

Referenced by SiStripMonitorTrack(), and trackStudy().

bool SiStripMonitorTrack::Trend_On_
private

Definition at line 165 of file SiStripMonitorTrack.h.

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

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

Definition at line 175 of file SiStripMonitorTrack.h.

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

double SiStripMonitorTrack::widthLowerLimit_
private

Definition at line 185 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().

double SiStripMonitorTrack::widthUpperLimit_
private

Definition at line 186 of file SiStripMonitorTrack.h.

Referenced by clusterInfos(), and SiStripMonitorTrack().