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
OnDemandMeasurementTracker Class Reference

#include <OnDemandMeasurementTracker.h>

Inheritance diagram for OnDemandMeasurementTracker:
MeasurementTrackerImpl MeasurementTracker MeasurementDetSystem

Classes

class  DetODStatus
 

Public Types

typedef edm::LazyGetter
< SiStripCluster
LazyGetter
 
typedef edm::RefGetter
< SiStripCluster
RefGetter
 
- Public Types inherited from MeasurementTrackerImpl
typedef std::unordered_map
< unsigned int, MeasurementDet * > 
DetContainer
 
enum  QualityFlags {
  BadModules =1, BadAPVFibers =2, BadStrips =4, MaskBad128StripBlocks =8,
  BadROCs =2
}
 
- Public Types inherited from MeasurementTracker
enum  QualityFlags {
  BadModules =1, BadAPVFibers =2, BadStrips =4, MaskBad128StripBlocks =8,
  BadROCs =2
}
 

Public Member Functions

void define (const edm::Handle< edm::LazyGetter< SiStripCluster > > &, RefGetter &, StMeasurementDetSet &) const
 OnDemandMeasurementTracker specific function to be called to define the region in the RefGetter according to MeasurementDet content. More...
 
const MeasurementDetidToDetBare (const DetId &id, const MeasurementTrackerEvent &data) const
 MeasurementTrackerImpl interface. More...
 
 OnDemandMeasurementTracker (const edm::ParameterSet &conf, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, const TrackerGeometry *trackerGeom, const GeometricSearchTracker *geometricSearchTracker, const SiStripQuality *stripQuality, int stripQualityFlags, int stripQualityDebugFlags, const SiPixelQuality *pixelQuality, const SiPixelFedCabling *pixelCabling, int pixelQualityFlags, int pixelQualityDebugFlags, const SiStripRegionCabling *stripRegionCabling, bool isRegional=false)
 constructor More...
 
virtual ~OnDemandMeasurementTracker ()
 destructor More...
 
- Public Member Functions inherited from MeasurementTrackerImpl
const DetContainerallDets () const
 For debug only. More...
 
const MeasurementDetfindDet (const DetId &id) const
 
const GeometricSearchTrackergeometricSearchTracker () const
 
const TrackingGeometrygeomTracker () const
 
const std::vector
< TkGluedMeasurementDet > & 
gluedDets () const
 
virtual MeasurementDetWithData idToDet (const DetId &id, const MeasurementTrackerEvent &data) const
 MeasurementDetSystem interface (won't be overloaded anymore) More...
 
 MeasurementTrackerImpl (const edm::ParameterSet &conf, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, const TrackerGeometry *trackerGeom, const GeometricSearchTracker *geometricSearchTracker, const SiStripQuality *stripQuality, int stripQualityFlags, int stripQualityDebugFlags, const SiPixelQuality *pixelQuality, const SiPixelFedCabling *pixelCabling, int pixelQualityFlags, int pixelQualityDebugFlags, bool isRegional=false)
 
virtual const
PxMeasurementConditionSet
pixelDetConditions () const
 
const std::vector
< TkPixelMeasurementDet > & 
pixelDets () const
 
virtual const
StMeasurementConditionSet
stripDetConditions () const
 Provide templates to be filled in. More...
 
const std::vector
< TkStripMeasurementDet > & 
stripDets () const
 
virtual ~MeasurementTrackerImpl ()
 
- Public Member Functions inherited from MeasurementTracker
const GeometricSearchTrackergeometricSearchTracker () const
 
const TrackingGeometrygeomTracker () const
 
 MeasurementTracker (TrackerGeometry const *trackerGeom, GeometricSearchTracker const *geometricSearchTracker)
 
virtual ~MeasurementTracker ()
 

Private Types

typedef std::unordered_map
< unsigned int, DetODStatus
DetODContainer
 
typedef std::vector< std::pair
< SiStripRegionCabling::ElementIndex,
std::vector
< DetODContainer::const_iterator > > > 
RegionalMap
 mapping of elementIndex -> iterator to the DetODMap: to know what are the regions that needs to be defined in the ref getter More...
 

Private Member Functions

void assign (const TkStripMeasurementDet *csmdet, const MeasurementTrackerEvent &data) const
 assigne the cluster iterator to the TkStipMeasurementDet (const_cast in the way) More...
 
std::string dumpCluster (const std::vector< SiStripCluster >::const_iterator &begin, const std::vector< SiStripCluster >::const_iterator &end) const
 some printouts, exclusively under LogDebug More...
 
std::string dumpRegion (std::pair< unsigned int, unsigned int > indexes, const RefGetter &theGetter, bool stayUnpacked=false) const
 

Private Attributes

std::string category_
 log category More...
 
bool PixelOnDemand_
 internal flag to do pixel on demand (not configurable) false by default More...
 
RegionalMap region_mapping
 
bool StayPacked_
 internal flag to avoid unpacking things with LogDebug on More...
 
bool StripOnDemand_
 internal flag to do strip on demand (not configurable) true by default More...
 
DetODContainer theDetODMap
 mapping of detid -> MeasurementDet+flags+region_range More...
 
const SiStripRegionCablingtheStripRegionCabling
 the cabling region tool to update a RefGetter More...
 

Additional Inherited Members

- Protected Member Functions inherited from MeasurementTrackerImpl
void addGluedDet (const GluedGeomDet *gd)
 
void addPixelDet (const GeomDet *gd)
 
void addPixelDets (const TrackingGeometry::DetContainer &dets)
 
void addStripDet (const GeomDet *gd)
 
void addStripDets (const TrackingGeometry::DetContainer &dets)
 
void initGluedDet (TkGluedMeasurementDet &det)
 
void initialize ()
 
void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
 
void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
 
void initPxMeasurementConditionSet (std::vector< TkPixelMeasurementDet > &pixelDets)
 
void initStMeasurementConditionSet (std::vector< TkStripMeasurementDet > &stripDets)
 
- Protected Attributes inherited from MeasurementTrackerImpl
const std::string name_
 
const edm::ParameterSetpset_
 
DetContainer theDetMap
 
std::vector
< TkGluedMeasurementDet > 
theGluedDets
 
const SiPixelFedCablingthePixelCabling
 
std::vector
< TkPixelMeasurementDet
thePixelDets
 
PxMeasurementConditionSet thePxDetConditions
 
StMeasurementConditionSet theStDetConditions
 
std::vector
< TkStripMeasurementDet > 
theStripDets
 
- Protected Attributes inherited from MeasurementTracker
const GeometricSearchTrackertheGeometricSearchTracker
 
const TrackerGeometrytheTrackerGeom
 

Detailed Description

Definition at line 13 of file OnDemandMeasurementTracker.h.

Member Typedef Documentation

typedef std::unordered_map<unsigned int, DetODStatus> OnDemandMeasurementTracker::DetODContainer
private

Definition at line 66 of file OnDemandMeasurementTracker.h.

Definition at line 34 of file OnDemandMeasurementTracker.h.

Definition at line 35 of file OnDemandMeasurementTracker.h.

typedef std::vector<std::pair<SiStripRegionCabling::ElementIndex, std::vector<DetODContainer::const_iterator> > > OnDemandMeasurementTracker::RegionalMap
private

mapping of elementIndex -> iterator to the DetODMap: to know what are the regions that needs to be defined in the ref getter

Definition at line 72 of file OnDemandMeasurementTracker.h.

Constructor & Destructor Documentation

OnDemandMeasurementTracker::OnDemandMeasurementTracker ( const edm::ParameterSet conf,
const PixelClusterParameterEstimator pixelCPE,
const StripClusterParameterEstimator stripCPE,
const SiStripRecHitMatcher hitMatcher,
const TrackerGeometry trackerGeom,
const GeometricSearchTracker geometricSearchTracker,
const SiStripQuality stripQuality,
int  stripQualityFlags,
int  stripQualityDebugFlags,
const SiPixelQuality pixelQuality,
const SiPixelFedCabling pixelCabling,
int  pixelQualityFlags,
int  pixelQualityDebugFlags,
const SiStripRegionCabling stripRegionCabling,
bool  isRegional = false 
)

constructor

Definition at line 51 of file OnDemandMeasurementTracker.cc.

References category_, SiStripRegionCabling::elementIndex(), PV3DBase< T, PVType, FrameType >::eta(), eta(), first, OnDemandMeasurementTracker::DetODStatus::Glued, SiStripRegionCabling::layerFromDetId(), LogDebug, phi, PV3DBase< T, PVType, FrameType >::phi(), OnDemandMeasurementTracker::DetODStatus::Pixel, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, SiStripRegionCabling::position(), SiStripRegionCabling::positionIndex(), SiStripRegionCabling::region(), region_mapping, edm::second(), OnDemandMeasurementTracker::DetODStatus::Strip, SiStripRegionCabling::subdetFromDetId(), GeomDetEnumerators::TEC, MeasurementTrackerImpl::theDetMap, theDetODMap, theStripRegionCabling, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, and GeomDetEnumerators::TOB.

65  :
66  MeasurementTrackerImpl(conf,pixelCPE,stripCPE,hitMatcher,trackerGeom,geometricSearchTracker,
67  stripQuality,stripQualityFlags,stripQualityDebugFlags,
68  pixelQuality,pixelCabling,pixelQualityFlags,pixelQualityDebugFlags,
69  isRegional)
70  , category_("OnDemandMeasurementTracker")
71  , StayPacked_(true)
72  , StripOnDemand_(true)
73  , PixelOnDemand_(false)
74  , theStripRegionCabling(stripRegionCabling)
75 {
76  // the constructor does construct the regular MeasurementTracker
77  // then a smart copy of the DetMap is made into DetODMap: this could be avoided with modification to MeasurementDet interface
78  // the elementIndex to be defined in the refgetter is mapped to the detId
79  // flags are set to initialize the DetODMap
80 
81  std::map<SiStripRegionCabling::ElementIndex, std::vector< DetODContainer::const_iterator> > local_mapping;
82  for (DetContainer::iterator it=theDetMap.begin(); it!= theDetMap.end();++it)
83  {
84  DetODContainer::iterator inserted = theDetODMap.insert(make_pair(it->first,DetODStatus(it->second))).first;
85 
86 
87  GeomDet::SubDetector subdet = it->second->geomDet().subDetector();
89  inserted->second.index = -1;
90  inserted->second.kind = DetODStatus::Pixel;
91  }//pixel module
92  else if (subdet == GeomDetEnumerators::TIB || subdet == GeomDetEnumerators::TOB ||
93  subdet == GeomDetEnumerators::TID || subdet == GeomDetEnumerators::TEC )
94  {
95  //set flag to false
96  if (typeid(*it->second) == typeid(TkStripMeasurementDet)) {
97  const TkStripMeasurementDet & sdet = static_cast<const TkStripMeasurementDet &>(*it->second);
98  inserted->second.index = sdet.index();
99  inserted->second.kind = DetODStatus::Strip;
100  } else {
101  inserted->second.kind = DetODStatus::Glued;
102  }
103 
104  //what will be the element index in the refgetter
105  GlobalPoint center = it->second->geomDet().position();
106  double eta = center.eta();
107  double phi = center.phi();
108  uint32_t id = it->first;
112  LogDebug(category_)<<"region selected (from "<<id<<" center) is:\n"
113  <<"position: "<<center
115  <<"\n center position index: "<<theStripRegionCabling->positionIndex(SiStripRegionCabling::Position(eta,phi)).first<<
119  <<"\n eta: "<<eta
120  <<"\n phi: "<<phi
121  <<"\n subedet: "<<SiStripRegionCabling::subdetFromDetId(id)
122  <<" layer: "<<SiStripRegionCabling::layerFromDetId(id);
123 
124  // register those in a map
125  //to be able to know what are the detid in a given elementIndex
126  local_mapping[eIndex].push_back(inserted);
127  }//strip module
128  else{
129  //abort
130  edm::LogError(category_)<<"not a tracker geomdet in constructor: "<<it->first;
131  throw MeasurementDetException("OnDemandMeasurementTracker dealing with a non tracker GeomDet.");
132  }//abort
133  }//loop over DetMap
134  //move into a vector
135  region_mapping.reserve(local_mapping.size());
136  for( auto eIt= local_mapping.begin();
137  eIt!=local_mapping.end();++eIt)
138  region_mapping.push_back(std::make_pair((*eIt).first,(*eIt).second));
139 }
#define LogDebug(id)
static const ElementIndex elementIndex(const uint32_t region, const SubDet, const uint32_t layer)
bool PixelOnDemand_
internal flag to do pixel on demand (not configurable) false by default
const PositionIndex positionIndex(const uint32_t) const
const SiStripRegionCabling * theStripRegionCabling
the cabling region tool to update a RefGetter
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T eta() const
U second(std::pair< T, U > const &p)
MeasurementTrackerImpl(const edm::ParameterSet &conf, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, const TrackerGeometry *trackerGeom, const GeometricSearchTracker *geometricSearchTracker, const SiStripQuality *stripQuality, int stripQualityFlags, int stripQualityDebugFlags, const SiPixelQuality *pixelQuality, const SiPixelFedCabling *pixelCabling, int pixelQualityFlags, int pixelQualityDebugFlags, bool isRegional=false)
DetODContainer theDetODMap
mapping of detid -&gt; MeasurementDet+flags+region_range
static const SubDet subdetFromDetId(const uint32_t detid)
bool StayPacked_
internal flag to avoid unpacking things with LogDebug on
std::pair< double, double > Position
bool first
Definition: L1TdeRCT.cc:79
bool StripOnDemand_
internal flag to do strip on demand (not configurable) true by default
std::string category_
log category
const Position position(const uint32_t) const
static const uint32_t layerFromDetId(const uint32_t detid)
T eta() const
Definition: PV3DBase.h:76
const uint32_t region(const Position) const
Definition: DDAxes.h:10
virtual OnDemandMeasurementTracker::~OnDemandMeasurementTracker ( )
inlinevirtual

destructor

Definition at line 32 of file OnDemandMeasurementTracker.h.

32 {}

Member Function Documentation

void OnDemandMeasurementTracker::assign ( const TkStripMeasurementDet *  csmdet,
const MeasurementTrackerEvent data 
) const
private

assigne the cluster iterator to the TkStipMeasurementDet (const_cast in the way)

Definition at line 219 of file OnDemandMeasurementTracker.cc.

References category_, dumpCluster(), dumpRegion(), edm::RefGetter< T >::find(), LogDebug, DetId::rawId(), StMeasurementDetSet::rawInactiveStripDetIds(), StMeasurementDetSet::refGetter(), StMeasurementDetSet::regionRange(), StMeasurementDetSet::setUpdated(), and MeasurementTrackerEvent::stripData().

Referenced by idToDetBare().

220  {
221  // assign is using the handle to the refgetter and the region index range to update the MeasurementDet with their clusters
222 
225  StMeasurementDetSet & rwdata = const_cast<StMeasurementDetSet &>(data.stripData());
226 
227  DetId id = smdet->rawId();
228 
229  LogDebug(category_)<<"assigning: "<<id.rawId();
230 
231  rwdata.setUpdated(smdet->index());
232 
233  if (!data.stripData().rawInactiveStripDetIds().empty() && std::binary_search(data.stripData().rawInactiveStripDetIds().begin(), data.stripData().rawInactiveStripDetIds().end(), id)) {
234  smdet->setActiveThisEvent(rwdata, false);
235  return;
236  }
237 
238  //retrieve the region range index for this module
239  const std::pair<unsigned int,unsigned int> & indexes = data.stripData().regionRange(smdet->index());
240 
241  //this printout will trigger unpacking. no problem. it is done on the next regular line (find(id.rawId())
242  LogDebug(category_)<<"between index: "<<indexes.first<<" and: "<<indexes.second
243  <<"\nretrieved for module: "<<id.rawId()
244  <<"\n"<<dumpRegion(indexes,data.stripData().refGetter());
245 
246  //look for iterator range in the regions defined for that module
247  for (unsigned int iRegion = indexes.first; iRegion != indexes.second; ++iRegion){
248  RefGetter::record_pair range = data.stripData().refGetter()[iRegion].find(id.rawId());
249  if (range.first!=range.second){
250  // found something not empty
251  //update the measurementDet
252  smdet->update(rwdata, range.first, range.second);
253  LogDebug(category_)<<"Valid clusters for: "<<id.rawId()
254  <<"\nnumber of regions defined here: "<< indexes.second-indexes.first
255  <<"\n"<<dumpCluster(range.first,range.second);
256  /* since theStripsToSkip is a "static" pointer of the MT, no need to set it at all time.
257  if (selfUpdateSkipClusters_){
258  //assign skip clusters
259  smdet->setClusterToSkip(&theStripsToSkip);
260  }
261  */
262  //and you are done
263  return;}
264  }//loop over regions, between indexes
265 
266  //if reached. no cluster are found. set the TkStripMeasurementDet to be empty
267  smdet->setEmpty(rwdata);
268 
269 }
#define LogDebug(id)
std::pair< typename record_type::const_iterator, typename record_type::const_iterator > record_pair
Definition: RefGetter.h:27
std::string dumpCluster(const std::vector< SiStripCluster >::const_iterator &begin, const std::vector< SiStripCluster >::const_iterator &end) const
some printouts, exclusively under LogDebug
const StMeasurementDetSet & stripData() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const std::pair< unsigned int, unsigned int > & regionRange(int i) const
std::string category_
log category
std::vector< uint32_t > & rawInactiveStripDetIds()
Definition: DetId.h:18
bool find(uint32_t) const
Returns true if region already defined.
Definition: RefGetter.h:170
const edm::RefGetter< SiStripCluster > & refGetter() const
std::string dumpRegion(std::pair< unsigned int, unsigned int > indexes, const RefGetter &theGetter, bool stayUnpacked=false) const
void OnDemandMeasurementTracker::define ( const edm::Handle< edm::LazyGetter< SiStripCluster > > &  aLazyGetterH,
RefGetter aGetter,
StMeasurementDetSet stData 
) const

OnDemandMeasurementTracker specific function to be called to define the region in the RefGetter according to MeasurementDet content.

Definition at line 141 of file OnDemandMeasurementTracker.cc.

References category_, StMeasurementDetSet::defineStrip(), dumpRegion(), HTMLExport::elem(), OnDemandMeasurementTracker::DetODStatus::index, OnDemandMeasurementTracker::DetODStatus::kind, LogDebug, region_mapping, StMeasurementDetSet::resetOnDemandStrips(), edm::RefGetter< T >::size(), StayPacked_, OnDemandMeasurementTracker::DetODStatus::Strip, theStripRegionCabling, and SiStripRegionCabling::updateSiStripRefGetter().

Referenced by MeasurementTrackerSiStripRefGetterProducer::produce().

143 {
144  // define is supposed to be call by an EDProducer module, which wil put the RefGetter in the event
145  // so that reference can be made to it.
146  // the lazy getter is retrieved by the calling module and passed along with the event
147  // the map is cleared, except for pixel
148  // then the known elementIndex are defined to the RefGetter. no unpacking is done at this time
149  // the defined region range is registered in the DetODMap for further use.
150  stData.resetOnDemandStrips();
151 
152  //define all the elementindex in the refgetter
153  for(auto eIt= region_mapping.begin();
154  eIt!=region_mapping.end();++eIt){
155  std::pair<unsigned int, unsigned int> region_range;
156 
157  //before update of the refgetter
158  region_range.first = aGetter.size();
159  //update the refegetter with the elementindex
160  theStripRegionCabling->updateSiStripRefGetter<SiStripCluster> (aGetter, aLazyGetterH, eIt->first);
161  //after update of the refgetter
162  region_range.second = aGetter.size();
163 
164  LogDebug(category_)<<"between index: "<<region_range.first<<" "<<region_range.second
165  <<"\n"<<dumpRegion(region_range,aGetter,StayPacked_);
166 
167  //now assign to each measurement det for that element index
168  for (auto dIt=eIt->second.begin();
169  dIt!=eIt->second.end();++dIt){
170  const DetODStatus & elem = (*dIt)->second;
171  if (elem.kind == DetODStatus::Strip) {
172  stData.defineStrip(elem.index, region_range);
173  }
174  LogDebug(category_)<<"detId: "<<(*dIt)->first<<" in region range: "<<region_range.first<<" "<<region_range.second;
175  }//loop over MeasurementDet attached to that elementIndex
176  }//loop over know elementindex
177 }
#define LogDebug(id)
const SiStripRegionCabling * theStripRegionCabling
the cabling region tool to update a RefGetter
void defineStrip(int i, std::pair< unsigned int, unsigned int > range)
void updateSiStripRefGetter(edm::RefGetter< T > &refgetter, const edm::Handle< edm::LazyGetter< T > > &lazygetter, const ElementIndex) const
bool StayPacked_
internal flag to avoid unpacking things with LogDebug on
std::string category_
log category
std::string dumpRegion(std::pair< unsigned int, unsigned int > indexes, const RefGetter &theGetter, bool stayUnpacked=false) const
std::string OnDemandMeasurementTracker::dumpCluster ( const std::vector< SiStripCluster >::const_iterator &  begin,
const std::vector< SiStripCluster >::const_iterator &  end 
) const
private

some printouts, exclusively under LogDebug

Definition at line 181 of file OnDemandMeasurementTracker.cc.

References begin, end, i, AlCaHLTBitMon_QueryRunRegistry::string, and accesses::tab.

Referenced by assign(), and dumpRegion().

182 {
183  // dumpCluster is a printout of all the clusters between the iterator. returns a string
184  std::string tab=" ";
185  std::stringstream ss;
186  std::vector<SiStripCluster> ::const_iterator it = begin;
187  unsigned int i=0;
188  for (;it!=end;++it){
189  ss<<tab<<i++<<") center: "<<it->barycenter()<<",id: "<<it->geographicalId()<<" with: "<<it->amplitudes().size()<<" strips\n"<<tab<<tab<<"{";
190  for (unsigned int is=0;is!=it->amplitudes().size();++is){
191  ss<<it->amplitudes()[is]<<" ";
192  }ss<<"}\n";
193  }
194  return ss.str();
195 }
int i
Definition: DBlmapReader.cc:9
tuple tab
Definition: accesses.py:4
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
std::string OnDemandMeasurementTracker::dumpRegion ( std::pair< unsigned int, unsigned int >  indexes,
const RefGetter theGetter,
bool  stayUnpacked = false 
) const
private

Definition at line 197 of file OnDemandMeasurementTracker.cc.

References begin, dumpCluster(), end, SiStripRegionCabling::position(), SiStripRegionCabling::positionIndex(), SiStripRegionCabling::region(), and theStripRegionCabling.

Referenced by assign(), and define().

200 {
201  // dumpRegion is a printout of all the clusters in a region defined on the RefGetter. returns a string
202  std::stringstream ss;
203  ss<<"cluster between: "<<indexes.first<<" and: "<<indexes.second<<"\n";
204  for (unsigned int iRegion = indexes.first; iRegion != indexes.second; ++iRegion){
205  uint32_t reg = SiStripRegionCabling::region((theGetter)[iRegion].region());
208 
209  ss<<"Clusters for region:["<<iRegion<<"]"
210  <<"\n element index: "<<(theGetter)[iRegion].region()
211  <<"\n region absolute index: "<<reg
212  <<"\n region position index: "<<posI.first<<" "<<posI.second
213  <<"\n region position: "<<pos.first<<" "<<pos.second
214  <<"\n"<< (stayPacked? " hidden to avoid unpacking." : dumpCluster((theGetter)[iRegion].begin(),(theGetter)[iRegion].end()));
215  }
216  return ss.str();
217 }
const PositionIndex positionIndex(const uint32_t) const
const SiStripRegionCabling * theStripRegionCabling
the cabling region tool to update a RefGetter
std::string dumpCluster(const std::vector< SiStripCluster >::const_iterator &begin, const std::vector< SiStripCluster >::const_iterator &end) const
some printouts, exclusively under LogDebug
std::pair< double, double > Position
#define end
Definition: vmac.h:37
const Position position(const uint32_t) const
const uint32_t region(const Position) const
#define begin
Definition: vmac.h:30
std::pair< uint32_t, uint32_t > PositionIndex
const MeasurementDet * OnDemandMeasurementTracker::idToDetBare ( const DetId id,
const MeasurementTrackerEvent data 
) const
virtual

MeasurementTrackerImpl interface.

Reimplemented from MeasurementTrackerImpl.

Definition at line 274 of file OnDemandMeasurementTracker.cc.

References assign(), category_, data, OnDemandMeasurementTracker::DetODStatus::Glued, OnDemandMeasurementTracker::DetODStatus::Pixel, OnDemandMeasurementTracker::DetODStatus::Strip, MeasurementTrackerEvent::stripData(), StMeasurementDetSet::stripDefined(), StMeasurementDetSet::stripUpdated(), and theDetODMap.

275 {
276  // overloaded from MeasurementTracker
277  // find the detid. if not found throw exception
278  // if already updated: always for pixel or strip already queried. return it
279  DetODContainer::const_iterator it = theDetODMap.find(id);
280  if ( it != theDetODMap.end()) {
281  switch (it->second.kind) {
282  case DetODStatus::Pixel:
283  // nothing to do
284  break;
285  case DetODStatus::Strip: {
286  const TkStripMeasurementDet* theConcreteDet = static_cast<const TkStripMeasurementDet*>(it->second.mdet);
287  assert(data.stripData().stripDefined(theConcreteDet->index()));
288  if (!data.stripData().stripUpdated(theConcreteDet->index())) assign(theConcreteDet, data);
289  }
290  break;
291  case DetODStatus::Glued: {
292  const TkGluedMeasurementDet* theConcreteDet = static_cast<const TkGluedMeasurementDet*>(it->second.mdet);
293  int imono = theConcreteDet->monoDet()->index(), istereo = theConcreteDet->stereoDet()->index();
294  assert(data.stripData().stripDefined(imono) && data.stripData().stripDefined(istereo));
295  if (!data.stripData().stripUpdated(imono)) assign(theConcreteDet->monoDet(), data);
296  if (!data.stripData().stripUpdated(istereo)) assign(theConcreteDet->stereoDet(), data);
297  }
298  break;
299  }
300  return it->second.mdet;
301  }
302  else{
303  //throw excpetion
304  edm::LogError(category_)<<"failed to find the MeasurementDet for: "<<id.rawId();
305  throw MeasurementDetException("failed to find the MeasurementDet for: <see message logger>");
306  }
307  return 0;
308 }
void assign(const TkStripMeasurementDet *csmdet, const MeasurementTrackerEvent &data) const
assigne the cluster iterator to the TkStipMeasurementDet (const_cast in the way)
const StMeasurementDetSet & stripData() const
const bool stripUpdated(int i) const
DetODContainer theDetODMap
mapping of detid -&gt; MeasurementDet+flags+region_range
std::string category_
log category
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const bool stripDefined(int i) const

Member Data Documentation

std::string OnDemandMeasurementTracker::category_
private

log category

Definition at line 46 of file OnDemandMeasurementTracker.h.

Referenced by assign(), define(), idToDetBare(), and OnDemandMeasurementTracker().

bool OnDemandMeasurementTracker::PixelOnDemand_
private

internal flag to do pixel on demand (not configurable) false by default

Definition at line 52 of file OnDemandMeasurementTracker.h.

RegionalMap OnDemandMeasurementTracker::region_mapping
private

Definition at line 73 of file OnDemandMeasurementTracker.h.

Referenced by define(), and OnDemandMeasurementTracker().

bool OnDemandMeasurementTracker::StayPacked_
private

internal flag to avoid unpacking things with LogDebug on

Definition at line 48 of file OnDemandMeasurementTracker.h.

Referenced by define().

bool OnDemandMeasurementTracker::StripOnDemand_
private

internal flag to do strip on demand (not configurable) true by default

Definition at line 50 of file OnDemandMeasurementTracker.h.

DetODContainer OnDemandMeasurementTracker::theDetODMap
private

mapping of detid -> MeasurementDet+flags+region_range

Definition at line 68 of file OnDemandMeasurementTracker.h.

Referenced by idToDetBare(), and OnDemandMeasurementTracker().

const SiStripRegionCabling* OnDemandMeasurementTracker::theStripRegionCabling
private

the cabling region tool to update a RefGetter

Definition at line 55 of file OnDemandMeasurementTracker.h.

Referenced by define(), dumpRegion(), and OnDemandMeasurementTracker().