Skip to content

Commit 7b10b54

Browse files
committed
Merge pull request #76 from pinkenburg/master
add light correction to inner hcal stepping action, remove track pathlength from hcal hits, fix cppcheck performance warnings
2 parents 3aca292 + 9fcc3d4 commit 7b10b54

20 files changed

Lines changed: 148 additions & 80 deletions

simulation/g4simulation/g4detectors/PHG4BlockCellGeomContainer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void
2525
PHG4BlockCellGeomContainer::identify(std::ostream& os) const
2626
{
2727
map<int,PHG4BlockCellGeom *>::const_iterator iter;
28-
for (iter=layergeoms.begin(); iter != layergeoms.end(); iter++)
28+
for (iter=layergeoms.begin(); iter != layergeoms.end(); ++iter)
2929
{
3030
cout << "layer " << iter->first << endl;
3131
(iter->second)->identify(os);

simulation/g4simulation/g4detectors/PHG4BlockGeomContainer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ PHG4BlockGeomContainer::identify(std::ostream& os) const
2828
os << "mag field: " << _magfield << endl;
2929
os << "number of layers: " << _layergeoms.size() << endl;
3030
map<int,PHG4BlockGeom *>::const_iterator iter;
31-
for (iter=_layergeoms.begin(); iter != _layergeoms.end(); iter++)
31+
for (iter=_layergeoms.begin(); iter != _layergeoms.end(); ++iter)
3232
{
3333
(iter->second)->identify(os);
3434
}

simulation/g4simulation/g4detectors/PHG4CylinderCellContainer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ PHG4CylinderCellContainer::identify(ostream& os) const
2929
{
3030
map<unsigned int,PHG4CylinderCell *>::const_iterator iter;
3131
os << "Number of cells: " << size() << endl;
32-
for (iter = cellmap.begin(); iter != cellmap.end(); iter++)
32+
for (iter = cellmap.begin(); iter != cellmap.end(); ++iter)
3333
{
3434
os << "cell key 0x" << hex << iter->first << dec << endl;
3535
(iter->second)->identify();
3636
}
3737
set<int>::const_iterator siter;
3838
os << "Number of layers: " << num_layers() << endl;
39-
for (siter = layers.begin(); siter != layers.end(); siter++)
39+
for (siter = layers.begin(); siter != layers.end(); ++siter)
4040
{
4141
os << "layer : " << *siter << endl;
4242
}
@@ -131,7 +131,7 @@ PHG4CylinderCellContainer::getTotalEdep() const
131131
{
132132
ConstIterator iter;
133133
double totalenergy = 0;
134-
for (iter = cellmap.begin(); iter != cellmap.end(); iter++)
134+
for (iter = cellmap.begin(); iter != cellmap.end(); ++iter)
135135
{
136136
totalenergy += iter->second->get_edep();
137137
}

simulation/g4simulation/g4detectors/PHG4CylinderCellContainer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class PHG4CylinderCellContainer: public PHObject
4848
}
4949
else
5050
{
51-
its++;
51+
++its;
5252
}
5353
}
5454
}

simulation/g4simulation/g4detectors/PHG4CylinderCellGeomContainer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void
2525
PHG4CylinderCellGeomContainer::identify(std::ostream& os) const
2626
{
2727
map<int,PHG4CylinderCellGeom *>::const_iterator iter;
28-
for (iter=layergeoms.begin(); iter != layergeoms.end(); iter++)
28+
for (iter=layergeoms.begin(); iter != layergeoms.end(); ++iter)
2929
{
3030
cout << "layer " << iter->first << endl;
3131
(iter->second)->identify(os);

simulation/g4simulation/g4detectors/PHG4CylinderCellReco.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int PHG4CylinderCellReco::InitRun(PHCompositeNode *topNode)
9595
map<int, PHG4CylinderGeom *>::const_iterator miter;
9696
pair <map<int, PHG4CylinderGeom *>::const_iterator, map<int, PHG4CylinderGeom *>::const_iterator> begin_end = geo->get_begin_end();
9797
map<int, std::pair <double, double> >::iterator sizeiter;
98-
for (miter = begin_end.first; miter != begin_end.second; miter++)
98+
for (miter = begin_end.first; miter != begin_end.second; ++miter)
9999
{
100100
PHG4CylinderGeom *layergeom = miter->second;
101101
int layer = layergeom->get_layer();
@@ -981,7 +981,7 @@ PHG4CylinderCellReco::CheckEnergy(PHCompositeNode *topNode)
981981
}
982982
PHG4CylinderCellContainer::ConstRange cell_begin_end = cells->getCylinderCells();
983983
PHG4CylinderCellContainer::ConstIterator citer;
984-
for (citer = cell_begin_end.first; citer != cell_begin_end.second; citer++)
984+
for (citer = cell_begin_end.first; citer != cell_begin_end.second; ++citer)
985985
{
986986
sum_energy_cells += citer->second->get_edep();
987987
}

simulation/g4simulation/g4detectors/PHG4CylinderCellTPCReco.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int PHG4CylinderCellTPCReco::InitRun(PHCompositeNode *topNode)
7777
map<int, PHG4CylinderGeom *>::const_iterator miter;
7878
pair <map<int, PHG4CylinderGeom *>::const_iterator, map<int, PHG4CylinderGeom *>::const_iterator> begin_end = geo->get_begin_end();
7979
map<int, std::pair <double, double> >::iterator sizeiter;
80-
for(miter = begin_end.first; miter != begin_end.second; miter++)
80+
for(miter = begin_end.first; miter != begin_end.second; ++miter)
8181
{
8282
PHG4CylinderGeom *layergeom = miter->second;
8383
int layer = layergeom->get_layer();

simulation/g4simulation/g4detectors/PHG4FCalDetector.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ bool PHG4FCalDetector::isInScintillator(G4VPhysicalVolume * volume)
147147
{
148148
//loop over the physical volumes and see if this is a match
149149
std::map<unsigned int, G4VPhysicalVolume*>::iterator vol_iter = scintillator_physi_.begin();
150-
for ( ; vol_iter != scintillator_physi_.end(); vol_iter ++ )
150+
for ( ; vol_iter != scintillator_physi_.end(); ++vol_iter )
151151
{
152152
if ( vol_iter->second == volume )
153153
return true;
@@ -161,7 +161,7 @@ int PHG4FCalDetector::getScintillatorLayer(G4VPhysicalVolume * volume)
161161
{
162162
//loop over the physical volumes and see if this is a match
163163
std::map<unsigned int, G4VPhysicalVolume*>::iterator vol_iter = scintillator_physi_.begin();
164-
for ( ; vol_iter != scintillator_physi_.end(); vol_iter ++ )
164+
for ( ; vol_iter != scintillator_physi_.end(); ++vol_iter )
165165
{
166166
if ( vol_iter->second == volume )
167167
return vol_iter->first;

simulation/g4simulation/g4detectors/PHG4FPbScDetector.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ bool PHG4FPbScDetector::isInScintillator(G4VPhysicalVolume * volume)
160160
{
161161
//loop over the physical volumes and see if this is a match
162162
std::map<unsigned int, G4VPhysicalVolume*>::iterator vol_iter = scintillator_physi_.begin();
163-
for ( ; vol_iter != scintillator_physi_.end(); vol_iter ++ )
163+
for ( ; vol_iter != scintillator_physi_.end(); ++vol_iter )
164164
{
165165
if ( vol_iter->second == volume )
166166
{
@@ -175,7 +175,7 @@ int PHG4FPbScDetector::getScintillatorLayer(G4VPhysicalVolume * volume)
175175
{
176176
//loop over the physical volumes and see if this is a match
177177
std::map<unsigned int, G4VPhysicalVolume*>::iterator vol_iter = scintillator_physi_.begin();
178-
for ( ; vol_iter != scintillator_physi_.end(); vol_iter ++ )
178+
for ( ; vol_iter != scintillator_physi_.end(); ++vol_iter )
179179
{
180180
if ( vol_iter->second == volume )
181181
return vol_iter->first;

simulation/g4simulation/g4detectors/PHG4InnerHcalParameters.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ PHG4InnerHcalParameters::PHG4InnerHcalParameters():
2929
blackhole(0),
3030
material("SS310"),
3131
steplimits(NAN),
32+
light_scint_model(true),
33+
light_balance(false),
34+
light_balance_inner_radius(0.0),
35+
light_balance_inner_corr(1.0),
36+
light_balance_outer_radius(10.0),
37+
light_balance_outer_corr(1.0),
3238
absorbertruth(0)
3339
{}
3440

0 commit comments

Comments
 (0)