8 :
CSCBaseValidation(ps), theTimeBinPlots(), theNDigisPerLayerPlots(), theStripDigiPlots(), the3StripPlots() {
24 "CSC Comparator Digis per event;CSC Comparator Digis per event;Entries",
29 for (
int i = 1;
i <= 10; ++
i) {
52 iBooker.
setCurrentFolder(
"MuonCSCDigisV/CSCDigiTask/Comparator/Resolution/");
53 for (
int i = 1;
i <= 10; ++
i) {
57 ";Comparator X Position Resolution [cm]; Entries",
78 unsigned nDigisPerEvent = 0;
80 for (
auto j = comparators->begin();
j != comparators->end();
j++) {
81 auto digiItr = (*j).second.first;
82 auto last = (*j).second.second;
87 int nDigis =
last - digiItr;
94 if (nDigis == 1 &&
simHits.size() == 1) {
100 for (
auto stripRange = stripDigis->get(
detId); digiItr !=
last; ++digiItr) {
104 int strip = digiItr->getStrip();
105 for (
auto stripItr = stripRange.first; stripItr != stripRange.second; ++stripItr) {
106 if (stripItr->getStrip() ==
strip) {
107 std::vector<int>
adc = stripItr->getADCCounts();
108 float pedc = 0.5 * (
adc[0] +
adc[1]);
109 float amp =
adc[4] - pedc;
112 if (stripItr != stripRange.first && stripItr != stripRange.second - 1) {
113 std::vector<int> adcl = (stripItr - 1)->getADCCounts();
114 std::vector<int> adcr = (stripItr + 1)->getADCCounts();
115 float pedl = 0.5 * (adcl[0] + adcl[1]);
116 float pedr = 0.5 * (adcr[0] + adcr[1]);
117 float three = adcl[4] - pedl + adcr[4] - pedr + amp;
128 double hitX =
hit.localPosition().
x();
129 double hitY =
hit.localPosition().
y();
130 double digiX =
layer->geometry()->xOfStrip(
strip, hitY);
edm::InputTag inputTagComp_
virtual void setCurrentFolder(std::string const &fullpath)
ParameterSet const & getParameterSet(std::string const &) const
Log< level::Error, false > LogError
MonitorElement * theResolutionPlots[10]
void analyze(const edm::Event &, const edm::EventSetup &) override
void plotResolution(const PSimHit &hit, int strip, const CSCLayer *layer, int chamberType)
edm::EDGetTokenT< CSCComparatorDigiCollection > comparators_Token_
std::string chamberName() const
MonitorElement * theNDigisPerEventPlot
const PSimHitMap * theSimHitMap
const CSCLayer * findLayer(int detId) const
void bookHistograms(DQMStore::IBooker &)
const edm::PSimHitContainer & hits(int detId) const
MonitorElement * theStripDigiPlots[10]
edm::InputTag inputTagStrip_
~CSCComparatorDigiValidation() override
MonitorElement * theTimeBinPlots[10]
MonitorElement * the3StripPlots[10]
MonitorElement * theNDigisPerLayerPlots[10]
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
std::vector< PSimHit > PSimHitContainer
CSCComparatorDigiValidation(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::EDGetTokenT< CSCStripDigiCollection > strips_Token_
uint16_t *__restrict__ uint16_t const *__restrict__ adc
static constexpr int NUM_STRIPS_PER_CFEB