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 Member Functions | Private Attributes | Static Private Attributes
MaterialBudgetForward Class Reference

#include <MaterialBudgetForward.h>

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

Public Member Functions

 MaterialBudgetForward (const edm::ParameterSet &)
 
virtual ~MaterialBudgetForward ()
 
- 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 &)
 
 MaterialBudgetForward (const MaterialBudgetForward &)
 
const MaterialBudgetForwardoperator= (const MaterialBudgetForward &)
 
bool stopAfter (const G4Step *)
 
void update (const BeginOfRun *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *)
 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
 
TProfile * me100 [maxSet]
 
TProfile * me200 [maxSet]
 
TProfile * me300 [maxSet]
 
TH1F * me400 [maxSet]
 
TProfile2D * me500 [maxSet]
 
TProfile2D * me600 [maxSet]
 
TProfile2D * me700 [maxSet]
 
TH2F * me800 [maxSet]
 
double phi
 
std::vector< double > radLen
 
std::vector< int > regionTypes
 
std::vector< int > stackOrder
 
std::vector< double > stepLen
 
double stepT
 

Static Private Attributes

static const int maxSet = 25
 

Additional Inherited Members

Detailed Description

Definition at line 24 of file MaterialBudgetForward.h.

Constructor & Destructor Documentation

MaterialBudgetForward::MaterialBudgetForward ( const edm::ParameterSet p)

Definition at line 20 of file MaterialBudgetForward.cc.

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

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

Definition at line 58 of file MaterialBudgetForward.cc.

58  {
59 }
MaterialBudgetForward::MaterialBudgetForward ( const MaterialBudgetForward )
private

Member Function Documentation

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

Definition at line 207 of file MaterialBudgetForward.cc.

References detTypes, edm::ParameterSet::getUntrackedParameter(), i, edm::Service< T >::isAvailable(), TFileDirectory::make(), maxEta, maxSet, me100, me200, me300, me400, me500, me600, me700, me800, min, benchmark_cfg::minEta, mergeVDriftHistosByStation::name, pi, AlCaHLTBitMon_QueryRunRegistry::string, and indexGen::title.

Referenced by MaterialBudgetForward().

207  {
208 
209  // Book histograms
211 
212  if ( !tfile.isAvailable() )
213  throw cms::Exception("BadConfig") << "TFileService unavailable: "
214  << "please add it to config file";
215 
216  int binEta = m_p.getUntrackedParameter<int>("NBinEta", 320);
217  int binPhi = m_p.getUntrackedParameter<int>("NBinPhi", 180);
218  double minEta = m_p.getUntrackedParameter<double>("MinEta",-8.0);
219  double maxEta = m_p.getUntrackedParameter<double>("MaxEta", 8.0);
220  double maxPhi = CLHEP::pi;
221  edm::LogInfo("MaterialBudget") << "MaterialBudgetForward: Booking user "
222  << "histos === with " << binEta << " bins "
223  << "in eta from " << minEta << " to "
224  << maxEta << " and " << binPhi << " bins "
225  << "in phi from " << -maxPhi << " to "
226  << maxPhi;
227 
228  char name[20], title[80];
229  std::string named;
230  for (int i=0; i<std::min((int)(detTypes.size()+1),maxSet); i++) {
231  if (i >= (int)(detTypes.size())) named = "Unknown";
232  else named = detTypes[i];
233  sprintf(name, "%d", i+100);
234  sprintf(title, "MB(X0) prof Eta in %s", named.c_str());
235  me100[i] = tfile->make<TProfile>(name, title, binEta, minEta, maxEta);
236  sprintf(name, "%d", i+200);
237  sprintf(title, "MB(L0) prof Eta in %s", named.c_str());
238  me200[i] = tfile->make<TProfile>(name, title, binEta, minEta, maxEta);
239  sprintf(name, "%d", i+300);
240  sprintf(title, "MB(Step) prof Eta in %s", named.c_str());
241  me300[i] = tfile->make<TProfile>(name, title, binEta, minEta, maxEta);
242  sprintf(name, "%d", i+400);
243  sprintf(title, "Eta in %s", named.c_str());
244  me400[i] = tfile->make<TH1F>(name, title, binEta, minEta, maxEta);
245  sprintf(name, "%d", i+500);
246  sprintf(title, "MB(X0) prof Eta Phi in %s", named.c_str());
247  me500[i] = tfile->make<TProfile2D>(name, title, binEta/2, minEta, maxEta,
248  binPhi/2, -maxPhi, maxPhi);
249  sprintf(name, "%d", i+600);
250  sprintf(title, "MB(L0) prof Eta Phi in %s", named.c_str());
251  me600[i]= tfile->make<TProfile2D>(name, title, binEta/2, minEta, maxEta,
252  binPhi/2, -maxPhi, maxPhi);
253  sprintf(name, "%d", i+700);
254  sprintf(title, "MB(Step) prof Eta Phi in %s", named.c_str());
255  me700[i]= tfile->make<TProfile2D>(name, title, binEta/2, minEta, maxEta,
256  binPhi/2, -maxPhi, maxPhi);
257  sprintf(name, "%d", i+800);
258  sprintf(title, "Eta vs Phi in %s", named.c_str());
259  me800[i]= tfile->make<TH2F>(name, title, binEta/2, minEta, maxEta,
260  binPhi/2, -maxPhi, maxPhi);
261  }
262 
263  edm::LogInfo("MaterialBudget") << "MaterialBudgetForward: Booking user "
264  << "histos done ===";
265 
266 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
TProfile2D * me700[maxSet]
TProfile * me100[maxSet]
#define min(a, b)
Definition: mlp_lapack.h:161
double maxEta
TProfile2D * me600[maxSet]
TProfile * me200[maxSet]
bool isAvailable() const
Definition: Service.h:47
T * make() const
make new ROOT object
TProfile * me300[maxSet]
TProfile2D * me500[maxSet]
double pi
std::vector< std::string > detTypes
const MaterialBudgetForward& MaterialBudgetForward::operator= ( const MaterialBudgetForward )
private
bool MaterialBudgetForward::stopAfter ( const G4Step *  aStep)
private

Definition at line 268 of file MaterialBudgetForward.cc.

References abs, boundaries, eta, etaRegions, cuy::ii, LogDebug, regionTypes, and findQualityFiles::rr.

Referenced by update().

268  {
269 
270  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
271  if (aStep->GetPostStepPoint() != 0)
272  hitPoint = aStep->GetPostStepPoint()->GetPosition();
273  double rr = hitPoint.perp();
274  double zz = std::abs(hitPoint.z());
275 
276  bool flag(false);
277  for (unsigned int ii=0; ii<etaRegions.size(); ++ii) {
278  // LogDebug("MaterialBudget") << " MaterialBudgetForward::Eta " << eta << " in Region[" << ii << "] with " << etaRegions[ii] << " type " << regionTypes[ii] << "|" << boundaries[ii];
279  if (fabs(eta) < etaRegions[ii]) {
280  if (regionTypes[ii] == 0) {
281  if (rr >= boundaries[ii]-0.001) flag = true;
282  } else {
283  if (zz >= boundaries[ii]-0.001) flag = true;
284  }
285  if (flag)
286  LogDebug("MaterialBudget") <<" MaterialBudgetForward::Stop after R = "
287  << rr << " and Z = " << zz;
288  break;
289  }
290  }
291  // LogDebug("MaterialBudget") <<" MaterialBudgetForward:: R = " << rr << " and Z = " << zz << " Flag " << flag;
292  return flag;
293 }
#define LogDebug(id)
long int flag
Definition: mlp_lapack.h:47
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< double > etaRegions
int ii
Definition: cuy.py:588
std::vector< int > regionTypes
std::vector< double > boundaries
void MaterialBudgetForward::update ( const BeginOfRun )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 61 of file MaterialBudgetForward.cc.

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

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

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

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 97 of file MaterialBudgetForward.cc.

References detTypes, eta, cuy::ii, intLen, LogDebug, phi, radLen, stepLen, and stepT.

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

97  {
98 
99  for (unsigned int ii=0; ii<(detTypes.size()+1); ++ii) {
100  stepLen[ii] = 0; radLen[ii] = 0; intLen[ii] = 0;
101  }
102 
103  const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
104  const G4ThreeVector& mom = aTrack->GetMomentum() ;
105  if (mom.theta() != 0 ) {
106  eta = mom.eta();
107  } else {
108  eta = -99;
109  }
110  phi = mom.phi();
111  stepT = 0;
112 
113  double theEnergy = aTrack->GetTotalEnergy();
114  int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
115  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos: Track "
116  << aTrack->GetTrackID() << " Code " << theID
117  << " Energy " <<theEnergy/CLHEP::GeV<<" GeV; Eta "
118  << eta << " Phi " << phi/CLHEP::deg << " PT "
119  << mom.perp()/CLHEP::GeV << " GeV *****";
120 }
#define LogDebug(id)
std::vector< double > radLen
int ii
Definition: cuy.py:588
std::vector< double > intLen
std::vector< double > stepLen
std::vector< std::string > detTypes
void MaterialBudgetForward::update ( const G4Step *  )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 122 of file MaterialBudgetForward.cc.

References constituents, detLevels, detTypes, cuy::ii, intLen, findQualityFiles::jj, LogDebug, logVolumes, radLen, relval_parameters_module::step, stepLen, stepT, and stopAfter().

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

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

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 164 of file MaterialBudgetForward.cc.

References detTypes, eta, cuy::ii, intLen, findQualityFiles::jj, LogDebug, me100, me200, me300, me400, me500, me600, me700, me800, mergeVDriftHistosByStation::name, phi, radLen, stackOrder, stepLen, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

164  {
165 
166  for (unsigned int ii=0; ii<detTypes.size(); ++ii) {
167  for (unsigned int jj=0; jj<=detTypes.size(); ++jj) {
168  if (stackOrder[jj] == (int)(ii+1)) {
169  for (unsigned int kk=0; kk<=detTypes.size(); ++kk) {
170  if (stackOrder[kk] == (int)(ii)) {
171  radLen[jj] += radLen[kk];
172  intLen[jj] += intLen[kk];
173  LogDebug("MaterialBudget") << "MaterialBudgetForward::Add " << kk
174  << ":" << stackOrder[kk] << " to "
175  << jj <<":" << stackOrder[jj] <<" RadL "
176  << radLen[kk] << " : " << radLen[jj]
177  << " IntL " << intLen[kk] << " : "
178  << intLen[jj] <<" StepL " << stepLen[kk]
179  << " : " << stepLen[jj];
180  break;
181  }
182  }
183  break;
184  }
185  }
186  }
187 
188  for (unsigned int ii=0; ii<=detTypes.size(); ++ii) {
189  me100[ii]->Fill(eta, radLen[ii]);
190  me200[ii]->Fill(eta, intLen[ii]);
191  me300[ii]->Fill(eta, stepLen[ii]);
192  me400[ii]->Fill(eta);
193  me500[ii]->Fill(eta, phi, radLen[ii]);
194  me600[ii]->Fill(eta, phi, intLen[ii]);
195  me700[ii]->Fill(eta, phi, stepLen[ii]);
196  me800[ii]->Fill(eta, phi);
197 
198  std::string name("Unknown");
199  if (ii < detTypes.size()) name = detTypes[ii];
200  LogDebug("MaterialBudget") << "MaterialBudgetForward::Volume[" << ii
201  << "]: " << name << " == Step " << stepLen[ii]
202  << " RadL " << radLen[ii] << " IntL "
203  << intLen[ii];
204  }
205 }
#define LogDebug(id)
TProfile2D * me700[maxSet]
TProfile * me100[maxSet]
TProfile2D * me600[maxSet]
std::vector< double > radLen
int ii
Definition: cuy.py:588
std::vector< int > stackOrder
TProfile * me200[maxSet]
std::vector< double > intLen
std::vector< double > stepLen
TProfile * me300[maxSet]
TProfile2D * me500[maxSet]
std::vector< std::string > detTypes

Member Data Documentation

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

Definition at line 50 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and stopAfter().

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

Definition at line 49 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and update().

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

Definition at line 49 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and update().

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

Definition at line 48 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and update().

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

Definition at line 48 of file MaterialBudgetForward.h.

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

double MaterialBudgetForward::eta
private

Definition at line 58 of file MaterialBudgetForward.h.

Referenced by stopAfter(), and update().

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

Definition at line 50 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and stopAfter().

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

Definition at line 57 of file MaterialBudgetForward.h.

Referenced by update().

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

Definition at line 51 of file MaterialBudgetForward.h.

Referenced by update().

const int MaterialBudgetForward::maxSet = 25
staticprivate

Definition at line 52 of file MaterialBudgetForward.h.

Referenced by book().

TProfile* MaterialBudgetForward::me100[maxSet]
private

Definition at line 55 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TProfile * MaterialBudgetForward::me200[maxSet]
private

Definition at line 55 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TProfile * MaterialBudgetForward::me300[maxSet]
private

Definition at line 55 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TH1F* MaterialBudgetForward::me400[maxSet]
private

Definition at line 53 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TProfile2D* MaterialBudgetForward::me500[maxSet]
private

Definition at line 56 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TProfile2D * MaterialBudgetForward::me600[maxSet]
private

Definition at line 56 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TProfile2D * MaterialBudgetForward::me700[maxSet]
private

Definition at line 56 of file MaterialBudgetForward.h.

Referenced by book(), and update().

TH2F* MaterialBudgetForward::me800[maxSet]
private

Definition at line 54 of file MaterialBudgetForward.h.

Referenced by book(), and update().

double MaterialBudgetForward::phi
private

Definition at line 58 of file MaterialBudgetForward.h.

Referenced by update().

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

Definition at line 57 of file MaterialBudgetForward.h.

Referenced by update().

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

Definition at line 49 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and stopAfter().

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

Definition at line 49 of file MaterialBudgetForward.h.

Referenced by MaterialBudgetForward(), and update().

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

Definition at line 57 of file MaterialBudgetForward.h.

Referenced by update().

double MaterialBudgetForward::stepT
private

Definition at line 58 of file MaterialBudgetForward.h.

Referenced by update().