42 theDbe->setVerbose(1);
56 theRecHits4DLabel =
parameters.getParameter<
string>(
"recHits4DLabel");
58 theDbe->setCurrentFolder(
"Muons/DTSegmentsMonitor");
61 phiHistos.push_back(theDbe->book2D(
"phiSegments_numHitsVsWheel",
"phiSegments_numHitsVsWheel", 5, -2.5, 2.5, 20, 0, 20));
62 phiHistos[0]->setBinLabel(1,
"W-2",1);
63 phiHistos[0]->setBinLabel(2,
"W-1",1);
64 phiHistos[0]->setBinLabel(3,
"W0",1);
65 phiHistos[0]->setBinLabel(4,
"W1",1);
66 phiHistos[0]->setBinLabel(5,
"W2",1);
67 phiHistos.push_back(theDbe->book2D(
"phiSegments_numHitsVsSector",
"phiSegments_numHitsVsSector", 14, 0.5, 14.5, 20, 0, 20));
68 phiHistos[1]->setBinLabel(1,
"Sec1",1);
69 phiHistos[1]->setBinLabel(2,
"Sec2",1);
70 phiHistos[1]->setBinLabel(3,
"Sec3",1);
71 phiHistos[1]->setBinLabel(4,
"Sec4",1);
72 phiHistos[1]->setBinLabel(5,
"Sec5",1);
73 phiHistos[1]->setBinLabel(6,
"Sec6",1);
74 phiHistos[1]->setBinLabel(7,
"Sec7",1);
75 phiHistos[1]->setBinLabel(8,
"Sec8",1);
76 phiHistos[1]->setBinLabel(9,
"Sec9",1);
77 phiHistos[1]->setBinLabel(10,
"Sec10",1);
78 phiHistos[1]->setBinLabel(11,
"Sec11",1);
79 phiHistos[1]->setBinLabel(12,
"Sec12",1);
80 phiHistos[1]->setBinLabel(13,
"Sec13",1);
81 phiHistos[1]->setBinLabel(14,
"Sec14",1);
82 phiHistos.push_back(theDbe->book2D(
"phiSegments_numHitsVsStation",
"phiSegments_numHitsVsStation", 4, 0.5, 4.5, 20, 0, 20));
83 phiHistos[2]->setBinLabel(1,
"St1",1);
84 phiHistos[2]->setBinLabel(2,
"St2",1);
85 phiHistos[2]->setBinLabel(3,
"St3",1);
86 phiHistos[2]->setBinLabel(4,
"St4",1);
89 thetaHistos.push_back(theDbe->book2D(
"thetaSegments_numHitsVsWheel",
"thetaSegments_numHitsVsWheel", 5, -2.5, 2.5, 20, 0, 20));
90 thetaHistos[0]->setBinLabel(1,
"W-2",1);
91 thetaHistos[0]->setBinLabel(2,
"W-1",1);
92 thetaHistos[0]->setBinLabel(3,
"W0",1);
93 thetaHistos[0]->setBinLabel(4,
"W1",1);
94 thetaHistos[0]->setBinLabel(5,
"W2",1);
95 thetaHistos.push_back(theDbe->book2D(
"thetaSegments_numHitsVsSector",
"thetaSegments_numHitsVsSector", 14, 0.5, 14.5, 20, 0, 20));
96 thetaHistos[1]->setBinLabel(1,
"Sec1",1);
97 thetaHistos[1]->setBinLabel(2,
"Sec2",1);
98 thetaHistos[1]->setBinLabel(3,
"Sec3",1);
99 thetaHistos[1]->setBinLabel(4,
"Sec4",1);
100 thetaHistos[1]->setBinLabel(5,
"Sec5",1);
101 thetaHistos[1]->setBinLabel(6,
"Sec6",1);
102 thetaHistos[1]->setBinLabel(7,
"Sec7",1);
103 thetaHistos[1]->setBinLabel(8,
"Sec8",1);
104 thetaHistos[1]->setBinLabel(9,
"Sec9",1);
105 thetaHistos[1]->setBinLabel(10,
"Sec10",1);
106 thetaHistos[1]->setBinLabel(11,
"Sec11",1);
107 thetaHistos[1]->setBinLabel(12,
"Sec12",1);
108 thetaHistos[1]->setBinLabel(13,
"Sec13",1);
109 thetaHistos[1]->setBinLabel(14,
"Sec14",1);
110 thetaHistos.push_back(theDbe->book2D(
"thetaSegments_numHitsVsStation",
"thetaSegments_numHitsVsStation", 4, 0.5, 4.5, 20, 0, 20));
111 thetaHistos[2]->setBinLabel(1,
"St1",1);
112 thetaHistos[2]->setBinLabel(2,
"St2",1);
113 thetaHistos[2]->setBinLabel(3,
"St3",1);
114 thetaHistos[2]->setBinLabel(4,
"St4",1);
120 bool outputMEsInRootFile =
parameters.getParameter<
bool>(
"OutputMEsInRootFile");
122 if(outputMEsInRootFile){
123 theDbe->save(outputFileName);
126 theDbe->rmdir(
"DT/DTSegmentsTask");
139 bool checkNoisyChannels =
parameters.getUntrackedParameter<
bool>(
"checkNoisyChannels",
false);
141 if(checkNoisyChannels) {
147 event.getByLabel(theRecHits4DLabel, all4DSegments);
151 for (chamberId = all4DSegments->id_begin();
152 chamberId != all4DSegments->id_end();
156 int nsegm = distance(range.first, range.second);
158 cout <<
" Chamber: " << *chamberId <<
" has " << nsegm
159 <<
" 4D segments" << endl;
164 segment4D!=range.second;
168 bool segmNoisy =
false;
169 if((*segment4D).hasPhi()){
172 map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
173 for(vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
174 hit != phiHits.end(); ++
hit) {
178 if(checkNoisyChannels) {
179 bool isNoisy =
false;
180 bool isFEMasked =
false;
181 bool isTDCMasked =
false;
182 bool isTrigMask =
false;
185 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
188 cout <<
"Wire: " << wireId <<
" is noisy, skipping!" << endl;
195 if((*segment4D).hasZed()) {
199 for(vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
200 hit != zHits.end(); ++
hit) {
202 if(checkNoisyChannels) {
203 bool isNoisy =
false;
204 bool isFEMasked =
false;
205 bool isTDCMasked =
false;
206 bool isTrigMask =
false;
210 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
213 cout <<
"Wire: " << wireId <<
" is noisy, skipping!" << endl;
222 cout<<
"skipping the segment: it contains noisy cells"<<endl;
229 if((*segment4D).hasPhi()){
230 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
232 cout<<
"Phi segment with number of hits: "<<nHits<<endl;
233 phiHistos[0]->Fill((*chamberId).wheel(), nHits);
234 phiHistos[1]->Fill((*chamberId).sector(), nHits);
235 phiHistos[2]->Fill((*chamberId).station(), nHits);
237 if((*segment4D).hasZed()) {
238 nHits = (((*segment4D).zSegment())->specificRecHits()).
size();
240 cout<<
"Zed segment with number of hits: "<<nHits<<endl;
241 thetaHistos[0]->Fill((*chamberId).wheel(), nHits);
242 thetaHistos[1]->Fill((*chamberId).sector(), nHits);
243 thetaHistos[2]->Fill((*chamberId).station(), nHits);
T getUntrackedParameter(std::string const &, T const &) const
std::pair< const_iterator, const_iterator > range
iterator range
virtual ~DTSegmentsTask()
Destructor.
C::const_iterator const_iterator
constant access iterator type
void analyze(const edm::Event &event, const edm::EventSetup &setup)
DTSegmentsTask(const edm::ParameterSet &pset)
Constructor.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
void beginJob(void)
book the histos
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.