23 ModulesToBeExcluded.clear();
24 ModulesToBeExcluded = ps.
getParameter< std::vector<unsigned> >(
"ModulesToBeExcluded");
25 edm::LogInfo(
"TECClusterFilter")<<
"Clusters from "<<ModulesToBeExcluded.size()<<
" modules will be ignored in the filter:";
26 for( std::vector<uint32_t>::const_iterator imod = ModulesToBeExcluded.begin(); imod != ModulesToBeExcluded.end(); imod++){
30 ChargeThresholdTEC=ps.
getParameter<
int>(
"ChargeThresholdTEC");
31 edm::LogInfo(
"TECClusterFilter")<<
"ChargeThresholdTEC"<<ChargeThresholdTEC;
32 minNrOfTECClusters=ps.
getParameter<
int>(
"MinNrOfTECClusters");
33 edm::LogInfo(
"TECClusterFilter")<<
"MinNrOfTECClusters"<<minNrOfTECClusters;
34 clusterProducer = ps.
getParameter<
string>(
"ClusterProducer");
35 edm::LogInfo(
"TECClusterFilter")<<
"ClusterProducer"<<clusterProducer;
46 unsigned int nr_clusters_above_threshold = 0;
50 bool exclude_this_detid =
false;
51 for(vector<SiStripCluster>::const_iterator vit=(it->data).begin(); vit!=(it->data).
end(); vit++)
53 for( std::vector<uint32_t>::const_iterator imod = ModulesToBeExcluded.begin(); imod != ModulesToBeExcluded.end(); imod++ )
54 {
if(*imod == thedetId.
rawId()) exclude_this_detid =
true; }
57 unsigned int amplclus=0;
59 for(
auto ia=vit->amplitudes().begin(); ia!=vit->amplitudes().end(); ia++)
60 {
if ((*ia)>0) amplclus+=(*ia); }
61 if(amplclus>ChargeThresholdTEC) nr_clusters_above_threshold++;
65 if(nr_clusters_above_threshold>=minNrOfTECClusters) decision=
true;
66 e.
put(std::make_unique<int>(decision));
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
constexpr uint32_t rawId() const
get the raw id
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Namespace of DDCMS conversion namespace.
collection_type::const_iterator const_iterator