26 ModulesToBeExcluded.clear();
27 ModulesToBeExcluded = ps.
getParameter< std::vector<unsigned> >(
"ModulesToBeExcluded");
28 edm::LogInfo(
"ClusterMTCCFilter")<<
"Clusters from "<<ModulesToBeExcluded.size()<<
" modules will be ignored in the filter:";
29 for( std::vector<uint32_t>::const_iterator imod = ModulesToBeExcluded.begin(); imod != ModulesToBeExcluded.end(); imod++){
33 ChargeThresholdTIB=ps.
getParameter<
int>(
"ChargeThresholdTIB");
34 ChargeThresholdTOB=ps.
getParameter<
int>(
"ChargeThresholdTOB");
35 ChargeThresholdTEC=ps.
getParameter<
int>(
"ChargeThresholdTEC");
36 MinClustersDiffComponents=ps.
getParameter<
int>(
"MinClustersDiffComponents");
37 clusterProducer = ps.
getParameter<
string>(
"ClusterProducer");
40 produces <unsigned int >();
41 produces < map<unsigned int,vector<SiStripCluster> > >();
57 unsigned int sum_of_cluster_charges=0;
58 clusters_in_subcomponents.clear();
61 for(vector<SiStripCluster>::const_iterator vit=(it->data).begin(); vit!=(it->data).
end(); vit++){
63 unsigned int amplclus=0;
64 for(
auto ia=vit->amplitudes().begin(); ia!=vit->amplitudes().end(); ia++) {
65 if ((*ia)>0) amplclus+=(*ia);
67 sum_of_cluster_charges += amplclus;
69 unsigned int generalized_layer = 0;
70 bool exclude_this_detid =
false;
71 for( std::vector<uint32_t>::const_iterator imod = ModulesToBeExcluded.begin(); imod != ModulesToBeExcluded.end(); imod++ ){
72 if(*imod == thedetId.
rawId()) exclude_this_detid =
true;
75 if( ! exclude_this_detid ){
89 generalized_layer = 10*thedetId.
subdetId();
96 map<unsigned int,vector<SiStripCluster> >::iterator layer_it = clusters_in_subcomponents.find(generalized_layer);
97 if(layer_it==clusters_in_subcomponents.end()){
98 vector<SiStripCluster> local_vector;
99 local_vector.push_back(*vit);
100 clusters_in_subcomponents.insert( std::make_pair( generalized_layer, local_vector) );
102 (layer_it->second).push_back(*vit);
110 unsigned int nr_of_subcomps_with_clusters=0;
115 if( !clusters_in_subcomponents[31].
empty() || !clusters_in_subcomponents[32].empty() ) nr_of_subcomps_with_clusters++;
116 if( !clusters_in_subcomponents[33].
empty() ) nr_of_subcomps_with_clusters++;
117 if( !clusters_in_subcomponents[51].
empty() ) nr_of_subcomps_with_clusters++;
118 if( !clusters_in_subcomponents[52].
empty() ) nr_of_subcomps_with_clusters++;
120 nr_of_subcomps_with_clusters >= MinClustersDiffComponents
125 e.
put(std::make_unique<int>(decision));
127 e.
put(std::make_unique<unsigned int>(sum_of_cluster_charges));
129 e.
put(std::make_unique<
std::map<
unsigned int,std::vector<SiStripCluster>>>(clusters_in_subcomponents));
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
unsigned int tibLayer(const DetId &id) const
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.
uint32_t tibGlued(const DetId &id) const
uint32_t tibStereo(const DetId &id) const
collection_type::const_iterator const_iterator
T const * product() const
unsigned int tobLayer(const DetId &id) const