105 bool meet_single_thresh =
false;
110 float energy1 = clus1.
energy();
111 float theta1 = 2 * atan(
exp(-1. *
eta1));
112 float cluspt1 = energy1 *
sin(theta1);
114 saveBarrelSuperClusters.push_back(clus1);
116 meet_single_thresh =
true;
124 float energy1 = clus1.
energy();
125 float theta1 = 2 * atan(
exp(-1. *
eta1));
126 float cluspt1 = energy1 *
sin(theta1);
128 saveEndcapSuperClusters.push_back(clus1);
130 meet_single_thresh =
true;
134 auto SEBDigiCol = std::make_unique<EBDigiCollection>();
135 auto SEEDigiCol = std::make_unique<EEDigiCollection>();
136 int TotClus = saveBarrelSuperClusters.size() + saveEndcapSuperClusters.size();
138 if (TotClus >=
nclus_sel_ || meet_single_thresh) {
139 if (!saveBarrelSuperClusters.empty()) {
155 std::vector<DetId> saveTheseDetIds;
157 for (
int loop = 0;
loop <
int(saveBarrelSuperClusters.size());
loop++) {
165 saveTheseDetIds.push_back(
detId);
167 for (
int detloop = 0; detloop <
int(saveTheseDetIds.size()); ++detloop) {
171 if (detL == blah->id()) {
173 SEBDigiCol->push_back(detL);
176 for (
int iq = 0; iq < myDigi.
size(); ++iq) {
188 if (!saveEndcapSuperClusters.empty()) {
206 std::set<DetId> saveTheseDetIds;
208 for (
int loop = 0;
loop <
int(saveEndcapSuperClusters.size());
loop++) {
216 saveTheseDetIds.insert(
detId);
220 std::set<DetId>::const_iterator
finder = saveTheseDetIds.find(blah->id());
221 if (
finder != saveTheseDetIds.end()) {
224 if (detL == blah->id()) {
226 SEEDigiCol->push_back(detL);
228 for (
int iq = 0; iq < myDigi.
size(); ++iq) {
234 if (eecounter >=
int(saveTheseDetIds.size()))
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Sin< T >::type sin(const T &t)
T const * product() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string selectedEcalEEDigiCollection_
double getMaximum(TObjArray *array)
edm::EDGetTokenT< reco::SuperClusterCollection > barrelSuperClusterProducer_
std::string selectedEcalEBDigiCollection_
T const * product() const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
double cluster_pt_thresh_
EcalMGPASample sample(int i) const
edm::EDGetTokenT< EEDigiCollection > EcalEEDigiToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
T const * get() const
Returns C++ pointer to the item.
const_iterator end() const
double energy() const
cluster energy
const_iterator begin() const
The iterator returned can not safely be used across threads.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const CaloClusterPtr & seed() const
seed BasicCluster
double eta() const
pseudorapidity of cluster centroid
edm::EDGetTokenT< EBDigiCollection > EcalEBDigiToken_
edm::EDGetTokenT< EcalRecHitCollection > EcalEERecHitToken_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSuperClusterProducer_
uint16_t raw() const
get the raw word
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
edm::EDGetTokenT< EcalRecHitCollection > EcalEBRecHitToken_
double single_cluster_thresh_