81 |
|
edm::LogVerbatim ("DTDPGSummary") << "[DTDPGCreateSummary]: BeginJob"; |
82 |
|
context.get<MuonGeometryRecord>().get(myMuonGeom); |
83 |
|
|
84 |
+ |
vector<int> emptyVector, wheelVector; |
85 |
+ |
wheelVector = myParameters.getUntrackedParameter<vector<int> >("sectorsWhm2", emptyVector); |
86 |
+ |
if (! wheelVector.empty()) mySectors[-2]=wheelVector; |
87 |
+ |
wheelVector = myParameters.getUntrackedParameter<vector<int> >("sectorsWhm1", emptyVector); |
88 |
+ |
if (! wheelVector.empty()) mySectors[-1]=wheelVector; |
89 |
+ |
wheelVector = myParameters.getUntrackedParameter<vector<int> >("sectorsWh0", emptyVector); |
90 |
+ |
if (! wheelVector.empty()) mySectors[0]=wheelVector; |
91 |
+ |
wheelVector = myParameters.getUntrackedParameter<vector<int> >("sectorsWh1", emptyVector); |
92 |
+ |
if (! wheelVector.empty()) mySectors[1]=wheelVector; |
93 |
+ |
wheelVector = myParameters.getUntrackedParameter<vector<int> >("sectorsWh2", emptyVector); |
94 |
+ |
if (! wheelVector.empty()) mySectors[2]=wheelVector; |
95 |
+ |
|
96 |
+ |
|
97 |
|
} |
98 |
|
|
99 |
|
void DTDPGCreateSummary::analyze(const edm::Event& e, const edm::EventSetup& context){ |
120 |
|
|
121 |
|
|
122 |
|
edm::LogVerbatim ("DTDPGSummary") << "[DTDPGCreateSummary]: Creating summaries!"; |
123 |
< |
|
124 |
< |
for(int wh=-2;wh<=2;++wh) { |
125 |
< |
for(int sec=1;sec<=14;sec++) { |
123 |
> |
|
124 |
> |
std::map<int,std::vector<int> >::const_iterator whIt = mySectors.begin(); |
125 |
> |
std::map<int,std::vector<int> >::const_iterator whEnd = mySectors.end(); |
126 |
> |
for(;whIt!=whEnd;++whIt) { |
127 |
> |
int wh = (*whIt).first; |
128 |
> |
std::vector<int>::const_iterator secIt = (*whIt).second.begin(); |
129 |
> |
std::vector<int>::const_iterator secEnd = (*whIt).second.end(); |
130 |
> |
for(;secIt!=secEnd;++secIt) { |
131 |
> |
int sec = (*secIt); |
132 |
|
if (myParameters.getUntrackedParameter<bool>("DataIntegrityHistos", false)) { createDataIntegrityPlots(wh,sec); } |
133 |
|
if (myParameters.getUntrackedParameter<bool>("DigiHistos", false)) { createDigiPlots(wh,sec); } |
134 |
|
if (myParameters.getUntrackedParameter<bool>("RecoHistos", false)) { createRecoPlots(wh,sec); } |
347 |
|
gStyle->SetStatW(0.29); |
348 |
|
myCanvas->Clear(); |
349 |
|
myCanvas->Divide(3,4); |
350 |
+ |
TH1F *layerOccupancy[3][4]; |
351 |
+ |
memset(layerOccupancy,0,12*sizeof(TH1F*)); |
352 |
|
|
353 |
|
chDigiIt = myMuonGeom->chambers().begin(); |
354 |
|
chDigiEnd = myMuonGeom->chambers().end(); |
363 |
|
TH2F *histoOccupancy = (TH2F*) myFile -> Get(histoNameOccupancy.c_str()); |
364 |
|
if(histoOccupancy){ |
365 |
|
found = true; |
345 |
– |
TH1F *layerOccupancy[3][4]; |
366 |
|
|
367 |
|
vector<const DTSuperLayer*>::const_iterator slIt = (*chDigiIt)->superLayers().begin(); |
368 |
|
vector<const DTSuperLayer*>::const_iterator slEnd = (*chDigiIt)->superLayers().end(); |
412 |
|
} |
413 |
|
|
414 |
|
createGifFile("Occupancies",wh,sec); |
415 |
+ |
|
416 |
+ |
for (int i=0;i<3;++i) { |
417 |
+ |
for (int j=0;j<4;++j) { |
418 |
+ |
if (layerOccupancy[i][j]) { |
419 |
+ |
delete layerOccupancy[i][j]; |
420 |
+ |
} |
421 |
+ |
} |
422 |
+ |
} |
423 |
|
|
424 |
|
// Occupancy Noise -------------------------------------------------------- |
425 |
|
/* |
792 |
|
histoName4DSeg = recoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/h4DSegmXvsYInCham_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str(); |
793 |
|
if(ch.station() == 4) |
794 |
|
histoName4DSeg = recoFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/h4DSegmXInCham_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str(); |
795 |
< |
TProfile *histo4DSeg = (TProfile*) myFile -> Get(histoName4DSeg.c_str()); // CB fissa qui non è di certo un profile! |
795 |
> |
TProfile *histo4DSeg = (TProfile*) myFile -> Get(histoName4DSeg.c_str()); // CB fix here it is not a profile |
796 |
|
if(histo4DSeg){ |
797 |
|
int pad = (ch.station() - 1)*2 + 1; |
798 |
|
myCanvas->cd(pad); |
1100 |
|
stringstream layer; layer << layerId.layer(); |
1101 |
|
string testPulsesFolder = myMainFolder + "DTTestPulsesTask/Wheel" + wheel.str(); |
1102 |
|
string histoName = testPulsesFolder + "/Station" + station.str() + "/Sector" + sector.str() + "/SuperLayer" + superLayer.str() + "/TPProfile/TestPulses2D_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str() + "_L" + layer.str(); |
1103 |
< |
TProfile *histoTP = (TProfile*) myFile->Get(histoName.c_str()); // CB è un Profile??? |
1103 |
> |
TProfile *histoTP = (TProfile*) myFile->Get(histoName.c_str()); // CB fix here |
1104 |
|
if(histoTP){ |
1105 |
|
found = true; |
1106 |
|
int pad = (sl.superlayer() - 1)*4 + layerId.layer(); |