14 std::vector<std::string> wantedsubdets = iConfig.
getParameter<std::vector<std::string> >(
"wantedSubDets");
15 for(
const auto& iS : wantedsubdets){
21 if(subdet == ClusterSummary::NVALIDENUMS)
throw cms::Exception(
"No standard selection: ") << iS;
24 if(subdet > maxEnum) maxEnum = subdet;
29 std::vector<edm::ParameterSet> wantedusersubdets_ps = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"wantedUserSubDets");
30 for(
const auto& iS : wantedusersubdets_ps){
33 std::vector<std::string>
selection = iS.getParameter<std::vector<std::string> >(
"selection");
39 if(subdet > maxEnum) maxEnum = subdet;
44 produces<ClusterSummary>().setBranchAlias(
"trackerClusterSummary");
52 std::vector<bool> selectedVector(
selectors.size(),
false);
54 auto getSelections = [&] (
const uint32_t detid ){
55 for(
unsigned int iS = 0; iS <
selectors.size(); ++iS)
58 auto fillSelections = [&] (
const int clusterSize,
const float clusterCharge ){
59 for(
unsigned int iS = 0; iS <
selectors.size(); ++iS){
60 if(!selectedVector[iS])
continue;
75 for(;itClusters!=stripClusters->end();++itClusters){
76 getSelections(itClusters->
id());
91 for(;itClusters!=pixelClusters->end();++itClusters){
92 getSelections(itClusters->
id());
94 fillSelections(cluster->size(),
float(cluster->charge())/1000.);
111 std::cout <<
"-------------------------------------------------------" << std::endl;
115 auto result = std::make_unique<ClusterSummary>();
126 edm::LogInfo(
"ClusterSummaryProducer") <<
"+++++++++++++++++++++++++++++++ " << std::endl <<
"Getting info on " ;
T getParameter(std::string const &) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< std::string > moduleNames
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClusters_
void addClusChargeByIndex(const int mod, const float val)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void addClusSizeByIndex(const int mod, const int val)
#define DEFINE_FWK_MODULE(type)
static const std::vector< std::string > subDetNames
ModuleSelections selectors
void produce(edm::Event &, const edm::EventSetup &) override
data_type const * const_iterator
id_type id(size_t cell) const
ClusterSummaryProducer(const edm::ParameterSet &)
int getClusSizeByIndex(const int mod) const
int getNClusByIndex(const int mod) const
void beginStream(edm::StreamID) override
std::pair< DetIdSelector, ClusterSummary::CMSTracker > ModuleSelection
float getClusChargeByIndex(const int mod) const
static const std::vector< std::vector< std::string > > subDetSelections
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClusters_
const unsigned clusterSize() const
void addNClusByIndex(const int mod, const int val)
const_iterator begin(bool update=false) const