46 PreshowerClusterShapeCollectionX_ = ps.
getParameter<
string>(
"PreshowerClusterShapeCollectionX");
47 PreshowerClusterShapeCollectionY_ = ps.
getParameter<
string>(
"PreshowerClusterShapeCollectionY");
49 produces< reco::PreshowerClusterShapeCollection >(PreshowerClusterShapeCollectionX_);
50 produces< reco::PreshowerClusterShapeCollection >(PreshowerClusterShapeCollectionY_);
52 float preshStripECut = ps.
getParameter<
double>(
"preshStripEnergyCut");
55 string debugString = ps.
getParameter<
string>(
"debugLevel");
61 string tmpPath = ps.
getUntrackedParameter<
string>(
"pathToWeightFiles",
"RecoEcal/EgammaClusterProducers/data/");
66 cout <<
"PreshowerClusterShapeProducer:presh_pi0_algo class instantiated " << endl;
74 delete presh_pi0_algo;
83 cout <<
"\n ....... Event " << evt.
id() <<
" with Number = " << nEvt_+1
84 <<
" is analyzing ....... " << endl << endl;
112 cout <<
"PreshowerClusterShapeProducer: ### Total # of preshower RecHits: "
113 << rechits->
size() << endl;
118 map<DetId, EcalRecHit> rechits_map;
120 for (it = rechits->
begin(); it != rechits->
end(); it++) {
121 rechits_map.insert(make_pair(it->id(), *it));
124 <<
"PreshowerClusterShapeProducer: ### Preshower RecHits_map of size "
125 << rechits_map.size() <<
" was created!" << endl;
136 evt.
getByLabel(endcapSClusterProducer_, pSuperClusters);
139 SuperClusterCollection::const_iterator it_s;
140 for ( it_s=SClusts->begin(); it_s!=SClusts->end(); it_s++ ) {
144 float SC_Et = it_super->energy()*
sin(2*atan(
exp(-it_super->eta())));
145 float SC_eta = it_super->eta();
146 float SC_phi = it_super->phi();
149 cout <<
"PreshowerClusterShapeProducer: superCl_E = " << it_super->energy()
150 <<
" superCl_Et = " << SC_Et
151 <<
" superCl_Eta = " << SC_eta
152 <<
" superCl_Phi = " << SC_phi << endl;
155 if(fabs(SC_eta) >= 1.65 && fabs(SC_eta) <= 2.5)
159 const GlobalPoint pointSC(it_super->x(),it_super->y(),it_super->z());
169 vector<float> vout_stripE1 = presh_pi0_algo->findPreshVector(stripX, &rechits_map, topology_p);
170 vector<float> vout_stripE2 = presh_pi0_algo->findPreshVector(stripY, &rechits_map, topology_p);
173 cout <<
"PreshowerClusterShapeProducer : ES Energy vector associated to the given SC = " ;
174 for(
int k1=0;k1<11;k1++) {
175 cout << vout_stripE1[k1] <<
" " ;
177 for(
int k1=0;k1<11;k1++) {
178 cout << vout_stripE2[k1] <<
" " ;
185 ps_cl_x.push_back(ps1);
189 ps_cl_y.push_back(ps2);
196 ps_cl_for_pi0_disc_x->assign(ps_cl_x.begin(), ps_cl_x.end());
197 ps_cl_for_pi0_disc_y->assign(ps_cl_y.begin(), ps_cl_y.end());
199 evt.
put(ps_cl_for_pi0_disc_x, PreshowerClusterShapeCollectionX_);
200 evt.
put(ps_cl_for_pi0_disc_y, PreshowerClusterShapeCollectionY_);
209 LogDebug(
"PiZeroDiscriminatorDebug") << ostr.str();
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setSCRef(const SuperClusterRef &r)
Sin< T >::type sin(const T &t)
std::vector< T >::const_iterator const_iterator
Exp< T >::type exp(const T &t)
~PreshowerClusterShapeProducer()
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< PreshowerClusterShape > PreshowerClusterShapeCollection
collection of PreshowerClusterShape objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
T const * product() const
ESHandle< TrackerGeometry > geometry
virtual void produce(edm::Event &evt, const edm::EventSetup &es)
PreshowerClusterShapeProducer(const edm::ParameterSet &ps)
const_iterator begin() const