diff --git a/source/include/DDMarlinCED.h b/source/include/DDMarlinCED.h index 9789934..576e681 100644 --- a/source/include/DDMarlinCED.h +++ b/source/include/DDMarlinCED.h @@ -190,7 +190,6 @@ class DDMarlinCED { //hauke hoelbe template 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; @@ -200,7 +199,6 @@ class DDMarlinCED { marker, layer, size , color, id ) ; ++first ; - i++; } } diff --git a/source/include/MarlinCED.h b/source/include/MarlinCED.h index f578634..f7f2ff6 100644 --- a/source/include/MarlinCED.h +++ b/source/include/MarlinCED.h @@ -195,7 +195,6 @@ class MarlinCED { //hauke hoelbe template 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; @@ -207,7 +206,6 @@ class MarlinCED { marker, layer, size , color, id ) ; ++first ; - i++; } } diff --git a/source/include/WeightedPoints3D.h b/source/include/WeightedPoints3D.h index b008391..a884c6c 100644 --- a/source/include/WeightedPoints3D.h +++ b/source/include/WeightedPoints3D.h @@ -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 diff --git a/source/include/random.h b/source/include/random.h index 8709b19..6cdda9f 100644 --- a/source/include/random.h +++ b/source/include/random.h @@ -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(RAND_MAX); x1 = 2.0*(frand) - 1.0; // generate second random number frand = rand(); - frand = frand/RAND_MAX; + frand = frand/static_cast(RAND_MAX); x2 = 2.0*frand - 1.0; w = x1 *x1 + x2*x2; } while ( w >= 1.0 ); diff --git a/source/src/CutOnGEANT4Bug.cc b/source/src/CutOnGEANT4Bug.cc index fc62617..88dcb83 100644 --- a/source/src/CutOnGEANT4Bug.cc +++ b/source/src/CutOnGEANT4Bug.cc @@ -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 float ESumSubCalorimeterHits = 0.0; // accumulated energy of calorimeter hit energies, but only the part which originates from the track,i.e. sub-hit accuracy @@ -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 diff --git a/source/src/DDMarlinCED.cc b/source/src/DDMarlinCED.cc index 3cd0d2f..5dacd9c 100644 --- a/source/src/DDMarlinCED.cc +++ b/source/src/DDMarlinCED.cc @@ -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 ; @@ -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; diff --git a/source/src/MarlinCED.cc b/source/src/MarlinCED.cc index c4dfc14..1efe74a 100644 --- a/source/src/MarlinCED.cc +++ b/source/src/MarlinCED.cc @@ -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<= (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); } diff --git a/source/src/MarlinUtil.cc b/source/src/MarlinUtil.cc index 81bc47b..f2fa64d 100644 --- a/source/src/MarlinUtil.cc +++ b/source/src/MarlinUtil.cc @@ -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; igetNumberOfElements() ; i++){ @@ -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; } @@ -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; } @@ -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; } @@ -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; } @@ -1184,7 +1130,7 @@ MCParticleHelper::MCParticleHelper() { } bool endOfFile = false; - unsigned int numberOfLines = 0; + //unsigned int numberOfLines = 0; while (!endOfFile) { @@ -1202,7 +1148,7 @@ MCParticleHelper::MCParticleHelper() { if ( ( (P != "+") && (P != "-") && (P != "?") && (P != "") ) || (Charge.length() == 0) ) continue; - ++numberOfLines; + //++numberOfLines; // debug /* diff --git a/source/src/TrackwiseClusters.cc b/source/src/TrackwiseClusters.cc index 42e31ba..34cb5d5 100644 --- a/source/src/TrackwiseClusters.cc +++ b/source/src/TrackwiseClusters.cc @@ -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; @@ -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]zmax) diff --git a/source/src/TrueJet_Parser.cc b/source/src/TrueJet_Parser.cc index 0e8c95a..996b81e 100644 --- a/source/src/TrueJet_Parser.cc +++ b/source/src/TrueJet_Parser.cc @@ -280,7 +280,6 @@ 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[kk])->getParticles(); for ( unsigned jj=0 ; jjext(); sibl->push_back(jjet); - nsibl++; } } } @@ -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[kk])->getParticles(); for ( unsigned jj=0 ; jjat(ijet) ) { int jjet=jetvec[jj]->ext(); sibl->push_back(jjet); - nsibl++; } } } diff --git a/source/src/WeightedPoints3D.cc b/source/src/WeightedPoints3D.cc index 2423372..c7c67d0 100644 --- a/source/src/WeightedPoints3D.cc +++ b/source/src/WeightedPoints3D.cc @@ -78,9 +78,6 @@ WeightedPoints3D::WeightedPoints3D(const std::vector &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), @@ -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),