CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MaterialBudget Class Reference

#include <MaterialBudget.h>

Inheritance diagram for MaterialBudget:
SimWatcher Observer< const BeginOfRun * > Observer< const BeginOfTrack * > Observer< const G4Step * > Observer< const EndOfTrack * >

Public Member Functions

 MaterialBudget (const edm::ParameterSet &)
 
 MaterialBudget (const MaterialBudget &)=delete
 
const MaterialBudgetoperator= (const MaterialBudget &)=delete
 
 ~MaterialBudget () override
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const G4Step * >
 Observer ()
 
void slotForUpdate (const G4Step * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfTrack * >
 Observer ()
 
void slotForUpdate (const EndOfTrack * iT)
 
virtual ~Observer ()
 

Private Member Functions

void book (const edm::ParameterSet &)
 
bool stopAfter (const G4Step *)
 
void update (const BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

std::vector< double > boundaries
 
std::vector< int > constituents
 
std::vector< int > detLevels
 
std::vector< std::string > detNames
 
std::vector< std::string > detTypes
 
double eta_
 
std::vector< double > etaRegions
 
std::vector< double > intLen
 
std::vector< G4LogicalVolume * > logVolumes
 
std::vector< TProfile * > me100
 
std::vector< TProfile * > me200
 
std::vector< TProfile * > me300
 
std::vector< TProfile * > me400
 
std::vector< TProfile * > me500
 
std::vector< TProfile * > me600
 
double phi_
 
std::vector< double > radLen
 
std::vector< int > regionTypes
 
std::vector< int > stackOrder
 
std::vector< double > stepLen
 
double stepT
 

Additional Inherited Members

Detailed Description

Definition at line 24 of file MaterialBudget.h.

Constructor & Destructor Documentation

MaterialBudget::MaterialBudget ( const edm::ParameterSet p)

Definition at line 19 of file MaterialBudget.cc.

References book(), boundaries, constituents, detLevels, detNames, detTypes, etaRegions, edm::ParameterSet::getParameter(), cuy::ii, GetRecoTauVFromDQM_MC_cff::kk, personalPlayback::level, Skims_PA_cff::name, regionTypes, stackOrder, and AlCaHLTBitMon_QueryRunRegistry::string.

19  {
20  edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("MaterialBudget");
21  detTypes = m_p.getParameter<std::vector<std::string> >("DetectorTypes");
22  constituents = m_p.getParameter<std::vector<int> >("Constituents");
23  stackOrder = m_p.getParameter<std::vector<int> >("StackOrder");
24  detNames = m_p.getParameter<std::vector<std::string> >("DetectorNames");
25  detLevels = m_p.getParameter<std::vector<int> >("DetectorLevels");
26  etaRegions = m_p.getParameter<std::vector<double> >("EtaBoundaries");
27  regionTypes = m_p.getParameter<std::vector<int> >("RegionTypes");
28  boundaries = m_p.getParameter<std::vector<double> >("Boundaries");
29  edm::LogInfo("MaterialBudget") << "MaterialBudget initialized for " << detTypes.size() << " detector types";
30  unsigned int nc = 0;
31  for (unsigned int ii = 0; ii < detTypes.size(); ++ii) {
32  edm::LogInfo("MaterialBudget") << "Type[" << ii << "] : " << detTypes[ii] << " with " << constituents[ii]
33  << ", order " << stackOrder[ii] << " constituents --> ";
34  for (int kk = 0; kk < constituents[ii]; ++kk) {
35  std::string name = "Unknown";
36  int level = -1;
37  if (nc < detNames.size()) {
38  name = detNames[nc];
39  level = detLevels[nc];
40  ++nc;
41  }
42  edm::LogInfo("MaterialBudget") << " Constituent[" << kk << "]: " << name << " at level " << level;
43  }
44  }
45  edm::LogInfo("MaterialBudget") << "MaterialBudget Stop condition for " << etaRegions.size() << " eta regions";
46  for (unsigned int ii = 0; ii < etaRegions.size(); ++ii) {
47  edm::LogInfo("MaterialBudget") << "Region[" << ii << "] : Eta < " << etaRegions[ii] << " boundary type "
48  << regionTypes[ii] << " limit " << boundaries[ii];
49  }
50  book(m_p);
51 }
T getParameter(std::string const &) const
std::vector< int > detLevels
std::vector< std::string > detNames
std::vector< int > regionTypes
void book(const edm::ParameterSet &)
ii
Definition: cuy.py:590
std::vector< double > boundaries
std::vector< std::string > detTypes
std::vector< double > etaRegions
std::vector< int > stackOrder
std::vector< int > constituents
MaterialBudget::MaterialBudget ( const MaterialBudget )
delete
MaterialBudget::~MaterialBudget ( )
override

Definition at line 53 of file MaterialBudget.cc.

53 {}

Member Function Documentation

void MaterialBudget::book ( const edm::ParameterSet m_p)
private

Definition at line 198 of file MaterialBudget.cc.

References detTypes, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, edm::Service< T >::isAvailable(), TFileService::make(), maxEta, HLT_2018_cff::maxPhi, me100, me200, me300, me400, me500, me600, ticl::constants::minEta, Skims_PA_cff::name, pi, AlCaHLTBitMon_QueryRunRegistry::string, compare::tfile, and overlapproblemtsosanalyzer_cfi::title.

Referenced by MaterialBudget().

198  {
199  // Book histograms
201 
202  if (!tfile.isAvailable())
203  throw cms::Exception("BadConfig") << "TFileService unavailable: "
204  << "please add it to config file";
205 
206  int binEta = m_p.getUntrackedParameter<int>("NBinEta", 320);
207  int binPhi = m_p.getUntrackedParameter<int>("NBinPhi", 180);
208  double minEta = m_p.getUntrackedParameter<double>("MinEta", -8.0);
209  double maxEta = m_p.getUntrackedParameter<double>("MaxEta", 8.0);
210  double maxPhi = CLHEP::pi;
211  edm::LogInfo("MaterialBudget") << "MaterialBudget: Booking user "
212  << "histos === with " << binEta << " bins "
213  << "in eta from " << minEta << " to " << maxEta << " and " << binPhi << " bins "
214  << "in phi from " << -maxPhi << " to " << maxPhi;
215 
216  char name[20], title[80];
217  std::string named;
218  for (unsigned int i = 0; i <= detTypes.size(); i++) {
219  if (i >= detTypes.size())
220  named = "Unknown";
221  else
222  named = detTypes[i];
223  sprintf(name, "%d", i + 100);
224  sprintf(title, "MB(X0) prof Eta in %s", named.c_str());
225  me100.push_back(tfile->make<TProfile>(name, title, binEta, minEta, maxEta));
226  sprintf(name, "%d", i + 200);
227  sprintf(title, "MB(L0) prof Eta in %s", named.c_str());
228  me200.push_back(tfile->make<TProfile>(name, title, binEta, minEta, maxEta));
229  sprintf(name, "%d", i + 300);
230  sprintf(title, "MB(Step) prof Eta in %s", named.c_str());
231  me300.push_back(tfile->make<TProfile>(name, title, binEta, minEta, maxEta));
232  sprintf(name, "%d", i + 400);
233  sprintf(title, "MB(X0) prof Phi in %s", named.c_str());
234  me400.push_back(tfile->make<TProfile>(name, title, binPhi, -maxPhi, maxPhi));
235  sprintf(name, "%d", i + 500);
236  sprintf(title, "MB(L0) prof Phi in %s", named.c_str());
237  me500.push_back(tfile->make<TProfile>(name, title, binPhi, -maxPhi, maxPhi));
238  sprintf(name, "%d", i + 600);
239  sprintf(title, "MB(Step) prof Phi in %s", named.c_str());
240  me600.push_back(tfile->make<TProfile>(name, title, binPhi, -maxPhi, maxPhi));
241  }
242 
243  edm::LogInfo("MaterialBudget") << "MaterialBudget: Booking user "
244  << "histos done ===";
245 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< TProfile * > me300
constexpr float minEta
Definition: Common.h:9
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
double maxEta
const Double_t pi
std::vector< TProfile * > me600
std::vector< TProfile * > me100
bool isAvailable() const
Definition: Service.h:40
std::vector< TProfile * > me400
std::vector< TProfile * > me200
std::vector< TProfile * > me500
std::vector< std::string > detTypes
const MaterialBudget& MaterialBudget::operator= ( const MaterialBudget )
delete
bool MaterialBudget::stopAfter ( const G4Step *  aStep)
private

Definition at line 247 of file MaterialBudget.cc.

References funct::abs(), boundaries, eta_, etaRegions, RemoveAddSevLevel::flag, cuy::ii, regionTypes, findQualityFiles::rr, and geometryCSVtoXML::zz.

Referenced by update().

247  {
248  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
249  if (aStep->GetPostStepPoint() != nullptr)
250  hitPoint = aStep->GetPostStepPoint()->GetPosition();
251  double rr = hitPoint.perp();
252  double zz = std::abs(hitPoint.z());
253 
254  bool flag(false);
255  for (unsigned int ii = 0; ii < etaRegions.size(); ++ii) {
256 #ifdef DebugLog
257  edm::LogInfo("MaterialBudget") << " MaterialBudget::Eta " << eta_ << " in Region[" << ii << "] with "
258  << etaRegions[ii] << " type " << regionTypes[ii] << "|" << boundaries[ii];
259 #endif
260  if (fabs(eta_) < etaRegions[ii]) {
261  if (regionTypes[ii] == 0) {
262  if (rr >= boundaries[ii] - 0.001)
263  flag = true;
264  } else {
265  if (zz >= boundaries[ii] - 0.001)
266  flag = true;
267  }
268 #ifdef DebugLog
269  if (flag)
270  edm::LogInfo("MaterialBudget") << " MaterialBudget::Stop after R = " << rr << " and Z = " << zz;
271 #endif
272  break;
273  }
274  }
275 #ifdef DebugLog
276  edm::LogInfo("MaterialBudget") << " MaterialBudget:: R = " << rr << " and Z = " << zz << " Flag " << flag;
277 #endif
278  return flag;
279 }
std::vector< int > regionTypes
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ii
Definition: cuy.py:590
std::vector< double > boundaries
std::vector< double > etaRegions
void MaterialBudget::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 55 of file MaterialBudget.cc.

References detNames, detTypes, cuy::ii, intLen, logVolumes, Skims_PA_cff::name, radLen, stackOrder, stepLen, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

55  {
56  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
57  std::vector<G4LogicalVolume*>::const_iterator lvcite;
58 
59  unsigned int kount = detNames.size();
60  for (unsigned int ii = 0; ii < kount; ++ii)
61  logVolumes.push_back(nullptr);
62 
63  for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++) {
64  for (unsigned int ii = 0; ii < detNames.size(); ++ii) {
65  if (strcmp(detNames[ii].c_str(), (*lvcite)->GetName().c_str()) == 0) {
66  logVolumes[ii] = (*lvcite);
67  kount--;
68  break;
69  }
70  }
71  if (kount <= 0)
72  break;
73  }
74  edm::LogInfo("MaterialBudget") << "MaterialBudget::Finds " << detNames.size() - kount << " out of " << detNames.size()
75  << " LV addresses";
76  for (unsigned int ii = 0; ii < detNames.size(); ++ii) {
77  std::string name("Unknown");
78  if (logVolumes[ii] != nullptr)
79  name = logVolumes[ii]->GetName();
80  edm::LogInfo("MaterialBudget") << "LV[" << ii << "] : " << detNames[ii] << " Address " << logVolumes[ii] << " | "
81  << name;
82  }
83 
84  for (unsigned int ii = 0; ii < (detTypes.size() + 1); ++ii) {
85  stepLen.push_back(0);
86  radLen.push_back(0);
87  intLen.push_back(0);
88  }
89  stackOrder.push_back(0);
90 }
std::vector< double > intLen
std::vector< std::string > detNames
std::vector< double > stepLen
ii
Definition: cuy.py:590
std::vector< std::string > detTypes
std::vector< int > stackOrder
std::vector< double > radLen
std::vector< G4LogicalVolume * > logVolumes
void MaterialBudget::update ( const BeginOfTrack )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 92 of file MaterialBudget.cc.

References detTypes, eta_, GeV, cuy::ii, createfilelist::int, intLen, phi_, radLen, stepLen, and stepT.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

92  {
93  for (unsigned int ii = 0; ii < (detTypes.size() + 1); ++ii) {
94  stepLen[ii] = 0;
95  radLen[ii] = 0;
96  intLen[ii] = 0;
97  }
98 
99  const G4Track* aTrack = (*trk)(); // recover G4 pointer if wanted
100  const G4ThreeVector& mom = aTrack->GetMomentum();
101  if (mom.theta() != 0) {
102  eta_ = mom.eta();
103  } else {
104  eta_ = -99;
105  }
106  phi_ = mom.phi();
107  stepT = 0;
108 
109 #ifdef DebugLog
110  double theEnergy = aTrack->GetTotalEnergy();
111  int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
112  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Track " << aTrack->GetTrackID() << " Code " << theID
113  << " Energy " << theEnergy / CLHEP::GeV << " GeV; Eta " << eta_ << " Phi "
114  << phi_ / CLHEP::deg << " PT " << mom.perp() / CLHEP::GeV << " GeV *****";
115 #endif
116 }
const double GeV
Definition: MathUtil.h:16
std::vector< double > intLen
std::vector< double > stepLen
ii
Definition: cuy.py:590
std::vector< std::string > detTypes
std::vector< double > radLen
void MaterialBudget::update ( const G4Step *  )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 118 of file MaterialBudget.cc.

References constituents, detLevels, detTypes, cuy::ii, createfilelist::int, intLen, findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, logVolumes, radLen, stepLen, stepT, stopAfter(), and HLT_2018_cff::track.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

118  {
119  //---------- each step
120  G4Material* material = aStep->GetPreStepPoint()->GetMaterial();
121  double step = aStep->GetStepLength();
122  double radl = material->GetRadlen();
123  double intl = material->GetNuclearInterLength();
124 
125  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
126  unsigned int indx = detTypes.size();
127  unsigned int nc = 0;
128  for (unsigned int ii = 0; ii < detTypes.size(); ++ii) {
129  for (int kk = 0; kk < constituents[ii]; ++kk) {
130  if (detLevels[nc + kk] <= (int)((touch->GetHistoryDepth()) + 1)) {
131  int jj = (int)((touch->GetHistoryDepth()) + 1) - detLevels[nc + kk];
132  if ((touch->GetVolume(jj)->GetLogicalVolume()) == logVolumes[nc + kk]) {
133  indx = ii;
134  break;
135  }
136  }
137  }
138  nc += (unsigned int)(constituents[ii]);
139  if (indx == ii)
140  break;
141  }
142 
143  stepT += step;
144  stepLen[indx] = stepT;
145  radLen[indx] += (step / radl);
146  intLen[indx] += (step / intl);
147 #ifdef DebugLog
148  edm::LogInfo("MaterialBudget") << "MaterialBudget::Step in " << touch->GetVolume(0)->GetLogicalVolume()->GetName()
149  << " Index " << indx << " Step " << step << " RadL " << step / radl << " IntL "
150  << step / intl;
151 #endif
152  //----- Stop tracking after selected position
153  if (stopAfter(aStep)) {
154  G4Track* track = aStep->GetTrack();
155  track->SetTrackStatus(fStopAndKill);
156  }
157 }
std::vector< int > detLevels
std::vector< double > intLen
std::vector< double > stepLen
ii
Definition: cuy.py:590
bool stopAfter(const G4Step *)
std::vector< std::string > detTypes
step
Definition: StallMonitor.cc:94
std::vector< double > radLen
std::vector< G4LogicalVolume * > logVolumes
std::vector< int > constituents
void MaterialBudget::update ( const EndOfTrack )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 159 of file MaterialBudget.cc.

References detTypes, eta_, cuy::ii, intLen, findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, me100, me200, me300, me400, me500, me600, Skims_PA_cff::name, phi_, radLen, stackOrder, stepLen, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

159  {
160  for (unsigned int ii = 0; ii < detTypes.size(); ++ii) {
161  for (unsigned int jj = 0; jj <= detTypes.size(); ++jj) {
162  if (stackOrder[jj] == (int)(ii + 1)) {
163  for (unsigned int kk = 0; kk <= detTypes.size(); ++kk) {
164  if (stackOrder[kk] == (int)(ii)) {
165  radLen[jj] += radLen[kk];
166  intLen[jj] += intLen[kk];
167 #ifdef DebugLog
168  edm::LogInfo("MaterialBudget")
169  << "MaterialBudget::Add " << kk << ":" << stackOrder[kk] << " to " << jj << ":" << stackOrder[jj]
170  << " RadL " << radLen[kk] << " : " << radLen[jj] << " IntL " << intLen[kk] << " : " << intLen[jj]
171  << " StepL " << stepLen[kk] << " : " << stepLen[jj];
172 #endif
173  break;
174  }
175  }
176  break;
177  }
178  }
179  }
180 
181  for (unsigned int ii = 0; ii <= detTypes.size(); ++ii) {
182  me100[ii]->Fill(eta_, radLen[ii]);
183  me200[ii]->Fill(eta_, intLen[ii]);
184  me300[ii]->Fill(eta_, stepLen[ii]);
185  me400[ii]->Fill(phi_, radLen[ii]);
186  me500[ii]->Fill(phi_, intLen[ii]);
187  me600[ii]->Fill(phi_, stepLen[ii]);
188 #ifdef DebugLog
189  std::string name("Unknown");
190  if (ii < detTypes.size())
191  name = detTypes[ii];
192  edm::LogInfo("MaterialBudget") << "MaterialBudget::Volume[" << ii << "]: " << name << " eta " << eta_ << " == Step "
193  << stepLen[ii] << " RadL " << radLen[ii] << " IntL " << intLen[ii];
194 #endif
195  }
196 }
std::vector< TProfile * > me300
std::vector< double > intLen
std::vector< double > stepLen
std::vector< TProfile * > me600
std::vector< TProfile * > me100
ii
Definition: cuy.py:590
std::vector< TProfile * > me400
std::vector< TProfile * > me200
std::vector< TProfile * > me500
std::vector< std::string > detTypes
std::vector< int > stackOrder
std::vector< double > radLen

Member Data Documentation

std::vector<double> MaterialBudget::boundaries
private

Definition at line 47 of file MaterialBudget.h.

Referenced by MaterialBudget(), and stopAfter().

std::vector<int> MaterialBudget::constituents
private

Definition at line 46 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

std::vector<int> MaterialBudget::detLevels
private

Definition at line 46 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

std::vector<std::string> MaterialBudget::detNames
private

Definition at line 45 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

std::vector<std::string> MaterialBudget::detTypes
private

Definition at line 45 of file MaterialBudget.h.

Referenced by book(), MaterialBudget(), and update().

double MaterialBudget::eta_
private

Definition at line 51 of file MaterialBudget.h.

Referenced by stopAfter(), and update().

std::vector<double> MaterialBudget::etaRegions
private

Definition at line 47 of file MaterialBudget.h.

Referenced by MaterialBudget(), and stopAfter().

std::vector<double> MaterialBudget::intLen
private

Definition at line 50 of file MaterialBudget.h.

Referenced by update().

std::vector<G4LogicalVolume*> MaterialBudget::logVolumes
private

Definition at line 48 of file MaterialBudget.h.

Referenced by update().

std::vector<TProfile*> MaterialBudget::me100
private

Definition at line 49 of file MaterialBudget.h.

Referenced by book(), and update().

std::vector<TProfile*> MaterialBudget::me200
private

Definition at line 49 of file MaterialBudget.h.

Referenced by book(), and update().

std::vector<TProfile*> MaterialBudget::me300
private

Definition at line 49 of file MaterialBudget.h.

Referenced by book(), and update().

std::vector<TProfile*> MaterialBudget::me400
private

Definition at line 49 of file MaterialBudget.h.

Referenced by book(), and update().

std::vector<TProfile*> MaterialBudget::me500
private

Definition at line 49 of file MaterialBudget.h.

Referenced by book(), and update().

std::vector<TProfile*> MaterialBudget::me600
private

Definition at line 49 of file MaterialBudget.h.

Referenced by book(), and update().

double MaterialBudget::phi_
private

Definition at line 51 of file MaterialBudget.h.

Referenced by update().

std::vector<double> MaterialBudget::radLen
private

Definition at line 50 of file MaterialBudget.h.

Referenced by update().

std::vector<int> MaterialBudget::regionTypes
private

Definition at line 46 of file MaterialBudget.h.

Referenced by MaterialBudget(), and stopAfter().

std::vector<int> MaterialBudget::stackOrder
private

Definition at line 46 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

std::vector<double> MaterialBudget::stepLen
private

Definition at line 50 of file MaterialBudget.h.

Referenced by update().

double MaterialBudget::stepT
private

Definition at line 51 of file MaterialBudget.h.

Referenced by update().