New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing pixel cluster trend plots #15121
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,20 @@ void SiPixelClusterSource::bookHistograms(DQMStore::IBooker & iBooker, edm::Run | |
ss2.str(std::string()); ss2 << "Clusters -Z Disk" << i << ";Global X (cm);Global Y (cm)"; | ||
meClPosDiskmz.push_back(iBooker.book2D(ss1.str(),ss2.str(),80,-20.,20.,80,-20.,20.)); | ||
} | ||
|
||
//Book trend cluster plots for barrel and endcap. Lumisections for offline and second for online - taken from strips | ||
iBooker.setCurrentFolder(topFolderName_+"/Barrel"); | ||
ss1.str(std::string()); ss1 << "totalNumberOfClustersProfile_siPixelClusters_Barrel"; | ||
ss2.str(std::string()); ss2 << "Total number of barrel clusters profile;Lumisection;"; | ||
meClusBarrelProf = iBooker.bookProfile(ss1.str(),ss2.str(),2400,0.,150,0,0,""); | ||
meClusBarrelProf->getTH1()->SetCanExtend(TH1::kAllAxes); | ||
|
||
iBooker.setCurrentFolder(topFolderName_+"/Endcap"); | ||
ss1.str(std::string()); ss1 << "totalNumberOfClustersProfile_siPixelClusters_Endcap"; | ||
ss2.str(std::string()); ss2 << "Total number of endcap clusters profile;Lumisection;"; | ||
meClusEndcapProf = iBooker.bookProfile(ss1.str(),ss2.str(),2400,0.,150,0,0,""); | ||
meClusEndcapProf->getTH1()->SetCanExtend(TH1::kAllAxes); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If possible, avoid using SetCanExtend, but specify the proper ranges instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dmitrijus - will this cause problems with merging? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It used to, but ever since we 'handle' this with lower performance - so it is okay if there is really good justification for having this automatic extension. But having static ranges is the best way/solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dmitrijus these kind of plots require a binning that depends on the run lenght (the x axis variable is the number of lumisections), we could also set a fixed range, but in this case the number of bins should be choosen in a way to cover "all possible" run lenghts, so it should be choosen as a big number even if the specific run turns out to be a short one. So, I would prefer to keep the "can extend option" unless it really break something. Let me know if this is a an issue, for my recollection these are the only plots to be added with this feature (and btw, the correspondent plots for SiStrip have the same settings) |
||
|
||
} | ||
|
||
//------------------------------------------------------------------ | ||
|
@@ -164,11 +178,14 @@ void SiPixelClusterSource::analyze(const edm::Event& iEvent, const edm::EventSet | |
int lumiSection = (int)iEvent.luminosityBlock(); | ||
int nEventFpixClusters = 0; | ||
|
||
int nEventsBarrel = 0; | ||
int nEventsEndcap = 0; | ||
|
||
std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter; | ||
for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++) { | ||
|
||
int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker, | ||
int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker, | ||
&nEventsBarrel, &nEventsEndcap, | ||
meClPosLayer, | ||
meClPosDiskpz, | ||
meClPosDiskmz, | ||
|
@@ -184,8 +201,16 @@ void SiPixelClusterSource::analyze(const edm::Event& iEvent, const edm::EventSet | |
bigFpixClusterEventRate->Fill(lumiSection,1./23.); | ||
} | ||
} | ||
|
||
float trendVar = iEvent.orbitNumber()/262144.0; //lumisection : seconds - matches strip trend plot | ||
|
||
meClusBarrelProf->Fill(trendVar,nEventsBarrel); | ||
meClusEndcapProf->Fill(trendVar,nEventsEndcap); | ||
|
||
//std::cout<<"nEventFpixClusters: "<<nEventFpixClusters<<" , nLumiSecs: "<<nLumiSecs<<" , nBigEvents: "<<nBigEvents<<std::endl; | ||
|
||
|
||
|
||
// slow down... | ||
if(slowDown) usleep(10000); | ||
|
||
|
@@ -270,7 +295,7 @@ void SiPixelClusterSource::bookMEs(DQMStore::IBooker & iBooker, const edm::Event | |
|
||
|
||
std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter; | ||
|
||
SiPixelFolderOrganizer theSiPixelFolder(false); | ||
|
||
for(struct_iter = thePixelStructure.begin(); struct_iter != thePixelStructure.end(); struct_iter++){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change, the entire purpose of it.