CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
TrackingMaterialAnalyser Class Reference

#include <TrackingMaterialAnalyser.h>

Inheritance diagram for TrackingMaterialAnalyser:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 TrackingMaterialAnalyser (const edm::ParameterSet &)
 
virtual ~TrackingMaterialAnalyser ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

enum  SplitMode { NEAREST_LAYER, INNER_LAYER, OUTER_LAYER, UNDEFINED }
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob (const edm::EventSetup &)
 
void endJob ()
 
int findLayer (const MaterialAccountingDetector &detector)
 
void save ()
 
void saveLayerPlots (const char *name)
 
void saveParameters (const char *name)
 
void saveXml (const char *name)
 
void split (MaterialAccountingTrack &track)
 

Private Attributes

edm::ESWatcher
< IdealGeometryRecord
m_geometryWatcher
 
std::vector< std::string > m_groupNames
 
std::vector
< MaterialAccountingGroup * > 
m_groups
 
edm::InputTag m_material
 
TrackingMaterialPlotterm_plotter
 
bool m_saveDetailedPlots
 
bool m_saveParameters
 
bool m_saveSummaryPlot
 
bool m_saveXml
 
bool m_skipAfterLastDetector
 
bool m_skipBeforeFirstDetector
 
SplitMode m_splitMode
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 18 of file TrackingMaterialAnalyser.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

TrackingMaterialAnalyser::TrackingMaterialAnalyser ( const edm::ParameterSet iPSet)

Definition at line 30 of file TrackingMaterialAnalyser.cc.

References edm::hlt::Exception, edm::ParameterSet::getParameter(), INNER_LAYER, edm::errors::LogicError, m_groupNames, m_material, m_plotter, m_saveDetailedPlots, m_saveParameters, m_saveSummaryPlot, m_saveXml, m_skipAfterLastDetector, m_skipBeforeFirstDetector, m_splitMode, NEAREST_LAYER, NULL, OUTER_LAYER, AlCaHLTBitMon_QueryRunRegistry::string, and UNDEFINED.

31 {
32  m_material = iPSet.getParameter<edm::InputTag>("MaterialAccounting");
33  m_groupNames = iPSet.getParameter<std::vector<std::string> >("Groups");
34  const std::string & splitmode = iPSet.getParameter<std::string>("SplitMode");
35  if (strcasecmp(splitmode.c_str(), "NearestLayer") == 0) {
37  } else if (strcasecmp(splitmode.c_str(), "InnerLayer") == 0) {
39  } else if (strcasecmp(splitmode.c_str(), "OuterLayer") == 0) {
41  } else {
43  throw edm::Exception(edm::errors::LogicError) << "Invalid SplitMode \"" << splitmode << "\". Acceptable values are \"NearestLayer\", \"InnerLayer\", \"OuterLayer\".";
44  }
45  m_skipAfterLastDetector = iPSet.getParameter<bool>("SkipAfterLastDetector");
46  m_skipBeforeFirstDetector = iPSet.getParameter<bool>("SkipBeforeFirstDetector");
47  m_saveSummaryPlot = iPSet.getParameter<bool>("SaveSummaryPlot");
48  m_saveDetailedPlots = iPSet.getParameter<bool>("SaveDetailedPlots");
49  m_saveParameters = iPSet.getParameter<bool>("SaveParameters");
50  m_saveXml = iPSet.getParameter<bool>("SaveXML");
51  if (m_saveSummaryPlot)
52  m_plotter = new TrackingMaterialPlotter( 300., 120., 10 ); // 10x10 points per cm2
53  else
54  m_plotter = NULL;
55 }
T getParameter(std::string const &) const
#define NULL
Definition: scimark2.h:8
std::vector< std::string > m_groupNames
TrackingMaterialPlotter * m_plotter
TrackingMaterialAnalyser::~TrackingMaterialAnalyser ( void  )
virtual

Definition at line 58 of file TrackingMaterialAnalyser.cc.

References m_plotter.

59 {
60  if (m_plotter)
61  delete m_plotter;
62 }
TrackingMaterialPlotter * m_plotter

Member Function Documentation

void TrackingMaterialAnalyser::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 144 of file TrackingMaterialAnalyser.cc.

References edm::ESWatcher< T >::check(), gather_cfg::cout, end, edm::EventSetup::get(), i, info, m_geometryWatcher, m_groupNames, m_groups, m_material, m_plotter, nullptr, TrackingMaterialPlotter::reset(), save(), split(), and lumiQTWidget::t.

145 {
146  if (m_geometryWatcher.check(setup)) {
148  setup.get<IdealGeometryRecord>().get( hDDD );
149 
150  if (m_groups.empty()) {
151  // initialise the layers for the first time
152  m_groups.resize( m_groupNames.size(), nullptr );
153  } else {
154  // the geometry has changed: save the current parameters/xml/plots and re-initialise the layers
155  save();
156  for (unsigned int i = 0; i < m_groups.size(); ++i)
157  delete m_groups[i];
158  if (m_plotter)
159  m_plotter->reset();
160  }
161 
162  for (unsigned int i = 0; i < m_groups.size(); ++i)
163  m_groups[i] = new MaterialAccountingGroup( m_groupNames[i], * hDDD);
164 
165  // INFO
166  std::cout << "TrackingMaterialAnalyser: List of the tracker groups: " << std::endl;
167  for (unsigned int i = 0; i < m_groups.size(); ++i)
168  std::cout << '\t' << m_groups[i]->info() << std::endl;
169  std::cout << std::endl;
170  }
171 
173  event.getByLabel(m_material, h_tracks);
174 
175  for (std::vector<MaterialAccountingTrack>::const_iterator t = h_tracks->begin(), end = h_tracks->end(); t != end; ++t) {
176  MaterialAccountingTrack track(*t);
177  split( track );
178  }
179 }
int i
Definition: DBlmapReader.cc:9
edm::ESWatcher< IdealGeometryRecord > m_geometryWatcher
#define nullptr
void split(MaterialAccountingTrack &track)
#define end
Definition: vmac.h:38
std::vector< std::string > m_groupNames
TrackingMaterialPlotter * m_plotter
std::vector< MaterialAccountingGroup * > m_groups
const T & get() const
Definition: EventSetup.h:55
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:59
tuple cout
Definition: gather_cfg.py:121
void TrackingMaterialAnalyser::beginJob ( const edm::EventSetup )
private
void TrackingMaterialAnalyser::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file TrackingMaterialAnalyser.cc.

References save().

139 {
140  save();
141 }
int TrackingMaterialAnalyser::findLayer ( const MaterialAccountingDetector detector)
private

Definition at line 364 of file TrackingMaterialAnalyser.cc.

References dtNoiseDBValidation_cfg::cerr, i, getHLTprescales::index, m_groups, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), MaterialAccountingDetector::position(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by split().

365 {
366  int index = 0;
367  size_t inside = 0;
368  for (size_t i = 0; i < m_groups.size(); ++i)
369  if (m_groups[i]->inside(detector)) {
370  ++inside;
371  index = i+1;
372  }
373  if (inside == 0) {
374  index = 0;
375  std::cerr << "TrackingMaterialAnalyser::findLayer(...): ERROR: detector does not belong to any DetLayer" << std::endl;
376  std::cerr << "TrackingMaterialAnalyser::findLayer(...): detector position: " << std::fixed
377  << " (r: " << std::setprecision(1) << std::setw(5) << detector.position().perp()
378  << ", z: " << std::setprecision(1) << std::setw(6) << detector.position().z()
379  << ", phi: " << std::setprecision(3) << std::setw(6) << detector.position().phi() << ")"
380  << std::endl;
381  }
382  if (inside > 1) {
383  index = 0;
384  std::cerr << "TrackingMaterialAnalyser::findLayer(...): ERROR: detector belongs to " << inside << "DetLayers" << std::endl;
385  std::cerr << "TrackingMaterialAnalyser::findLayer(...): detector position: " << std::fixed
386  << " (r: " << std::setprecision(1) << std::setw(5) << detector.position().perp()
387  << ", z: " << std::setprecision(1) << std::setw(6) << detector.position().z()
388  << ", phi: " << std::setprecision(3) << std::setw(6) << detector.position().phi() << ")"
389  << std::endl;
390  }
391 
392  return index;
393 }
int i
Definition: DBlmapReader.cc:9
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T z() const
Definition: PV3DBase.h:64
std::vector< MaterialAccountingGroup * > m_groups
const GlobalPoint & position() const
void TrackingMaterialAnalyser::save ( )
private

Definition at line 120 of file TrackingMaterialAnalyser.cc.

References m_plotter, m_saveDetailedPlots, m_saveParameters, m_saveSummaryPlot, m_saveXml, saveLayerPlots(), saveParameters(), and saveXml().

Referenced by analyze(), and endJob().

121 {
122  if (m_saveParameters)
123  saveParameters("parameters");
124 
125  if (m_saveXml)
126  saveXml("parameters.xml");
127 
129  saveLayerPlots("layers");
130 
131  if (m_saveSummaryPlot and m_plotter) {
132  m_plotter->normalize();
133  m_plotter->draw();
134  }
135 }
void saveXml(const char *name)
void saveParameters(const char *name)
void saveLayerPlots(const char *name)
TrackingMaterialPlotter * m_plotter
void TrackingMaterialAnalyser::saveLayerPlots ( const char *  name)
private

Definition at line 107 of file TrackingMaterialAnalyser.cc.

References i, m_groups, and MaterialAccountingGroup::savePlots().

Referenced by save().

108 {
109  if (boost::filesystem::is_directory(name))
110  boost::filesystem::remove_all(name);
111  boost::filesystem::create_directory(name);
112  for (unsigned int i = 0; i < m_groups.size(); ++i) {
113  MaterialAccountingGroup & layer = *(m_groups[i]);
114  layer.savePlots(name);
115  }
116 }
int i
Definition: DBlmapReader.cc:9
void savePlots(const char *directory)
save the plots
std::vector< MaterialAccountingGroup * > m_groups
void TrackingMaterialAnalyser::saveParameters ( const char *  name)
private

Definition at line 65 of file TrackingMaterialAnalyser.cc.

References MaterialAccountingGroup::averageEnergyLoss(), MaterialAccountingGroup::averageLength(), MaterialAccountingGroup::averageRadiationLengths(), gather_cfg::cout, diffTreeTool::format(), i, m_groups, MaterialAccountingGroup::name(), Parameters::parameters, MaterialAccountingGroup::sigmaEnergyLoss(), MaterialAccountingGroup::sigmaLength(), MaterialAccountingGroup::sigmaRadiationLengths(), and MaterialAccountingGroup::tracks().

Referenced by save().

66 {
67  std::ofstream parameters(name);
68  std::cout << std::endl;
69  for (unsigned int i = 0; i < m_groups.size(); ++i) {
70  MaterialAccountingGroup & layer = *(m_groups[i]);
71  std::cout << layer.name() << std::endl;
72  std::cout << boost::format("\tnumber of hits: %9d") % layer.tracks() << std::endl;
73  std::cout << boost::format("\tnormalized segment length: %9.1f ± %9.1f cm") % layer.averageLength() % layer.sigmaLength() << std::endl;
74  std::cout << boost::format("\tnormalized radiation lengths: %9.3f ± %9.3f") % layer.averageRadiationLengths() % layer.sigmaRadiationLengths() << std::endl;
75  std::cout << boost::format("\tnormalized energy loss: %9.3f ± %9.3f MeV") % layer.averageEnergyLoss() % layer.sigmaEnergyLoss() << std::endl;
76  parameters << boost::format("%-20s\t%7d\t%5.1f ± %5.1f cm\t%6.4f ± %6.4f \t%6.4fe-03 ± %6.4fe-03 GeV")
77  % layer.name()
78  % layer.tracks()
79  % layer.averageLength() % layer.sigmaLength()
81  % layer.averageEnergyLoss() % layer.sigmaEnergyLoss()
82  << std::endl;
83  }
84  std::cout << std::endl;
85 
86  parameters.close();
87 }
int i
Definition: DBlmapReader.cc:9
dictionary parameters
Definition: Parameters.py:2
double averageRadiationLengths(void) const
return the average normalized number of radiation lengths
double sigmaLength(void) const
return the sigma of the normalized layer thickness
double sigmaRadiationLengths(void) const
return the sigma of the normalized number of radiation lengths
double sigmaEnergyLoss(void) const
return the sigma of the normalized energy loss density factor for Bethe-Bloch
unsigned int tracks(void) const
return the number of tracks that hit this layer
double averageLength(void) const
return the average normalized layer thickness
double averageEnergyLoss(void) const
return the average normalized energy loss density factor for Bethe-Bloch
const std::string & name(void) const
get the layer name
std::vector< MaterialAccountingGroup * > m_groups
tuple cout
Definition: gather_cfg.py:121
void TrackingMaterialAnalyser::saveXml ( const char *  name)
private

Definition at line 90 of file TrackingMaterialAnalyser.cc.

References MaterialAccountingGroup::averageEnergyLoss(), MaterialAccountingGroup::averageRadiationLengths(), i, m_groups, and MaterialAccountingGroup::name().

Referenced by save().

91 {
92  std::ofstream xml(name);
93  xml << "<?xml version=\"1.0\" encoding=\"utf-8\"?>" << std::endl;
94  xml << "<Groups>" << std::endl;
95  for (unsigned int i = 0; i < m_groups.size(); ++i) {
96  MaterialAccountingGroup & layer = *(m_groups[i]);
97  xml << " <Group name=\"" << layer.name() << "\">\n"
98  << " <Parameter name=\"TrackerRadLength\" value=\"" << layer.averageRadiationLengths() << "\"/>\n"
99  << " <Parameter name=\"TrackerXi\" value=\"" << layer.averageEnergyLoss() << "\"/>\n"
100  << " </Group>\n"
101  << std::endl;
102  }
103  xml << "</Groups>" << std::endl;
104 }
int i
Definition: DBlmapReader.cc:9
double averageRadiationLengths(void) const
return the average normalized number of radiation lengths
double averageEnergyLoss(void) const
return the average normalized energy loss density factor for Bethe-Bloch
const std::string & name(void) const
get the layer name
std::vector< MaterialAccountingGroup * > m_groups
void TrackingMaterialAnalyser::split ( MaterialAccountingTrack track)
private

Definition at line 188 of file TrackingMaterialAnalyser.cc.

References begin, dtNoiseDBValidation_cfg::cerr, MuonGeometrySanityCheck_cfi::detectors(), end, findLayer(), i, getHLTprescales::index, INNER_LAYER, MaterialAccountingStep::length(), edm::errors::LogicError, MaterialAccountingTrack::m_detectors, m_groups, m_plotter, m_skipAfterLastDetector, m_skipBeforeFirstDetector, m_splitMode, MaterialAccountingTrack::m_steps, MaterialAccountingTrack::m_total, NEAREST_LAYER, or, OUTER_LAYER, CfgNavigationSchool_cfi::parts, TrackingMaterialPlotter::plotSegmentInLayer(), TrackingMaterialPlotter::plotSegmentUnassigned(), MaterialAccountingStep::split(), relval_parameters_module::step, and UNDEFINED.

Referenced by analyze().

189 {
190  // group sensitive detectors by their DetLayer
191  std::vector<int> group( track.m_detectors.size() );
192  for (unsigned int i = 0; i < track.m_detectors.size(); ++i)
193  group[i] = findLayer( track.m_detectors[i] );
194 
195  unsigned int detectors = track.m_detectors.size();
196  if (detectors == 0) {
197  // the track doesn't cross any active detector:
198  // keep al material as unassigned
199  if (m_plotter)
200  for (unsigned int i = 1; i < track.m_steps.size(); ++i)
202  } else {
203  const double TOLERANCE = 0.0001; // 1 um tolerance
204  std::vector<double> limits(detectors + 2);
205 
206  // define the trivial limits
208  limits[0] = track.m_detectors[0].m_curvilinearIn - TOLERANCE;
209  else
210  limits[0] = - TOLERANCE;
212  limits[detectors] = track.m_detectors[detectors-1].m_curvilinearOut + TOLERANCE;
213  else
214  limits[detectors] = track.m_total.length() + TOLERANCE;
215  limits[detectors+1] = INFINITY; // this is probably no more needed, but doesn't harm...
216 
217  // pick the algorithm to define the non-trivial limits
218  switch (m_splitMode) {
219  // assign each segment to the the nearest layer
220  // e.g. the material between pixel barrel 3 and TIB 1 will be split among the two
221  case NEAREST_LAYER:
222  for (unsigned int i = 1; i < detectors; ++i)
223  limits[i] = (track.m_detectors[i-1].m_curvilinearOut + track.m_detectors[i].m_curvilinearIn) / 2.;
224  break;
225 
226  // assign each segment to the the inner layer
227  // e.g. all material between pixel barrel 3 and TIB 1 will go into the pixel barrel
228  case INNER_LAYER:
229  for (unsigned int i = 1; i < detectors; ++i)
230  limits[i] = track.m_detectors[i].m_curvilinearIn - TOLERANCE;
231  break;
232 
233  // assign each segment to the the outer layer
234  // e.g. all material between pixel barrel 3 and TIB 1 will go into the TIB
235  case OUTER_LAYER:
236  for (unsigned int i = 1; i < detectors; ++i)
237  limits[i] = track.m_detectors[i-1].m_curvilinearOut + TOLERANCE;
238  break;
239 
240  case UNDEFINED:
241  default:
242  // throw something
243  throw edm::Exception(edm::errors::LogicError) << "Invalid SplitMode";
244  }
245 
246  //for (unsigned int i = 0; i < detectors; ++i)
247  // std::cout << "MaterialAccountingTrack::split(): detector region boundaries: [" << limits[i] << ", " << limits[i+1] << "] along track" << std::endl;
248 
249  double begin = 0.; // begginning of step, along the track
250  double end = 0.; // end of step, along the track
251  unsigned int i = 1; // step conter
252 
253  // skip the material before the first layer
254  //std::cout << "before first layer, skipping" << std::endl;
255  while (end < limits[0]) {
256  const MaterialAccountingStep & step = track.m_steps[i++];
257  end = begin + step.length();
258 
259  // do not account material before the first layer
260  if (m_plotter)
262 
263  begin = end;
264  //std::cout << '.';
265  }
266  //std::cout << std::endl;
267 
268  // optionally split a step across the first layer boundary
269  //std::cout << "first layer (0): " << limits[0] << ".." << limits[1] << std::endl;
270  if (begin < limits[0] and end > limits[0]) {
271  const MaterialAccountingStep & step = track.m_steps[i++];
272  end = begin + step.length();
273 
274  double fraction = (limits[0] - begin) / (end - begin);
275  std::pair<MaterialAccountingStep, MaterialAccountingStep> parts = step.split(fraction);
276 
277  //std::cout << '!' << std::endl;
278  track.m_detectors[0].account( parts.second, limits[1], end );
279 
280  if (m_plotter) {
281  // step partially before first layer, keep first part as unassocated
282  m_plotter->plotSegmentUnassigned( parts.first );
283 
284  // associate second part to first layer
285  m_plotter->plotSegmentInLayer( parts.second, group[0] );
286  }
287  begin = end;
288  }
289 
290  unsigned int index = 0; // which detector
291  while (i < track.m_steps.size()) {
292  const MaterialAccountingStep & step = track.m_steps[i++];
293 
294  end = begin + step.length();
295 
296  if (begin > limits[detectors]) {
297  // segment after last layer and skipping requested in configuation
298  if (m_plotter)
300  begin = end;
301  continue;
302  }
303 
304  // from here onwards we should be in the accountable region, either completely in a single layer:
305  // limits[index] <= begin < end <= limits[index+1]
306  // or possibly split between 2 layers
307  // limits[index] < begin < limits[index+1] < end < limits[index+2]
308  if (begin < limits[index] or end > limits[index+2]) {
309  // sanity check
310  std::cerr << "MaterialAccountingTrack::split(): ERROR: internal logic error, expected " << limits[index] << " < " << begin << " < " << limits[index+1] << std::endl;
311  break;
312  }
313 
314  //std::cout << '.';
315  if (limits[index] <= begin and end <= limits[index+1]) {
316  // step completely inside current detector range
317  track.m_detectors[index].account( step, begin, end );
318  if (m_plotter)
319  m_plotter->plotSegmentInLayer( step, group[index] );
320  } else {
321  // step shared beteewn two detectors, transition at limits[index+1]
322  double fraction = (limits[index+1] - begin) / (end - begin);
323  std::pair<MaterialAccountingStep, MaterialAccountingStep> parts = step.split(fraction);
324 
325  if (m_plotter) {
326  if (index > 0)
327  m_plotter->plotSegmentInLayer( parts.first, group[index] );
328  else
329  // track outside acceptance, keep as unassocated
330  m_plotter->plotSegmentUnassigned( parts.first );
331 
332  if (index+1 < detectors)
333  m_plotter->plotSegmentInLayer( parts.second, group[index+1] );
334  else
335  // track outside acceptance, keep as unassocated
336  m_plotter->plotSegmentUnassigned( parts.second );
337  }
338 
339  track.m_detectors[index].account( parts.first, begin, limits[index+1] );
340  ++index; // next layer
341  //std::cout << '!' << std::endl;
342  //std::cout << "next layer (" << index << "): " << limits[index] << ".." << limits[index+1] << std::endl;
343  if (index < detectors)
344  track.m_detectors[index].account( parts.second, limits[index+1], end );
345  }
346  begin = end;
347  }
348 
349  }
350  //std::cout << std::endl;
351 
352  // add the material from each detector to its layer (if there is one and only one)
353  for (unsigned int i = 0; i < track.m_detectors.size(); ++i)
354  if (group[i] != 0)
355  m_groups[group[i]-1]->addDetector( track.m_detectors[i] );
356 
357  // end of track: commit internal buffers and reset the m_groups internal state for a new track
358  for (unsigned int i = 0; i < m_groups.size(); ++i)
359  m_groups[i]->endOfTrack();
360 }
void plotSegmentUnassigned(const MaterialAccountingStep &step)
int i
Definition: DBlmapReader.cc:9
std::vector< MaterialAccountingDetector > m_detectors
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< MaterialAccountingStep > m_steps
double length(void) const
MaterialAccountingStep m_total
int findLayer(const MaterialAccountingDetector &detector)
#define end
Definition: vmac.h:38
TrackingMaterialPlotter * m_plotter
std::vector< MaterialAccountingGroup * > m_groups
std::pair< MaterialAccountingStep, MaterialAccountingStep > split(double fraction) const
split the step (0..1) in (0..f) + (f..1) using linear interpolation
#define begin
Definition: vmac.h:31
void plotSegmentInLayer(const MaterialAccountingStep &step, int layer)

Member Data Documentation

edm::ESWatcher<IdealGeometryRecord> TrackingMaterialAnalyser::m_geometryWatcher
private

Definition at line 56 of file TrackingMaterialAnalyser.h.

Referenced by analyze().

std::vector<std::string> TrackingMaterialAnalyser::m_groupNames
private

Definition at line 53 of file TrackingMaterialAnalyser.h.

Referenced by analyze(), and TrackingMaterialAnalyser().

std::vector<MaterialAccountingGroup *> TrackingMaterialAnalyser::m_groups
private
edm::InputTag TrackingMaterialAnalyser::m_material
private

Definition at line 44 of file TrackingMaterialAnalyser.h.

Referenced by analyze(), and TrackingMaterialAnalyser().

TrackingMaterialPlotter* TrackingMaterialAnalyser::m_plotter
private
bool TrackingMaterialAnalyser::m_saveDetailedPlots
private

Definition at line 49 of file TrackingMaterialAnalyser.h.

Referenced by save(), and TrackingMaterialAnalyser().

bool TrackingMaterialAnalyser::m_saveParameters
private

Definition at line 50 of file TrackingMaterialAnalyser.h.

Referenced by save(), and TrackingMaterialAnalyser().

bool TrackingMaterialAnalyser::m_saveSummaryPlot
private

Definition at line 48 of file TrackingMaterialAnalyser.h.

Referenced by save(), and TrackingMaterialAnalyser().

bool TrackingMaterialAnalyser::m_saveXml
private

Definition at line 51 of file TrackingMaterialAnalyser.h.

Referenced by save(), and TrackingMaterialAnalyser().

bool TrackingMaterialAnalyser::m_skipAfterLastDetector
private

Definition at line 46 of file TrackingMaterialAnalyser.h.

Referenced by split(), and TrackingMaterialAnalyser().

bool TrackingMaterialAnalyser::m_skipBeforeFirstDetector
private

Definition at line 47 of file TrackingMaterialAnalyser.h.

Referenced by split(), and TrackingMaterialAnalyser().

SplitMode TrackingMaterialAnalyser::m_splitMode
private

Definition at line 45 of file TrackingMaterialAnalyser.h.

Referenced by split(), and TrackingMaterialAnalyser().