3 #include <boost/cstdint.hpp>
19 edm::LogInfo(
"SiStripBadModuleGenerator") <<
"[SiStripBadModuleGenerator::SiStripBadModuleGenerator]";
24 edm::LogInfo(
"SiStripBadModuleGenerator") <<
"[SiStripBadModuleGenerator::~SiStripBadModuleGenerator]";
38 const std::vector<uint32_t>& DetIds=
reader.getAllDetIds();
39 std::vector<uint32_t> selDetIds;
42 edm::LogInfo(
"SiStripQualityConfigurableFakeESSource")<<
"[produce] number of selected dets to be removed " << selDetIds.size() <<std::endl;
45 std::vector<uint32_t>::const_iterator
iter=selDetIds.begin();
46 std::vector<uint32_t>::const_iterator iterEnd=selDetIds.end();
47 for(;iter!=iterEnd;++
iter){
49 SiStripQuality::InputVector theSiStripVector;
51 unsigned short firstBadStrip=0, NconsecutiveBadStrips=
reader.getNumberOfApvsAndStripLength(*iter).first * 128;
52 unsigned int theBadStripRange;
54 theBadStripRange = obj->encode(firstBadStrip,NconsecutiveBadStrips);
57 ss <<
"detid " << *iter <<
" \t"
58 <<
" firstBadStrip " << firstBadStrip <<
"\t "
59 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t "
60 <<
" packed integer " << std::hex << theBadStripRange << std::dec
63 theSiStripVector.push_back(theBadStripRange);
66 if ( ! obj->put(*iter,range) )
67 edm::LogError(
"SiStripQualityConfigurableFakeESSource")<<
"[produce] detid already exists"<<std::endl;
70 edm::LogInfo(
"SiStripQualityConfigurableFakeESSource") << ss.str();
75 std::stringstream ss1;
77 for (std::vector<SiStripQuality::BadComponent>::const_iterator iter=obj->getBadComponentList().begin();iter!=obj->getBadComponentList().end();++
iter)
78 ss1 <<
"bad module " << iter->detid <<
" " << iter->BadModule <<
"\n";
79 edm::LogInfo(
"SiStripQualityConfigurableFakeESSource") << ss1.str();
95 ss <<
"Bad SubDet " << iBadComponent->getParameter<
std::string>(
"SubDet") <<
" \t";
98 if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TIB")
100 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TID")
102 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TOB")
104 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TEC")
106 std::vector<uint32_t> genericBadDetIds( iBadComponent->getUntrackedParameter<std::vector<uint32_t> >(
"detidList", std::vector<uint32_t>()) );
108 bool anySubDet =
true;
109 if( genericBadDetIds.empty() ) anySubDet =
false;
111 std::cout <<
"genericBadDetIds.size() = " << genericBadDetIds.size() << std::endl;
121 std::vector<uint32_t>::const_iterator
iter=lower_bound(DetIds.begin(),DetIds.end(),startDet);
122 std::vector<uint32_t>::const_iterator iterEnd=lower_bound(DetIds.begin(),DetIds.end(),stopDet);
125 for ( ;iter!=iterEnd;++
iter){
128 if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TIB")
130 iBadComponent->getParameter<uint32_t>(
"layer"),
131 iBadComponent->getParameter<uint32_t>(
"bkw_frw"),
132 iBadComponent->getParameter<uint32_t>(
"int_ext"),
133 iBadComponent->getParameter<uint32_t>(
"ster"),
134 iBadComponent->getParameter<uint32_t>(
"string_"),
135 iBadComponent->getParameter<uint32_t>(
"detid")
137 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TID")
139 iBadComponent->getParameter<uint32_t>(
"side"),
140 iBadComponent->getParameter<uint32_t>(
"wheel"),
141 iBadComponent->getParameter<uint32_t>(
"ring"),
142 iBadComponent->getParameter<uint32_t>(
"ster"),
143 iBadComponent->getParameter<uint32_t>(
"detid")
145 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TOB")
147 iBadComponent->getParameter<uint32_t>(
"layer"),
148 iBadComponent->getParameter<uint32_t>(
"bkw_frw"),
149 iBadComponent->getParameter<uint32_t>(
"rod"),
150 iBadComponent->getParameter<uint32_t>(
"ster"),
151 iBadComponent->getParameter<uint32_t>(
"detid")
153 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TEC")
155 iBadComponent->getParameter<uint32_t>(
"side"),
156 iBadComponent->getParameter<uint32_t>(
"wheel"),
157 iBadComponent->getParameter<uint32_t>(
"petal_bkw_frw"),
158 iBadComponent->getParameter<uint32_t>(
"petal"),
159 iBadComponent->getParameter<uint32_t>(
"ring"),
160 iBadComponent->getParameter<uint32_t>(
"ster"),
161 iBadComponent->getParameter<uint32_t>(
"detid")
164 std::cout <<
"AnySubDet" << *iter << std::endl;
165 if(
std::find(genericBadDetIds.begin(), genericBadDetIds.end(), *
iter) == genericBadDetIds.end() ) resp =
false;
170 list.push_back(*iter);
179 uint32_t requested_layer,
180 uint32_t requested_bkw_frw,
181 uint32_t requested_int_ext,
182 uint32_t requested_string,
183 uint32_t requested_ster,
184 uint32_t requested_detid)
const{
188 ( (potentialDet.
layerNumber()==requested_layer) || requested_layer==0 )
190 ( (potentialDet.
isZPlusSide() && requested_bkw_frw==2) || (!potentialDet.
isZPlusSide() && requested_bkw_frw==1) || requested_bkw_frw==0)
194 ( (potentialDet.
isStereo() && requested_ster==1) || (potentialDet.
isRPhi() && requested_ster==2) || requested_ster==0 )
196 ( (potentialDet.
stringNumber()==requested_string) || requested_string==0 )
198 ( (potentialDet.
rawId()==requested_detid) || requested_detid==0 )
206 uint32_t requested_layer,
207 uint32_t requested_bkw_frw,
208 uint32_t requested_rod,
209 uint32_t requested_ster,
210 uint32_t requested_detid)
const{
214 ( (potentialDet.
layerNumber()==requested_layer) || requested_layer==0 )
216 ( (potentialDet.
isZPlusSide() && requested_bkw_frw==2) || (!potentialDet.
isZPlusSide() && requested_bkw_frw==1) || requested_bkw_frw==0)
218 ( (potentialDet.
isStereo() && requested_ster==1) || (potentialDet.
isRPhi() && requested_ster==2) || requested_ster==0 )
220 ( (potentialDet.
rodNumber()==requested_rod) || requested_rod==0 )
222 ( (potentialDet.
rawId()==requested_detid) || requested_detid==0 )
231 uint32_t requested_side,
232 uint32_t requested_wheel,
233 uint32_t requested_ring,
234 uint32_t requested_ster,
235 uint32_t requested_detid)
const{
239 ( (potentialDet.
diskNumber()==requested_wheel) || requested_wheel==0 )
241 ( (potentialDet.
isZPlusSide() && requested_side==2) || (!potentialDet.
isZPlusSide() && requested_side==1) || requested_side==0)
243 ( (potentialDet.
isStereo() && requested_ster==1) || (potentialDet.
isRPhi() && requested_ster==2) || requested_ster==0 )
245 ( (potentialDet.
ringNumber()==requested_ring) || requested_ring==0 )
247 ( (potentialDet.
rawId()==requested_detid) || requested_detid==0 )
256 uint32_t requested_side,
257 uint32_t requested_wheel,
258 uint32_t requested_petal_bkw_frw,
259 uint32_t requested_petal,
260 uint32_t requested_ring,
261 uint32_t requested_ster,
262 uint32_t requested_detid)
const{
266 ( (potentialDet.
wheelNumber()==requested_wheel) || requested_wheel==0 )
268 ( (potentialDet.
isZPlusSide() && requested_side==2) || (!potentialDet.
isZPlusSide() && requested_side==1) || requested_side==0)
270 ( (potentialDet.
isStereo() && requested_ster==1) || (!potentialDet.
isStereo() && requested_ster==2) || requested_ster==0 )
272 ( (potentialDet.
isFrontPetal() && requested_petal_bkw_frw==2) || (!potentialDet.
isFrontPetal() && requested_petal_bkw_frw==2) || requested_petal_bkw_frw==0 )
274 ( (potentialDet.
petalNumber()==requested_petal) || requested_petal==0 )
276 ( (potentialDet.
ringNumber()==requested_ring) || requested_ring==0 )
278 ( (potentialDet.
rawId()==requested_detid) || requested_detid==0 )
unsigned int rodNumber() const
T getUntrackedParameter(std::string const &, T const &) const
unsigned int petalNumber() const
unsigned int stringNumber() const
std::vector< edm::ParameterSet > Parameters
unsigned int ringNumber() const
unsigned int wheelNumber() const
bool isTIBDetector(const uint32_t &therawid, uint32_t requested_layer, uint32_t requested_bkw_frw, uint32_t requested_int_ext, uint32_t requested_string, uint32_t requested_ster, uint32_t requested_detid) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void selectDetectors(const std::vector< uint32_t > &, std::vector< uint32_t > &)
unsigned int layerNumber() const
uint32_t rawId() const
get the raw id
unsigned int layerNumber() const
SiStripBadModuleGenerator(const edm::ParameterSet &, const edm::ActivityRegistry &)
SubDetector subDetector() const
Parameters BadComponentList_
bool isInternalString() const
unsigned int ringNumber() const
bool isTECDetector(const uint32_t &therawid, uint32_t requested_side, uint32_t requested_wheel, uint32_t requested_petal_bkw_frw, uint32_t requested_petal, uint32_t requested_ring, uint32_t requested_ster, uint32_t requested_detid) const
SiStripBadStrip * createObject()
std::pair< ContainerIterator, ContainerIterator > Range
bool isTOBDetector(const uint32_t &therawid, uint32_t requested_layer, uint32_t requested_bkw_frw, uint32_t requested_rod, uint32_t requested_ster, uint32_t requested_detid) const
bool isFrontPetal() const
std::string fullPath() const
~SiStripBadModuleGenerator()
bool isTIDDetector(const uint32_t &therawid, uint32_t requested_side, uint32_t requested_wheel, uint32_t requested_ring, uint32_t requested_ster, uint32_t requested_detid) const
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 list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
unsigned int diskNumber() const