74 bool meet_single_thresh =
false;
78 float eta1 = clus1.
eta();
79 float energy1 = clus1.
energy();
80 float theta1 = 2*atan(
exp(-1.*eta1));
81 float cluspt1 = energy1 *
sin(theta1);
83 saveBarrelSuperClusters.push_back(clus1);
85 meet_single_thresh =
true;
93 float eta1 = clus1.
eta();
94 float energy1 = clus1.
energy();
95 float theta1 = 2*atan(
exp(-1.*eta1));
96 float cluspt1 = energy1 *
sin(theta1);
98 saveEndcapSuperClusters.push_back(clus1);
100 meet_single_thresh =
true;
104 auto SEBDigiCol = std::make_unique<EBDigiCollection>();
105 auto SEEDigiCol = std::make_unique<EEDigiCollection>();
106 int TotClus = saveBarrelSuperClusters.size() + saveEndcapSuperClusters.size();
108 if (TotClus >=
nclus_sel_ || meet_single_thresh){
110 if (!saveBarrelSuperClusters.empty()){
130 std::vector<DetId> saveTheseDetIds;
137 DetId maxDetId = EcalClusterTools::getMaximum(*bc,rechits).first;
142 for (
int detloop=0; detloop <
int(saveTheseDetIds.size());++detloop){
146 blah!=digis->
end();blah++){
148 if (detL == blah->id()){
150 SEBDigiCol->push_back(detL);
153 for (
int iq =0;iq<myDigi.
size();++iq){
167 if (!saveEndcapSuperClusters.empty()){
187 std::set<DetId> saveTheseDetIds;
194 DetId maxDetId = EcalClusterTools::getMaximum(*bc,rechits).first;
200 blah!=digis->
end();blah++){
201 std::set<DetId>::const_iterator
finder = saveTheseDetIds.find(blah->id());
202 if (finder!=saveTheseDetIds.end()){
205 if (detL == blah->id()){
207 SEEDigiCol->push_back(detL);
209 for (
int iq =0;iq<myDigi.
size();++iq){
216 if (eecounter >=
int(saveTheseDetIds.size()))
break;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T const * get() const
Returns C++ pointer to the item.
Sin< T >::type sin(const T &t)
EcalMGPASample sample(int i) const
const_iterator begin() const
uint16_t raw() const
get the raw word
double eta() const
pseudorapidity of cluster centroid
std::string selectedEcalEEDigiCollection_
edm::EDGetTokenT< reco::SuperClusterCollection > barrelSuperClusterProducer_
std::string selectedEcalEBDigiCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
double cluster_pt_thresh_
edm::EDGetTokenT< EEDigiCollection > EcalEEDigiToken_
double energy() const
cluster energy
T const * product() const
const_iterator end() const
void setSample(int i, EcalMGPASample sam)
const CaloClusterPtr & seed() const
seed BasicCluster
edm::EDGetTokenT< EBDigiCollection > EcalEBDigiToken_
edm::EDGetTokenT< EcalRecHitCollection > EcalEERecHitToken_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSuperClusterProducer_
T const * product() const
edm::EDGetTokenT< EcalRecHitCollection > EcalEBRecHitToken_
double single_cluster_thresh_