Skip to content
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

Update me0Digi validation #18394

Merged
merged 5 commits into from Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Validation/MuonME0Validation/interface/ME0DigisValidation.h
Expand Up @@ -46,6 +46,9 @@ class ME0DigisValidation : public ME0BaseValidation
MonitorElement* me0_strip_dg_bkg_rad_tot;
MonitorElement* me0_strip_dg_bkgElePos_rad;
MonitorElement* me0_strip_dg_bkgNeutral_rad;
MonitorElement* me0_strip_exp_bkg_rad_tot;
MonitorElement* me0_strip_exp_bkgElePos_rad;
MonitorElement* me0_strip_exp_bkgNeutral_rad;

edm::EDGetToken InputTagToken_Digi;
double sigma_x_, sigma_y_;
Expand Down
Expand Up @@ -119,7 +119,7 @@ TH1F* MuonME0DigisHarvestor::ComputeBKG(TH1F* hist1, TH1F* hist2, std::string na
}

int nEvts = hist2->GetEntries();
float scale = 6*2*nEvts*9*25e-9;
float scale = 6*2*nEvts*3*25e-9;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @calabria - please add a comment to explain this set of magic numbers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 layers, 2 endcap regions, we are saving hits only from 3 BXs (-1,0,+1) of 25 ns (before it was 9)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant in the code:) Thanks for adding it
[but can "3" be deduced from some other source of information?]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the moment this information can be taken from here https://github.com/cms-sw/cmssw/blob/master/SimMuon/GEMDigitizer/python/muonME0ReDigis_cfi.py#L11 , when we move to the realistic digitizer from similar lines

hist1->Scale(1.0/scale);
return hist1;

Expand Down
39 changes: 35 additions & 4 deletions Validation/MuonME0Validation/src/ME0DigisValidation.cc
Expand Up @@ -36,12 +36,43 @@ void ME0DigisValidation::bookHistograms(DQMStore::IBooker & ibooker, edm::Run co
me0_strip_dg_den_eta_tot = ibooker.book1D( "me0_strip_dg_den_eta_tot", "Denominator; #eta; Entries", 12, 1.8, 3.0);
me0_strip_dg_num_eta_tot = ibooker.book1D( "me0_strip_dg_num_eta_tot", "Numerator; #eta; Entries", 12, 1.8, 3.0);

float bins[] = {62.3, 68.2, 74.1, 81.1, 88.2, 96.6, 104.9, 115.1, 125.2, 137.3, 149.5};
float bins[] = {62.3, 70.0, 77.7, 87.1, 96.4, 108.2, 119.9, 134.7, 149.5};
int binnum = sizeof(bins)/sizeof(float) - 1;

me0_strip_dg_bkg_rad_tot = ibooker.book1D( "me0_strip_dg_bkg_radius_tot", "Total neutron background; Radius; Entries", binnum, bins);
me0_strip_dg_bkgElePos_rad = ibooker.book1D( "me0_strip_dg_bkgElePos_radius", "Neutron background: electrons+positrons; Radius; Entries", binnum, bins);
me0_strip_dg_bkgNeutral_rad = ibooker.book1D( "me0_strip_dg_bkgNeutral_radius", "Neutron background: gammas+neutrons; Radius; Entries", binnum, bins);
me0_strip_dg_bkg_rad_tot = ibooker.book1D( "me0_strip_dg_bkg_radius_tot", "Total neutron background; Radius [cm]; Entries", binnum, bins);
me0_strip_dg_bkgElePos_rad = ibooker.book1D( "me0_strip_dg_bkgElePos_radius", "Neutron background: electrons+positrons; Radius [cm]; Entries", binnum, bins);
me0_strip_dg_bkgNeutral_rad = ibooker.book1D( "me0_strip_dg_bkgNeutral_radius", "Neutron background: gammas+neutrons; Radius [cm]; Entries", binnum, bins);

me0_strip_exp_bkg_rad_tot = ibooker.book1D( "me0_strip_exp_bkg_radius_tot", "Total expected neutron background; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
me0_strip_exp_bkgElePos_rad = ibooker.book1D( "me0_strip_exp_bkgElePos_radius", "Expected neutron background: electrons+positrons; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
me0_strip_exp_bkgNeutral_rad = ibooker.book1D( "me0_strip_exp_bkgNeutral_radius", "Expected neutron background: gammas+neutrons; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);

std::vector<double> neuBkg, eleBkg;
neuBkg.push_back(899644.0); neuBkg.push_back(-30841.0); neuBkg.push_back(441.28);
neuBkg.push_back(-3.3405); neuBkg.push_back(0.0140588); neuBkg.push_back(-3.11473e-05); neuBkg.push_back(2.83736e-08);
eleBkg.push_back(4.68590e+05); eleBkg.push_back(-1.63834e+04); eleBkg.push_back(2.35700e+02);
eleBkg.push_back(-1.77706e+00); eleBkg.push_back(7.39960e-03); eleBkg.push_back(-1.61448e-05); eleBkg.push_back(1.44368e-08);

for(int i = 1; i < me0_strip_exp_bkgNeutral_rad->getTH1F()->GetSize(); i++){

double pos = me0_strip_exp_bkgNeutral_rad->getTH1F()->GetBinCenter(i);
double neutral = 0;
double charged = 0;

double pos_helper = 1.0;
for(int j = 0; j < 7; ++j) {

neutral += neuBkg[j]*pos_helper;
charged += eleBkg[j]*pos_helper;
pos_helper *= pos;

}

me0_strip_exp_bkgNeutral_rad->setBinContent(i, neutral);
me0_strip_exp_bkgElePos_rad->setBinContent(i, charged);
me0_strip_exp_bkg_rad_tot->setBinContent(i, neutral+charged);

}

for( unsigned int region_num = 0 ; region_num < nregion ; region_num++ ) {
me0_strip_dg_zr_tot[region_num] = BookHistZR(ibooker,"me0_strip_dg_tot","Digi",region_num);
Expand Down