diff --git a/Analysis/TruthVertexFinder/src/MCOperator.cc b/Analysis/TruthVertexFinder/src/MCOperator.cc index feb21ae8..d58fbb44 100644 --- a/Analysis/TruthVertexFinder/src/MCOperator.cc +++ b/Analysis/TruthVertexFinder/src/MCOperator.cc @@ -545,8 +545,7 @@ namespace TTbarAnalysis streamlog_out(MESSAGE)<<"WARNING: Long-lived noninteracting particle " << parent->getPDG() <<"!\n"; return result; } - // bool finished = false; - for (unsigned int i = 0; i < daughters.size(); i++) + for (unsigned int i = 0; i < daughters.size(); i++) { MCParticle * daughter = daughters[i]; if (CheckParticle(daughter, TRACKABLE_PARTICLES)) @@ -556,8 +555,7 @@ namespace TTbarAnalysis { //streamlog_out(MESSAGE)<<"CAUTION: Low momentum particle of " << MathOperator::getModule(daughter->getMomentum()) << " GeV!\n"; } - // finished = true; - if (selectReco && IsReconstructed(daughter)) + if (selectReco && IsReconstructed(daughter)) { result.push_back(daughter); } diff --git a/Analysis/TruthVertexFinder/src/TruthVertexFinder.cc b/Analysis/TruthVertexFinder/src/TruthVertexFinder.cc index 47543cc1..ec0647e7 100644 --- a/Analysis/TruthVertexFinder/src/TruthVertexFinder.cc +++ b/Analysis/TruthVertexFinder/src/TruthVertexFinder.cc @@ -498,10 +498,8 @@ namespace TTbarAnalysis _bdistance = MathOperator::getDistance(verticies->at(1)->getPosition(), verticies->at(0)->getPosition()); _btotalnumber = _cnumber + _bnumber; streamlog_out(MESSAGE) <<"Checking b-quark meson...\n"; - // bool compatible = opera.CheckCompatibility(daughters, chain->Get(0), chain->Get(1)->getCharge()); - + streamlog_out(MESSAGE) <<"Checking c-quark meson...\n"; - // compatible = opera.CheckCompatibility(cdaughters, chain->Get(1)); _bptmiss = getMissingPt(daughters, cdaughters, verticies->at(0)); streamlog_out(MESSAGE) <<"Missing pt for b-quark hadron: " << _bptmiss << "\n"; _ccharge = (int)chain->Get(1)->getCharge(); diff --git a/Analysis/ZFinder/src/ZFinder.cc b/Analysis/ZFinder/src/ZFinder.cc index 73f70605..9ddb96b7 100644 --- a/Analysis/ZFinder/src/ZFinder.cc +++ b/Analysis/ZFinder/src/ZFinder.cc @@ -240,15 +240,12 @@ void ZFinder::FindZmumu(LCCollectionVec * recparcol) { ReconstructedParticle* pMplus = NULL; ReconstructedParticle* pMminus = NULL; float bestdmz = 999.; - // unsigned int besti=0; - // unsigned int bestj=0; - for(unsigned int i=0;igetCollection("MCParticle" ) ; + LCCollection* mcpCol = evt->getCollection("MCParticle" ) ; //----------------------------------------------------------------------- // Calculate balance at IP taking into account everything //----------------------------------------------------------------------- @@ -361,8 +360,7 @@ double Balance(LCEvent * evt){ idpdg = imc-> getPDG (); mom = imc-> getMomentum (); enr = imc-> getEnergy (); - // mass = imc-> getMass (); - if( imc-> getGeneratorStatus() == 1) { // stable particles only + if( imc-> getGeneratorStatus() == 1) { // stable particles only px = mom[0]; py = mom[1]; pz = mom[2]; diff --git a/CaloDigi/LDCCaloDigi/src/ILDCaloDigi.cc b/CaloDigi/LDCCaloDigi/src/ILDCaloDigi.cc index 6cc2d796..32bf05a1 100644 --- a/CaloDigi/LDCCaloDigi/src/ILDCaloDigi.cc +++ b/CaloDigi/LDCCaloDigi/src/ILDCaloDigi.cc @@ -570,10 +570,6 @@ void ILDCaloDigi::init() { _strip_virt_cells=-999; _countWarnings=0; - //fg: need to set default encoding in for reading old files... - // dudarboh: does nothing anymore, default encoding spedified in the constructor - // CellIDDecoder::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ; - const gear::GearParameters& pMokka = Global::GEAR->getGearParameters("MokkaParameters"); // Calorimeter geometry from GEAR @@ -882,34 +878,35 @@ void ILDCaloDigi::processEvent( LCEvent * evt ) { eCellInTime+=ecor; } - if(!used[i]){ + if (!used[i]) { // merge with other hits? used[i] = true; - for(unsigned int j =i+1; jgetTimeCont(j); - float energyj = hit->getEnergyCont(j); - float deltatij = fabs(timei-timej); - if (_ecalSimpleTimingCut){ - float deltatTmp = _ecalCorrectTimesForPropagation?dt:0; - if (timej-deltatTmp>_ecalTimeWindowMin && timej-deltatTmpenergyi) timei=timej; - energyi+=energyj; - used[j] = true; - } - } + for (unsigned int j = i + 1; j < n; j++) { + if (!used[j]) { + float timej = hit->getTimeCont(j); + float energyj = hit->getEnergyCont(j); + float deltatij = fabs(timei - timej); + if (_ecalSimpleTimingCut) { + float deltatTmp = _ecalCorrectTimesForPropagation ? dt : 0; + if (timej - deltatTmp > _ecalTimeWindowMin && timej - deltatTmp < ecalTimeWindowMax) { + energySum += energyj; + if (timej < timei) + timei = timej; + } + } else { + if (deltatij < _ecalDeltaTimeHitResolution) { + if (energyj > energyi) + timei = timej; + energyi += energyj; + used[j] = true; + } } + } + } + if (_ecalSimpleTimingCut) { + used = vector(n, true); // mark everything as used to terminate for loop on next run + energyi += energySum; //fill energySum back into energyi to have rest of loop behave the same. } - if (_ecalSimpleTimingCut){ - used = vector(n, true); // mark everything as used to terminate for loop on next run - energyi += energySum; //fill energySum back into energyi to have rest of loop behave the same. - } if(_digitalEcal){ calibr_coeff = this->digitalEcalCalibCoeff(layer); if(_mapsEcalCorrection){ @@ -1107,8 +1104,6 @@ void ILDCaloDigi::processEvent( LCEvent * evt ) { float timei = hit->getTimeCont(i); //absolute hit timing of current subhit float energyi = hit->getEnergyCont(i); //energy of current subhit float energySum = 0; - // float deltat = 0; - // if(_hcalCorrectTimesForPropagation)deltat=dt; //deltat now carries hit timing correction. //std::cout <<"outer:" << i << " " << n << std::endl; //idea of the following section: diff --git a/CaloDigi/LDCCaloDigi/src/LDCCaloDigi.cc b/CaloDigi/LDCCaloDigi/src/LDCCaloDigi.cc index 5d3dc32e..e30c8f1b 100644 --- a/CaloDigi/LDCCaloDigi/src/LDCCaloDigi.cc +++ b/CaloDigi/LDCCaloDigi/src/LDCCaloDigi.cc @@ -169,10 +169,6 @@ void LDCCaloDigi::init() { _nRun = -1; _nEvt = 0; - //fg: need to set default encoding in for reading old files... - // dudarboh: does nothing anymore, default encoding spedified in the constructor - // CellIDDecoder::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ; - } diff --git a/CaloDigi/LDCCaloDigi/src/NewLDCCaloDigi.cc b/CaloDigi/LDCCaloDigi/src/NewLDCCaloDigi.cc index ec67072e..a96f5811 100644 --- a/CaloDigi/LDCCaloDigi/src/NewLDCCaloDigi.cc +++ b/CaloDigi/LDCCaloDigi/src/NewLDCCaloDigi.cc @@ -224,10 +224,6 @@ void NewLDCCaloDigi::init() { _nRun = -1; _nEvt = 0; - //fg: need to set default encoding in for reading old files... - //CellIDDecoder::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ; - // dudarboh: does nothing anymore, default encoding spedified in the constructor - // Calorimeter geometry from GEAR const gear::CalorimeterParameters& pEcalBarrel = Global::GEAR->getEcalBarrelParameters(); const gear::CalorimeterParameters& pEcalEndcap = Global::GEAR->getEcalEndcapParameters(); diff --git a/CaloDigi/LDCCaloDigi/src/SimpleCaloDigi.cc b/CaloDigi/LDCCaloDigi/src/SimpleCaloDigi.cc index d728a3ef..6de121a4 100644 --- a/CaloDigi/LDCCaloDigi/src/SimpleCaloDigi.cc +++ b/CaloDigi/LDCCaloDigi/src/SimpleCaloDigi.cc @@ -140,10 +140,6 @@ void SimpleCaloDigi::init() { _nRun = -1; _nEvt = 0; - //fg: need to set default encoding in for reading old files... - // dudarboh: does nothing anymore, default encoding spedified in the constructor - // CellIDDecoder::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ; - } diff --git a/CaloDigi/LDCCaloDigi/src/SimpleMuonDigi.cc b/CaloDigi/LDCCaloDigi/src/SimpleMuonDigi.cc index ee9103e8..32648b6c 100644 --- a/CaloDigi/LDCCaloDigi/src/SimpleMuonDigi.cc +++ b/CaloDigi/LDCCaloDigi/src/SimpleMuonDigi.cc @@ -98,11 +98,6 @@ void SimpleMuonDigi::init() { _nRun = -1; _nEvt = 0; - //fg: need to set default encoding in for reading old files... - // dudarboh: does nothing anymore, default encoding spedified in the constructor - // CellIDDecoder::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ; - - //Get the number of Layers in the Endcap int layersEndcap=0, layersBarrel=0; diff --git a/Clustering/PhotonFinderKit/src/EMShowerFinder.cc b/Clustering/PhotonFinderKit/src/EMShowerFinder.cc index 816298d1..465bd2fe 100644 --- a/Clustering/PhotonFinderKit/src/EMShowerFinder.cc +++ b/Clustering/PhotonFinderKit/src/EMShowerFinder.cc @@ -104,11 +104,6 @@ void EMShowerFinder::init() { // usually a good idea to printParameters(); - // FIXME: hard coded cell id's for old Mokka (e.g. Mokka v5.4) versions) - // dudarboh: does nothing anymore, default encoding spedified in the constructor - // CellIDDecoder::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6"); - - // debug if (_drawOnCED) MarlinCED::init(this);