27 #include <boost/ref.hpp>
28 #include <boost/bind.hpp>
29 #include <boost/function.hpp>
30 #include <boost/iterator/transform_iterator.hpp>
48 std::cout <<
" tower map size " << stripMap.size() << std::endl;
49 ss <<
" Endcap : Number of masked Trigger Strips " << stripMap.size() << std::endl;
56 std::vector<int>
const&,
57 std::vector<float>
const& )
const {
58 gStyle->SetPalette(1);
60 const Int_t NRGBs = 5;
61 const Int_t NCont = 255;
63 Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
64 Double_t
red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
65 Double_t
green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
66 Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
67 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
68 gStyle->SetNumberContours(NCont);
70 TCanvas
canvas(
"CC map",
"CC map",1200, 600);
71 TPad** pad =
new TPad*[2];
72 float xmi[2] = {0.0, 0.5};
73 float xma[2] = {0.5, 1.0};
75 pad[
obj] =
new TPad(Form(
"p_%i",
obj),Form(
"p_%i",
obj),
76 xmi[
obj], 0.0, xma[obj], 1.0);
80 TH2F** hEEStrip =
new TH2F*[2];
81 for (
int iz = 0; iz < 2; iz++) {
84 hEEStrip[iz] =
new TH2F(Form(
"EEStrip_%i", iz),
85 Form(
"EE masked strips side %i", izz),101,1.,101.,101,1.,101.);
86 hEEStrip[iz]->SetStats(0);
94 std::cout <<
"EcalTPGStripStatusPyWrapper File not found" << std::endl;
99 int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
100 int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
101 uint32_t rawEE[108][28][5][5];
102 int NbrawEE[108][28][5];
103 for(
int TCC = 0; TCC < 108; TCC++)
104 for(
int TT = 0; TT < 28; TT++)
105 for(
int ST = 0; ST < 5; ST++)
106 NbrawEE[TCC][TT][ST] = 0;
108 f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip
109 >> tccid >> tower >> pseudostrip_in_TCC >> pseudostrip_in_TT ;
113 if(tccid > 108 || tower > 28 || pseudostrip_in_TT > 5 || xtal_in_pseudostrip > 5)
114 std::cout <<
" tccid " << tccid <<
" tower " << tower <<
" pseudostrip_in_TT "<< pseudostrip_in_TT
115 <<
" xtal_in_pseudostrip " << xtal_in_pseudostrip << std::endl;
117 rawEE[tccid - 1][tower - 1][pseudostrip_in_TT - 1][xtal_in_pseudostrip - 1] = rawId;
118 NbrawEE[tccid - 1][tower - 1][pseudostrip_in_TT - 1]++;
136 std::cout <<
" tower map size " << stripMap.size() << std::endl;
137 double wei[2] = {0., 0.};
139 for(itSt = stripMap.begin(); itSt != stripMap.end(); ++itSt) {
140 if(itSt->second > 0) {
142 int strip = itSt->first/8;
143 int pseudostrip = strip & 0x7;
145 int tt = strip & 0x7F;
147 int tccid = strip & 0x7F;
148 int NbXtalInStrip = NbrawEE[tccid - 1][tt - 1][pseudostrip - 1];
149 if(NbXtalInStrip != 5)
std::cout <<
" Strip TCC " << tccid <<
" TT " << tt <<
" ST " << pseudostrip
150 <<
" Nx Xtals " << NbXtalInStrip << std::endl;
151 for(
int Xtal = 0; Xtal < NbXtalInStrip; Xtal++) {
152 uint32_t rawId = rawEE[tccid - 1][tt - 1][pseudostrip - 1][Xtal];
155 float x = (float)detid.
ix();
156 float y = (float)detid.
iy();
157 int iz = detid.
zside();
159 if(Xtal == 0) wei[iz] += 1.;
160 hEEStrip[iz]->Fill(x + 0.5, y + 0.5, wei[iz]);
166 TLine*
l =
new TLine(0., 0., 0., 0.);
168 int ixSectorsEE[202] = {
169 62, 62, 61, 61, 60, 60, 59, 59, 58, 58, 56, 56, 46, 46, 44, 44, 43, 43, 42, 42,
170 41, 41, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 46, 46, 56, 56, 58, 58, 59, 59,
171 60, 60, 61, 61, 62, 62, 0,101,101, 98, 98, 96, 96, 93, 93, 88, 88, 86, 86, 81,
172 81, 76, 76, 66, 66, 61, 61, 41, 41, 36, 36, 26, 26, 21, 21, 16, 16, 14, 14, 9,
173 9, 6, 6, 4, 4, 1, 1, 4, 4, 6, 6, 9, 9, 14, 14, 16, 16, 21, 21, 26,
174 26, 36, 36, 41, 41, 61, 61, 66, 66, 76, 76, 81, 81, 86, 86, 88, 88, 93, 93, 96,
175 96, 98, 98,101,101, 0, 62, 66, 66, 71, 71, 81, 81, 91, 91, 93, 0, 62, 66, 66,
176 91, 91, 98, 0, 58, 61, 61, 66, 66, 71, 71, 76, 76, 81, 81, 0, 51, 51, 0, 44,
177 41, 41, 36, 36, 31, 31, 26, 26, 21, 21, 0, 40, 36, 36, 11, 11, 4, 0, 40, 36,
178 36, 31, 31, 21, 21, 11, 11, 9, 0, 46, 46, 41, 41, 36, 36, 0, 56, 56, 61, 61, 66, 66};
180 int iySectorsEE[202] = {
181 51, 56, 56, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 61, 61, 60, 60, 59, 59, 58,
182 58, 56, 56, 46, 46, 44, 44, 43, 43, 42, 42, 41, 41, 40, 40, 41, 41, 42, 42, 43,
183 43, 44, 44, 46, 46, 51, 0, 51, 61, 61, 66, 66, 76, 76, 81, 81, 86, 86, 88, 88,
184 93, 93, 96, 96, 98, 98,101,101, 98, 98, 96, 96, 93, 93, 88, 88, 86, 86, 81, 81,
185 76, 76, 66, 66, 61, 61, 41, 41, 36, 36, 26, 26, 21, 21, 16, 16, 14, 14, 9, 9,
186 6, 6, 4, 4, 1, 1, 4, 4, 6, 6, 9, 9, 14, 14, 16, 16, 21, 21, 26, 26,
187 36, 36, 41, 41, 51, 0, 46, 46, 41, 41, 36, 36, 31, 31, 26, 26, 0, 51, 51, 56,
188 56, 61, 61, 0, 61, 61, 66, 66, 71, 71, 76, 76, 86, 86, 88, 0, 62,101, 0, 61,
189 61, 66, 66, 71, 71, 76, 76, 86, 86, 88, 0, 51, 51, 56, 56, 61, 61, 0, 46, 46,
190 41, 41, 36, 36, 31, 31, 26, 26, 0, 40, 31, 31, 16, 16, 6, 0, 40, 31, 31, 16, 16, 6};
193 hEEStrip[0]->Draw(
"col");
194 for (
int i=0;
i<201;
i=
i+1) {
195 if ( (ixSectorsEE[
i]!=0 || iySectorsEE[
i]!=0) &&
196 (ixSectorsEE[
i+1]!=0 || iySectorsEE[
i+1]!=0) ) {
197 l->DrawLine(ixSectorsEE[
i], iySectorsEE[i],
198 ixSectorsEE[i+1], iySectorsEE[i+1]);
199 l->SetLineWidth(0.2);
204 hEEStrip[1]->Draw(
"col");
205 for (
int i=0;
i<201;
i=
i+1) {
206 if ( (ixSectorsEE[
i]!=0 || iySectorsEE[
i]!=0) &&
207 (ixSectorsEE[
i+1]!=0 || iySectorsEE[
i+1]!=0) ) {
208 l->DrawLine(ixSectorsEE[
i], iySectorsEE[i],
209 ixSectorsEE[i+1], iySectorsEE[i+1]);
210 l->SetLineWidth(0.2);
214 canvas.SaveAs(filename.c_str());
static EEDetId detIdFromDenseIndex(uint32_t din)
std::string plot(std::string const &, std::string const &, std::vector< int > const &, std::vector< float > const &) const
#define PYTHON_WRAPPER(_class, _name)
std::string summary() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
static std::string dumpXML(const EcalCondHeader &header, const EcalTPGStripStatus &record)
uint32_t denseIndex() const
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
std::map< uint32_t, uint16_t >::const_iterator EcalTPGStripStatusMapIterator