3 #include <boost/cstdint.hpp>
11 edm::LogInfo(
"SiStripBadModuleGenerator") <<
"[SiStripBadModuleGenerator::SiStripBadModuleGenerator]";
16 edm::LogInfo(
"SiStripBadModuleGenerator") <<
"[SiStripBadModuleGenerator::~SiStripBadModuleGenerator]";
30 const std::vector<uint32_t>& DetIds=
reader.getAllDetIds();
31 std::vector<uint32_t> selDetIds;
34 edm::LogInfo(
"SiStripQualityConfigurableFakeESSource")<<
"[produce] number of selected dets to be removed " << selDetIds.size() <<std::endl;
37 std::vector<uint32_t>::const_iterator iter=selDetIds.begin();
38 std::vector<uint32_t>::const_iterator iterEnd=selDetIds.end();
39 for(;iter!=iterEnd;++iter){
43 unsigned short firstBadStrip=0, NconsecutiveBadStrips=
reader.getNumberOfApvsAndStripLength(*iter).first * 128;
44 unsigned int theBadStripRange;
46 theBadStripRange = obj->
encode(firstBadStrip,NconsecutiveBadStrips);
49 ss <<
"detid " << *iter <<
" \t"
50 <<
" firstBadStrip " << firstBadStrip <<
"\t "
51 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t "
52 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec
55 theSiStripVector.push_back(theBadStripRange);
58 if ( ! obj->
put(*iter,range) )
59 edm::LogError(
"SiStripQualityConfigurableFakeESSource")<<
"[produce] detid already exists"<<std::endl;
62 edm::LogInfo(
"SiStripQualityConfigurableFakeESSource") << ss.str();
67 std::stringstream ss1;
70 ss1 <<
"bad module " << iter->detid <<
" " << iter->BadModule <<
"\n";
71 edm::LogInfo(
"SiStripQualityConfigurableFakeESSource") << ss1.str();
85 ss <<
"Bad SubDet " << iBadComponent->getParameter<
std::string>(
"SubDet") <<
" \t";
88 if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TIB")
90 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TID")
92 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TOB")
94 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TEC")
96 std::vector<uint32_t> genericBadDetIds( iBadComponent->getUntrackedParameter<std::vector<uint32_t> >(
"detidList", std::vector<uint32_t>()) );
98 bool anySubDet =
true;
99 if( genericBadDetIds.empty() ) anySubDet =
false;
101 std::cout <<
"genericBadDetIds.size() = " << genericBadDetIds.size() << std::endl;
111 std::vector<uint32_t>::const_iterator iter=lower_bound(DetIds.begin(),DetIds.end(),startDet);
112 std::vector<uint32_t>::const_iterator iterEnd=lower_bound(DetIds.begin(),DetIds.end(),stopDet);
115 for ( ;iter!=iterEnd;++iter){
118 if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TIB")
120 iBadComponent->getParameter<uint32_t>(
"layer"),
121 iBadComponent->getParameter<uint32_t>(
"bkw_frw"),
122 iBadComponent->getParameter<uint32_t>(
"int_ext"),
123 iBadComponent->getParameter<uint32_t>(
"ster"),
124 iBadComponent->getParameter<uint32_t>(
"string_"),
125 iBadComponent->getParameter<uint32_t>(
"detid")
127 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TID")
129 iBadComponent->getParameter<uint32_t>(
"side"),
130 iBadComponent->getParameter<uint32_t>(
"wheel"),
131 iBadComponent->getParameter<uint32_t>(
"ring"),
132 iBadComponent->getParameter<uint32_t>(
"ster"),
133 iBadComponent->getParameter<uint32_t>(
"detid")
135 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TOB")
137 iBadComponent->getParameter<uint32_t>(
"layer"),
138 iBadComponent->getParameter<uint32_t>(
"bkw_frw"),
139 iBadComponent->getParameter<uint32_t>(
"rod"),
140 iBadComponent->getParameter<uint32_t>(
"ster"),
141 iBadComponent->getParameter<uint32_t>(
"detid")
143 else if (iBadComponent->getParameter<
std::string>(
"SubDet")==
"TEC")
145 iBadComponent->getParameter<uint32_t>(
"side"),
146 iBadComponent->getParameter<uint32_t>(
"wheel"),
147 iBadComponent->getParameter<uint32_t>(
"petal_bkw_frw"),
148 iBadComponent->getParameter<uint32_t>(
"petal"),
149 iBadComponent->getParameter<uint32_t>(
"ring"),
150 iBadComponent->getParameter<uint32_t>(
"ster"),
151 iBadComponent->getParameter<uint32_t>(
"detid")
154 std::cout <<
"AnySubDet" << *iter << std::endl;
155 if(
std::find(genericBadDetIds.begin(), genericBadDetIds.end(), *iter) == genericBadDetIds.end() ) resp =
false;
160 list.push_back(*iter);
169 const DetId & therawid,
170 uint32_t requested_layer,
171 uint32_t requested_bkw_frw,
172 uint32_t requested_int_ext,
173 uint32_t requested_string,
174 uint32_t requested_ster,
175 uint32_t requested_detid)
const{
178 ( (tTopo->
tibLayer(therawid)==requested_layer) || requested_layer==0 )
180 ( (tTopo->
tibIsZPlusSide(therawid) && requested_bkw_frw==2) || (!tTopo->
tibIsZPlusSide(therawid) && requested_bkw_frw==1) || requested_bkw_frw==0)
184 ( (tTopo->
tibIsStereo(therawid) && requested_ster==1) || (tTopo->
tibIsRPhi(therawid) && requested_ster==2) || requested_ster==0 )
186 ( (tTopo->
tibString(therawid)==requested_string) || requested_string==0 )
188 ( (therawid.
rawId()==requested_detid) || requested_detid==0 )
196 const DetId & therawid,
197 uint32_t requested_layer,
198 uint32_t requested_bkw_frw,
199 uint32_t requested_rod,
200 uint32_t requested_ster,
201 uint32_t requested_detid)
const{
204 ( (tTopo->
tobLayer(therawid)==requested_layer) || requested_layer==0 )
206 ( (tTopo->
tobIsZPlusSide(therawid) && requested_bkw_frw==2) || (!tTopo->
tobIsZPlusSide(therawid) && requested_bkw_frw==1) || requested_bkw_frw==0)
208 ( (tTopo->
tobIsStereo(therawid) && requested_ster==1) || (tTopo->
tobIsRPhi(therawid) && requested_ster==2) || requested_ster==0 )
210 ( (tTopo->
tobRod(therawid) ==requested_rod) || requested_rod==0 )
212 ( (therawid.
rawId()==requested_detid) || requested_detid==0 )
221 const DetId & therawid,
222 uint32_t requested_side,
223 uint32_t requested_wheel,
224 uint32_t requested_ring,
225 uint32_t requested_ster,
226 uint32_t requested_detid)
const{
229 ( (tTopo->
tidWheel(therawid)==requested_wheel) || requested_wheel==0 )
231 ( (tTopo->
tidIsZPlusSide(therawid) && requested_side==2) || (!tTopo->
tidIsZPlusSide(therawid) && requested_side==1) || requested_side==0)
233 ( (tTopo->
tidIsStereo(therawid) && requested_ster==1) || (tTopo->
tidIsRPhi(therawid) && requested_ster==2) || requested_ster==0 )
235 ( (tTopo->
tidRing(therawid) ==requested_ring) || requested_ring==0 )
237 ( (therawid.
rawId()==requested_detid) || requested_detid==0 )
246 const DetId & therawid,
247 uint32_t requested_side,
248 uint32_t requested_wheel,
249 uint32_t requested_petal_bkw_frw,
250 uint32_t requested_petal,
251 uint32_t requested_ring,
252 uint32_t requested_ster,
253 uint32_t requested_detid)
const{
256 ( (tTopo->
tecWheel(therawid)==requested_wheel) || requested_wheel==0 )
258 ( (tTopo->
tecIsZPlusSide(therawid) && requested_side==2) || (!tTopo->
tecIsZPlusSide(therawid) && requested_side==1) || requested_side==0)
260 ( (tTopo->
tecIsStereo(therawid) && requested_ster==1) || (!tTopo->
tecIsStereo(therawid) && requested_ster==2) || requested_ster==0 )
262 ( (tTopo->
tecIsFrontPetal(therawid)&& requested_petal_bkw_frw==2) || (!tTopo->
tecIsFrontPetal(therawid) && requested_petal_bkw_frw==2) || requested_petal_bkw_frw==0 )
264 ( (tTopo->
tecPetalNumber(therawid)==requested_petal) || requested_petal==0 )
266 ( (tTopo->
tecRing(therawid)==requested_ring) || requested_ring==0 )
268 ( (therawid.
rawId()==requested_detid) || requested_detid==0 )
T getUntrackedParameter(std::string const &, T const &) const
void selectDetectors(const TrackerTopology *tTopo, const std::vector< uint32_t > &, std::vector< uint32_t > &)
bool cleanUp(bool force=false)
const std::vector< BadComponent > & getBadComponentList() const
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
unsigned int tidRing(const DetId &id) const
bool isTIDDetector(const TrackerTopology *tTopo, const DetId &therawid, uint32_t requested_side, uint32_t requested_wheel, uint32_t requested_ring, uint32_t requested_ster, uint32_t requested_detid) const
bool tobIsStereo(const DetId &id) const
std::vector< edm::ParameterSet > Parameters
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidWheel(const DetId &id) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool tobIsRPhi(const DetId &id) const
bool tidIsStereo(const DetId &id) const
uint32_t rawId() const
get the raw id
bool tibIsZPlusSide(const DetId &id) const
bool tecIsStereo(const DetId &id) const
bool tibIsRPhi(const DetId &id) const
bool isTIBDetector(const TrackerTopology *tTopo, const DetId &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
bool tobIsZPlusSide(const DetId &id) const
SiStripBadModuleGenerator(const edm::ParameterSet &, const edm::ActivityRegistry &)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool tecIsFrontPetal(const DetId &id) const
bool tidIsRPhi(const DetId &id) const
bool tidIsZPlusSide(const DetId &id) const
Parameters BadComponentList_
bool tibIsStereo(const DetId &id) const
SiStripBadStrip * createObject(const TrackerTopology *tTopo)
bool isTOBDetector(const TrackerTopology *tTopo, const DetId &therawid, uint32_t requested_layer, uint32_t requested_bkw_frw, uint32_t requested_rod, uint32_t requested_ster, uint32_t requested_detid) const
bool tecIsZPlusSide(const DetId &id) const
bool isTECDetector(const TrackerTopology *tTopo, const DetId &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
std::pair< ContainerIterator, ContainerIterator > Range
unsigned int tecPetalNumber(const DetId &id) const
std::string fullPath() const
unsigned int tobRod(const DetId &id) const
bool put(const uint32_t &detID, const InputVector &vect)
bool tibIsInternalString(const DetId &id) const
~SiStripBadModuleGenerator()
unsigned int tecWheel(const DetId &id) const
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
unsigned int tobLayer(const DetId &id) 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