Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added chi-squared plots to Timing Task #14126

Merged
merged 1 commit into from Apr 26, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions DQM/EcalMonitorTasks/python/TimingTask_cfi.py
Expand Up @@ -140,6 +140,18 @@
),
btype = cms.untracked.string('User'),
description = cms.untracked.string('Distribution of the mean rec hit timing. Only hits with GOOD or OUT_OF_TIME reconstruction flags and energy above threshold are used. The energy thresholds are ' + ('%f and %f' % (energyThresholdEB, energyThresholdEE)) + ' for EB and EE respectively.')
),
Chi2 = cms.untracked.PSet(
path = cms.untracked.string("%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT %(subdetshortsig)s Chi2"),
kind = cms.untracked.string('TH1F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('User'),
xaxis = cms.untracked.PSet(
high = cms.untracked.double(100.),
low = cms.untracked.double(0.),
nbins = cms.untracked.int32(100)
),
description = cms.untracked.string('Chi2 of the pulse reconstruction.')
)
)
)
19 changes: 19 additions & 0 deletions DQM/EcalMonitorTasks/src/TimingTask.cc
Expand Up @@ -50,9 +50,11 @@ namespace ecaldqm
MESet& meTimeAllMap(MEs_.at("TimeAllMap"));
MESet& meTimeMap(MEs_.at("TimeMap"));
MESet& meTime1D(MEs_.at("Time1D"));
MESet& meChi2(MEs_.at("Chi2"));

uint32_t mask(~((0x1 << EcalRecHit::kGood) | (0x1 << EcalRecHit::kOutOfTime)));
float threshold(_collection == kEBRecHit ? energyThresholdEB_ : energyThresholdEE_);
int signedSubdet;

std::for_each(_hits.begin(), _hits.end(), [&](EcalRecHitCollection::value_type const& hit){
if(hit.checkFlagMask(mask)) return;
Expand All @@ -63,6 +65,23 @@ namespace ecaldqm
float energy(hit.energy());

float chi2Threshold = ( id.subdetId() == EcalBarrel ) ? chi2ThresholdEB_ : chi2ThresholdEE_;
if (id.subdetId() == EcalBarrel) {
signedSubdet=EcalBarrel;
}
else {
EEDetId eeId(hit.id());
if(eeId.zside() < 0){
signedSubdet = -EcalEndcap;
}
else{
signedSubdet = EcalEndcap;
}
}

if(energy > threshold){
meChi2.fill(signedSubdet, hit.chi2());
}

if( hit.chi2() > chi2Threshold ) return;

meTimeAmp.fill(id, energy, time);
Expand Down