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 () 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 &)
 
 MaterialBudget (const MaterialBudget &)=delete
 
const MaterialBudgetoperator= (const MaterialBudget &)=delete
 
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, hcalDigis_cfi::level, dataset::name, regionTypes, stackOrder, and AlCaHLTBitMon_QueryRunRegistry::string.

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

Definition at line 57 of file MaterialBudget.cc.

57  {
58 }
MaterialBudget::MaterialBudget ( const MaterialBudget )
privatedelete

Member Function Documentation

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

Definition at line 214 of file MaterialBudget.cc.

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

Referenced by MaterialBudget().

214  {
215 
216  // Book histograms
218 
219  if ( !tfile.isAvailable() )
220  throw cms::Exception("BadConfig") << "TFileService unavailable: "
221  << "please add it to config file";
222 
223  int binEta = m_p.getUntrackedParameter<int>("NBinEta", 320);
224  int binPhi = m_p.getUntrackedParameter<int>("NBinPhi", 180);
225  double minEta = m_p.getUntrackedParameter<double>("MinEta",-8.0);
226  double maxEta = m_p.getUntrackedParameter<double>("MaxEta", 8.0);
227  double maxPhi = CLHEP::pi;
228  edm::LogInfo("MaterialBudget") << "MaterialBudget: Booking user "
229  << "histos === with " << binEta << " bins "
230  << "in eta from " << minEta << " to "
231  << maxEta << " and " << binPhi << " bins "
232  << "in phi from " << -maxPhi << " to "
233  << maxPhi;
234 
235  char name[20], title[80];
236  std::string named;
237  for (unsigned int i=0; i<=detTypes.size(); i++) {
238  if (i >= detTypes.size()) named = "Unknown";
239  else named = detTypes[i];
240  sprintf(name, "%d", i+100);
241  sprintf(title, "MB(X0) prof Eta in %s", named.c_str());
242  me100.push_back(tfile->make<TProfile>(name,title, binEta, minEta, maxEta));
243  sprintf(name, "%d", i+200);
244  sprintf(title, "MB(L0) prof Eta in %s", named.c_str());
245  me200.push_back(tfile->make<TProfile>(name,title, binEta, minEta, maxEta));
246  sprintf(name, "%d", i+300);
247  sprintf(title, "MB(Step) prof Eta in %s", named.c_str());
248  me300.push_back(tfile->make<TProfile>(name,title, binEta, minEta, maxEta));
249  sprintf(name, "%d", i+400);
250  sprintf(title, "MB(X0) prof Phi in %s", named.c_str());
251  me400.push_back(tfile->make<TProfile>(name,title, binPhi,-maxPhi, maxPhi));
252  sprintf(name, "%d", i+500);
253  sprintf(title, "MB(L0) prof Phi in %s", named.c_str());
254  me500.push_back(tfile->make<TProfile>(name,title, binPhi,-maxPhi, maxPhi));
255  sprintf(name, "%d", i+600);
256  sprintf(title, "MB(Step) prof Phi in %s", named.c_str());
257  me600.push_back(tfile->make<TProfile>(name,title, binPhi,-maxPhi, maxPhi));
258  }
259 
260  edm::LogInfo("MaterialBudget") << "MaterialBudget: Booking user "
261  << "histos done ===";
262 
263 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< TProfile * > me300
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 )
privatedelete
bool MaterialBudget::stopAfter ( const G4Step *  aStep)
private

Definition at line 265 of file MaterialBudget.cc.

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

Referenced by update().

265  {
266 
267  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
268  if (aStep->GetPostStepPoint() != nullptr)
269  hitPoint = aStep->GetPostStepPoint()->GetPosition();
270  double rr = hitPoint.perp();
271  double zz = std::abs(hitPoint.z());
272 
273  bool flag(false);
274  for (unsigned int ii=0; ii<etaRegions.size(); ++ii) {
275 #ifdef DebugLog
276  edm::LogInfo("MaterialBudget") << " MaterialBudget::Eta " << eta
277  << " in Region[" << ii << "] with "
278  << etaRegions[ii] << " type "
279  << regionTypes[ii] << "|" << boundaries[ii];
280 #endif
281  if (fabs(eta) < etaRegions[ii]) {
282  if (regionTypes[ii] == 0) {
283  if (rr >= boundaries[ii]-0.001) flag = true;
284  } else {
285  if (zz >= boundaries[ii]-0.001) flag = true;
286  }
287 #ifdef DebugLog
288  if (flag)
289  edm::LogInfo("MaterialBudget") <<" MaterialBudget::Stop after R = "
290  << rr << " and Z = " << zz;
291 #endif
292  break;
293  }
294  }
295 #ifdef DebugLog
296  edm::LogInfo("MaterialBudget") <<" MaterialBudget:: R = " << rr
297  << " and Z = " << zz << " Flag " << flag;
298 #endif
299  return flag;
300 }
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 60 of file MaterialBudget.cc.

References detNames, detTypes, cuy::ii, intLen, logVolumes, dataset::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().

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

96  {
97 
98  for (unsigned int ii=0; ii<(detTypes.size()+1); ++ii) {
99  stepLen[ii] = 0; radLen[ii] = 0; intLen[ii] = 0;
100  }
101 
102  const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
103  const G4ThreeVector& mom = aTrack->GetMomentum() ;
104  if (mom.theta() != 0 ) {
105  eta = mom.eta();
106  } else {
107  eta = -99;
108  }
109  phi = mom.phi();
110  stepT = 0;
111 
112 #ifdef DebugLog
113  double theEnergy = aTrack->GetTotalEnergy();
114  int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
115  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Track "
116  << aTrack->GetTrackID() << " Code " << theID
117  << " Energy " <<theEnergy/CLHEP::GeV
118  << " GeV; Eta " << eta << " Phi "
119  << phi/CLHEP::deg << " PT "
120  << mom.perp()/CLHEP::GeV << " GeV *****";
121 #endif
122 }
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 124 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 HiIsolationCommonParameters_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().

124  {
125 
126  //---------- each step
127  G4Material * material = aStep->GetPreStepPoint()->GetMaterial();
128  double step = aStep->GetStepLength();
129  double radl = material->GetRadlen();
130  double intl = material->GetNuclearInterLength();
131 
132  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
133  unsigned int indx = detTypes.size();
134  unsigned int nc = 0;
135  for (unsigned int ii=0; ii<detTypes.size(); ++ii) {
136  for (int kk=0; kk<constituents[ii]; ++kk) {
137  if (detLevels[nc+kk] <= (int)((touch->GetHistoryDepth())+1)) {
138  int jj = (int)((touch->GetHistoryDepth())+1)-detLevels[nc+kk];
139  if ((touch->GetVolume(jj)->GetLogicalVolume()) == logVolumes[nc+kk]) {
140  indx = ii;
141  break;
142  }
143  }
144  }
145  nc += (unsigned int)(constituents[ii]);
146  if (indx == ii) break;
147  }
148 
149  stepT += step;
150  stepLen[indx] = stepT;
151  radLen[indx] += (step/radl);
152  intLen[indx] += (step/intl);
153 #ifdef DebugLog
154  edm::LogInfo("MaterialBudget") << "MaterialBudget::Step in "
155  << touch->GetVolume(0)->GetLogicalVolume()->GetName()
156  << " Index " << indx <<" Step " << step
157  << " RadL " << step/radl << " IntL "
158  << step/intl;
159 #endif
160  //----- Stop tracking after selected position
161  if (stopAfter(aStep)) {
162  G4Track* track = aStep->GetTrack();
163  track->SetTrackStatus( fStopAndKill );
164  }
165 }
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 168 of file MaterialBudget.cc.

References detTypes, eta, cuy::ii, intLen, findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, me100, me200, me300, me400, me500, me600, dataset::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().

168  {
169 
170  for (unsigned int ii=0; ii<detTypes.size(); ++ii) {
171  for (unsigned int jj=0; jj<=detTypes.size(); ++jj) {
172  if (stackOrder[jj] == (int)(ii+1)) {
173  for (unsigned int kk=0; kk<=detTypes.size(); ++kk) {
174  if (stackOrder[kk] == (int)(ii)) {
175  radLen[jj] += radLen[kk];
176  intLen[jj] += intLen[kk];
177 #ifdef DebugLog
178  edm::LogInfo("MaterialBudget") << "MaterialBudget::Add "
179  << kk << ":" << stackOrder[kk]
180  << " to " << jj <<":"
181  << stackOrder[jj] <<" RadL "
182  << radLen[kk] << " : " << radLen[jj]
183  << " IntL " << intLen[kk] << " : "
184  << intLen[jj] <<" StepL "
185  << stepLen[kk]<< " : "
186  << stepLen[jj];
187 #endif
188  break;
189  }
190  }
191  break;
192  }
193  }
194  }
195 
196  for (unsigned int ii=0; ii<=detTypes.size(); ++ii) {
197  me100[ii]->Fill(eta, radLen[ii]);
198  me200[ii]->Fill(eta, intLen[ii]);
199  me300[ii]->Fill(eta, stepLen[ii]);
200  me400[ii]->Fill(phi, radLen[ii]);
201  me500[ii]->Fill(phi, intLen[ii]);
202  me600[ii]->Fill(phi, stepLen[ii]);
203 #ifdef DebugLog
204  std::string name("Unknown");
205  if (ii < detTypes.size()) name = detTypes[ii];
206  edm::LogInfo("MaterialBudget") << "MaterialBudget::Volume[" << ii
207  << "]: " << name << " eta " << eta
208  << " == Step " << stepLen[ii] << " RadL "
209  << radLen[ii] << " IntL " << intLen[ii];
210 #endif
211  }
212 }
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 50 of file MaterialBudget.h.

Referenced by MaterialBudget(), and stopAfter().

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

Definition at line 49 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

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

Definition at line 49 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

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

Definition at line 48 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

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

Definition at line 48 of file MaterialBudget.h.

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

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

Definition at line 50 of file MaterialBudget.h.

Referenced by MaterialBudget(), and stopAfter().

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

Definition at line 53 of file MaterialBudget.h.

Referenced by update().

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

Definition at line 51 of file MaterialBudget.h.

Referenced by update().

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

Definition at line 52 of file MaterialBudget.h.

Referenced by book(), and update().

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

Definition at line 52 of file MaterialBudget.h.

Referenced by book(), and update().

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

Definition at line 52 of file MaterialBudget.h.

Referenced by book(), and update().

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

Definition at line 52 of file MaterialBudget.h.

Referenced by book(), and update().

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

Definition at line 52 of file MaterialBudget.h.

Referenced by book(), and update().

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

Definition at line 52 of file MaterialBudget.h.

Referenced by book(), and update().

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

Definition at line 53 of file MaterialBudget.h.

Referenced by update().

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

Definition at line 49 of file MaterialBudget.h.

Referenced by MaterialBudget(), and stopAfter().

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

Definition at line 49 of file MaterialBudget.h.

Referenced by MaterialBudget(), and update().

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

Definition at line 53 of file MaterialBudget.h.

Referenced by update().

double MaterialBudget::stepT
private

Definition at line 54 of file MaterialBudget.h.

Referenced by update().