46 float red = fabs(2*x-0.5);
48 float blue =
cos( 90*x);
50 file <<
", PointSize[" << energy*0.01 <<
"]";
51 file <<
", RGBColor[" << red <<
"," << green <<
"," << blue <<
"]";
58 file <<
", If[sd, {RGBColor[0.5,0.5,0.5]";
61 file <<
"{" <<
p[0].x() <<
"," <<
p[0].y() <<
",(" <<
p[0].z() <<
"-zs)*mz}, ";
62 file <<
"{" <<
p[1].x() <<
"," <<
p[1].y() <<
",(" <<
p[1].z() <<
"-zs)*mz}, ";
63 file <<
"{" <<
p[2].x() <<
"," <<
p[2].y() <<
",(" <<
p[2].z() <<
"-zs)*mz}, ";
64 file <<
"{" <<
p[3].x() <<
"," <<
p[3].y() <<
",(" <<
p[3].z() <<
"-zs)*mz}, ";
65 file <<
"{" <<
p[0].x() <<
"," <<
p[0].y() <<
",(" <<
p[0].z() <<
"-zs)*mz}";
66 file <<
"}]" << std::endl;
69 file <<
"{" <<
p[4].x() <<
"," <<
p[4].y() <<
",(" <<
p[4].z() <<
"-zs)*mz}, ";
70 file <<
"{" <<
p[5].x() <<
"," <<
p[5].y() <<
",(" <<
p[5].z() <<
"-zs)*mz}, ";
71 file <<
"{" <<
p[6].x() <<
"," <<
p[6].y() <<
",(" <<
p[6].z() <<
"-zs)*mz}, ";
72 file <<
"{" <<
p[7].x() <<
"," <<
p[7].y() <<
",(" <<
p[7].z() <<
"-zs)*mz}, ";
73 file <<
"{" <<
p[4].x() <<
"," <<
p[4].y() <<
",(" <<
p[4].z() <<
"-zs)*mz}";
74 file <<
"}]" << std::endl;
77 file <<
"{" <<
p[0].x() <<
"," <<
p[0].y() <<
",(" <<
p[0].z() <<
"-zs)*mz}, ";
78 file <<
"{" <<
p[4].x() <<
"," <<
p[4].y() <<
",(" <<
p[4].z() <<
"-zs)*mz}";
79 file <<
"}]" << std::endl;
82 file <<
"{" <<
p[1].x() <<
"," <<
p[1].y() <<
",(" <<
p[1].z() <<
"-zs)*mz}, ";
83 file <<
"{" <<
p[5].x() <<
"," <<
p[5].y() <<
",(" <<
p[5].z() <<
"-zs)*mz}";
84 file <<
"}]" << std::endl;
87 file <<
"{" <<
p[2].x() <<
"," <<
p[2].y() <<
",(" <<
p[2].z() <<
"-zs)*mz}, ";
88 file <<
"{" <<
p[6].x() <<
"," <<
p[6].y() <<
",(" <<
p[6].z() <<
"-zs)*mz}";
89 file <<
"}]" << std::endl;
92 file <<
"{" <<
p[3].x() <<
"," <<
p[3].y() <<
",(" <<
p[3].z() <<
"-zs)*mz}, ";
93 file <<
"{" <<
p[7].x() <<
"," <<
p[7].y() <<
",(" <<
p[7].z() <<
"-zs)*mz}";
94 file <<
"}]" << std::endl;
96 file <<
"}]" << std::endl;
105 ev.
getByLabel(
"ecalRecHit",
"EcalRecHitsEB", recHitsBarrel);
107 ev.
getByLabel(
"ecalRecHit",
"EcalRecHitsEE", recHitsEndcap);
114 <<
" [EventPlotter] ecal barrel/endcap :"
115 <<
" " << recHitsBarrel->size()
116 <<
"/" << recHitsEndcap->size();
121 file <<
", If[er, {RGBColor[0.0,0.0,0.0]";
126 recHit!= recHitsBarrel->end();
132 printEcalRecHit(cell, recHit->energy());
138 recHit!= recHitsEndcap->end();
144 printEcalRecHit(cell, recHit->energy());
Sin< T >::type sin(const T &t)
std::vector< EcalRecHit >::const_iterator const_iterator
void printEcalRecHit(const CaloCellGeometry *cell, float energy)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
PlotEcalRecHits(const edm::EventSetup &es, std::ofstream &file_)
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Cos< T >::type cos(const T &t)
void printEcalRecHits(const edm::Event &ev)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell's volume.