Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions source/include/DDMarlinCED.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ class DDMarlinCED {
//hauke hoelbe
template <class In>
static void drawObjectsWithPositionID(LCCollection* /*col*/,In first, In last, int marker, int size ,unsigned int color, unsigned int layer=0) {
int i=0;
while( first != last ) {
int id = (*first)->id();
std::cout << "test!!! " << std::endl;
Expand All @@ -200,7 +199,6 @@ class DDMarlinCED {
marker, layer, size , color, id ) ;

++first ;
i++;
}
}

Expand Down
2 changes: 0 additions & 2 deletions source/include/MarlinCED.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ class MarlinCED {
//hauke hoelbe
template <class In>
static void drawObjectsWithPositionID(LCCollection* /*col*/,In first, In last, int marker, int size ,unsigned int color, unsigned int layer=0) {
int i=0;
while( first != last ) {
int id = (*first)->id();
std::cout << "test!!! " << std::endl;
Expand All @@ -207,7 +206,6 @@ class MarlinCED {
marker, layer, size , color, id ) ;

++first ;
i++;
}
}

Expand Down
3 changes: 0 additions & 3 deletions source/include/WeightedPoints3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@ class WeightedPoints3D {
double _nfact4;
double _fourth_mom[3][3][3][3];
double dang[6][2][3];
double _r1 ; // Cluster spatial axis length -- the largest
double _r2 ; // Cluster spatial axis length -- less
double _r3 ; // Cluster spatial axis length -- less
double _vol ; // Cluster ellipsoid volume
double _r_ave ; // Cluster average radius (cubic root)
double _density ; // Cluster density
Expand Down
4 changes: 2 additions & 2 deletions source/include/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class RandomNumberGenerator {
// generate pair of random numbers
// generate first random number
float frand = rand();
frand = frand/RAND_MAX;
frand = frand/static_cast<float>(RAND_MAX);
x1 = 2.0*(frand) - 1.0;
// generate second random number
frand = rand();
frand = frand/RAND_MAX;
frand = frand/static_cast<float>(RAND_MAX);
x2 = 2.0*frand - 1.0;
w = x1 *x1 + x2*x2;
} while ( w >= 1.0 );
Expand Down
6 changes: 3 additions & 3 deletions source/src/CutOnGEANT4Bug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void CutOnGEANT4Bug::processEvent( LCEvent* evt ) {
unsigned int index = 0;
bool alreadyCollected = false;

float ESumCalorimeterHits = 0.0; // accumulated energy of calorimeter hits where the track contributes
//float ESumCalorimeterHits = 0.0; // accumulated energy of calorimeter hits where the track contributes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have a preference for simply removing these instead of leaving them here as comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remove those entirely because they're referenced later on in code that's already commented out (generally in debugging printouts.)
So this is just making things consistent.
If you prefer, we can just remove the commented-out debugging code as well and thus all traces of these identifiers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Let's leave them there then and not rock the boat too much ;)

float ESumSubCalorimeterHits = 0.0; // accumulated energy of calorimeter hit energies, but only the part which originates from the track,i.e. sub-hit accuracy


Expand Down Expand Up @@ -264,14 +264,14 @@ void CutOnGEANT4Bug::processEvent( LCEvent* evt ) {

// debug
// CalorimeterHit* caloHit = collectedCalorimeterHitsWithEnergies.at(i).first;
float EHit = collectedCalorimeterHitsWithEnergies.at(i).second;
//float EHit = collectedCalorimeterHitsWithEnergies.at(i).second;

// debug
// CalorimeterHit* caloSubHit = collectedSubCalorimeterHitsWithEnergies.at(i).first;
float ESubHit = collectedSubCalorimeterHitsWithEnergies.at(i).second;


ESumCalorimeterHits += EHit;
//ESumCalorimeterHits += EHit;
ESumSubCalorimeterHits += ESubHit;

// debug
Expand Down
2 changes: 0 additions & 2 deletions source/src/DDMarlinCED.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ void DDMarlinCED::drawHelix(float b, float charge, float x, float y, float z,
int nSteps = int(100/step); //hauke


int count_lines=0;
for (int j = 0; j < nSteps ; j++) {

double alpha0 = step*j ;
Expand All @@ -381,7 +380,6 @@ void DDMarlinCED::drawHelix(float b, float charge, float x, float y, float z,
}

if( r_current >= (rmin+step)) {
count_lines++;
ced_line_ID( x1, y1, z1, x2, y2, z2 , marker , size, col, id);
}
x1 = x2;
Expand Down
4 changes: 2 additions & 2 deletions source/src/MarlinCED.cc
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void MarlinCED::drawHelix(float b, float charge, float x, float y, float z,
//streamlog_out(DEBUG) << "draw helix (nsteps: " << nSteps << ") id= " << id<<std::endl;


int count_lines=0;
//int count_lines=0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

for (int j = 0; j < nSteps ; j++) {

double alpha0 = step*j ;
Expand All @@ -618,7 +618,7 @@ void MarlinCED::drawHelix(float b, float charge, float x, float y, float z,
}

if( r_current >= (rmin+step)) {
count_lines++;
//count_lines++;
ced_line_ID( x1, y1, z1, x2, y2, z2 , marker , size, col, id);
//ced_line( x1, y1, z1, x2, y2, z2 , marker , size, col);
}
Expand Down
58 changes: 2 additions & 56 deletions source/src/MarlinUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -572,57 +572,30 @@ void MarlinUtil::getMC_Balance(LCEvent * evt, double* accumulatedEnergies){
double px,py,pz,pt,ttet;

double e_to_tube = 0.;
double e_to_tubex = 0.;
double e_to_tubey = 0.;
double e_to_tubez = 0.;
int n_to_tube = 0;

double e_neutr = 0.;
double e_neutrx= 0.;
double e_neutry= 0.;
double e_neutrz= 0.;
int n_neutr= 0;

double e_muon = 0.;
double e_muonx= 0.;
double e_muony= 0.;
double e_muonz= 0.;
int n_muon= 0;

double e_elect = 0.;
double e_electx= 0.;
double e_electy= 0.;
double e_electz= 0.;
int n_elect= 0;

double e_photon = 0.;
double e_photonx= 0.;
double e_photony= 0.;
double e_photonz= 0.;
int n_photon= 0;

double e_pi0 = 0.;
double e_pi0x= 0.;
double e_pi0y= 0.;
double e_pi0z= 0.;
int n_pi0= 0;

double e_llhadr = 0.;
double e_llhadrx= 0.;
double e_llhadry= 0.;
double e_llhadrz= 0.;
int n_llhadr= 0;

double e_slhadr = 0.;
double e_slhadrx= 0.;
double e_slhadry= 0.;
double e_slhadrz= 0.;
int n_slhadr= 0;

double e_chadr = 0.;
double e_chadrx= 0.;
double e_chadry= 0.;
double e_chadrz= 0.;
int n_chadr= 0;

for(int i=0; i<mcpCol->getNumberOfElements() ; i++){
Expand All @@ -640,49 +613,31 @@ void MarlinUtil::getMC_Balance(LCEvent * evt, double* accumulatedEnergies){
//FIXME : Hard coded cut. Use GEAR instead
if ((fabs(ttet) < 0.1) || (fabs(M_PI-ttet) < 0.1)) {
e_to_tube += enr;
e_to_tubex += px;
e_to_tubey += py;
e_to_tubez += pz;
n_to_tube ++;
continue;
}
if((abs(idpdg)==12)||(abs(idpdg)==14)||(abs(idpdg)==16)) {
e_neutr += enr;
e_neutrx += px;
e_neutry += py;
e_neutrz += pz;
n_neutr ++;
continue;
}
if(abs(idpdg)==13) { // mu+ mu-
e_muon += enr;
e_muonx += px;
e_muony += py;
e_muonz += pz;
n_muon ++;
continue;
}
if(abs(idpdg)==11) { // e+ e-
e_elect += enr;
e_electx += px;
e_electy += py;
e_electz += pz;
n_elect ++;
continue;
}
if(idpdg == 111) { // Pi0 as stable
e_pi0 += enr;
e_pi0x += px;
e_pi0y += py;
e_pi0z += pz;
n_pi0 ++;
continue;
}
if(idpdg == 22) { // photon
e_photon += enr;
e_photonx += px;
e_photony += py;
e_photonz += pz;
n_photon ++;
continue;
}
Expand All @@ -691,9 +646,6 @@ void MarlinUtil::getMC_Balance(LCEvent * evt, double* accumulatedEnergies){
(abs(idpdg)== 130) // KoL
) {
e_llhadr += enr;
e_llhadrx += px;
e_llhadry += py;
e_llhadrz += pz;
n_llhadr ++;
continue;
}
Expand All @@ -704,9 +656,6 @@ void MarlinUtil::getMC_Balance(LCEvent * evt, double* accumulatedEnergies){
(abs(idpdg)==3322) // Xi0
) {
e_slhadr += enr;
e_slhadrx += px;
e_slhadry += py;
e_slhadrz += pz;
n_slhadr ++;
continue;
}
Expand All @@ -719,9 +668,6 @@ void MarlinUtil::getMC_Balance(LCEvent * evt, double* accumulatedEnergies){
!(abs(idpdg)== 130) && !(abs(idpdg)== 310) && // neutral hadrons
!(abs(idpdg)==3122) && !(abs(idpdg)==3212) && !(abs(idpdg)==3322) ) { // neutral hadrons
e_chadr += enr;
e_chadrx += px;
e_chadry += py;
e_chadrz += pz;
n_chadr ++;
continue;
}
Expand Down Expand Up @@ -1184,7 +1130,7 @@ MCParticleHelper::MCParticleHelper() {
}

bool endOfFile = false;
unsigned int numberOfLines = 0;
//unsigned int numberOfLines = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


while (!endOfFile) {

Expand All @@ -1202,7 +1148,7 @@ MCParticleHelper::MCParticleHelper() {

if ( ( (P != "+") && (P != "-") && (P != "?") && (P != "") ) || (Charge.length() == 0) ) continue;

++numberOfLines;
//++numberOfLines;

// debug
/*
Expand Down
10 changes: 0 additions & 10 deletions source/src/TrackwiseClusters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,6 @@ void TrackwiseClusters::calculateProperties(ClusterExtended* Cl) {
float * exhit = new float[nhcl];
float * eyhit = new float[nhcl];
float * ezhit = new float[nhcl];
float totene = 0.0;
float totecal = 0.0;
float tothcal = 0.0;
RandomNumberGenerator random;
float zmin = 1.0e+20;
float zmax = -1.0e+20;
Expand All @@ -871,13 +868,6 @@ void TrackwiseClusters::calculateProperties(ClusterExtended* Cl) {
exhit[jhit] = 4.0;
eyhit[jhit] = 4.0;
ezhit[jhit] = 4.0;
totene += ahit[jhit];
if (calohitvec[jhit]->getType() == 0) {
totecal += ahit[jhit];
}
else {
tothcal += ahit[jhit];
}
if (zhit[jhit]<zmin )
zmin = zhit[jhit];
if (zhit[jhit]>zmax)
Expand Down
4 changes: 0 additions & 4 deletions source/src/TrueJet_Parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,13 @@ const IntVec& TrueJet_Parser::final_siblings( int ijet ) {
m_intvec->clear();
IntVec* sibl=m_intvec;
LCObjectVec fcnvec = relfcn->getRelatedToObjects( jets->at(ijet) );
int nsibl=0;
for ( unsigned kk=0 ; kk<fcnvec.size() ; kk++ ) {
ReconstructedParticleVec jetvec= dynamic_cast<ReconstructedParticle*>(fcnvec[kk])->getParticles();
for ( unsigned jj=0 ; jj<jetvec.size() ; jj++ ) {
if ( jetvec[jj] != jets->at(ijet) ) {
// sibling
int jjet=jetvec[jj]->ext<JetIndex>();
sibl->push_back(jjet);
nsibl++;
}
}
}
Expand All @@ -300,14 +298,12 @@ const IntVec& TrueJet_Parser::initial_siblings( int ijet ){
m_intvec->clear();
IntVec* sibl=m_intvec;
LCObjectVec icnvec = relicn->getRelatedToObjects( jets->at(ijet) );
int nsibl=0;
for ( unsigned kk=0 ; kk<icnvec.size() ; kk++ ) {
ReconstructedParticleVec jetvec= dynamic_cast<ReconstructedParticle*>(icnvec[kk])->getParticles();
for ( unsigned jj=0 ; jj<jetvec.size() ; jj++ ) {
if ( jetvec[jj] != jets->at(ijet) ) {
int jjet=jetvec[jj]->ext<JetIndex>();
sibl->push_back(jjet);
nsibl++;
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions source/src/WeightedPoints3D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ WeightedPoints3D::WeightedPoints3D(const std::vector<double> &cog,
_nfact2(0.0),
_nfact3(0.0),
_nfact4(0.0),
_r1(0.0),
_r2(0.0),
_r3(0.0),
_vol(0.0),
_r_ave(0.0),
_density(0.0),
Expand Down Expand Up @@ -201,9 +198,6 @@ WeightedPoints3D::WeightedPoints3D(int nhits, double* a, double* x, double* y, d
_nfact2 (0.),
_nfact3(0.),
_nfact4(0.),
_r1(0.0),
_r2(0.0),
_r3(0.0),
_vol(0.0),
_r_ave(0.0),
_density(0.0),
Expand Down
Loading