23 const std::string ClusterType__Mustache(
"Mustache");
33 if( _typename == ClusterType__BOX ) {
35 }
else if ( _typename == ClusterType__Mustache ) {
39 <<
"You have not chosen a valid clustering type,"
40 <<
" please choose from \"Box\" or \"Mustache\"!";
46 bool useDynamicDPhi = iConfig.
getParameter<
bool>(
"useDynamicDPhiWindow");
48 double threshPFClusterSeedBarrel = iConfig.
getParameter<
double>(
"thresh_PFClusterSeedBarrel");
49 double threshPFClusterBarrel = iConfig.
getParameter<
double>(
"thresh_PFClusterBarrel");
51 double threshPFClusterSeedEndcap = iConfig.
getParameter<
double>(
"thresh_PFClusterSeedEndcap");
52 double threshPFClusterEndcap = iConfig.
getParameter<
double>(
"thresh_PFClusterEndcap");
54 double phiwidthSuperClusterBarrel = iConfig.
getParameter<
double>(
"phiwidth_SuperClusterBarrel");
55 double etawidthSuperClusterBarrel = iConfig.
getParameter<
double>(
"etawidth_SuperClusterBarrel");
57 double phiwidthSuperClusterEndcap = iConfig.
getParameter<
double>(
"phiwidth_SuperClusterEndcap");
58 double etawidthSuperClusterEndcap = iConfig.
getParameter<
double>(
"etawidth_SuperClusterEndcap");
60 double threshPFClusterES = iConfig.
getParameter<
double>(
"thresh_PFClusterES");
65 double doSatelliteClusterMerge =
67 double satelliteClusterSeedThreshold =
68 iConfig.
getParameter<
double>(
"satelliteClusterSeedThreshold");
69 double satelliteMajorityFraction =
70 iConfig.
getParameter<
double>(
"satelliteMajorityFraction");
72 superClusterAlgo_.setVerbosityLevel(verbose_);
73 superClusterAlgo_.setClusteringType(_theclusteringtype);
74 superClusterAlgo_.setUseDynamicDPhi(useDynamicDPhi);
76 superClusterAlgo_.setThreshPFClusterSeedBarrel( threshPFClusterSeedBarrel );
77 superClusterAlgo_.setThreshPFClusterBarrel( threshPFClusterBarrel );
79 superClusterAlgo_.setThreshPFClusterSeedEndcap( threshPFClusterSeedEndcap );
80 superClusterAlgo_.setThreshPFClusterEndcap( threshPFClusterEndcap );
82 superClusterAlgo_.setPhiwidthSuperClusterBarrel( phiwidthSuperClusterBarrel );
83 superClusterAlgo_.setEtawidthSuperClusterBarrel( etawidthSuperClusterBarrel );
85 superClusterAlgo_.setPhiwidthSuperClusterEndcap( phiwidthSuperClusterEndcap );
86 superClusterAlgo_.setEtawidthSuperClusterEndcap( etawidthSuperClusterEndcap );
88 superClusterAlgo_.setThreshPFClusterES( threshPFClusterES );
90 superClusterAlgo_.setSatelliteMerging( doSatelliteClusterMerge );
91 superClusterAlgo_.setSatelliteThreshold( satelliteClusterSeedThreshold );
92 superClusterAlgo_.setMajorityFraction( satelliteMajorityFraction );
97 thePFEnergyCalibration_ =
99 superClusterAlgo_.setPFClusterCalibration(thePFEnergyCalibration_);
100 superClusterAlgo_.setUsePS(iConfig.
getParameter<
bool>(
"use_preshower"));
102 bool applyCrackCorrections_ = iConfig.
getParameter<
bool>(
"applyCrackCorrections");
103 superClusterAlgo_.setCrackCorrections(applyCrackCorrections_);
110 PFBasicClusterCollectionBarrel_ = iConfig.
getParameter<
string>(
"PFBasicClusterCollectionBarrel");
111 PFSuperClusterCollectionBarrel_ = iConfig.
getParameter<
string>(
"PFSuperClusterCollectionBarrel");
113 PFBasicClusterCollectionEndcap_ = iConfig.
getParameter<
string>(
"PFBasicClusterCollectionEndcap");
114 PFSuperClusterCollectionEndcap_ = iConfig.
getParameter<
string>(
"PFSuperClusterCollectionEndcap");
116 PFBasicClusterCollectionPreshower_ = iConfig.
getParameter<
string>(
"PFBasicClusterCollectionPreshower");
117 PFSuperClusterCollectionEndcapWithPreshower_ = iConfig.
getParameter<
string>(
"PFSuperClusterCollectionEndcapWithPreshower");
119 produces<reco::SuperClusterCollection>(PFSuperClusterCollectionBarrel_);
120 produces<reco::SuperClusterCollection>(PFSuperClusterCollectionEndcapWithPreshower_);
136 iEvent.
getByLabel( inputTagPFClusters_, pfclustersHandle );
139 iEvent.
getByLabel( inputTagPFClustersES_, preshowerpfclustersHandle);
143 superClusterAlgo_.loadAndSortPFClusters(*pfclustersHandle,
144 *preshowerpfclustersHandle);
145 superClusterAlgo_.run();
148 iEvent.
put(superClusterAlgo_.getEBOutputSCCollection(),
149 PFSuperClusterCollectionBarrel_);
150 iEvent.
put(superClusterAlgo_.getEEOutputSCCollection(),
151 PFSuperClusterCollectionEndcapWithPreshower_);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
PFECALSuperClusterProducer(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
~PFECALSuperClusterProducer()