57 preshClusterCollectionX_ = ps.
getParameter<std::string>(
"preshClusterCollectionX");
58 preshClusterCollectionY_ = ps.
getParameter<std::string>(
"preshClusterCollectionY");
63 assocSClusterCollection_ = ps.
getParameter<std::string>(
"assocSClusterCollection");
65 produces< reco::PreshowerClusterCollection >(preshClusterCollectionX_);
66 produces< reco::PreshowerClusterCollection >(preshClusterCollectionY_);
67 produces< reco::SuperClusterCollection >(assocSClusterCollection_);
69 float preshStripECut = ps.
getParameter<
double>(
"preshStripEnergyCut");
70 int preshSeededNst = ps.
getParameter<
int>(
"preshSeededNstrip");
71 preshClustECut = ps.
getParameter<
double>(
"preshClusterEnergyCut");
74 std::string debugString = ps.
getParameter<std::string>(
"debugLevel");
117 evt.
getByLabel(endcapSClusterProducer_, pSuperClusters);
126 << rechits->
size() << std::endl;
129 std::map<DetId, EcalRecHit> rechits_map;
131 for (it = rechits->
begin(); it != rechits->
end(); it++) {
133 if (it->recoFlag()==14 || (it->recoFlag()<=10 && it->recoFlag()>=5))
continue;
135 rechits_map.insert(std::make_pair(it->id(), *it));
138 std::set<DetId> used_strips;
142 << rechits_map.size() <<
" was created!" << std::endl;
149 reco::SuperClusterCollection::const_iterator it_super;
151 for ( it_super=SClusts->begin(); it_super!=SClusts->end(); it_super++ ) {
159 <<
" superPHI = " << it_super->phi() << std::endl;
163 for ( ; bc_iter !=it_super->clustersEnd(); ++bc_iter ) {
167 double X = (*bc_iter)->x();
168 double Y = (*bc_iter)->y();
169 double Z = (*bc_iter)->z();
179 std::cout <<
" Intersected preshower strips are: " << std::endl;
183 else if ( strip1 ==
ESDetId(0) )
184 std::cout <<
" No intersected strip in plane 1 " << std::endl;
185 else if ( strip2 ==
ESDetId(0) )
186 std::cout <<
" No intersected strip in plane 2 " << std::endl;
190 for (
int i=0;
i<preshNclust_;
i++) {
191 reco::PreshowerCluster cl1 = presh_algo->makeOneCluster(strip1,&used_strips,&rechits_map,geometry_p,topology_p);
193 if ( cl1.
energy() > preshClustECut) {
194 clusters1.push_back(cl1);
197 reco::PreshowerCluster cl2 = presh_algo->makeOneCluster(strip2,&used_strips,&rechits_map,geometry_p,topology_p);
200 if ( cl2.
energy() > preshClustECut) {
201 clusters2.push_back(cl2);
210 <<
" basic clusters, PreshowerClusterAlgo made "
211 << clusters1.size() <<
" in X plane and " << clusters2.size()
212 <<
" in Y plane " <<
" preshower clusters " << std::endl;
215 if(e1+e2 > 1.0
e-10) {
219 deltaE = gamma_*(e1+alpha_*e2);
223 float E = it_super->energy() + deltaE;
228 if(sc.energy()*
sin(sc.position().theta())>etThresh_)
229 new_SC.push_back(sc);
231 <<
" vs. old E =" << it_super->energy() << std::endl;
238 clusters_p1->assign(clusters1.begin(), clusters1.end());
239 clusters_p2->assign(clusters2.begin(), clusters2.end());
241 evt.
put( clusters_p1, preshClusterCollectionX_ );
242 evt.
put( clusters_p2, preshClusterCollectionY_ );
246 superclusters_p->assign(new_SC.begin(), new_SC.end());
247 evt.
put(superclusters_p, assocSClusterCollection_);
260 const ESGain *gain = esgain_.product();
const double Z[kNumberCalorimeter]
T getParameter(std::string const &) const
void push_back(Ptr< T > const &iPtr)
float getESValueLow() const
Sin< T >::type sin(const T &t)
std::vector< T >::const_iterator const_iterator
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void setBCRef(const CaloClusterPtr &r)
DetIds of component RecHits – now inherited from CaloCluster.
~PreshowerClusterProducer()
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
double energy() const
cluster energy
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
virtual void produce(edm::Event &evt, const edm::EventSetup &es)
float getGammaLow0() const
float getAlphaHigh0() const
PreshowerClusterProducer(const edm::ParameterSet &ps)
void set(const edm::EventSetup &es)
T const * product() const
ESHandle< TrackerGeometry > geometry
float getGammaHigh0() const
float getESValueHigh() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
float getAlphaLow0() const
const_iterator begin() const