11 #include "TPaveStats.h"
72 vValues[0].first =
"p1";
73 vValues[1].first =
"p2";
74 vValues[2].first =
"p3";
76 vValues[0].second = .0;
77 vValues[1].second = .0;
78 vValues[2].second = .0;
82 for(std::vector<EcalLaserAPDPNRatios::EcalLaserAPDPNpair>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems){
83 vValues[0].second += iItems->p1;
84 vValues[1].second += iItems->p2;
85 vValues[2].second += iItems->p3;
102 ss << helper.
printBarrelsEndcaps(
object().getLaserMap().barrelItems(),
object().getLaserMap().endcapItems());
110 for (
int i=0;
i<92;
i++) {
114 unsigned int x1= ((timestamp.
t1).
value() >> 32) ;
115 std::time_t tt1 = x1;
118 ss<<
"T1["<<
i<<
"]=" << timestamp.
t1.
value()<<
" "<< x1<< std::ctime(&tt1) ;
120 unsigned int x2= (timestamp.
t2).
value() >> 32;
121 std::time_t tt2 = x2;
123 ss<<
" T2["<<
i<<
"]=" << timestamp.
t2.
value()<<
" "<<x2<<std::ctime(&tt2) ;
125 unsigned int x3= (timestamp.
t3).
value() >> 32 ;
126 std::time_t tt3 = x3;
128 ss <<
" T3["<<
i<<
"]=" << timestamp.
t3.
value()<<
" "<< x3<< std::ctime(&tt3) << std::endl;
141 std::vector<int>
const&,
142 std::vector<float>
const& )
const {
143 gStyle->SetPalette(1);
145 TCanvas
canvas(
"CC map",
"CC map",800,1200);
147 float xmi[3] = {0.0 , 0.22, 0.78};
148 float xma[3] = {0.22, 0.78, 1.00};
149 TPad*** pad =
new TPad**[3];
150 for (
int gId = 0; gId < 3; gId++) {
151 pad[gId] =
new TPad*[3];
153 float yma = 1.- (0.32 * gId);
154 float ymi = yma - 0.30;
155 pad[gId][
obj] =
new TPad(Form(
"p_%i_%i",
obj, gId),Form(
"p_%i_%i",
obj, gId),
156 xmi[
obj], ymi, xma[obj], yma);
157 pad[gId][
obj]->Draw();
161 const int kGains = 3;
162 const int gainValues[3] = {1, 2, 3};
169 TH2F**
barrel =
new TH2F*[3];
170 TH2F** endc_p =
new TH2F*[3];
171 TH2F** endc_m =
new TH2F*[3];
174 barrel[
gainId] =
new TH2F(Form(
"EBp%i", gainValues[
gainId]),Form(
"EBp%i", gainValues[gainId]),360,0,360, 170, -85,85);
175 endc_p[
gainId] =
new TH2F(Form(
"EE+p%i",gainValues[gainId]),Form(
"EE+p%i",gainValues[gainId]),100,1,101,100,1,101);
176 endc_m[
gainId] =
new TH2F(Form(
"EE-p%i",gainValues[gainId]),Form(
"EE-p%i",gainValues[gainId]),100,1,101,100,1,101);
181 int thesign =
sign==1 ? 1:-1;
185 EBDetId id((ieta+1)*thesign, iphi+1);
187 if(
sign == 1) y = ieta;
188 barrel[0]->Fill(iphi, y,
object().getLaserMap()[
id.rawId()].
p1);
189 barrel[1]->Fill(iphi, y,
object().getLaserMap()[
id.rawId()].
p2);
190 barrel[2]->Fill(iphi, y,
object().getLaserMap()[
id.rawId()].
p3);
200 endc_p[0]->Fill(ix+1,iy+1,
object().getLaserMap()[
id.rawId()].
p1);
201 endc_p[1]->Fill(ix+1,iy+1,
object().getLaserMap()[
id.rawId()].
p2);
202 endc_p[2]->Fill(ix+1,iy+1,
object().getLaserMap()[
id.rawId()].
p3);
206 endc_m[0]->Fill(ix+1,iy+1,
object().getLaserMap()[
id.rawId()].
p1);
207 endc_m[1]->Fill(ix+1,iy+1,
object().getLaserMap()[
id.rawId()].
p2);
208 endc_m[2]->Fill(ix+1,iy+1,
object().getLaserMap()[
id.rawId()].
p3);
217 TLine*
l =
new TLine(0., 0., 0., 0.);
219 int ixSectorsEE[202] = {
220 62, 62, 61, 61, 60, 60, 59, 59, 58, 58, 56, 56, 46, 46, 44, 44, 43, 43, 42, 42,
221 41, 41, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 46, 46, 56, 56, 58, 58, 59, 59,
222 60, 60, 61, 61, 62, 62, 0,101,101, 98, 98, 96, 96, 93, 93, 88, 88, 86, 86, 81,
223 81, 76, 76, 66, 66, 61, 61, 41, 41, 36, 36, 26, 26, 21, 21, 16, 16, 14, 14, 9,
224 9, 6, 6, 4, 4, 1, 1, 4, 4, 6, 6, 9, 9, 14, 14, 16, 16, 21, 21, 26,
225 26, 36, 36, 41, 41, 61, 61, 66, 66, 76, 76, 81, 81, 86, 86, 88, 88, 93, 93, 96,
226 96, 98, 98,101,101, 0, 62, 66, 66, 71, 71, 81, 81, 91, 91, 93, 0, 62, 66, 66,
227 91, 91, 98, 0, 58, 61, 61, 66, 66, 71, 71, 76, 76, 81, 81, 0, 51, 51, 0, 44,
228 41, 41, 36, 36, 31, 31, 26, 26, 21, 21, 0, 40, 36, 36, 11, 11, 4, 0, 40, 36,
229 36, 31, 31, 21, 21, 11, 11, 9, 0, 46, 46, 41, 41, 36, 36, 0, 56, 56, 61, 61, 66, 66};
231 int iySectorsEE[202] = {
232 51, 56, 56, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 61, 61, 60, 60, 59, 59, 58,
233 58, 56, 56, 46, 46, 44, 44, 43, 43, 42, 42, 41, 41, 40, 40, 41, 41, 42, 42, 43,
234 43, 44, 44, 46, 46, 51, 0, 51, 61, 61, 66, 66, 76, 76, 81, 81, 86, 86, 88, 88,
235 93, 93, 96, 96, 98, 98,101,101, 98, 98, 96, 96, 93, 93, 88, 88, 86, 86, 81, 81,
236 76, 76, 66, 66, 61, 61, 41, 41, 36, 36, 26, 26, 21, 21, 16, 16, 14, 14, 9, 9,
237 6, 6, 4, 4, 1, 1, 4, 4, 6, 6, 9, 9, 14, 14, 16, 16, 21, 21, 26, 26,
238 36, 36, 41, 41, 51, 0, 46, 46, 41, 41, 36, 36, 31, 31, 26, 26, 0, 51, 51, 56,
239 56, 61, 61, 0, 61, 61, 66, 66, 71, 71, 76, 76, 86, 86, 88, 0, 62,101, 0, 61,
240 61, 66, 66, 71, 71, 76, 76, 86, 86, 88, 0, 51, 51, 56, 56, 61, 61, 0, 46, 46,
241 41, 41, 36, 36, 31, 31, 26, 26, 0, 40, 31, 31, 16, 16, 6, 0, 40, 31, 31, 16, 16, 6};
243 for (
int gId = 0; gId < 3; gId++) {
245 endc_m[gId]->SetStats(0);
247 endc_m[gId]->GetZaxis()->SetRangeUser(0.9,1.1);
248 endc_m[gId]->Draw(
"colz");
249 for (
int i=0;
i<201;
i=
i+1) {
250 if ( (ixSectorsEE[
i]!=0 || iySectorsEE[
i]!=0) &&
251 (ixSectorsEE[
i+1]!=0 || iySectorsEE[
i+1]!=0) ) {
252 l->DrawLine(ixSectorsEE[
i], iySectorsEE[i],
253 ixSectorsEE[i+1], iySectorsEE[i+1]);
254 l->SetLineWidth(0.2);
258 barrel[gId]->SetStats(0);
259 barrel[gId]->GetZaxis()->SetRangeUser(0.9,1.1);
261 barrel[gId]->Draw(
"colz");
262 for(
int i = 0;
i <17;
i++) {
263 Double_t
x = 20.+ (
i *20);
264 l =
new TLine(x,-85.,x,86.);
267 l =
new TLine(0.,0.,360.,0.);
272 endc_p[gId]->SetStats(0);
273 endc_p[gId]->GetZaxis()->SetRangeUser(0.9,1.1);
275 endc_p[gId]->Draw(
"colz");
276 for (
int i=0;
i<201;
i=
i+1) {
277 if ( (ixSectorsEE[
i]!=0 || iySectorsEE[
i]!=0) &&
278 (ixSectorsEE[
i+1]!=0 || iySectorsEE[
i+1]!=0) ) {
279 l->DrawLine(ixSectorsEE[
i], iySectorsEE[i],
280 ixSectorsEE[i+1], iySectorsEE[i+1]);
285 canvas.SaveAs(filename.c_str());
EcalLaserAPDPNRatiosHelper()
std::string plot(std::string const &, std::string const &, std::vector< int > const &, std::vector< float > const &) const
int gainId(sample_type sample)
get the gainId (2 bits)
static const int kBarlRings
std::vector< std::pair< std::string, float > > type_vValues
static std::string dumpXML(const EcalCondHeader &header, const EcalLaserAPDPNRatios &record)
#define PYTHON_WRAPPER(_class, _name)
unsigned int total_values
EcalLaserAPDPNRatios::EcalLaserAPDPNpair EcalObject
static const int kBarlWedges
std::string summary() const
static const int kEndcWedgesX
type_vValues getValues(const std::vector< EcalLaserAPDPNRatios::EcalLaserAPDPNpair > &vItems) override
static const int MAX_IPHI
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
static const int MAX_IETA
std::string printBarrelsEndcaps(const std::vector< T > &barrelItems, const std::vector< T > &endcapItems)
TimeValue_t value() const
static const int kEndcWedgesY