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
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ void EcalTestPulseAnalyzer::analyze(const edm::Event& e, const edm::EventSetup&
double chi2pn = 0;
double ypnrange[50];
double dsum = 0.;
double dsum1 = 0.;
double bl = 0.;
double val_max = 0.;
int samplemax = 0;
Expand Down Expand Up @@ -435,10 +434,8 @@ void EcalTestPulseAnalyzer::analyze(const edm::Event& e, const edm::EventSetup&
}
// Remove pedestal
//====================
for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
for (dsum = 0., k = 0; k < _presample; k++) {
dsum += adc[k];
if (k < _presample - 1)
dsum1 += adc[k];
}

bl = dsum / ((double)_presample);
Expand Down Expand Up @@ -561,10 +558,8 @@ void EcalTestPulseAnalyzer::analyze(const edm::Event& e, const edm::EventSetup&

// Remove pedestal
//====================
for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
for (dsum = 0., k = 0; k < _presample; k++) {
dsum += adc[k];
if (k < _presample - 1)
dsum1 += adc[k];
}

bl = dsum / ((double)_presample);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ void DeDxDiscriminatorLearner::algoAnalyze(const edm::Event& iEvent, const edm::
edm::Handle<reco::TrackCollection> trackCollectionHandle;
iEvent.getByToken(m_tracksTag, trackCollectionHandle);

unsigned track_index = 0;
for (TrajTrackAssociationCollection::const_iterator it = trajTrackAssociationHandle->begin();
it != trajTrackAssociationHandle->end();
++it, track_index++) {
++it) {
const Track& track = *it->val;
const Trajectory& traj = *it->key;

Expand Down
6 changes: 6 additions & 0 deletions Calibration/HcalCalibAlgos/plugins/AnalyzerMinbias.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,16 @@ void AnalyzerMinbias::analyze(const edm::Event& iEvent, const edm::EventSetup& i
const edm::Handle<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord = iEvent.getHandle(tok_hltL1GtMap_);
if (gtObjectMapRecord.isValid()) {
const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->gtObjectMap();
#ifdef EDM_ML_DEBUG
int ii(0);
#endif
bool ok(false), fill(true);
for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
#ifdef EDM_ML_DEBUG
++itMap, ++ii) {
#else
++itMap) {
#endif
bool resultGt = (*itMap).algoGtlResult();
if (resultGt == 1) {
ok = true;
Expand Down
6 changes: 2 additions & 4 deletions Calibration/IsolatedParticles/plugins/IsolatedGenParticles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,8 @@ void IsolatedGenParticles::analyze(const edm::Event &iEvent, const edm::EventSet
}
}

unsigned int indx;
HepMC::GenEvent::particle_const_iterator p;
for (p = myGenEvent->particles_begin(), indx = 0; p != myGenEvent->particles_end(); ++p, ++indx) {
for (p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) {
int pdgId = ((*p)->pdg_id());
int ix = particleCode(pdgId);
if (ix >= 0) {
Expand Down Expand Up @@ -770,9 +769,8 @@ void IsolatedGenParticles::analyze(const edm::Event &iEvent, const edm::EventSet
}
} // loop over gen particles

unsigned int indx;
reco::GenParticleCollection::const_iterator p;
for (p = genParticles->begin(), indx = 0; p != genParticles->end(); ++p, ++indx) {
for (p = genParticles->begin(); p != genParticles->end(); ++p) {
int pdgId = (p->pdgId());
int ix = particleCode(pdgId);
if (ix >= 0) {
Expand Down
6 changes: 2 additions & 4 deletions Calibration/IsolatedParticles/plugins/StudyCaloGen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,8 @@ void StudyCaloGen::analyze(const edm::Event &iEvent, const edm::EventSetup &iSet
}
}

unsigned int indx;
HepMC::GenEvent::particle_const_iterator p;
for (p = myGenEvent->particles_begin(), indx = 0; p != myGenEvent->particles_end(); ++p, ++indx) {
for (p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) {
int pdgId = ((*p)->pdg_id());
int ix = particleCode(pdgId);
if (ix >= 0) {
Expand Down Expand Up @@ -524,9 +523,8 @@ void StudyCaloGen::analyze(const edm::Event &iEvent, const edm::EventSetup &iSet
}
} // loop over gen particles

unsigned int indx;
reco::GenParticleCollection::const_iterator p;
for (p = genParticles->begin(), indx = 0; p != genParticles->end(); ++p, ++indx) {
for (p = genParticles->begin(); p != genParticles->end(); ++p) {
int pdgId = (p->pdgId());
int ix = particleCode(pdgId);
if (ix >= 0) {
Expand Down
3 changes: 1 addition & 2 deletions Calibration/IsolatedParticles/plugins/StudyCaloResponse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1083,10 +1083,9 @@ int StudyCaloResponse::trackPID(const reco::Track* pTrack,
const edm::Handle<reco::GenParticleCollection>& genParticles) {
int id(0);
if (genParticles.isValid()) {
unsigned int indx;
reco::GenParticleCollection::const_iterator p;
double mindR(999.9);
for (p = genParticles->begin(), indx = 0; p != genParticles->end(); ++p, ++indx) {
for (p = genParticles->begin(); p != genParticles->end(); ++p) {
int pdgId = std::abs(p->pdgId());
int idx = (pdgId == 11) ? 1 : ((pdgId == 211) ? 2 : ((pdgId == 321) ? 3 : ((pdgId == 2212) ? 4 : 0)));
if (idx > 0) {
Expand Down