Skip to content

Commit

Permalink
Another batch of removing obsolete code and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed May 3, 2024
1 parent c8e5c9c commit 38ee51d
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 70 deletions.
6 changes: 2 additions & 4 deletions Analysis/TruthVertexFinder/src/MCOperator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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);
}
Expand Down
4 changes: 1 addition & 3 deletions Analysis/TruthVertexFinder/src/TruthVertexFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 2 additions & 7 deletions Analysis/ZFinder/src/ZFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;i<pmuplus.size();i++){
for(unsigned int i=0;i<pmuplus.size();i++){
for(unsigned int j=0;j<pmuminus.size();j++){
LorentzVector pmumu = pmuplus[i]+pmuminus[j];
float massmumu = pmumu.m();
if( fabs(massmumu-91.2) < bestdmz){
bestdmz = fabs(massmumu-91.2);
// besti=i; bestj=j;
pMplus = pMplusPfoVec[i];
pMminus = pMminusPfoVec[j];
}
Expand Down Expand Up @@ -365,16 +362,14 @@ void ZFinder::FindZee(LCCollectionVec * recparcol) {
ReconstructedParticle* pEplus = NULL;
ReconstructedParticle* pEminus = NULL;
float bestdmz = 999.;
// unsigned int besti = 999;
unsigned int bestj = 999;
for(unsigned int i=0;i<peplus.size();i++){
for(unsigned int j=0;j<peminus.size();j++){
LorentzVector pee = peplus[i]+peminus[j];
float massee = pee.m();
if( fabs(massee-91.2) < bestdmz){
bestdmz = fabs(massee-91.2);
// besti=i;
bestj=j;
bestj=j;
pEplus = pEplusPfoVec[i];
pEminus = pEminusPfoVec[j];
}
Expand Down
6 changes: 2 additions & 4 deletions Calibration/AbsCalibration/src/AbsCalibr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ double Balance(LCEvent * evt){
int idpdg;
const double* mom;
float enr;
// double mass;
LCCollection* mcpCol = evt->getCollection("MCParticle" ) ;
LCCollection* mcpCol = evt->getCollection("MCParticle" ) ;
//-----------------------------------------------------------------------
// Calculate balance at IP taking into account everything
//-----------------------------------------------------------------------
Expand Down Expand Up @@ -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];
Expand Down
55 changes: 25 additions & 30 deletions CaloDigi/LDCCaloDigi/src/ILDCaloDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimCalorimeterHit>::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
Expand Down Expand Up @@ -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; 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;
}
}
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<bool>(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<bool>(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){
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions CaloDigi/LDCCaloDigi/src/LDCCaloDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimCalorimeterHit>::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ;

}


Expand Down
4 changes: 0 additions & 4 deletions CaloDigi/LDCCaloDigi/src/NewLDCCaloDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ void NewLDCCaloDigi::init() {
_nRun = -1;
_nEvt = 0;

//fg: need to set default encoding in for reading old files...
//CellIDDecoder<SimCalorimeterHit>::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();
Expand Down
4 changes: 0 additions & 4 deletions CaloDigi/LDCCaloDigi/src/SimpleCaloDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimCalorimeterHit>::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6") ;

}


Expand Down
5 changes: 0 additions & 5 deletions CaloDigi/LDCCaloDigi/src/SimpleMuonDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimCalorimeterHit>::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;

Expand Down
5 changes: 0 additions & 5 deletions Clustering/PhotonFinderKit/src/EMShowerFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<CalorimeterHit>::setDefaultEncoding("M:3,S-1:3,I:9,J:9,K-1:6");


// debug
if (_drawOnCED) MarlinCED::init(this);

Expand Down

0 comments on commit 38ee51d

Please sign in to comment.