Commit 76c6fd85 authored by Peter Berta's avatar Peter Berta Committed by Atlas Nightlybuild
Browse files

Merge branch 'master-DQegamma_07092021_for22.0-mc20' into '22.0-mc20'

Fix Tag and Probe monitors by using both electron branches

See merge request atlas/athena!46650

(cherry picked from commit e8460554)

51262cd6 Bugfix to take into account possible multi chain setup for TnP monitors
4841e140 Bugfix to remove the trigger requirement of TnP monitors
4fdb1eec New trigger setup for JPsi and no trigger for Zee (TnP monitors)
401990f9 Bug fix on the TnP configuration
ad138993 bug fix for TnP algs - use both electron candidates except in the eta/phi distributions of probes
41355989 fix to TnP monitors and implementation of double precision histogram for electron eta monitoring
parent 39d27228
......@@ -80,7 +80,7 @@ def BookHistograms(groupe,reconame,particletype,withTrigger=""):
hname= "Eta"
htitle= particletype + " #eta" + " (" + reconame + " " + withTrigger + ")"+ " ; #eta" + tlabel + " ; N" + tlabel
groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-3.2,xmax=3.2)
groupe.defineHistogram(hname,title=htitle, path='',type = "TH1D", xbins=64,xmin=-3.2,xmax=3.2)
if particletype in ["Photon"] :
hname= "EtaConv"
......@@ -370,15 +370,15 @@ def BookTnPHistograms(groupe,reconame,TnPType,MassLowerCut,MassUpperCut):
# Probe electron candidate distributions
hname = "Etprobe;Etprobe_distribution"
htitle = "Number of "+ TnPType +" candidates vs of leading e ; Et_{probe} ; N_{e_ {probe}}"
htitle = "Number of "+ TnPType +" candidates vs of leading e ; Et_{probe} ; N_{e_{probe}}"
groupe.defineHistogram(hname,title=htitle, path='ElectronProbes',xbins=100,xmin=-1000.0,xmax=200000.0)
hname = "Etaprobe;Etaprobe_distribution"
htitle = "#eta distribution of probe candidates ; #eta_{e_{probe}} ; N_{e_ {probe}}"
htitle = "#eta distribution of probe candidates ; #eta_{e_{probe}} ; N_{e_{probe}}"
groupe.defineHistogram(hname,title=htitle,path='ElectronProbes', xbins=64,xmin=-3.2,xmax=3.2)
hname = "Phiprobe;Phiprobe_distribution"
htitle = "#phi distribution of probe candidates ; #phi_{e_{probe}} ; N_{e_ {probe}}"
htitle = "#phi distribution of probe candidates ; #phi_{e_{probe}} ; N_{e_{probe}}"
groupe.defineHistogram(hname,title=htitle,path='ElectronProbes', xbins=64,xmin=-3.2,xmax=3.2)
hname = "Etaprobe,Phiprobe;Eta_Phi_map_of_electron_probes_for_T_and_P_"+ TnPType
......
......@@ -52,7 +52,9 @@ StatusCode MonitorElectronAlgorithm::fillHistograms( const EventContext& ctx ) c
// Particle variables to be monitored
auto np = Monitored::Scalar<int>("N",0.0);
auto et = Monitored::Scalar<Float_t>("Et",0.0);
auto eta = Monitored::Scalar<Float_t>("Eta",0.0);
// Check if small differences between old and new monitoring are related to rounding effects
// auto eta = Monitored::Scalar<Float_t>("Eta",0.0);
auto eta = Monitored::Scalar<Double_t>("Eta",0.0);
auto phi = Monitored::Scalar<Float_t>("Phi",0.0);
auto is_pt_gt_2_5gev = Monitored::Scalar<bool>("is_pt_gt_2_5gev",false);
auto is_pt_gt_4gev = Monitored::Scalar<bool>("is_pt_gt_4gev",false);
......@@ -168,7 +170,8 @@ StatusCode MonitorElectronAlgorithm::fillHistograms( const EventContext& ctx ) c
}
if(isGood) {
mynp++;
Float_t myetaloc = e_iter->eta();
//Float_t myetaloc = e_iter->eta();
Double_t myetaloc = e_iter->eta();
auto regionloc = GetRegion(myetaloc);
ATH_MSG_DEBUG("Test electron in region : " << regionloc);
switch(regionloc){
......@@ -191,7 +194,8 @@ StatusCode MonitorElectronAlgorithm::fillHistograms( const EventContext& ctx ) c
// do specific stuff with electrons
Float_t myet = e_iter->pt(); // in MeV (/Gaudi::Units::GeV; // in GeV)
Float_t myeta = e_iter->eta();
//Float_t myeta = e_iter->eta();
Double_t myeta = e_iter->eta();
Float_t myphi = e_iter->phi();
bool myis_pt_gt_2_5gev = myet > 2500. ;
......
......@@ -144,16 +144,13 @@ StatusCode MonitorTnPAlgorithm::fillHistograms( const EventContext& ctx ) const
bool subl_isLHTight = false;
if ( !subl_el->passSelection(subl_isLHTight,"LHTight") ) return StatusCode::FAILURE;
// Use only one electron from a single TnP candidate to avoid introducing correlations in the distributions related to probes
// If leading electron is LHTight use subleading as probe
bool EventZcandidateUsed = false;
if(lead_isLHTight) {
ATH_CHECK(fillElectronProbe(subl_el, true, ctx));
EventZcandidateUsed = true;
}
// If subleading electron is LHTight use leading as probe
if(subl_isLHTight) {
if (!EventZcandidateUsed) ATH_CHECK(fillElectronProbe(lead_el, false, ctx));
ATH_CHECK(fillElectronProbe(lead_el, false, ctx));
}
return StatusCode::SUCCESS;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment