|
|
#include <CSCValidation.h>
|
void | analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override |
| Perform the analysis. More...
|
|
| CSCValidation (const edm::ParameterSet &pset) |
| Constructor. More...
|
|
void | endJob () override |
|
| ~CSCValidation () override |
| Destructor. More...
|
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzer () |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () |
|
SerialTaskQueue * | globalRunsQueue () |
|
ModuleDescription const & | moduleDescription () const |
|
std::string | workerType () const |
|
| ~EDAnalyzer () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
int | chamberSerial (CSCDetId id) |
|
void | doADCTiming (const CSCRecHit2DCollection &) |
|
void | doAFEBTiming (const CSCWireDigiCollection &) |
|
void | doCalibrations (const edm::EventSetup &eventSetup) |
|
void | doCompTiming (const CSCComparatorDigiCollection &) |
|
void | doEfficiencies (edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom) |
|
void | doGasGain (const CSCWireDigiCollection &, const CSCStripDigiCollection &, const CSCRecHit2DCollection &) |
|
bool | doHLT (edm::Handle< edm::TriggerResults > hltResults) |
|
void | doNoiseHits (edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom, edm::Handle< CSCStripDigiCollection > strips) |
|
void | doOccupancies (edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments) |
|
void | doPedestalNoise (edm::Handle< CSCStripDigiCollection > strips) |
|
void | doRecHits (edm::Handle< CSCRecHit2DCollection > recHits, edm::ESHandle< CSCGeometry > cscGeom) |
|
void | doResolution (edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom) |
|
void | doSegments (edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom) |
|
void | doSimHits (edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< edm::PSimHitContainer > simHits) |
|
void | doStandalone (edm::Handle< reco::TrackCollection > saMuons) |
|
void | doStripDigis (edm::Handle< CSCStripDigiCollection > strips) |
|
void | doTimeMonitoring (edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< CSCALCTDigiCollection > alcts, edm::Handle< CSCCLCTDigiCollection > clcts, edm::Handle< CSCCorrelatedLCTDigiCollection > correlatedlcts, edm::Handle< L1MuGMTReadoutCollection > pCollection, edm::ESHandle< CSCGeometry > cscGeom, const edm::EventSetup &eventSetup, const edm::Event &event) |
|
bool | doTrigger (edm::Handle< L1MuGMTReadoutCollection > pCollection) |
|
void | doWireDigis (edm::Handle< CSCWireDigiCollection > wires) |
|
double | extrapolate1D (double initPosition, double initDirection, double parameterOfTheLine) |
|
void | fillEfficiencyHistos (int bin, int flag) |
|
bool | filterEvents (edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< reco::TrackCollection > saMuons) |
|
void | findNonAssociatedRecHits (edm::ESHandle< CSCGeometry > cscGeom, edm::Handle< CSCStripDigiCollection > strips) |
|
float | fitX (const CLHEP::HepMatrix &sp, const CLHEP::HepMatrix &ep) |
|
void | getEfficiency (float bin, float Norm, std::vector< float > &eff) |
|
float | getSignal (const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip) |
|
float | getthisSignal (const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip) |
|
int | getWidth (const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip) |
|
void | histoEfficiency (TH1F *readHisto, TH1F *writeHisto) |
|
double | lineParametrization (double z1Position, double z2Position, double z1Direction) |
|
int | ringSerial (CSCDetId id) |
|
int | typeIndex (CSCDetId id) |
|
bool | withinSensitiveRegion (LocalPoint localPos, const std::array< const float, 4 > &layerBounds, int station, int ring, float shiftFromEdge, float shiftFromDeadZone) |
|
|
typedef EDAnalyzer | ModuleType |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &) |
|
static bool | wantsGlobalLuminosityBlocks () |
|
static bool | wantsGlobalRuns () |
|
static bool | wantsInputProcessBlocks () |
|
static bool | wantsProcessBlocks () |
|
static bool | wantsStreamLuminosityBlocks () |
|
static bool | wantsStreamRuns () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Package to validate local CSC reconstruction: DIGIS recHits segments L1 trigger CSC STA muons Various efficiencies
Responsible: Andy Kubik, Northwestern University
Definition at line 105 of file CSCValidation.h.
◆ CSCValidation()
Constructor.
Definition at line 16 of file CSCValidation.cc.
22 useDigis =
pset.getUntrackedParameter<
bool>(
"useDigis",
true);
26 pMin =
pset.getUntrackedParameter<
double>(
"pMin", 4.);
27 chisqMax =
pset.getUntrackedParameter<
double>(
"chisqMax", 20.);
30 lengthMin =
pset.getUntrackedParameter<
double>(
"lengthMin", 140.);
31 lengthMax =
pset.getUntrackedParameter<
double>(
"lengthMax", 600.);
33 polarMax =
pset.getUntrackedParameter<
double>(
"polarMax", 0.7);
34 polarMin =
pset.getUntrackedParameter<
double>(
"polarMin", 0.3);
89 hOWires =
new TH2I(
"hOWires",
"Wire Digi Occupancy", 36, 0.5, 36.5, 20, 0.5, 20.5);
90 hOStrips =
new TH2I(
"hOStrips",
"Strip Digi Occupancy", 36, 0.5, 36.5, 20, 0.5, 20.5);
91 hORecHits =
new TH2I(
"hORecHits",
"RecHit Occupancy", 36, 0.5, 36.5, 20, 0.5, 20.5);
92 hOSegments =
new TH2I(
"hOSegments",
"Segments Occupancy", 36, 0.5, 36.5, 20, 0.5, 20.5);
95 hSSTE =
new TH1F(
"hSSTE",
"hSSTE", 40, 0, 40);
96 hRHSTE =
new TH1F(
"hRHSTE",
"hRHSTE", 40, 0, 40);
97 hSEff =
new TH1F(
"hSEff",
"Segment Efficiency", 20, 0.5, 20.5);
98 hRHEff =
new TH1F(
"hRHEff",
"recHit Efficiency", 20, 0.5, 20.5);
100 const int nChambers = 36;
101 const int nTypes = 18;
103 float nCh_max =
float(nChambers) + 0.5;
105 float nT_max =
float(nTypes) + 0.5;
107 hSSTE2 =
new TH2F(
"hSSTE2",
"hSSTE2", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
108 hRHSTE2 =
new TH2F(
"hRHSTE2",
"hRHSTE2", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
109 hStripSTE2 =
new TH2F(
"hStripSTE2",
"hStripSTE2", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
110 hWireSTE2 =
new TH2F(
"hWireSTE2",
"hWireSTE2", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
112 hEffDenominator =
new TH2F(
"hEffDenominator",
"hEffDenominator", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
113 hSEff2 =
new TH2F(
"hSEff2",
"Segment Efficiency 2D", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
114 hRHEff2 =
new TH2F(
"hRHEff2",
"recHit Efficiency 2D", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
116 hStripEff2 =
new TH2F(
"hStripEff2",
"strip Efficiency 2D", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
117 hWireEff2 =
new TH2F(
"hWireEff2",
"wire Efficiency 2D", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
120 new TH2F(
"hSensitiveAreaEvt",
"events in sensitive area", nChambers, nCH_min, nCh_max, nTypes, nT_min, nT_max);
126 geomToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
References dtNoiseAnalysis_cfi::detailedAnalysis, amptDefault_cfi::firstEvent, dqmMemoryStats::float, combine::histos, ALCARECOTkAlMinBias_cff::pMin, muonDTDigis_cfi::pset, CSCSkim_cfi::rootFileName, AlCaHLTBitMon_QueryRunRegistry::string, and interactiveExample::theFile.
◆ ~CSCValidation()
CSCValidation::~CSCValidation |
( |
| ) |
|
|
override |
◆ analyze()
Perform the analysis.
Implements edm::EDAnalyzer.
Definition at line 176 of file CSCValidation.cc.
193 event.getByToken(
cd_token, compars);
196 event.getByToken(
co_token, correlatedlcts);
223 event.getByToken(
l1_token, pCollection);
233 event.getByToken(
sa_token, saMuons);
References dtChamberEfficiency_cfi::cscSegments, ecalTB2006H4_GenSimDigiReco_cfg::doSimHits, amptDefault_cfi::firstEvent, edm::EventSetup::getHandle(), ValidationMatrix::hlt, FastTrackerRecHitMaskProducer_cfi::recHits, FastTrackerRecHitCombiner_cfi::simHits, DigiDM_cff::strips, and DigiDM_cff::wires.
◆ chamberSerial()
int CSCValidation::chamberSerial |
( |
CSCDetId |
id | ) |
|
|
private |
Definition at line 1358 of file CSCValidation.cc.
1359 int st =
id.station();
1361 int ch =
id.chamber();
1362 int ec =
id.endcap();
1364 if (st == 1 && ri == 1)
1366 if (st == 1 && ri == 2)
1368 if (st == 1 && ri == 3)
1370 if (st == 1 && ri == 4)
1372 if (st == 2 && ri == 1)
1374 if (st == 2 && ri == 2)
1376 if (st == 3 && ri == 1)
1378 if (st == 3 && ri == 2)
1380 if (st == 4 && ri == 1)
1382 if (st == 4 && ri == 2)
1385 kSerial = kSerial + 300;
◆ doADCTiming()
Definition at line 2843 of file CSCValidation.cc.
2844 float adc_3_3_sum, adc_3_3_wtbin,
x,
y;
2845 int cfeb, idchamber,
ring;
2849 std::vector<float> zer(6, 0.0);
2852 std::map<int, int>::iterator intIt;
2854 if (rechitcltn.begin() != rechitcltn.end()) {
2860 for (recIt = rechitcltn.begin(); recIt != rechitcltn.end(); ++recIt) {
2863 if (recIt->nStrips() == 3) {
2866 unsigned int binmx = 0;
2869 for (
unsigned int i = 0;
i < recIt->nStrips();
i++)
2870 for (
unsigned int j = 0;
j < recIt->nTimeBins();
j++)
2871 if (recIt->adcs(
i,
j) > adcmax) {
2872 adcmax = recIt->adcs(
i,
j);
2878 for (
unsigned int i = 0;
i < recIt->nStrips();
i++)
2879 for (
unsigned int j = binmx - 1;
j <= binmx + 1;
j++)
2880 adc_3_3_sum += recIt->adcs(
i,
j);
2883 if (adc_3_3_sum > 100.0) {
2884 int centerStrip = recIt->channels(1);
2887 if (
id.
station() == 1 &&
id.
ring() == 4 && centerStrip > 16)
2891 adc_3_3_wtbin = (*recIt).tpeak() / 50;
2892 idchamber = indexer.
dbIndex(
id, centerStrip) / 10;
2900 ss <<
"adc_3_3_weight_time_bin_vs_cfeb_occupancy_ME_" << idchamber;
2912 ss <<
"ADC 3X3 Weighted Time Bin vs CFEB Occupancy ME" << endcapstr <<
id.station() <<
"/" <<
ring <<
"/"
2917 cfeb = (centerStrip - 1) / 16 + 1;
2920 histos->
fill2DHist(
x,
y,
name,
title, 5, 1., 6., 80, -8., 8.,
"ADCTiming");
References CSCIndexer::dbIndex(), makeMuonMisalignmentScenario::endcap, RemoveAddSevLevel::flag, combine::histos, mps_fire::i, dqmiolumiharvest::j, Skims_PA_cff::name, relativeConstraints::ring, contentValuesCheck::ss, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.
◆ doAFEBTiming()
Definition at line 2715 of file CSCValidation.cc.
2719 int wire, wiretbin, nmbwiretbin,
layer, afeb, idlayer, idchamber;
2723 if (wirecltn.begin() != wirecltn.end()) {
2730 for (wiredetUnitIt = wirecltn.begin(); wiredetUnitIt != wirecltn.end(); ++wiredetUnitIt) {
2731 const CSCDetId id = (*wiredetUnitIt).first;
2732 idlayer = indexer.
dbIndex(
id, channel);
2733 idchamber = idlayer / 10;
2745 wire = (*digiIt).getWireGroup();
2746 wiretbin = (*digiIt).getTimeBin();
2747 nmbwiretbin = (*digiIt).getTimeBinsOn().size();
2748 afeb = 3 * ((wire - 1) / 8) + (
layer + 1) / 2;
2753 ss <<
"afeb_time_bin_vs_afeb_occupancy_ME_" << idchamber;
2756 ss <<
"Time Bin vs AFEB Occupancy ME" << endcapstr <<
id.station() <<
"/" <<
id.ring() <<
"/" <<
id.chamber();
2759 histos->
fill2DHist(
x,
y,
name,
title, 42, 1., 43., 16, 0., 16.,
"AFEBTiming");
2764 ss <<
"nmb_afeb_time_bins_vs_afeb_ME_" << idchamber;
2767 ss <<
"Number of Time Bins vs AFEB ME" << endcapstr <<
id.station() <<
"/" <<
id.ring() <<
"/" <<
id.chamber();
2770 histos->
fill2DHist(
x,
y,
name,
title, 42, 1., 43., 16, 0., 16.,
"AFEBTiming");
References CSCIndexer::dbIndex(), makeMuonMisalignmentScenario::endcap, combine::histos, phase1PixelTopology::layer, Skims_PA_cff::name, FastTimerService_cff::range, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.
◆ doCalibrations()
Definition at line 693 of file CSCValidation.cc.
696 LogDebug(
"Calibrations") <<
"Loading Calibrations...";
715 LogDebug(
"Calibrations") <<
"Calibrations Loaded!";
717 for (
int i = 0;
i < 400;
i++) {
721 pCrosstalk->
crosstalk[
i].xtalk_slope_left,
"hCalibXtalkSL",
"Xtalk Slope Left", 400, 0, 400,
bin,
"Calib");
723 pCrosstalk->
crosstalk[
i].xtalk_slope_right,
"hCalibXtalkSR",
"Xtalk Slope Right", 400, 0, 400,
bin,
"Calib");
726 "Xtalk Intercept Left",
734 "Xtalk Intercept Right",
743 pNoiseMatrix->
matrix[
i].elem33,
"hCalibNoise33",
"Noise Matrix 33", 400, 0, 400,
bin,
"Calib");
745 pNoiseMatrix->
matrix[
i].elem34,
"hCalibNoise34",
"Noise Matrix 34", 400, 0, 400,
bin,
"Calib");
747 pNoiseMatrix->
matrix[
i].elem35,
"hCalibNoise35",
"Noise Matrix 35", 400, 0, 400,
bin,
"Calib");
749 pNoiseMatrix->
matrix[
i].elem44,
"hCalibNoise44",
"Noise Matrix 44", 400, 0, 400,
bin,
"Calib");
751 pNoiseMatrix->
matrix[
i].elem45,
"hCalibNoise45",
"Noise Matrix 45", 400, 0, 400,
bin,
"Calib");
753 pNoiseMatrix->
matrix[
i].elem46,
"hCalibNoise46",
"Noise Matrix 46", 400, 0, 400,
bin,
"Calib");
755 pNoiseMatrix->
matrix[
i].elem55,
"hCalibNoise55",
"Noise Matrix 55", 400, 0, 400,
bin,
"Calib");
757 pNoiseMatrix->
matrix[
i].elem56,
"hCalibNoise56",
"Noise Matrix 56", 400, 0, 400,
bin,
"Calib");
759 pNoiseMatrix->
matrix[
i].elem57,
"hCalibNoise57",
"Noise Matrix 57", 400, 0, 400,
bin,
"Calib");
761 pNoiseMatrix->
matrix[
i].elem66,
"hCalibNoise66",
"Noise Matrix 66", 400, 0, 400,
bin,
"Calib");
763 pNoiseMatrix->
matrix[
i].elem67,
"hCalibNoise67",
"Noise Matrix 67", 400, 0, 400,
bin,
"Calib");
765 pNoiseMatrix->
matrix[
i].elem77,
"hCalibNoise77",
"Noise Matrix 77", 400, 0, 400,
bin,
"Calib");
References newFWLiteAna::bin, CSCDBCrosstalk::crosstalk, CSCDBGains::gains, edm::EventSetup::get(), get, combine::histos, mps_fire::i, LogDebug, CSCDBNoiseMatrix::matrix, CSCDBPedestals::pedestals, and edm::ESHandle< T >::product().
◆ doCompTiming()
Definition at line 2782 of file CSCValidation.cc.
2786 int strip, tbin, cfeb, idlayer, idchamber;
2790 if (compars.begin() != compars.end()) {
2797 for (compdetUnitIt = compars.begin(); compdetUnitIt != compars.end(); ++compdetUnitIt) {
2798 const CSCDetId id = (*compdetUnitIt).first;
2799 idlayer = indexer.
dbIndex(
id, channel);
2800 idchamber = idlayer / 10;
2809 strip = (*digiIt).getStrip();
2817 tbin = (*digiIt).getTimeBin();
2818 cfeb = (
strip - 1) / 16 + 1;
2824 ss <<
"comp_time_bin_vs_cfeb_occupancy_ME_" << idchamber;
2827 ss <<
"Comparator Time Bin vs CFEB Occupancy ME" <<
endcap <<
id.station() <<
"/" <<
id.ring() <<
"/"
2831 histos->
fill2DHist(
x,
y,
name,
title, 5, 1., 6., 16, 0., 16.,
"CompTiming");
References CSCIndexer::dbIndex(), makeMuonMisalignmentScenario::endcap, combine::histos, Skims_PA_cff::name, FastTimerService_cff::range, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, digitizers_cfi::strip, and runGCPTkAlMap::title.
◆ doEfficiencies()
Definition at line 1462 of file CSCValidation.cc.
1467 bool allWires[2][4][4][36][6];
1468 bool allStrips[2][4][4][36][6];
1469 bool AllRecHits[2][4][4][36][6];
1470 bool AllSegments[2][4][4][36];
1473 for (
int iE = 0; iE < 2; iE++) {
1474 for (
int iS = 0; iS < 4; iS++) {
1475 for (
int iR = 0; iR < 4; iR++) {
1476 for (
int iC = 0; iC < 36; iC++) {
1477 AllSegments[iE][iS][iR][iC] =
false;
1479 for (
int iL = 0; iL < 6; iL++) {
1480 allWires[iE][iS][iR][iC][iL] =
false;
1481 allStrips[iE][iS][iR][iC][iL] =
false;
1482 AllRecHits[iE][iS][iR][iC][iL] =
false;
1493 std::vector<CSCWireDigi>::const_iterator wireIter = (*dWDiter).second.first;
1494 std::vector<CSCWireDigi>::const_iterator lWire = (*dWDiter).second.second;
1495 for (; wireIter != lWire; ++wireIter) {
1505 std::vector<CSCStripDigi>::const_iterator stripIter = (*dSDiter).second.first;
1506 std::vector<CSCStripDigi>::const_iterator lStrip = (*dSDiter).second.second;
1507 for (; stripIter != lStrip; ++stripIter) {
1508 std::vector<int> myADCVals = stripIter->getADCCounts();
1509 bool thisStripFired =
false;
1510 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
1513 for (
unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
1514 diff = (
float)myADCVals[iCount] - thisPedestal;
1516 thisStripFired =
true;
1520 if (thisStripFired) {
1537 std::vector<unsigned int> seg_ME2(2, 0);
1538 std::vector<unsigned int> seg_ME3(2, 0);
1539 std::vector<std::pair<CSCDetId, CSCSegment> > theSegments(4);
1552 unsigned int seg_tmp;
1554 ++seg_ME2[idseg.
endcap() - 1];
1555 seg_tmp = seg_ME2[idseg.
endcap() - 1];
1557 ++seg_ME3[idseg.
endcap() - 1];
1558 seg_tmp = seg_ME3[idseg.
endcap() - 1];
1561 if (1 == seg_tmp && 6 == (*segEffIt).nRecHits() && (*segEffIt).chi2() / (*segEffIt).degreesOfFreedom() < 3.) {
1562 std::pair<CSCDetId, CSCSegment> specSeg = make_pair((
CSCDetId)(*segEffIt).cscDetId(), *segEffIt);
1563 theSegments[2 * (idseg.
endcap() - 1) + (idseg.
station() - 2)] = specSeg;
1584 for (
int iE = 0; iE < 2; iE++) {
1585 for (
int iS = 0; iS < 4; iS++) {
1586 for (
int iR = 0; iR < 4; iR++) {
1587 for (
int iC = 0; iC < 36; iC++) {
1588 int NumberOfLayers = 0;
1589 for (
int iL = 0; iL < 6; iL++) {
1590 if (AllRecHits[iE][iS][iR][iC][iL]) {
1596 bin = iR + 1 + (iE * 10);
1598 bin = (iS + 1) * 2 + (iR + 1) + (iE * 10);
1599 if (NumberOfLayers > 1) {
1601 if (AllSegments[iE][iS][iR][iC]) {
1609 if (AllSegments[iE][iS][iR][iC]) {
1610 if (NumberOfLayers == 6) {
1625 std::vector<std::pair<CSCDetId, CSCSegment>*> theSeg;
1626 if (1 == seg_ME2[0])
1627 theSeg.push_back(&theSegments[0]);
1628 if (1 == seg_ME3[0])
1629 theSeg.push_back(&theSegments[1]);
1630 if (1 == seg_ME2[1])
1631 theSeg.push_back(&theSegments[2]);
1632 if (1 == seg_ME3[1])
1633 theSeg.push_back(&theSegments[3]);
1638 std::map<std::string, float> chamberTypes;
1639 chamberTypes[
"ME1/a"] = 0.5;
1640 chamberTypes[
"ME1/b"] = 1.5;
1641 chamberTypes[
"ME1/2"] = 2.5;
1642 chamberTypes[
"ME1/3"] = 3.5;
1643 chamberTypes[
"ME2/1"] = 4.5;
1644 chamberTypes[
"ME2/2"] = 5.5;
1645 chamberTypes[
"ME3/1"] = 6.5;
1646 chamberTypes[
"ME3/2"] = 7.5;
1647 chamberTypes[
"ME4/1"] = 8.5;
1649 if (!theSeg.empty()) {
1650 std::map<int, GlobalPoint> extrapolatedPoint;
1651 std::map<int, GlobalPoint>::iterator it;
1654 for (
size_t nCh = 0; nCh < ChamberContainer.size(); nCh++) {
1655 const CSCChamber* cscchamber = ChamberContainer[nCh];
1656 std::pair<CSCDetId, CSCSegment>* thisSegment =
nullptr;
1657 for (
size_t iSeg = 0; iSeg < theSeg.size(); ++iSeg) {
1658 if (cscchamber->
id().
endcap() == theSeg[iSeg]->first.endcap()) {
1660 if (2 == theSeg[iSeg]->
first.station()) {
1661 thisSegment = theSeg[iSeg];
1664 if (3 == theSeg[iSeg]->
first.station()) {
1665 thisSegment = theSeg[iSeg];
1677 it = extrapolatedPoint.find(
int(cscchamberCenter.
z()));
1678 if (it == extrapolatedPoint.end()) {
1682 double xExtrapolated =
extrapolate1D(segPos.
x(), segDir.
x(), paramaterLine);
1683 double yExtrapolated =
extrapolate1D(segPos.
y(), segDir.
y(), paramaterLine);
1684 GlobalPoint globP(xExtrapolated, yExtrapolated, cscchamberCenter.
z());
1685 extrapolatedPoint[
int(cscchamberCenter.
z())] = globP;
1688 LocalPoint extrapolatedPointLocal = cscchamber->
toLocal(extrapolatedPoint[
int(cscchamberCenter.
z())]);
1691 const std::array<const float, 4>& layerBounds = layerGeom->
parameters();
1692 float shiftFromEdge = 15.;
1693 float shiftFromDeadZone = 10.;
1708 for (
int iL = 0; iL < 6; ++iL) {
1716 if (cscchamberCenter.
z() < 0) {
1717 verticalScale = -verticalScale;
1719 verticalScale += 9.5;
1721 if (nRHLayers > 1) {
1730 hSSTE2->Fill(
float(cscchamber->
id().
chamber()),
float(verticalScale));
1733 for (
int iL = 0; iL < 6; ++iL) {
References newFWLiteAna::bin, CSCDetId::chamber(), CSCGeometry::chamber(), CSCGeometry::chambers(), CSCChamberSpecs::chamberTypeName(), dtChamberEfficiency_cfi::cscSegments, change_name::diff, CSCDetId::endcap(), first, dqmMemoryStats::float, cms::cuda::for(), CSCLayer::geometry(), CSCChamber::id(), createfilelist::int, CSCChamber::layer(), CSCDetId::layer(), CSCSegment::localDirection(), CSCSegment::localPosition(), TrapezoidalPlaneBounds::parameters(), FastTrackerRecHitMaskProducer_cfi::recHits, CSCDetId::ring(), CSCChamber::specs(), CSCDetId::station(), DigiDM_cff::strips, remoteMonitoring_LED_IterMethod_cfg::threshold, GeomDet::toGlobal(), GeomDet::toLocal(), mps_merge::weight, DigiDM_cff::wires, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ doGasGain()
Definition at line 2442 of file CSCValidation.cc.
2445 int channel = 0,
mult, wire,
layer, idlayer, idchamber,
ring;
2446 int wire_strip_rechit_present;
2450 std::map<int, int>::iterator intIt;
2458 std::map<int, std::vector<int> >::iterator intvecIt;
2460 int csctype[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
2461 int hvsegm_layer[10] = {1, 1, 3, 3, 3, 5, 3, 5, 3, 5};
2464 for (
int i = 0;
i < 10;
i++)
2467 std::vector<int> zer_1_1a(49, 0);
2472 for (
int wire = 1; wire <= 48; wire++)
2473 intvecIt->second[wire] = 1;
2476 std::vector<int> zer_1_1b(49, 0);
2481 for (
int wire = 1; wire <= 48; wire++)
2482 intvecIt->second[wire] = 1;
2485 std::vector<int> zer_1_2(65, 0);
2490 for (
int wire = 1; wire <= 24; wire++)
2491 intvecIt->second[wire] = 1;
2492 for (
int wire = 25; wire <= 48; wire++)
2493 intvecIt->second[wire] = 2;
2494 for (
int wire = 49; wire <= 64; wire++)
2495 intvecIt->second[wire] = 3;
2498 std::vector<int> zer_1_3(33, 0);
2503 for (
int wire = 1; wire <= 12; wire++)
2504 intvecIt->second[wire] = 1;
2505 for (
int wire = 13; wire <= 22; wire++)
2506 intvecIt->second[wire] = 2;
2507 for (
int wire = 23; wire <= 32; wire++)
2508 intvecIt->second[wire] = 3;
2511 std::vector<int> zer_2_1(113, 0);
2516 for (
int wire = 1; wire <= 44; wire++)
2517 intvecIt->second[wire] = 1;
2518 for (
int wire = 45; wire <= 80; wire++)
2519 intvecIt->second[wire] = 2;
2520 for (
int wire = 81; wire <= 112; wire++)
2521 intvecIt->second[wire] = 3;
2524 std::vector<int> zer_2_2(65, 0);
2529 for (
int wire = 1; wire <= 16; wire++)
2530 intvecIt->second[wire] = 1;
2531 for (
int wire = 17; wire <= 28; wire++)
2532 intvecIt->second[wire] = 2;
2533 for (
int wire = 29; wire <= 40; wire++)
2534 intvecIt->second[wire] = 3;
2535 for (
int wire = 41; wire <= 52; wire++)
2536 intvecIt->second[wire] = 4;
2537 for (
int wire = 53; wire <= 64; wire++)
2538 intvecIt->second[wire] = 5;
2541 std::vector<int> zer_3_1(97, 0);
2546 for (
int wire = 1; wire <= 32; wire++)
2547 intvecIt->second[wire] = 1;
2548 for (
int wire = 33; wire <= 64; wire++)
2549 intvecIt->second[wire] = 2;
2550 for (
int wire = 65; wire <= 96; wire++)
2551 intvecIt->second[wire] = 3;
2554 std::vector<int> zer_3_2(65, 0);
2559 for (
int wire = 1; wire <= 16; wire++)
2560 intvecIt->second[wire] = 1;
2561 for (
int wire = 17; wire <= 28; wire++)
2562 intvecIt->second[wire] = 2;
2563 for (
int wire = 29; wire <= 40; wire++)
2564 intvecIt->second[wire] = 3;
2565 for (
int wire = 41; wire <= 52; wire++)
2566 intvecIt->second[wire] = 4;
2567 for (
int wire = 53; wire <= 64; wire++)
2568 intvecIt->second[wire] = 5;
2571 std::vector<int> zer_4_1(97, 0);
2576 for (
int wire = 1; wire <= 32; wire++)
2577 intvecIt->second[wire] = 1;
2578 for (
int wire = 33; wire <= 64; wire++)
2579 intvecIt->second[wire] = 2;
2580 for (
int wire = 65; wire <= 96; wire++)
2581 intvecIt->second[wire] = 3;
2584 std::vector<int> zer_4_2(65, 0);
2589 for (
int wire = 1; wire <= 16; wire++)
2590 intvecIt->second[wire] = 1;
2591 for (
int wire = 17; wire <= 28; wire++)
2592 intvecIt->second[wire] = 2;
2593 for (
int wire = 29; wire <= 40; wire++)
2594 intvecIt->second[wire] = 3;
2595 for (
int wire = 41; wire <= 52; wire++)
2596 intvecIt->second[wire] = 4;
2597 for (
int wire = 53; wire <= 64; wire++)
2598 intvecIt->second[wire] = 5;
2603 wire_strip_rechit_present = 0;
2604 if (wirecltn.begin() != wirecltn.end())
2605 wire_strip_rechit_present = wire_strip_rechit_present + 1;
2606 if (strpcltn.begin() != strpcltn.end())
2607 wire_strip_rechit_present = wire_strip_rechit_present + 2;
2608 if (rechitcltn.begin() != rechitcltn.end())
2609 wire_strip_rechit_present = wire_strip_rechit_present + 4;
2611 if (wire_strip_rechit_present == 7) {
2618 for (wiredetUnitIt = wirecltn.begin(); wiredetUnitIt != wirecltn.end(); ++wiredetUnitIt) {
2619 const CSCDetId id = (*wiredetUnitIt).first;
2620 idlayer = indexer.
dbIndex(
id, channel);
2626 wire = (*digiIt).getWireGroup();
2641 for (recIt = rechitcltn.begin(); recIt != rechitcltn.end(); ++recIt) {
2643 idlayer = indexer.
dbIndex(
id, channel);
2644 idchamber = idlayer / 10;
2648 if (recIt->nStrips() == 3) {
2650 unsigned int binmx = 0;
2653 for (
unsigned int i = 0;
i < recIt->nStrips();
i++)
2654 for (
unsigned int j = 0;
j < recIt->nTimeBins();
j++)
2655 if (recIt->adcs(
i,
j) > adcmax) {
2656 adcmax = recIt->adcs(
i,
j);
2660 float adc_3_3_sum = 0.0;
2662 for (
unsigned int i = 0;
i < recIt->nStrips();
i++)
2663 for (
unsigned int j = binmx - 1;
j <= binmx + 1;
j++)
2664 adc_3_3_sum += recIt->adcs(
i,
j);
2666 if (adc_3_3_sum > 0.0 && adc_3_3_sum < 2000.0) {
2669 if (
id.
station() == 1 &&
id.
ring() == 4 && recIt->channels(1) > 16)
2674 int chambertype =
id.iChamberType(
id.
station(),
id.
ring());
2676 int nmbofhvsegm =
nmbhvsegm[chambertype - 1];
2679 ss <<
"gas_gain_rechit_adc_3_3_sum_location_ME_" << idchamber;
2689 ss <<
"Gas Gain Rechit ADC3X3 Sum ME" << endcapstr <<
id.station() <<
"/" <<
ring <<
"/" <<
id.chamber();
2693 float y = adc_3_3_sum;
2694 histos->
fill2DHist(
x,
y,
name,
title, 30, 1.0, 31.0, 50, 0.0, 2000.0,
"GasGain");
References CSCIndexer::dbIndex(), makeMuonMisalignmentScenario::endcap, amptDefault_cfi::firstEvent, RemoveAddSevLevel::flag, cms::cuda::for(), combine::histos, mps_fire::i, triggerObjects_cff::id, dqmiolumiharvest::j, phase1PixelTopology::layer, EcalCondDBWriter_cfi::location, VarParsing::mult, Skims_PA_cff::name, FastTimerService_cff::range, relativeConstraints::ring, contentValuesCheck::ss, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.
◆ doHLT()
◆ doNoiseHits()
Definition at line 1965 of file CSCValidation.cc.
1970 for (recIt =
recHits->begin(); recIt !=
recHits->end(); recIt++) {
1974 AllRechits.insert(std::pair<CSCDetId, CSCRecHit2D>(idrec, *recIt));
1977 int centerid = recIt->nStrips() / 2;
1978 int centerStrip = recIt->channels(centerid);
1982 rHsignal,
"hrHSignal",
"Signal in the 4th time bin for centre strip", 1100, -99, 1000,
"recHits");
1986 std::vector<CSCRecHit2D> theseRecHits = (*it).specificRecHits();
1987 for (std::vector<CSCRecHit2D>::const_iterator iRH = theseRecHits.begin(); iRH != theseRecHits.end(); iRH++) {
1990 float xrec = lpRH.
x();
1991 float yrec = lpRH.
y();
1992 float zrec = lpRH.
z();
1993 bool RHalreadyinMap =
false;
1995 multimap<CSCDetId, CSCRecHit2D>::iterator segRHit;
1998 for (; segRHit !=
SegRechits.upper_bound(idRH); ++segRHit) {
2000 LocalPoint lposRH = (segRHit->second).localPosition();
2001 float xpos = lposRH.
x();
2002 float ypos = lposRH.
y();
2003 float zpos = lposRH.
z();
2004 if (xrec == xpos && yrec == ypos && zrec == zpos) {
2005 RHalreadyinMap =
true;
2011 if (!RHalreadyinMap) {
2012 SegRechits.insert(std::pair<CSCDetId, CSCRecHit2D>(idRH, *iRH));
References dtChamberEfficiency_cfi::cscSegments, combine::histos, FastTrackerRecHitMaskProducer_cfi::recHits, DigiDM_cff::strips, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ doOccupancies()
Definition at line 418 of file CSCValidation.cc.
422 bool wireo[2][4][4][36];
423 bool stripo[2][4][4][36];
424 bool rechito[2][4][4][36];
425 bool segmento[2][4][4][36];
427 bool hasWires =
false;
428 bool hasStrips =
false;
429 bool hasRecHits =
false;
430 bool hasSegments =
false;
432 for (
int e = 0;
e < 2;
e++) {
433 for (
int s = 0;
s < 4;
s++) {
434 for (
int r = 0;
r < 4;
r++) {
435 for (
int c = 0;
c < 36;
c++) {
436 wireo[
e][
s][
r][
c] =
false;
437 stripo[
e][
s][
r][
c] =
false;
438 rechito[
e][
s][
r][
c] =
false;
439 segmento[
e][
s][
r][
c] =
false;
449 int kEndcap =
id.
endcap();
450 int kRing =
id.ring();
451 int kStation =
id.station();
452 int kChamber =
id.chamber();
453 std::vector<CSCWireDigi>::const_iterator wireIt = (*wi).second.first;
454 std::vector<CSCWireDigi>::const_iterator lastWire = (*wi).second.second;
455 for (; wireIt != lastWire; ++wireIt) {
456 if (!wireo[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1]) {
457 wireo[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1] =
true;
460 chamberSerial(
id),
"hOWireSerial",
"Wire Occupancy by Chamber Serial", 601, -0.5, 600.5,
"Digis");
469 int kEndcap =
id.
endcap();
470 int kRing =
id.ring();
471 int kStation =
id.station();
472 int kChamber =
id.chamber();
473 std::vector<CSCStripDigi>::const_iterator stripIt = (*si).second.first;
474 std::vector<CSCStripDigi>::const_iterator lastStrip = (*si).second.second;
475 for (; stripIt != lastStrip; ++stripIt) {
476 std::vector<int> myADCVals = stripIt->getADCCounts();
477 bool thisStripFired =
false;
478 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
481 for (
unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
482 diff = (
float)myADCVals[iCount] - thisPedestal;
484 thisStripFired =
true;
487 if (thisStripFired) {
488 if (!stripo[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1]) {
489 stripo[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1] =
true;
492 chamberSerial(
id),
"hOStripSerial",
"Strip Occupancy by Chamber Serial", 601, -0.5, 600.5,
"Digis");
502 for (recIt =
recHits->begin(); recIt !=
recHits->end(); recIt++) {
504 int kEndcap = idrec.
endcap();
505 int kRing = idrec.
ring();
506 int kStation = idrec.
station();
507 int kChamber = idrec.
chamber();
508 if (!rechito[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1]) {
509 rechito[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1] =
true;
511 chamberSerial(idrec),
"hORecHitsSerial",
"RecHit Occupancy by Chamber Serial", 601, -0.5, 600.5,
"recHits");
520 int kEndcap =
id.
endcap();
521 int kRing =
id.ring();
522 int kStation =
id.station();
523 int kChamber =
id.chamber();
524 if (!segmento[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1]) {
525 segmento[kEndcap - 1][kStation - 1][kRing - 1][kChamber - 1] =
true;
527 chamberSerial(
id),
"hOSegmentsSerial",
"Segment Occupancy by Chamber Serial", 601, -0.5, 600.5,
"Segments");
534 histos->
fill1DHist(1,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
536 histos->
fill1DHist(3,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
538 histos->
fill1DHist(5,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
539 if (hasWires && hasStrips)
540 histos->
fill1DHist(7,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
542 histos->
fill1DHist(9,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
544 histos->
fill1DHist(11,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
546 histos->
fill1DHist(13,
"hCSCOccupancy",
"overall CSC occupancy", 15, -0.5, 14.5,
"GeneralHists");
References c, CSCDetId::chamber(), dtChamberEfficiency_cfi::cscSegments, change_name::diff, MillePedeFileConverter_cfg::e, CSCDetId::endcap(), dqmMemoryStats::float, combine::histos, alignCSCRings::r, FastTrackerRecHitMaskProducer_cfi::recHits, CSCDetId::ring(), alignCSCRings::s, CSCDetId::station(), DigiDM_cff::strips, remoteMonitoring_LED_IterMethod_cfg::threshold, and DigiDM_cff::wires.
◆ doPedestalNoise()
Definition at line 853 of file CSCValidation.cc.
857 std::vector<CSCStripDigi>::const_iterator pedIt = (*dPNiter).second.first;
858 std::vector<CSCStripDigi>::const_iterator lStrip = (*dPNiter).second.second;
859 for (; pedIt != lStrip; ++pedIt) {
860 int myStrip = pedIt->getStrip();
861 std::vector<int> myADCVals = pedIt->getADCCounts();
863 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
865 (1. / 6) * (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]);
866 bool thisStripFired = TotalADC >
threshold;
867 if (!thisStripFired) {
868 float ADC = thisSignal - thisPedestal;
869 histos->
fill1DHist(
ADC,
"hStripPed",
"Pedestal Noise Distribution", 50, -25., 25.,
"PedestalNoise");
873 "hStripPedMEProfile",
874 "Wire TimeBin Fired",
883 ADC,
"hStripPedME",
"Pedestal Noise Distribution",
id, 50, -25., 25.,
"PedestalNoiseByLayer");
References dtNoiseAnalysis_cfi::detailedAnalysis, dqmMemoryStats::float, cms::cuda::for(), combine::histos, DigiDM_cff::strips, and remoteMonitoring_LED_IterMethod_cfg::threshold.
◆ doRecHits()
Definition at line 896 of file CSCValidation.cc.
898 int nRecHits =
recHits->size();
907 for (dRHIter =
recHits->begin(); dRHIter !=
recHits->end(); dRHIter++) {
912 int kEndcap = idrec.
endcap();
913 int kRing = idrec.
ring();
914 int kStation = idrec.
station();
915 int kChamber = idrec.
chamber();
919 LocalPoint rhitlocal = (*dRHIter).localPosition();
920 float xreco = rhitlocal.
x();
921 float yreco = rhitlocal.
y();
922 LocalError rerrlocal = (*dRHIter).localPositionError();
924 float xxerr = rerrlocal.
xx();
925 float yyerr = rerrlocal.
yy();
926 float xyerr = rerrlocal.
xy();
928 float stpos = (*dRHIter).positionWithinStrip();
929 float sterr = (*dRHIter).errorWithinStrip();
934 int adcsize = dRHIter->nStrips() * dRHIter->nTimeBins();
935 for (
unsigned int i = 0;
i < dRHIter->nStrips();
i++) {
936 for (
unsigned int j = 0;
j < dRHIter->nTimeBins() - 1;
j++) {
937 rHSumQ += dRHIter->adcs(
i,
j);
939 sumsides += dRHIter->adcs(
i,
j);
943 float rHratioQ = sumsides / rHSumQ;
949 rHtime = (*dRHIter).tpeak() / 50.;
956 float grecx = rhitglobal.
x();
957 float grecy = rhitglobal.
y();
968 grecx, grecy,
"hRHGlobal",
"recHit Global Position", idrec, 100, -800., 800., 100, -800., 800.,
"recHits");
969 if (kStation == 1 && (kRing == 1 || kRing == 4))
973 histos->
fill1DHistByType(rHratioQ,
"hRHRatioQ",
"Charge Ratio (Ql+Qr)/Qt", idrec, 120, -0.1, 1.1,
"recHits");
979 histos->
fill1DHistByType(stpos,
"hRHstpos",
"Reconstructed Position on Strip", idrec, 120, -0.6, 0.6,
"recHits");
981 sterr,
"hRHsterr",
"Estimated Error on Strip Measurement", idrec, 120, -0.05, 0.25,
"recHits");
983 chamberSerial(idrec), rHSumQ,
"hRHSumQProfile",
"Sum 3x3 recHit Charge", 601, -0.5, 600.5, 0, 4000,
"recHits");
985 chamberSerial(idrec), rHtime,
"hRHTimingProfile",
"recHit Timing", 601, -0.5, 600.5, -11, 11,
"recHits");
987 if (kStation == 1 && (kRing == 1 || kRing == 4))
991 histos->
fill1DHistByLayer(rHratioQ,
"hRHRatioQ",
"Charge Ratio (Ql+Qr)/Qt", idrec, 120, -0.1, 1.1,
"RHQByLayer");
996 "recHit Local Position",
1004 "RHLocalXYByLayer");
1006 sqrt(xxerr),
"hRHxerr",
"RecHit Error on Local X", idrec, 100, -0.1, 2,
"RHErrorsByLayer");
1008 sqrt(yyerr),
"hRHyerr",
"RecHit Error on Local Y", idrec, 100, -0.1, 2,
"RHErrorsByLayer");
1010 stpos,
"hRHstpos",
"Reconstructed Position on Strip", idrec, 120, -0.6, 0.6,
"RHStripPosByLayer");
1012 sterr,
"hRHsterr",
"Estimated Error on Strip Measurement", idrec, 120, -0.05, 0.25,
"RHStripPosByLayer");
1020 histos->
fill1DHist(nRecHits,
"hRHnrechits",
"recHits per Event (all chambers)", 151, -0.5, 150.5,
"recHits");
References CSCDetId::chamber(), dtNoiseAnalysis_cfi::detailedAnalysis, CSCDetId::endcap(), combine::histos, mps_fire::i, dqmiolumiharvest::j, kLayer(), CSCDetId::layer(), CSCGeometry::layer(), FastTrackerRecHitMaskProducer_cfi::recHits, CSCDetId::ring(), mathSSE::sqrt(), CSCDetId::station(), GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().
◆ doResolution()
Definition at line 1175 of file CSCValidation.cc.
1181 std::vector<CSCRecHit2D> theseRecHits = (*dSiter).specificRecHits();
1182 int nRH = (*dSiter).nRecHits();
1184 CLHEP::HepMatrix sp(6, 1);
1185 CLHEP::HepMatrix se(6, 1);
1186 for (std::vector<CSCRecHit2D>::const_iterator iRH = theseRecHits.begin(); iRH != theseRecHits.end(); iRH++) {
1189 int kRing = idRH.
ring();
1190 int kStation = idRH.
station();
1194 int centerid = iRH->nStrips() / 2;
1195 int centerStrip = iRH->channels(centerid);
1199 float stpos = (*iRH).positionWithinStrip();
1200 se(
kLayer, 1) = (*iRH).errorWithinStrip();
1202 if (kStation == 1 && (kRing == 1 || kRing == 4))
1203 sp(
kLayer, 1) = stpos + centerStrip;
1206 sp(
kLayer, 1) = stpos + centerStrip;
1208 sp(
kLayer, 1) = stpos - 0.5 + centerStrip;
1213 float residual = -99;
1217 float expected =
fitX(sp, se);
1218 residual = expected - sp(3, 1);
1219 pull = residual / se(3, 1);
1224 residual,
"hSResid",
"Fitted Position on Strip - Reconstructed for Layer 3",
id, 100, -0.5, 0.5,
"Resolution");
1225 histos->
fill1DHistByType(pull,
"hSStripPosPull",
"Strip Measurement Pulls",
id, 100, -5.0, 5.0,
"Resolution");
1229 "Fitted Position on Strip - Reconstructed for Layer 3",
1239 "Fitted Position on Strip - Reconstructed for Layer 3",
1244 "DetailedResolution");
References dtChamberEfficiency_cfi::cscSegments, dtNoiseAnalysis_cfi::detailedAnalysis, combine::histos, kLayer(), CSCDetId::layer(), CSCDetId::ring(), and CSCDetId::station().
◆ doSegments()
Definition at line 1081 of file CSCValidation.cc.
1093 int kEndcap =
id.
endcap();
1094 int kRing =
id.ring();
1095 int kStation =
id.station();
1096 int kChamber =
id.chamber();
1099 float chisq = (*dSiter).chi2();
1100 int nhits = (*dSiter).nRecHits();
1101 int nDOF = 2 *
nhits - 4;
1103 LocalPoint localPos = (*dSiter).localPosition();
1104 float segX = localPos.
x();
1105 float segY = localPos.
y();
1112 float globTheta = 0.;
1117 globX = globalPosition.
x();
1118 globY = globalPosition.
y();
1120 globTheta = globalDirection.
theta();
1121 globPhi = globalDirection.
phi();
1134 "Segment Global Positions;global x (cm)",
1145 histos->
fill1DHistByType((chisq / nDOF),
"hSChiSq",
"segments chi-squared/ndof",
id, 110, -0.05, 10.5,
"Segments");
1147 chisqProb,
"hSChiSqProb",
"segments chi-squared probability",
id, 110, -0.05, 1.05,
"Segments");
1148 histos->
fill1DHist(globTheta,
"hSGlobalTheta",
"segment global theta", 128, 0, 3.2,
"Segments");
1149 histos->
fill1DHist(globPhi,
"hSGlobalPhi",
"segment global phi", 128, -3.2, 3.2,
"Segments");
1151 chamberSerial(
id),
nhits,
"hSnHitsProfile",
"N hits on Segments", 601, -0.5, 600.5, -0.5, 7.5,
"Segments");
1156 (chisq / nDOF),
"hSChiSq",
"segments chi-squared/ndof",
id, 110, -0.05, 10.5,
"SegChi2ByChamber");
1158 chisqProb,
"hSChiSqProb",
"segments chi-squared probability",
id, 110, -0.05, 1.05,
"SegChi2ByChamber");
1166 histos->
fill1DHist(nSegments,
"hSnSegments",
"Segments per Event", 31, -0.5, 30.5,
"Segments");
References CSCGeometry::chamber(), ChiSquaredProbability(), dtChamberEfficiency_cfi::cscSegments, dtNoiseAnalysis_cfi::detailedAnalysis, CSCDetId::endcap(), combine::histos, nhits, PV3DBase< T, PVType, FrameType >::phi(), PV3DBase< T, PVType, FrameType >::theta(), theta(), GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
◆ doSimHits()
Definition at line 1029 of file CSCValidation.cc.
1031 for (dSHrecIter =
recHits->begin(); dSHrecIter !=
recHits->end(); dSHrecIter++) {
1033 LocalPoint rhitlocal = (*dSHrecIter).localPosition();
1034 float xreco = rhitlocal.
x();
1035 float yreco = rhitlocal.
y();
1036 float xError =
sqrt((*dSHrecIter).localPositionError().xx());
1037 float yError =
sqrt((*dSHrecIter).localPositionError().yy());
1038 float simHitXres = -99;
1039 float simHitYres = -99;
1042 float mindiffX = 99;
1043 float mindiffY = 10;
1045 PSimHitContainer::const_iterator dSHsimIter;
1046 for (dSHsimIter =
simHits->begin(); dSHsimIter !=
simHits->end(); dSHsimIter++) {
1051 if (sId == idrec &&
abs((*dSHsimIter).particleType()) == 13) {
1053 LocalPoint sHitlocal = (*dSHsimIter).localPosition();
1056 if ((sHitlocal.
x() - xreco) < mindiffX && (sHitlocal.
y() - yreco) < mindiffY) {
1057 simHitXres = (sHitlocal.
x() - xreco);
1058 simHitYres = (sHitlocal.
y() - yreco);
1059 mindiffX = (sHitlocal.
x() - xreco);
1060 xPull = simHitXres / xError;
1061 yPull = simHitYres / yError;
1067 simHitXres,
"hSimXResid",
"SimHitX - Reconstructed X", idrec, 100, -1.0, 1.0,
"Resolution");
1069 simHitYres,
"hSimYResid",
"SimHitY - Reconstructed Y", idrec, 100, -5.0, 5.0,
"Resolution");
References funct::abs(), combine::histos, FastTrackerRecHitMaskProducer_cfi::recHits, FastTrackerRecHitCombiner_cfi::simHits, mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
◆ doStandalone()
Definition at line 1256 of file CSCValidation.cc.
1257 int nSAMuons = saMuons->size();
1258 histos->
fill1DHist(nSAMuons,
"trNSAMuons",
"N Standalone Muons per Event", 6, -0.5, 5.5,
"STAMuons");
1260 for (reco::TrackCollection::const_iterator
muon = saMuons->begin();
muon != saMuons->end(); ++
muon) {
1261 float preco =
muon->p();
1262 float ptreco =
muon->pt();
1263 int n =
muon->recHitsSize();
1265 float normchi2 =
muon->normalizedChi2();
1277 std::vector<CSCDetId> staChambers;
1279 const DetId detId((*hit)->geographicalId());
1284 if (rpcId.region() == 1) {
1288 if (rpcId.region() == -1) {
1297 staChambers.push_back(detId.rawId());
1299 if (cscId.endcap() == 1) {
1303 if (cscId.endcap() == 2) {
1316 double crudeLength = deltaPnt.
mag();
1317 double deltaPhi = innerPnt.phi() - outerPnt.phi();
1318 double innerGlobalPolarAngle = innerKin.theta();
1319 double outerGlobalPolarAngle = outerKin.theta();
1322 histos->
fill1DHist(
n,
"trN",
"N hits on a STA Muon Track", 51, -0.5, 50.5,
"STAMuons");
1324 histos->
fill1DHist(
np,
"trNp",
"N hits on a STA Muon Track (plus endcap)", 51, -0.5, 50.5,
"STAMuons");
1326 histos->
fill1DHist(nm,
"trNm",
"N hits on a STA Muon Track (minus endcap)", 51, -0.5, 50.5,
"STAMuons");
1327 histos->
fill1DHist(nDTHits,
"trNDT",
"N DT hits on a STA Muon Track", 51, -0.5, 50.5,
"STAMuons");
1328 histos->
fill1DHist(nCSCHits,
"trNCSC",
"N CSC hits on a STA Muon Track", 51, -0.5, 50.5,
"STAMuons");
1330 histos->
fill1DHist(nCSCHitsp,
"trNCSCp",
"N CSC hits on a STA Muon Track (+ endcap)", 51, -0.5, 50.5,
"STAMuons");
1332 histos->
fill1DHist(nCSCHitsm,
"trNCSCm",
"N CSC hits on a STA Muon Track (- endcap)", 51, -0.5, 50.5,
"STAMuons");
1333 histos->
fill1DHist(nRPCHits,
"trNRPC",
"N RPC hits on a STA Muon Track", 51, -0.5, 50.5,
"STAMuons");
1335 histos->
fill1DHist(nRPCHitsp,
"trNRPCp",
"N RPC hits on a STA Muon Track (+ endcap)", 51, -0.5, 50.5,
"STAMuons");
1337 histos->
fill1DHist(nRPCHitsm,
"trNRPCm",
"N RPC hits on a STA Muon Track (- endcap)", 51, -0.5, 50.5,
"STAMuons");
1338 histos->
fill1DHist(preco,
"trP",
"STA Muon Momentum", 100, 0, 300,
"STAMuons");
1341 histos->
fill1DHist(normchi2,
"trNormChi2",
"STA Muon Normalized Chi2", 100, 0, 10,
"STAMuons");
1342 histos->
fill1DHist(crudeLength,
"trLength",
"Straight Line Length of STA Muon", 120, 0., 2400.,
"STAMuons");
1344 deltaPhi,
"trDeltaPhi",
"Delta-Phi Between Inner and Outer STA Muon Pos.", 100, -0.5, 0.5,
"STAMuons");
1346 innerGlobalPolarAngle,
"trInnerPolar",
"Polar Angle of Inner P Vector (STA muons)", 128, 0, 3.2,
"STAMuons");
1348 outerGlobalPolarAngle,
"trOuterPolar",
"Polar Angle of Outer P Vector (STA muons)", 128, 0, 3.2,
"STAMuons");
1349 histos->
fill1DHist(innerPnt.phi(),
"trInnerPhi",
"Phi of Inner Position (STA muons)", 256, -3.2, 3.2,
"STAMuons");
1350 histos->
fill1DHist(outerPnt.phi(),
"trOuterPhi",
"Phi of Outer Position (STA muons)", 256, -3.2, 3.2,
"STAMuons");
References hltPixelTracks_cff::chi2, MuonSubdetId::CSC, SiPixelRawToDigiRegional_cfi::deltaPhi, MuonSubdetId::DT, combine::histos, PV3DBase< T, PVType, FrameType >::mag(), DetId::Muon, HLT_FULL_cff::muon, dqmiodumpmetadata::n, np, and MuonSubdetId::RPC.
◆ doStripDigis()
Definition at line 811 of file CSCValidation.cc.
812 int nStripsFired = 0;
815 std::vector<CSCStripDigi>::const_iterator stripIter = (*dSDiter).second.first;
816 std::vector<CSCStripDigi>::const_iterator lStrip = (*dSDiter).second.second;
817 for (; stripIter != lStrip; ++stripIter) {
818 int myStrip = stripIter->getStrip();
819 std::vector<int> myADCVals = stripIter->getADCCounts();
820 bool thisStripFired =
false;
821 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
824 for (
unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
825 diff = (
float)myADCVals[iCount] - thisPedestal;
827 thisStripFired =
true;
830 if (thisStripFired) {
841 if (nStripsFired == 0)
844 histos->
fill1DHist(nStripsFired,
"hStripNFired",
"Fired Strips per Event", 251, -0.5, 250.5,
"Digis");
References dtNoiseAnalysis_cfi::detailedAnalysis, change_name::diff, dqmMemoryStats::float, cms::cuda::for(), combine::histos, DigiDM_cff::strips, and remoteMonitoring_LED_IterMethod_cfg::threshold.
◆ doTimeMonitoring()
Get a handle to the FED data collection
uncomment this for regional unpacking if (id!=SOME_ID) continue;
Take a reference to this FED's data
if fed has data then unpack it
examine event for integrity
get a pointer to data and pass it to constructor for unpacking
get a reference to dduData
set default detid to that for E=+z, S=1, R=1, C=1, L=1
skip the DDU if its data has serious errors define a mask for serious errors
get a reference to chamber data
adjust crate numbers for MTCC data
default value for all digis not related to cfebs
layer=0 flags entire chamber
check alct data integrity
check tmb data integrity
Definition at line 2933 of file CSCValidation.cc.
2942 map<CSCDetId, float> segment_median_map;
2943 map<CSCDetId, GlobalPoint> segment_position_map;
2953 LocalPoint localPos = (*dSiter).localPosition();
2957 globalPosition = cscchamber->
toGlobal(localPos);
2961 std::vector<CSCRecHit2D> theseRecHits = (*dSiter).specificRecHits();
2962 int nRH = (*dSiter).nRecHits();
2967 vector<float> non_zero;
2969 for (vector<CSCRecHit2D>::const_iterator iRH = theseRecHits.begin(); iRH != theseRecHits.end(); iRH++) {
2970 non_zero.push_back(iRH->tpeak());
2975 sort(non_zero.begin(), non_zero.end());
2976 int middle_index = non_zero.size() / 2;
2977 float average_two = (non_zero.at(middle_index - 1) + non_zero.at(middle_index)) / 2.;
2978 if (non_zero.size() % 2)
2979 average_two = non_zero.at(middle_index);
2982 segment_median_map[
id] = average_two;
2983 segment_position_map[
id] = globalPosition;
2985 double distToIP =
sqrt(globalPosition.
x() * globalPosition.
x() + globalPosition.
y() * globalPosition.
y() +
2986 globalPosition.
z() * globalPosition.
z());
2991 "Segment mean time",
3000 "timeChamberByType",
3001 "Segment mean time by chamber",
3011 "seg_time_vs_distToIP",
3012 "Segment time vs. Distance to IP",
3022 "seg_time_vs_globZ",
3023 "Segment time vs. z position",
3033 "seg_time_vs_absglobZ",
3034 "Segment time vs. abs(z position)",
3046 map<CSCDetId, float>::const_iterator it_outer;
3047 map<CSCDetId, float>::const_iterator it_inner;
3048 for (it_outer = segment_median_map.begin(); it_outer != segment_median_map.end(); it_outer++) {
3049 CSCDetId id_outer = it_outer->first;
3050 float t_outer = it_outer->second;
3053 for (it_inner = segment_median_map.begin(); it_inner != segment_median_map.end(); it_inner++) {
3054 CSCDetId id_inner = it_inner->first;
3055 float t_inner = it_inner->second;
3071 id_outer.
ring() == id_inner.
ring()) {
3073 "diff_opposite_endcaps",
3074 "#Delta t [ME+]-[ME-] for chambers in same station and ring",
3080 "diff_opposite_endcaps_byType",
3081 "#Delta t [ME+]-[ME-] for chambers in same station and ring",
3097 vector<L1MuGMTReadoutRecord> L1Mrec = pCollection->
getRecords();
3098 vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
3099 int L1GMT_BXN = -100;
3100 bool has_CSCTrigger =
false;
3101 bool has_beamHaloTrigger =
false;
3102 for (igmtrr = L1Mrec.begin(); igmtrr != L1Mrec.end(); igmtrr++) {
3103 std::vector<L1MuRegionalCand>::const_iterator iter1;
3104 std::vector<L1MuRegionalCand> rmc;
3107 rmc = igmtrr->getCSCCands();
3108 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
3109 if (!(*iter1).empty()) {
3111 int kQuality = (*iter1).quality();
3113 has_beamHaloTrigger =
true;
3116 if (igmtrr->getBxInEvent() == 0 && icsc > 0) {
3118 L1GMT_BXN = igmtrr->getBxNr();
3119 has_CSCTrigger =
true;
3120 }
else if (igmtrr->getBxInEvent() == 0) {
3122 L1GMT_BXN = igmtrr->getBxNr();
3131 map<CSCDetId, int> ALCT_KeyWG_map;
3134 const CSCDetId& idALCT = (*j).first;
3137 if ((*digiIt).isValid()) {
3139 histos->
fill1DHist((*digiIt).getBX(),
"ALCT_getBX",
"ALCT.getBX()", 11, -0.5, 10.5,
"TimeMonitoring");
3141 (*digiIt).getFullBX(),
"ALCT_getFullBX",
"ALCT.getFullBX()", 3601, -0.5, 3600.5,
"TimeMonitoring");
3143 if (ALCT_KeyWG_map.find(idALCT.
chamberId()) == ALCT_KeyWG_map.end()) {
3144 ALCT_KeyWG_map[idALCT.
chamberId()] = (*digiIt).getKeyWG();
3155 map<CSCDetId, int> CLCT_getFullBx_map;
3158 const CSCDetId& idCLCT = (*j).first;
3161 if ((*digiIt).isValid()) {
3163 histos->
fill1DHist((*digiIt).getBX(),
"CLCT_getBX",
"CLCT.getBX()", 11, -0.5, 10.5,
"TimeMonitoring");
3165 (*digiIt).getFullBX(),
"CLCT_getFullBX",
"CLCT.getFullBX()", 3601, -0.5, 3600.5,
"TimeMonitoring");
3167 if (CLCT_getFullBx_map.find(idCLCT.
chamberId()) == CLCT_getFullBx_map.end()) {
3168 CLCT_getFullBx_map[idCLCT.
chamberId()] = (*digiIt).getFullBX();
3178 int n_correlatedlcts = 0;
3182 if ((*digiIt).isValid()) {
3185 (*digiIt).getBX(),
"CorrelatedLCTS_getBX",
"CorrelatedLCT.getBX()", 11, -0.5, 10.5,
"TimeMonitoring");
3190 int nRecHits =
recHits->size();
3192 if (has_CSCTrigger) {
3193 histos->
fill1DHist(L1GMT_BXN,
"BX_L1CSCCand",
"BX of L1 CSC Cand", 4001, -0.5, 4000.5,
"TimeMonitoring");
3196 "n_ALCTs_v_BX_L1CSCCand",
3197 "Number of ALCTs vs. BX of L1 CSC Cand",
3207 "n_CLCTs_v_BX_L1CSCCand",
3208 "Number of CLCTs vs. BX of L1 CSC Cand",
3218 "n_CorrelatedLCTs_v_BX_L1CSCCand",
3219 "Number of CorrelatedLCTs vs. BX of L1 CSC Cand",
3229 "n_RecHits_v_BX_L1CSCCand",
3230 "Number of RecHits vs. BX of L1 CSC Cand",
3240 "n_Segments_v_BX_L1CSCCand",
3241 "Number of Segments vs. BX of L1 CSC Cand",
3250 if (has_CSCTrigger && has_beamHaloTrigger) {
3252 L1GMT_BXN,
"BX_L1CSCCand_w_beamHalo",
"BX of L1 CSC (w beamHalo bit)", 4001, -0.5, 4000.5,
"TimeMonitoring");
3255 "n_ALCTs_v_BX_L1CSCCand_w_beamHalo",
3256 "Number of ALCTs vs. BX of L1 CSC Cand (w beamHalo bit)",
3266 "n_CLCTs_v_BX_L1CSCCand_w_beamHalo",
3267 "Number of CLCTs vs. BX of L1 CSC Cand (w beamHalo bit)",
3277 "n_CorrelatedLCTs_v_BX_L1CSCCand_w_beamHalo",
3278 "Number of CorrelatedLCTs vs. BX of L1 CSC Cand (w beamHalo bit)",
3288 "n_RecHits_v_BX_L1CSCCand_w_beamHalo",
3289 "Number of RecHits vs. BX of L1 CSC Cand (w beamHalo bit)",
3299 "n_Segments_v_BX_L1CSCCand_w_beamHalo",
3300 "Number of Segments vs. BX of L1 CSC Cand (w beamHalo bit)",
3322 event.getByToken(
rd_token, rawdata);
3326 unsigned long dccBinCheckMask = 0x06080016;
3327 unsigned int examinerMask = 0x1FEBF3F6;
3328 unsigned int errorMask = 0x0;
3337 unsigned long length = fedData.
size();
3340 std::stringstream examiner_out, examiner_err;
3343 if (examinerMask & 0x40000)
3345 if (examinerMask & 0x8000)
3347 if (examinerMask & 0x0400)
3349 examiner->
setMask(examinerMask);
3350 const short unsigned int*
data = (
short unsigned int*)fedData.
data();
3356 goodEvent = !(examiner->
errors() & dccBinCheckMask);
3365 const std::vector<CSCDDUEventData>& dduData = dccData.
dduData();
3370 for (
unsigned int iDDU = 0; iDDU < dduData.size(); ++iDDU) {
3373 if (dduData[iDDU].trailer().errorstat() & errorMask) {
3374 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"DDU# " << iDDU <<
" has serious error - no digis unpacked! "
3375 << std::hex << dduData[iDDU].trailer().errorstat();
3380 const std::vector<CSCEventData>& cscData = dduData[iDDU].cscData();
3381 for (
unsigned int iCSC = 0; iCSC < cscData.size(); ++iCSC) {
3383 int vmecrate = cscData[iCSC].dmbHeader()->crateID();
3384 int dmb = cscData[iCSC].dmbHeader()->dmbID();
3392 if ((vmecrate >= 1) && (vmecrate <= 60) && (dmb >= 1) && (dmb <= 10) && (dmb != 6)) {
3393 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
3395 LogTrace(
"CSCTimingAlignment|CSCDCCUnpacker|CSCRawToDigi") <<
" detID input out of range!!! ";
3396 LogTrace(
"CSCTimingAlignment|CSCDCCUnpacker|CSCRawToDigi")
3397 <<
" skipping chamber vme= " << vmecrate <<
" dmb= " << dmb;
3402 int nalct = cscData[iCSC].dmbHeader()->nalct();
3403 bool goodALCT =
false;
3405 if (nalct && cscData[iCSC].alctHeader()) {
3406 if (cscData[iCSC].alctHeader()->
check()) {
3412 int nclct = cscData[iCSC].dmbHeader()->nclct();
3413 bool goodTMB =
false;
3414 if (nclct && cscData[iCSC].tmbData()) {
3415 if (cscData[iCSC].tmbHeader()->
check()) {
3416 if (cscData[iCSC].comparatorData()->
check())
3421 if (goodTMB && goodALCT) {
3422 if (ALCT_KeyWG_map.find(
layer) == ALCT_KeyWG_map.end()) {
3423 printf(
"no ALCT info for Chamber %d %d %d %d \n",
3430 if (CLCT_getFullBx_map.find(
layer) == CLCT_getFullBx_map.end()) {
3431 printf(
"no CLCT info for Chamber %d %d %d %d \n",
3438 int ALCT0Key = ALCT_KeyWG_map.find(
layer)->second;
3439 int CLCTPretrigger = CLCT_getFullBx_map.find(
layer)->second;
3441 const CSCTMBHeader* tmbHead = cscData[iCSC].tmbHeader();
3452 "TMB_ALCTMatchTime",
3453 "TMB_ALCTMatchTime",
3461 tmbHead->
BXNCount(),
"TMB_BXNCount",
"TMB_BXNCount", 3601, -0.5, 3600.5,
"TimeMonitoring");
3463 tmbHead->
ALCTMatchTime(),
"TMB_ALCTMatchTime",
"TMB_ALCTMatchTime", 7, -0.5, 6.5,
"TimeMonitoring");
3466 "TMB_ALCTMatchTime",
3467 "TMB_ALCTMatchTime",
3476 "prof_TMB_ALCTMatchTime",
3477 "prof_TMB_ALCTMatchTime",
3486 "prof_TMB_ALCTMatchTime_v_ALCT0KeyWG",
3487 "prof_TMB_ALCTMatchTime_v_ALCT0KeyWG",
3496 "prf_TMB_ALCTMatchTime_v_ALCT0KeyWG",
3497 "prf_TMB_ALCTMatchTime_v_ALCT0KeyWG",
3509 if (TMB_ALCT_rel_L1A > 3563)
3510 TMB_ALCT_rel_L1A = TMB_ALCT_rel_L1A - 3564;
3511 if (TMB_ALCT_rel_L1A < 0)
3512 TMB_ALCT_rel_L1A = TMB_ALCT_rel_L1A + 3564;
3516 TMB_ALCT_rel_L1A,
"h1D_TMB_ALCT_rel_L1A",
"h1D_TMB_ALCT_rel_L1A", 11, 144.5, 155.5,
"TimeMonitoring");
3519 "h2D_TMB_ALCT_rel_L1A",
3520 "h2D_TMB_ALCT_rel_L1A",
3530 "h2D_TMB_ALCT_rel_L1A_by_ring",
3531 "h2D_TMB_ALCT_rel_L1A_by_ring",
3541 "prof_TMB_ALCT_rel_L1A",
3542 "prof_TMB_ALCT_rel_L1A",
3551 "prof_TMB_ALCT_rel_L1A_by_ring",
3552 "prof_TMB_ALCT_rel_L1A_by_ring",
3562 "h2D_TMB_ALCT_rel_L1A_v_ALCT0KeyWG",
3563 "h2D_TMB_ALCT_rel_L1A_v_ALCT0KeyWG",
3573 "prof_TMB_ALCT_rel_L1A_v_ALCT0KeyWG",
3574 "prof_TMB_ALCT_rel_L1A_v_ALCT0KeyWG",
3583 "prf_TMB_ALCT_rel_L1A_v_ALCT0KeyWG",
3584 "prf_TMB_ALCT_rel_L1A_v_ALCT0KeyWG",
3597 if (examiner !=
nullptr)
References CSCTMBHeader::ALCTMatchTime(), CSCTMBHeader::BXNCount(), relativeConstraints::chamber, CSCGeometry::chamber(), CSCDetId::chamberId(), RPCNoise_example::check, CSCDCCExaminer::check(), CSCDCCExaminer::crcALCT(), CSCDCCExaminer::crcCFEB(), CSCDCCExaminer::crcTMB(), dtChamberEfficiency_cfi::cscSegments, FEDRawData::data(), data, CSCDCCEventData::dduData(), CSCCrateMap::detId(), CSCDetId::endcap(), CSCDCCExaminer::errors(), FEDRawDataCollection::FEDData(), edm::EventSetup::get(), get, L1MuGMTReadoutCollection::getRecords(), combine::histos, triggerObjects_cff::id, dqmiolumiharvest::j, phase1PixelTopology::layer, LogTrace, FEDNumbering::MAXCSCFEDID, FEDNumbering::MINCSCFEDID, edm::ESHandle< T >::product(), FastTimerService_cff::range, FastTrackerRecHitMaskProducer_cfi::recHits, CSCDetId::ring(), CSCDCCExaminer::setMask(), FEDRawData::size(), jetUpdater_cfi::sort, mathSSE::sqrt(), CSCDetId::station(), GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ doTrigger()
Definition at line 555 of file CSCValidation.cc.
556 std::vector<L1MuGMTReadoutRecord> L1Mrec = pCollection->
getRecords();
557 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
559 bool csc_l1a =
false;
561 bool rpcf_l1a =
false;
562 bool rpcb_l1a =
false;
563 bool beamHaloTrigger =
false;
565 int myBXNumber = -1000;
567 for (igmtrr = L1Mrec.begin(); igmtrr != L1Mrec.end(); igmtrr++) {
568 std::vector<L1MuRegionalCand>::const_iterator iter1;
569 std::vector<L1MuRegionalCand> rmc;
573 rmc = igmtrr->getCSCCands();
574 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
575 if (!(*iter1).empty()) {
577 int kQuality = (*iter1).quality();
579 beamHaloTrigger =
true;
582 if (igmtrr->getBxInEvent() == 0 && icsc > 0)
584 if (igmtrr->getBxInEvent() == 0) {
585 myBXNumber = igmtrr->getBxNr();
590 rmc = igmtrr->getDTBXCands();
591 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
592 if (!(*iter1).empty()) {
596 if (igmtrr->getBxInEvent() == 0 && idt > 0)
601 rmc = igmtrr->getBrlRPCCands();
602 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
603 if (!(*iter1).empty()) {
607 if (igmtrr->getBxInEvent() == 0 && irpcb > 0)
612 rmc = igmtrr->getFwdRPCCands();
613 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
614 if (!(*iter1).empty()) {
618 if (igmtrr->getBxInEvent() == 0 && irpcf > 0)
624 histos->
fill1DHist(myBXNumber,
"vtBXNumber",
"BX Number", 4001, -0.5, 4000.5,
"Trigger");
644 if (dt_l1a || rpcb_l1a || rpcf_l1a)
646 if (!(dt_l1a || rpcb_l1a || rpcf_l1a))
656 if (dt_l1a || rpcb_l1a || rpcf_l1a)
658 if (!(dt_l1a || rpcb_l1a || rpcf_l1a))
References L1MuGMTReadoutCollection::getRecords(), and combine::histos.
◆ doWireDigis()
Definition at line 776 of file CSCValidation.cc.
777 int nWireGroupsTotal = 0;
780 std::vector<CSCWireDigi>::const_iterator wireIter = (*dWDiter).second.first;
781 std::vector<CSCWireDigi>::const_iterator lWire = (*dWDiter).second.second;
782 for (; wireIter != lWire; ++wireIter) {
783 int myWire = wireIter->getWireGroup();
784 int myTBin = wireIter->getTimeBin();
789 chamberSerial(
id), myTBin,
"hWireTBinProfile",
"Wire TimeBin Fired", 601, -0.5, 600.5, -0.5, 16.5,
"Digis");
792 myWire,
"hWireWire",
"Wiregroup Numbers Fired",
id, 113, -0.5, 112.5,
"WireNumberByLayer");
799 if (nWireGroupsTotal == 0)
800 nWireGroupsTotal = -1;
802 histos->
fill1DHist(nWireGroupsTotal,
"hWirenGroupsTotal",
"Wires Fired Per Event", 151, -0.5, 150.5,
"Digis");
References dtNoiseAnalysis_cfi::detailedAnalysis, cms::cuda::for(), combine::histos, and DigiDM_cff::wires.
◆ endJob()
void CSCValidation::endJob |
( |
void |
| ) |
|
|
overridevirtual |
◆ extrapolate1D()
double CSCValidation::extrapolate1D |
( |
double |
initPosition, |
|
|
double |
initDirection, |
|
|
double |
parameterOfTheLine |
|
) |
| |
|
inlineprivate |
Definition at line 187 of file CSCValidation.h.
188 double extrapolatedPosition = initPosition + initDirection * parameterOfTheLine;
189 return extrapolatedPosition;
◆ fillEfficiencyHistos()
void CSCValidation::fillEfficiencyHistos |
( |
int |
bin, |
|
|
int |
flag |
|
) |
| |
|
private |
◆ filterEvents()
◆ findNonAssociatedRecHits()
Definition at line 2026 of file CSCValidation.cc.
2028 for (std::multimap<CSCDetId, CSCRecHit2D>::iterator allRHiter =
AllRechits.begin(); allRHiter !=
AllRechits.end();
2031 LocalPoint lpRH = (allRHiter->second).localPosition();
2032 float xrec = lpRH.
x();
2033 float yrec = lpRH.
y();
2034 float zrec = lpRH.
z();
2036 bool foundmatch =
false;
2037 multimap<CSCDetId, CSCRecHit2D>::iterator segRHit;
2040 for (; segRHit !=
SegRechits.upper_bound(idRH); ++segRHit) {
2041 LocalPoint lposRH = (segRHit->second).localPosition();
2042 float xpos = lposRH.
x();
2043 float ypos = lposRH.
y();
2044 float zpos = lposRH.
z();
2046 if (xrec == xpos && yrec == ypos && zrec == zpos) {
2051 float dclose = 1000.;
2054 d =
sqrt(
pow(xrec - xpos, 2) +
pow(yrec - ypos, 2) +
pow(zrec - zpos, 2));
2057 if (
distRHmap.find((allRHiter->second)) ==
2059 distRHmap.insert(make_pair(allRHiter->second, dclose));
2064 make_pair(allRHiter->second, dclose));
2075 for (std::map<CSCRecHit2D, float, ltrh>::iterator iter =
distRHmap.begin(); iter !=
distRHmap.end(); ++iter) {
2078 "Distance of Non Associated RecHit from closest Segment RecHit",
2082 "NonAssociatedRechits");
2089 int kEndcap = idrec.
endcap();
2090 int cEndcap = idrec.
endcap();
2093 int kRing = idrec.
ring();
2094 int kStation = idrec.
station();
2095 int kChamber = idrec.
chamber();
2099 LocalPoint rhitlocal = (iter->second).localPosition();
2100 float xreco = rhitlocal.
x();
2101 float yreco = rhitlocal.
y();
2104 int centerid = (iter->second).
nStrips() / 2;
2105 int centerStrip = (iter->second).
channels(centerid);
2109 float sumsides = 0.;
2111 for (
unsigned int i = 0;
i < (iter->second).
nStrips();
i++) {
2112 for (
unsigned int j = 0;
j < (iter->second).
nTimeBins() - 1;
j++) {
2113 rHSumQ += (iter->second).adcs(
i,
j);
2115 sumsides += (iter->second).adcs(
i,
j);
2119 float rHratioQ = sumsides / rHSumQ;
2124 float rHtime = (iter->second).tpeak() / 50;
2134 float grecx = rhitglobal.
x();
2135 float grecy = rhitglobal.
y();
2138 int kCodeBroad = cEndcap * (4 * (kStation - 1) + kRing);
2139 int kCodeNarrow = cEndcap * (100 * (kRing - 1) + kChamber);
2143 kCodeBroad,
"hNARHCodeBroad",
"broad scope code for recHits", 33, -16.5, 16.5,
"NonAssociatedRechits");
2147 "narrow scope recHit code station 1",
2151 "NonAssociatedRechits");
2155 "narrow scope recHit code station 2",
2159 "NonAssociatedRechits");
2163 "narrow scope recHit code station 3",
2167 "NonAssociatedRechits");
2171 "narrow scope recHit code station 4",
2175 "NonAssociatedRechits");
2177 histos->
fill1DHistByType(xreco,
"hNARHX",
"Local X of recHit", idrec, 160, -80., 80.,
"NonAssociatedRechits");
2178 histos->
fill1DHistByType(yreco,
"hNARHY",
"Local Y of recHit", idrec, 60, -180., 180.,
"NonAssociatedRechits");
2179 if (kStation == 1 && (kRing == 1 || kRing == 4))
2181 rHSumQ,
"hNARHSumQ",
"Sum 3x3 recHit Charge", idrec, 250, 0, 4000,
"NonAssociatedRechits");
2184 rHSumQ,
"hNARHSumQ",
"Sum 3x3 recHit Charge", idrec, 250, 0, 2000,
"NonAssociatedRechits");
2186 rHratioQ,
"hNARHRatioQ",
"Ratio (Ql+Qr)/Qt)", idrec, 120, -0.1, 1.1,
"NonAssociatedRechits");
2187 histos->
fill1DHistByType(rHtime,
"hNARHTiming",
"recHit Timing", idrec, 200, -10, 10,
"NonAssociatedRechits");
2191 "recHit Global Position",
2199 "NonAssociatedRechits");
2201 rHwidth,
"hNARHwidth",
"width for Non associated recHit", idrec, 21, -0.5, 20.5,
"NonAssociatedRechits");
2204 for (std::multimap<CSCDetId, CSCRecHit2D>::iterator iter =
SegRechits.begin(); iter !=
SegRechits.end(); ++iter) {
2206 int kEndcap = idrec.
endcap();
2207 int cEndcap = idrec.
endcap();
2210 int kRing = idrec.
ring();
2211 int kStation = idrec.
station();
2212 int kChamber = idrec.
chamber();
2216 LocalPoint rhitlocal = (iter->second).localPosition();
2217 float xreco = rhitlocal.
x();
2218 float yreco = rhitlocal.
y();
2221 int centerid = (iter->second).
nStrips() / 2;
2222 int centerStrip = (iter->second).
channels(centerid);
2227 float sumsides = 0.;
2229 for (
unsigned int i = 0;
i < (iter->second).
nStrips();
i++) {
2230 for (
unsigned int j = 0;
j < (iter->second).
nTimeBins() - 1;
j++) {
2231 rHSumQ += (iter->second).adcs(
i,
j);
2233 sumsides += (iter->second).adcs(
i,
j);
2237 float rHratioQ = sumsides / rHSumQ;
2242 float rHtime = (iter->second).tpeak() / 50;
2252 float grecx = rhitglobal.
x();
2253 float grecy = rhitglobal.
y();
2256 int kCodeBroad = cEndcap * (4 * (kStation - 1) + kRing);
2257 int kCodeNarrow = cEndcap * (100 * (kRing - 1) + kChamber);
2261 kCodeBroad,
"hSegRHCodeBroad",
"broad scope code for recHits", 33, -16.5, 16.5,
"AssociatedRechits");
2264 "hSegRHCodeNarrow1",
2265 "narrow scope recHit code station 1",
2269 "AssociatedRechits");
2272 "hSegRHCodeNarrow2",
2273 "narrow scope recHit code station 2",
2277 "AssociatedRechits");
2280 "hSegRHCodeNarrow3",
2281 "narrow scope recHit code station 3",
2285 "AssociatedRechits");
2288 "hSegRHCodeNarrow4",
2289 "narrow scope recHit code station 4",
2293 "AssociatedRechits");
2295 histos->
fill1DHistByType(xreco,
"hSegRHX",
"Local X of recHit", idrec, 160, -80., 80.,
"AssociatedRechits");
2296 histos->
fill1DHistByType(yreco,
"hSegRHY",
"Local Y of recHit", idrec, 60, -180., 180.,
"AssociatedRechits");
2297 if (kStation == 1 && (kRing == 1 || kRing == 4))
2298 histos->
fill1DHistByType(rHSumQ,
"hSegRHSumQ",
"Sum 3x3 recHit Charge", idrec, 250, 0, 4000,
"AssociatedRechits");
2300 histos->
fill1DHistByType(rHSumQ,
"hSegRHSumQ",
"Sum 3x3 recHit Charge", idrec, 250, 0, 2000,
"AssociatedRechits");
2301 histos->
fill1DHistByType(rHratioQ,
"hSegRHRatioQ",
"Ratio (Ql+Qr)/Qt)", idrec, 120, -0.1, 1.1,
"AssociatedRechits");
2302 histos->
fill1DHistByType(rHtime,
"hSegRHTiming",
"recHit Timing", idrec, 200, -10, 10,
"AssociatedRechits");
2306 "recHit Global Position",
2314 "AssociatedRechits");
2316 rHwidth,
"hSegRHwidth",
"width for Non associated recHit", idrec, 21, -0.5, 20.5,
"AssociatedRechits");
References CSCDetId::chamber(), ewkTauDQM_cfi::channels, ztail::d, CSCDetId::endcap(), combine::histos, mps_fire::i, dqmiolumiharvest::j, kLayer(), CSCDetId::layer(), CSCGeometry::layer(), me0TriggerPseudoDigis_cff::nStrips, dtSegmentTask_hlt_cfi::nTimeBins, funct::pow(), CSCDetId::ring(), mathSSE::sqrt(), CSCDetId::station(), DigiDM_cff::strips, GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ fitX()
float CSCValidation::fitX |
( |
const CLHEP::HepMatrix & |
sp, |
|
|
const CLHEP::HepMatrix & |
ep |
|
) |
| |
|
private |
◆ getEfficiency()
void CSCValidation::getEfficiency |
( |
float |
bin, |
|
|
float |
Norm, |
|
|
std::vector< float > & |
eff |
|
) |
| |
|
private |
◆ getSignal()
Definition at line 1902 of file CSCValidation.cc.
1914 for (sIt = stripdigis.begin(); sIt != stripdigis.end(); sIt++) {
1918 std::vector<CSCStripDigi>::const_iterator digiItr = (*sIt).second.first;
1919 std::vector<CSCStripDigi>::const_iterator
last = (*sIt).second.second;
1920 for (; digiItr !=
last; ++digiItr) {
1921 int thisStrip = digiItr->getStrip();
1922 if (thisStrip == (centerStrip)) {
1923 std::vector<int> myADCVals = digiItr->getADCCounts();
1924 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
1925 float thisSignal = (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]);
1926 SigADC[0] = thisSignal - 6 * thisPedestal;
1929 if (thisStrip == (centerStrip + 1)) {
1930 std::vector<int> myADCVals = digiItr->getADCCounts();
1931 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
1932 float thisSignal = (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]);
1933 SigADC[1] = thisSignal - 6 * thisPedestal;
1935 if (thisStrip == (centerStrip + 2)) {
1936 std::vector<int> myADCVals = digiItr->getADCCounts();
1937 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
1938 float thisSignal = (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]);
1939 SigADC[2] = thisSignal - 6 * thisPedestal;
1941 if (thisStrip == (centerStrip - 1)) {
1942 std::vector<int> myADCVals = digiItr->getADCCounts();
1943 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
1944 float thisSignal = (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]);
1945 SigADC[3] = thisSignal - 6 * thisPedestal;
1947 if (thisStrip == (centerStrip - 2)) {
1948 std::vector<int> myADCVals = digiItr->getADCCounts();
1949 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
1950 float thisSignal = (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]);
1951 SigADC[4] = thisSignal - 6 * thisPedestal;
1954 TotalADC = 0.2 * (SigADC[0] + SigADC[1] + SigADC[2] + SigADC[3] + SigADC[4]);
References dqmMemoryStats::float, if(), and dqmdumpme::last.
◆ getthisSignal()
Definition at line 2325 of file CSCValidation.cc.
2331 for (sIt = stripdigis.begin(); sIt != stripdigis.end(); sIt++) {
2336 vector<CSCStripDigi>::const_iterator digiItr = (*sIt).second.first;
2337 vector<CSCStripDigi>::const_iterator
last = (*sIt).second.second;
2341 if (St == 1 &&
Rg == 4) {
2342 while (centerStrip > 16)
2345 for (; digiItr !=
last; ++digiItr) {
2346 int thisStrip = digiItr->getStrip();
2348 std::vector<int> myADCVals = digiItr->getADCCounts();
2349 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
2351 if (thisStrip == (centerStrip)) {
2352 thisADC =
Signal - thisPedestal;
2358 if (thisStrip == (centerStrip + 1)) {
2359 std::vector<int> myADCVals = digiItr->getADCCounts();
2361 if (thisStrip == (centerStrip - 1)) {
2362 std::vector<int> myADCVals = digiItr->getADCCounts();
References dqmMemoryStats::float, if(), dqmdumpme::last, ExhumeParameters_cfi::Rg, CSCDetId::ring(), and CSCDetId::station().
◆ getWidth()
Definition at line 2377 of file CSCValidation.cc.
2385 for (sIt = stripdigis.begin(); sIt != stripdigis.end(); sIt++) {
2388 std::vector<CSCStripDigi>::const_iterator digiItr = (*sIt).second.first;
2389 std::vector<CSCStripDigi>::const_iterator
first = (*sIt).second.first;
2390 std::vector<CSCStripDigi>::const_iterator
last = (*sIt).second.second;
2391 std::vector<CSCStripDigi>::const_iterator it = (*sIt).second.first;
2392 std::vector<CSCStripDigi>::const_iterator itr = (*sIt).second.first;
2396 if (St == 1 &&
Rg == 4) {
2397 while (centerStrip > 16)
2400 for (; digiItr !=
last; ++digiItr) {
2401 int thisStrip = digiItr->getStrip();
2402 if (thisStrip == (centerStrip)) {
2404 for (; it !=
last; ++it) {
2405 int strip = it->getStrip();
2406 std::vector<int> myADCVals = it->getADCCounts();
2407 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
2408 if (((
float)myADCVals[3] - thisPedestal) < 6 || widthpos == 10 || it ==
last) {
2411 if (
strip != centerStrip) {
2416 for (; itr !=
first; --itr) {
2417 int strip = itr->getStrip();
2418 std::vector<int> myADCVals = itr->getADCCounts();
2419 float thisPedestal = 0.5 * (
float)(myADCVals[0] + myADCVals[1]);
2420 if (((
float)myADCVals[3] - thisPedestal) < 6 || widthneg == 10 || itr ==
first) {
2423 if (
strip != centerStrip) {
References first, dqmMemoryStats::float, if(), dqmdumpme::last, ExhumeParameters_cfi::Rg, CSCDetId::ring(), CSCDetId::station(), digitizers_cfi::strip, and ApeEstimator_cff::width.
◆ histoEfficiency()
void CSCValidation::histoEfficiency |
( |
TH1F * |
readHisto, |
|
|
TH1F * |
writeHisto |
|
) |
| |
|
private |
◆ lineParametrization()
double CSCValidation::lineParametrization |
( |
double |
z1Position, |
|
|
double |
z2Position, |
|
|
double |
z1Direction |
|
) |
| |
|
inlineprivate |
Definition at line 183 of file CSCValidation.h.
184 double parameterLine = (z2Position - z1Position) / z1Direction;
185 return parameterLine;
◆ ringSerial()
int CSCValidation::ringSerial |
( |
CSCDetId |
id | ) |
|
|
private |
Definition at line 1393 of file CSCValidation.cc.
1394 int st =
id.station();
1396 int ec =
id.endcap();
1398 if (st == 1 && ri == 1)
1400 if (st == 1 && ri == 2)
1402 if (st == 1 && ri == 3)
1404 if (st == 1 && ri == 4)
1413 kSerial = kSerial * (-1);
◆ typeIndex()
int CSCValidation::typeIndex |
( |
CSCDetId |
id | ) |
|
|
inlineprivate |
◆ withinSensitiveRegion()
bool CSCValidation::withinSensitiveRegion |
( |
LocalPoint |
localPos, |
|
|
const std::array< const float, 4 > & |
layerBounds, |
|
|
int |
station, |
|
|
int |
ring, |
|
|
float |
shiftFromEdge, |
|
|
float |
shiftFromDeadZone |
|
) |
| |
|
private |
Definition at line 1797 of file CSCValidation.cc.
1806 float y_center = 0.;
1807 double yUp = layerBounds[3] + y_center;
1808 double yDown = -layerBounds[3] + y_center;
1809 double xBound1Shifted = layerBounds[0] - shiftFromEdge;
1810 double xBound2Shifted = layerBounds[1] - shiftFromEdge;
1811 double lineSlope = (yUp - yDown) / (xBound2Shifted - xBound1Shifted);
1812 double lineConst = yUp - lineSlope * xBound2Shifted;
1813 double yBorder = lineSlope *
abs(localPos.
x()) + lineConst;
1816 std::vector<float> deadZoneCenter(6);
1817 float cutZone = shiftFromDeadZone;
1821 deadZoneCenter[0] = -162.48;
1822 deadZoneCenter[1] = -81.8744;
1823 deadZoneCenter[2] = -21.18165;
1824 deadZoneCenter[3] = 39.51105;
1825 deadZoneCenter[4] = 100.2939;
1826 deadZoneCenter[5] = 160.58;
1828 if (localPos.
y() > yBorder &&
1829 ((localPos.
y() > deadZoneCenter[0] + cutZone && localPos.
y() < deadZoneCenter[1] - cutZone) ||
1830 (localPos.
y() > deadZoneCenter[1] + cutZone && localPos.
y() < deadZoneCenter[2] - cutZone) ||
1831 (localPos.
y() > deadZoneCenter[2] + cutZone && localPos.
y() < deadZoneCenter[3] - cutZone) ||
1832 (localPos.
y() > deadZoneCenter[3] + cutZone && localPos.
y() < deadZoneCenter[4] - cutZone) ||
1833 (localPos.
y() > deadZoneCenter[4] + cutZone && localPos.
y() < deadZoneCenter[5] - cutZone))) {
1836 }
else if (1 ==
ring) {
1838 deadZoneCenter[0] = -95.80;
1839 deadZoneCenter[1] = -27.47;
1840 deadZoneCenter[2] = 33.67;
1841 deadZoneCenter[3] = 90.85;
1843 deadZoneCenter[0] = -89.305;
1844 deadZoneCenter[1] = -39.705;
1845 deadZoneCenter[2] = 20.195;
1846 deadZoneCenter[3] = 77.395;
1848 deadZoneCenter[0] = -75.645;
1849 deadZoneCenter[1] = -26.055;
1850 deadZoneCenter[2] = 23.855;
1851 deadZoneCenter[3] = 70.575;
1853 if (localPos.
y() > yBorder &&
1854 ((localPos.
y() > deadZoneCenter[0] + cutZone && localPos.
y() < deadZoneCenter[1] - cutZone) ||
1855 (localPos.
y() > deadZoneCenter[1] + cutZone && localPos.
y() < deadZoneCenter[2] - cutZone) ||
1856 (localPos.
y() > deadZoneCenter[2] + cutZone && localPos.
y() < deadZoneCenter[3] - cutZone))) {
1862 deadZoneCenter[0] = -83.155;
1863 deadZoneCenter[1] = -22.7401;
1864 deadZoneCenter[2] = 27.86665;
1865 deadZoneCenter[3] = 81.005;
1866 if (localPos.
y() > yBorder &&
1867 ((localPos.
y() > deadZoneCenter[0] + cutZone && localPos.
y() < deadZoneCenter[1] - cutZone) ||
1868 (localPos.
y() > deadZoneCenter[1] + cutZone && localPos.
y() < deadZoneCenter[2] - cutZone) ||
1869 (localPos.
y() > deadZoneCenter[2] + cutZone && localPos.
y() < deadZoneCenter[3] - cutZone))) {
1872 }
else if (2 ==
ring) {
1873 deadZoneCenter[0] = -86.285;
1874 deadZoneCenter[1] = -32.88305;
1875 deadZoneCenter[2] = 32.867423;
1876 deadZoneCenter[3] = 88.205;
1877 if (localPos.
y() > (yBorder) &&
1878 ((localPos.
y() > deadZoneCenter[0] + cutZone && localPos.
y() < deadZoneCenter[1] - cutZone) ||
1879 (localPos.
y() > deadZoneCenter[1] + cutZone && localPos.
y() < deadZoneCenter[2] - cutZone) ||
1880 (localPos.
y() > deadZoneCenter[2] + cutZone && localPos.
y() < deadZoneCenter[3] - cutZone))) {
1884 deadZoneCenter[0] = -81.0;
1885 deadZoneCenter[1] = 81.0;
1886 if (localPos.
y() > (yBorder) &&
1887 (localPos.
y() > deadZoneCenter[0] + cutZone && localPos.
y() < deadZoneCenter[1] - cutZone)) {
References funct::abs(), relativeConstraints::ring, relativeConstraints::station, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
◆ al_token
◆ AllRechits
◆ cd_token
◆ chisqMax
double CSCValidation::chisqMax |
|
private |
◆ cl_token
◆ cleanEvent
bool CSCValidation::cleanEvent |
|
private |
◆ co_token
◆ deltaPhiMax
double CSCValidation::deltaPhiMax |
|
private |
◆ detailedAnalysis
bool CSCValidation::detailedAnalysis |
|
private |
◆ distRHmap
◆ firstEvent
bool CSCValidation::firstEvent |
|
private |
◆ geomToken_
◆ hEffDenominator
TH2F* CSCValidation::hEffDenominator |
|
private |
◆ histos
◆ hORecHits
TH2I* CSCValidation::hORecHits |
|
private |
◆ hOSegments
TH2I* CSCValidation::hOSegments |
|
private |
◆ hOStrips
TH2I* CSCValidation::hOStrips |
|
private |
◆ hOWires
TH2I* CSCValidation::hOWires |
|
private |
◆ hRHEff
TH1F* CSCValidation::hRHEff |
|
private |
◆ hRHEff2
TH2F* CSCValidation::hRHEff2 |
|
private |
◆ hRHSTE
TH1F* CSCValidation::hRHSTE |
|
private |
◆ hRHSTE2
TH2F* CSCValidation::hRHSTE2 |
|
private |
◆ hSEff
TH1F* CSCValidation::hSEff |
|
private |
◆ hSEff2
TH2F* CSCValidation::hSEff2 |
|
private |
◆ hSensitiveAreaEvt
TH2F* CSCValidation::hSensitiveAreaEvt |
|
private |
◆ hSSTE
TH1F* CSCValidation::hSSTE |
|
private |
◆ hSSTE2
TH2F* CSCValidation::hSSTE2 |
|
private |
◆ hStripEff2
TH2F* CSCValidation::hStripEff2 |
|
private |
◆ hStripSTE2
TH2F* CSCValidation::hStripSTE2 |
|
private |
◆ hWireEff2
TH2F* CSCValidation::hWireEff2 |
|
private |
◆ hWireSTE2
TH2F* CSCValidation::hWireSTE2 |
|
private |
◆ isSimulation
bool CSCValidation::isSimulation |
|
private |
◆ l1_token
◆ lengthMax
double CSCValidation::lengthMax |
|
private |
◆ lengthMin
double CSCValidation::lengthMin |
|
private |
◆ m_single_wire_layer
std::map<int, int> CSCValidation::m_single_wire_layer |
|
private |
◆ m_wire_hvsegm
std::map<int, std::vector<int> > CSCValidation::m_wire_hvsegm |
|
private |
◆ makeADCTimingPlots
bool CSCValidation::makeADCTimingPlots |
|
private |
◆ makeAFEBTimingPlots
bool CSCValidation::makeAFEBTimingPlots |
|
private |
◆ makeCalibPlots
bool CSCValidation::makeCalibPlots |
|
private |
◆ makeComparisonPlots
bool CSCValidation::makeComparisonPlots |
|
private |
◆ makeCompTimingPlots
bool CSCValidation::makeCompTimingPlots |
|
private |
◆ makeEfficiencyPlots
bool CSCValidation::makeEfficiencyPlots |
|
private |
◆ makeGasGainPlots
bool CSCValidation::makeGasGainPlots |
|
private |
◆ makeHLTPlots
bool CSCValidation::makeHLTPlots |
|
private |
◆ makeOccupancyPlots
bool CSCValidation::makeOccupancyPlots |
|
private |
◆ makePedNoisePlots
bool CSCValidation::makePedNoisePlots |
|
private |
◆ makePlots
bool CSCValidation::makePlots |
|
private |
◆ makeRecHitPlots
bool CSCValidation::makeRecHitPlots |
|
private |
◆ makeResolutionPlots
bool CSCValidation::makeResolutionPlots |
|
private |
◆ makeRHNoisePlots
bool CSCValidation::makeRHNoisePlots |
|
private |
◆ makeSegmentPlots
bool CSCValidation::makeSegmentPlots |
|
private |
◆ makeSimHitPlots
bool CSCValidation::makeSimHitPlots |
|
private |
◆ makeStandalonePlots
bool CSCValidation::makeStandalonePlots |
|
private |
◆ makeStripPlots
bool CSCValidation::makeStripPlots |
|
private |
◆ makeTimeMonitorPlots
bool CSCValidation::makeTimeMonitorPlots |
|
private |
◆ makeTriggerPlots
bool CSCValidation::makeTriggerPlots |
|
private |
◆ makeWirePlots
bool CSCValidation::makeWirePlots |
|
private |
◆ nCSCHitsMax
int CSCValidation::nCSCHitsMax |
|
private |
◆ nCSCHitsMin
int CSCValidation::nCSCHitsMin |
|
private |
◆ nEventsAnalyzed
int CSCValidation::nEventsAnalyzed |
|
private |
◆ nmbhvsegm
std::vector<int> CSCValidation::nmbhvsegm |
|
private |
◆ NonAssociatedRechits
◆ pMin
double CSCValidation::pMin |
|
private |
◆ polarMax
double CSCValidation::polarMax |
|
private |
◆ polarMin
double CSCValidation::polarMin |
|
private |
◆ rd_token
◆ refRootFile
std::string CSCValidation::refRootFile |
|
private |
◆ rh_token
◆ rhTreeCount
int CSCValidation::rhTreeCount |
|
private |
◆ rootFileName
std::string CSCValidation::rootFileName |
|
private |
◆ sa_token
◆ sd_token
◆ se_token
◆ SegRechits
◆ segTreeCount
int CSCValidation::segTreeCount |
|
private |
◆ sh_token
◆ theFile
TFile* CSCValidation::theFile |
|
private |
◆ tr_token
◆ useDigis
bool CSCValidation::useDigis |
|
private |
◆ useQualityFilter
bool CSCValidation::useQualityFilter |
|
private |
◆ useTriggerFilter
bool CSCValidation::useTriggerFilter |
|
private |
◆ wd_token
◆ writeTreeToFile
bool CSCValidation::writeTreeToFile |
|
private |
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
T const * product() const
float fitX(const CLHEP::HepMatrix &sp, const CLHEP::HepMatrix &ep)
void fillCalibHist(float x, std::string name, std::string title, int bins, float xmin, float xmax, int bin, std::string folder)
void fillProfileByType(float x, float y, std::string name, std::string title, CSCDetId id, int binsx, float xmin, float xmax, float ymin, float ymax, std::string folder)
bool doTrigger(edm::Handle< L1MuGMTReadoutCollection > pCollection)
PedestalContainer pedestals
void doRecHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::ESHandle< CSCGeometry > cscGeom)
void doEfficiencies(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
void doOccupancies(edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
const std::vector< CSCDDUEventData > & dduData() const
accessor to dduData
ExaminerStatusType errors(void) const
edm::EDGetTokenT< FEDRawDataCollection > rd_token
float ChiSquaredProbability(double chiSquared, double nrDOF)
std::vector< int > nmbhvsegm
Maps and vectors for module doGasGain()
Geom::Theta< T > theta() const
int ringSerial(CSCDetId id)
std::map< int, int > m_single_wire_layer
void doResolution(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
std::multimap< CSCDetId, CSCRecHit2D > NonAssociatedRechits
bool makeTimeMonitorPlots
NoiseMatrixContainer matrix
void fill1DHist(float x, std::string name, std::string title, int bins, float xmin, float xmax, std::string folder)
void doTimeMonitoring(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< CSCALCTDigiCollection > alcts, edm::Handle< CSCCLCTDigiCollection > clcts, edm::Handle< CSCCorrelatedLCTDigiCollection > correlatedlcts, edm::Handle< L1MuGMTReadoutCollection > pCollection, edm::ESHandle< CSCGeometry > cscGeom, const edm::EventSetup &eventSetup, const edm::Event &event)
void fill1DHistByLayer(float x, std::string name, std::string title, CSCDetId id, int bins, float xmin, float xmax, std::string folder)
void doNoiseHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom, edm::Handle< CSCStripDigiCollection > strips)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
std::vector< DigiType >::const_iterator const_iterator
edm::EDGetTokenT< edm::TriggerResults > tr_token
int chamberSerial(CSCDetId id)
void doCalibrations(const edm::EventSetup &eventSetup)
void writeTrees(TFile *theFile)
float getthisSignal(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
void doWireDigis(edm::Handle< CSCWireDigiCollection > wires)
void doSimHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< edm::PSimHitContainer > simHits)
void fillProfile(float x, float y, std::string name, std::string title, int binsx, float xmin, float xmax, float ymin, float ymax, std::string folder)
void writeHists(TFile *theFile)
double lineParametrization(double z1Position, double z2Position, double z1Direction)
void insertPlot(TH1 *thePlot, std::string name, std::string folder)
virtual const std::array< const float, 4 > parameters() const
void doAFEBTiming(const CSCWireDigiCollection &)
void getEfficiency(float bin, float Norm, std::vector< float > &eff)
float getSignal(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
Geom::Theta< T > theta() const
const CSCLayerGeometry * geometry() const
Global3DPoint GlobalPoint
edm::EDGetTokenT< CSCSegmentCollection > se_token
void findNonAssociatedRecHits(edm::ESHandle< CSCGeometry > cscGeom, edm::Handle< CSCStripDigiCollection > strips)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
constexpr std::array< uint8_t, layerIndexSize > layer
std::multimap< CSCDetId, CSCRecHit2D > AllRechits
void fill1DHistByType(float x, std::string name, std::string title, CSCDetId id, int bins, float xmin, float xmax, std::string folder)
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
void fill2DHistByLayer(float x, float y, std::string name, std::string title, CSCDetId id, int binsx, float xmin, float xmax, int binsy, float ymin, float ymax, std::string folder)
void fill2DHist(float x, float y, std::string name, std::string title, int binsx, float xmin, float xmax, int binsy, float ymin, float ymax, std::string folder)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
edm::EDGetTokenT< reco::TrackCollection > sa_token
void doStandalone(edm::Handle< reco::TrackCollection > saMuons)
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
void doPedestalNoise(edm::Handle< CSCStripDigiCollection > strips)
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1_token
bool doHLT(edm::Handle< edm::TriggerResults > hltResults)
void setMask(ExaminerMaskType mask)
C::const_iterator const_iterator
constant access iterator type
int getWidth(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
std::string chamberTypeName() const
LocalVector localDirection() const override
Local direction.
int32_t check(const uint16_t *&buffer, int32_t length)
std::vector< const CSCChamber * > ChamberContainer
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
CSCDetId chamberId() const
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
const CSCChamberSpecs * specs() const
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
size_t size() const
Lenght of the data buffer in bytes.
void doGasGain(const CSCWireDigiCollection &, const CSCStripDigiCollection &, const CSCRecHit2DCollection &)
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
void fillRechitTree(float x, float y, float gx, float gy, int en, int st, int ri, int ch, int la)
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
void doADCTiming(const CSCRecHit2DCollection &)
bool filterEvents(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< reco::TrackCollection > saMuons)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
CrosstalkContainer crosstalk
int dbIndex(const CSCDetId &id, int &channel)
std::multimap< CSCDetId, CSCRecHit2D > SegRechits
void fill1DHistByStation(float x, std::string name, std::string title, CSCDetId id, int bins, float xmin, float xmax, std::string folder)
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
void crcALCT(bool enable)
void fill1DHistByChamber(float x, std::string name, std::string title, CSCDetId id, int bins, float xmin, float xmax, std::string folder)
CSCDetId detId(int vme, int dmb, int cfeb, int layer=0) const
bool withinSensitiveRegion(LocalPoint localPos, const std::array< const float, 4 > &layerBounds, int station, int ring, float shiftFromEdge, float shiftFromDeadZone)
std::map< int, std::vector< int > > m_wire_hvsegm
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
std::pair< const_iterator, const_iterator > Range
void doSegments(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
const ChamberContainer & chambers() const
Return a vector of all chambers.
char data[epos_bytes_allocation]
std::map< CSCRecHit2D, float, ltrh > distRHmap
int typeIndex(CSCDetId id)
Power< A, B >::type pow(const A &a, const B &b)
void crcCFEB(bool enable)
Abs< T >::type abs(const T &t)
double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine)
void fillSegmentTree(float x, float y, float gx, float gy, int en, int st, int ri, int ch)
static const double slope[3]
CSCDetId id() const
Get the (concrete) DetId.
edm::EDGetTokenT< edm::PSimHitContainer > sh_token
LocalPoint localPosition() const override
void doStripDigis(edm::Handle< CSCStripDigiCollection > strips)
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
void histoEfficiency(TH1F *readHisto, TH1F *writeHisto)
Geom::Phi< T > phi() const
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
void doCompTiming(const CSCComparatorDigiCollection &)
static const std::string kLayer("layer")
void fill2DHistByStation(float x, float y, std::string name, std::string title, CSCDetId id, int binsx, float xmin, float xmax, int binsy, float ymin, float ymax, std::string folder)