diff --git a/Trigger/TrigHypothesis/TrigHIHypo/python/UltraCentralHypos.py b/Trigger/TrigHypothesis/TrigHIHypo/python/UltraCentralHypos.py index 05ca2175904d398752a185c7ccc2eebbb6b1f6c0..97dd9a3176981ea2764cb6d1b0044a86f6770911 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/python/UltraCentralHypos.py +++ b/Trigger/TrigHypothesis/TrigHIHypo/python/UltraCentralHypos.py @@ -10,19 +10,19 @@ class UltraCentralMonitoring(TrigGenericMonitoringToolConfig): self.Histograms += [ defineHistogram('FCalTotalEt', type='TH1F', title="Total ET in FCal; ET [MeV]", - xbins = 100, xmin=0.0, xmax=4500000)] + xbins = 900, xmin=-500000.0, xmax=8500000)] self.Histograms += [ defineHistogram('FCalTotalEtPassing', type='TH1F', title="Total ET in FCal for passing events; ET [MeV]", - xbins = 100, xmin=0.0, xmax=4500000)] + xbins = 900, xmin=-500000.0, xmax=8500000)] class UltraCentral(UltraCentralHypo): __slots__ = [] - def __init__(self, name, min_et, max_et): + def __init__(self, name, minCut, maxCut): super( UltraCentralHypo, self ).__init__( name ) - self.FcalEtLowerBound = min_et - self.FcalEtUpperBound = max_et + self.FcalEtLowerBound = minCut + self.FcalEtUpperBound = maxCut self.AthenaMonTools += [UltraCentralMonitoring(name="UltraCentralMonitoring")] class UltraCentral_PT(UltraCentralHypo): @@ -30,6 +30,10 @@ class UltraCentral_PT(UltraCentralHypo): def __init__(self, name): super( UltraCentralHypo, self ).__init__( name ) self.forceAccept = True - self.FcalEtLowerBound = 0.001 + self.FcalEtLowerBound = 5000. self.AthenaMonTools += [UltraCentralMonitoring(name="UltraCentralMonitoring")] + +UCC_th = {"th1": UltraCentral("UCCHypo_th1", 6000.0, 10000.0), + "th2": UltraCentral("UCCHypo_th2", 6500.0, 10000.0), + "th3": UltraCentral("UCCHypo_th3", 7000.0, 10000.0) } diff --git a/Trigger/TrigHypothesis/TrigHIHypo/python/VnHypos.py b/Trigger/TrigHypothesis/TrigHIHypo/python/VnHypos.py index 9501aacd65db8c07eea3b99f4cc2fb469a8257da..97c3c9e0f0a8e39e5f0c2b24ab54442f2a251d44 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/python/VnHypos.py +++ b/Trigger/TrigHypothesis/TrigHIHypo/python/VnHypos.py @@ -11,11 +11,11 @@ class VnMonitoring(TrigGenericMonitoringToolConfig): self.Histograms += [ defineHistogram('TotalEt', type='TH1F', title="Total ET; ET [MeV]", - xbins = 100, xmin=0.0, xmax=4.5*TeV)] + xbins = 100, xmin=0.0, xmax=8.5*TeV)] self.Histograms += [ defineHistogram('TotalEtPassing', type='TH1F', title="Total ET for passing events; ET [MeV]", - xbins = 100, xmin=0.0, xmax=4.5*TeV)] + xbins = 100, xmin=0.0, xmax=8.5*TeV)] self.Histograms += [ defineHistogram('icent', @@ -55,7 +55,7 @@ class VnBootstrap(TrigGenericMonitoringToolConfig): self.Histograms += [ defineHistogram('q, TotalEt', type='TH2F', title="q%d vs Fcal of all events" % harmonic, - xbins=200, xmin=0.0, xmax=8*TeV, + xbins=200, xmin=0.0, xmax=8.5*TeV, ybins=50, ymin=0, ymax=0.25) ] class QZeroMonitoring(TrigGenericMonitoringToolConfig): @@ -65,8 +65,8 @@ class QZeroMonitoring(TrigGenericMonitoringToolConfig): # self.Histograms += [ defineHistogram('TotalEt, qnx', type="TH2F", title="TotalEt[TeV];q_{%d x 0};q_{x0}" % harmonic, xbins=100, xmin=0, xmax=4.5*TeV, ybins=30, ymin=-qmax, ymax=qmax) ] # self.Histograms += [ defineHistogram('TotalEt, qny', type="TH2F", title="TotalEt[TeV];q_{%d y 0};q_{y0}" % harmonic, xbins=100, xmin=0, xmax=4.5*TeV, ybins=30, ymin=-qmax, ymax=qmax) ] - self.Histograms += [ defineHistogram('TotalEt, qnx', type="TProfile", title="FCal Event q0x;TotalEt[TeV];q_{%d x 0}" % harmonic, xbins=100, xmin=0, xmax=4.5*TeV) ] - self.Histograms += [ defineHistogram('TotalEt, qny', type="TProfile", title="FCal Event q0y;TotalEt[TeV];q_{%d y 0}" % harmonic, xbins=100, xmin=0, xmax=4.5*TeV) ] + self.Histograms += [ defineHistogram('TotalEt, qnx', type="TProfile", title="FCal Event q0x;TotalEt[TeV];q_{%d x 0}" % harmonic, xbins=100, xmin=0, xmax=8.5*TeV) ] + self.Histograms += [ defineHistogram('TotalEt, qny', type="TProfile", title="FCal Event q0y;TotalEt[TeV];q_{%d y 0}" % harmonic, xbins=100, xmin=0, xmax=8.5*TeV) ] _EtCuts=[ 3.4432, 3.2977, 3.1648, 3.0400, 2.9222, 2.8101, 2.7033, 2.6014, 2.5038, 2.4104, @@ -85,17 +85,17 @@ _EtCuts=[ ######################################################################################## # V2 -class V2(VnHypo): +class V2Hypo(VnHypo): __slots__ = [] def __init__(self, name): super( VnHypo, self ).__init__( name ) self.FlowHarmonic = 2 self.CentralityBins=_EtCuts - self.QxShifts = [3.854e-3]*len(_EtCuts) - self.QyShifts = [5.081e-3]*len(_EtCuts) + self.QxShifts = [0]*len(_EtCuts) + self.QyShifts = [0]*len(_EtCuts) self.AthenaMonTools += [VnMonitoring(name="VnMonitoring", harmonic=self.FlowHarmonic)] -V2_th16 = V2("V2_th16") +V2_th16 = V2Hypo("V2_th16") V2_th16.AthenaMonTools += [QZeroMonitoring(name="QZeroMonitoring", harmonic=2, qmax=2), VnBootstrap(name="V2Bootstrap", harmonic=2)] V2_th16.CentralityBins=[-0.5] V2_th16.QThresholds=[1e3] @@ -103,7 +103,7 @@ V2_th16.QxShifts=[0] V2_th16.QyShifts=[0] -V2_th15 = V2("V2_th15") +V2_th15 = V2Hypo("V2_th15") V2_th15.QThresholds = [ 0.04191472, 0.04611506, 0.05070368, 0.05525005, 0.05956044, 0.06377603, 0.06757076, 0.07141442, 0.07484658, 0.07827399, 0.08138302, 0.08443090, 0.08749046, 0.09026565, 0.09284734, 0.09575570, 0.09815926, 0.10060653, 0.10314960, 0.10541277, @@ -113,7 +113,7 @@ V2_th15.QThresholds = [ 0.15193151, 0.15289912, 0.15375809, 0.15493656, 0.15573826, 0.15691238, 0.15828855, 0.15946312, 0.16061241, 0.16239769, 0.16372376, 0.16534476, 0.16677584, 0.16850459, 0.17127948, 0.17388474, 0.17683791, 0.18003190, 0.18252463, 0.18646950 ] -V2_th14 = V2("V2_th14") +V2_th14 = V2Hypo("V2_th14") V2_th14.QThresholds = [ 0.03740692, 0.04116810, 0.04545774, 0.04978427, 0.05381647, 0.05780035, 0.06150938, 0.06502882, 0.06840641, 0.07157117, 0.07462977, 0.07752905, 0.08048036, 0.08311171, 0.08561221, 0.08829189, 0.09058074, 0.09290209, 0.09525025, 0.09752058, @@ -123,7 +123,7 @@ V2_th14.QThresholds = [ 0.13881262, 0.13958677, 0.14049571, 0.14123980, 0.14214018, 0.14310421, 0.14399007, 0.14472858, 0.14572510, 0.14694505, 0.14817286, 0.14934388, 0.15074964, 0.15224148, 0.15406875, 0.15624562, 0.15855588, 0.16130813, 0.16366821, 0.16679789] -V2_th13 = V2("V2_th13") +V2_th13 = V2Hypo("V2_th13") V2_th13.QThresholds = [ 0.03369209, 0.03702664, 0.04105366, 0.04512280, 0.04898601, 0.05274932, 0.05634842, 0.05972964, 0.06296631, 0.06596177, 0.06889848, 0.07174880, 0.07443841, 0.07701042, 0.07937586, 0.08189047, 0.08405642, 0.08630061, 0.08845864, 0.09069694, @@ -134,7 +134,7 @@ V2_th13.QThresholds = [ 0.13489480, 0.13573733, 0.13701996, 0.13826900, 0.13978851, 0.14144086, 0.14341581, 0.14543296, 0.14777784, 0.15048885 ] -V2_th10 = V2("V2_th10") +V2_th10 = V2Hypo("V2_th10") V2_th10.QThresholds = [ 0.02456593, 0.02710698, 0.03018641, 0.03358774, 0.03690612, 0.04018757, 0.04331899, 0.04624952, 0.04911163, 0.05175626, 0.05429614, 0.05681480, 0.05915455, 0.06145126, 0.06352471, 0.06558050, 0.06751687, 0.06946219, 0.07116317, 0.07301096, @@ -144,7 +144,7 @@ V2_th10.QThresholds = [ 0.09904759, 0.09904453, 0.09943918, 0.09952868, 0.09974287, 0.09992959, 0.10024795, 0.10043963, 0.10067878, 0.10106615, 0.10156120, 0.10191574, 0.10239000, 0.10346732, 0.10411693, 0.10515329, 0.10619578, 0.10754704, 0.10909007, 0.11065415] -V2_th5 = V2("V2_th5") +V2_th5 = V2Hypo("V2_th5") V2_th5.QThresholds = [ 0.01152187, 0.01270212, 0.01427261, 0.01614444, 0.01816674, 0.02030926, 0.02235199, 0.02443076, 0.02647653, 0.02841883, 0.03031866, 0.03212026, 0.03367812, 0.03534181, 0.03688820, 0.03836156, 0.03970004, 0.04101713, 0.04218514, 0.04342612, @@ -154,21 +154,37 @@ V2_th5.QThresholds = [ 0.05177545, 0.05146717, 0.05131771, 0.05104530, 0.05069041, 0.05047863, 0.05023809, 0.05006885, 0.04991808, 0.04974556, 0.04975665, 0.04967587, 0.04980033, 0.04989947, 0.05007853, 0.05049705, 0.05075333, 0.05126722, 0.05196336, 0.05258261] + V2_th = {16: V2_th16, 15: V2_th15, 14: V2_th14, 13: V2_th13, 10: V2_th10, 5: V2_th5 } +def V2(names, threshold): + return V3_th[threshold] + + +V2_th1_veto = V2Hypo("V2_th1_veto") +V2_th1_veto.UpperLimit=True +V2_th1_veto.QThresholds = [ + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.] + ######################################################################################## # V3 -class V3(VnHypo): +class V3Hypo(VnHypo): __slots__ = [] def __init__(self, name): super( VnHypo, self ).__init__( name ) self.FlowHarmonic = 3 self.CentralityBins = _EtCuts - self.QxShifts = [-1.402e-3]*len(_EtCuts) - self.QyShifts = [2.670e-3]*len(_EtCuts) + self.QxShifts = [0]*len(_EtCuts) + self.QyShifts = [0]*len(_EtCuts) self.AthenaMonTools += [VnMonitoring(name="VnMonitoring", harmonic=self.FlowHarmonic)] -V3_th16 =V3("V3_th16") +V3_th16 =V3Hypo("V3_th16") V3_th16.QyShifts=[0] V3_th16.CentralityBins=[-0.5] V3_th16.QThresholds=[1e3] @@ -176,7 +192,7 @@ V3_th16.QxShifts=[0] V3_th16.AthenaMonTools += [QZeroMonitoring(name="QZeroMonitoring", harmonic=3, qmax=2), VnBootstrap(name="V2Bootstrap", harmonic=3)] -V3_th15 = V3("V3_th15") +V3_th15 = V3Hypo("V3_th15") V3_th15.QThresholds = [ 0.03513726, 0.03631165, 0.03768844, 0.03883054, 0.03998376, 0.04092407, 0.04179109, 0.04274018, 0.04352490, 0.04433323, 0.04516572, 0.04593598, 0.04662202, 0.04739382, 0.04812554, 0.04876814, 0.04945114, 0.05029320, 0.05089141, 0.05157609, @@ -186,7 +202,7 @@ V3_th15.QThresholds = [ 0.08104803, 0.08258906, 0.08434631, 0.08628569, 0.08804863, 0.09028343, 0.09265420, 0.09449524, 0.09728277, 0.10010242, 0.10267729, 0.10556075, 0.10890142, 0.11205775, 0.11587236, 0.12006067, 0.12365335, 0.12807378, 0.13233773, 0.13720867] -V3_th14 = V3("V3_th14") +V3_th14 = V3Hypo("V3_th14") V3_th14.QThresholds = [ 0.03145231, 0.03250667, 0.03370961, 0.03482182, 0.03576010, 0.03665307, 0.03744825, 0.03818750, 0.03902529, 0.03976378, 0.04047929, 0.04113197, 0.04171997, 0.04242770, 0.04307200, 0.04370316, 0.04424203, 0.04498447, 0.04551745, 0.04620108, @@ -196,7 +212,7 @@ V3_th14.QThresholds = [ 0.07228808, 0.07378565, 0.07529536, 0.07695675, 0.07857301, 0.08047163, 0.08255730, 0.08442803, 0.08672302, 0.08897797, 0.09151220, 0.09400259, 0.09685481, 0.09966639, 0.10291793, 0.10634085, 0.10965937, 0.11345894, 0.11736003, 0.12153300] -V3_th13 = V3("V3_th13") +V3_th13 = V3Hypo("V3_th13") V3_th13.QThresholds = [ 0.02834278, 0.02932029, 0.03040146, 0.03139097, 0.03222971, 0.03304867, 0.03379216, 0.03443726, 0.03519771, 0.03586084, 0.03646914, 0.03700551, 0.03759770, 0.03816923, 0.03872765, 0.03938810, 0.03989251, 0.04058628, 0.04110593, 0.04162897, @@ -206,7 +222,7 @@ V3_th13.QThresholds = [ 0.06505761, 0.06644779, 0.06771427, 0.06913746, 0.07076386, 0.07227259, 0.07415294, 0.07584718, 0.07778545, 0.07980494, 0.08201443, 0.08435533, 0.08689617, 0.08942477, 0.09222490, 0.09515650, 0.09832809, 0.10157795, 0.10503367, 0.10876363] -V3_th10 = V3("V3_th10") +V3_th10 = V3Hypo("V3_th10") V3_th10.QThresholds = [ 0.02074531, 0.02145897, 0.02228237, 0.02301473, 0.02360970, 0.02423087, 0.02473839, 0.02527057, 0.02579544, 0.02625824, 0.02669040, 0.02718450, 0.02759504, 0.02805876, 0.02847736, 0.02888053, 0.02930169, 0.02972249, 0.03015431, 0.03054604, @@ -217,7 +233,7 @@ V3_th10.QThresholds = [ 0.05973098, 0.06136851, 0.06310639, 0.06498229, 0.06694045, 0.06903552, 0.07129551, 0.07363774, 0.07608264, 0.07869995] -V3_th5 = V3("V3_th5") +V3_th5 = V3Hypo("V3_th5") V3_th5.QThresholds = [ 0.00974650, 0.01012176, 0.01047111, 0.01081774, 0.01114023, 0.01138964, 0.01164953, 0.01188304, 0.01216446, 0.01237966, 0.01255039, 0.01280590, 0.01301388, 0.01322910, 0.01344230, 0.01361435, 0.01380289, 0.01400183, 0.01420787, 0.01439984, @@ -228,3 +244,17 @@ V3_th5.QThresholds = [ 0.02794078, 0.02873716, 0.02950178, 0.03038695, 0.03132688, 0.03225487, 0.03325466, 0.03438586, 0.03552826, 0.03671435] V3_th = {16: V3_th16, 15: V3_th15, 14: V3_th14, 13: V3_th13, 10: V3_th10, 5: V3_th5 } +def V3(names, threshold): + return V3_th[threshold] + + +V3_th1_veto = V3Hypo("V3_th1_veto") +V3_th1_veto.UpperLimit=True +V3_th1_veto.QThresholds = [ + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.] diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/ElectronUEMonitoring.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/ElectronUEMonitoring.cxx index eb9fc4d04be75e42b6b04d76b2409b7ab533a73b..4e854c50d242838429aeaa8a89321baed252a3ee 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/ElectronUEMonitoring.cxx +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/ElectronUEMonitoring.cxx @@ -94,7 +94,7 @@ HLT::ErrorCode ElectronUEMonitoring::hltExecute(const HLT::TriggerElement* /*inp double fcalEt = 0.; for ( auto &slice: *evtShape ) { if ( withinFcalRange(slice->etaMin()) and withinFcalRange(slice->etaMax()) ) { - fcalEt += slice->Et(); + fcalEt += slice->et(); } } // get ot to TeV scale diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/HICaloCellCorectionTool.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/HICaloCellCorectionTool.cxx index 532e9a9906aa2e6cbc08f1fd2e03888826bfb815..2901f8d0d235a9546e398e251556930c0fecc5a1 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/HICaloCellCorectionTool.cxx +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/HICaloCellCorectionTool.cxx @@ -68,7 +68,7 @@ double HICaloCellCorectionTool::getAvgEnergy(const int layer, const double eta){ int evLayer = ev->layer(); if(evLayer == layer && (eta <= ev->etaMax() && eta > ev->etaMin())){ - double et = ev->Et(); + double et = ev->et(); if ( std::abs(et) > 0.1 ) // energy in MeV so this small value essentially zero return et /= ev->nCells(); } diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.cxx index 8985474a305c6638ff77a2c79cbce7468845254c..eeaaa6943c19374bd93cd5dc9e07ecec6467de46 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.cxx +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.cxx @@ -13,8 +13,9 @@ UltraCentralHypo::UltraCentralHypo(const std::string& name, ISvcLocator* pSvcLoc declareMonitoredVariable("FCalTotalEt" , m_Tot_Et , 0.); declareMonitoredVariable("FCalTotalEtPassing" , m_Tot_Et_passing , -1.); - declareProperty("FcalEtUpperBound", m_FcalEt_max = -1., "Upper bound of passing values, negative means +inf."); - declareProperty("FcalEtLowerBound", m_FcalEt_min = -1., "Lower bound of passing values, negative means -inf."); + declareProperty("FcalEtUpperBound", m_FcalEt_max=1.e10, "Upper bound of passing values, negative means +inf."); + declareProperty("FcalEtLowerBound", m_FcalEt_min=-1.e10, "Lower bound of passing values, negative means -inf."); + } HLT::ErrorCode UltraCentralHypo::hltInitialize() { return HLT::OK; } @@ -48,7 +49,7 @@ HLT::ErrorCode UltraCentralHypo::hltExecute(const HLT::TriggerElement* outputTE, int size=evtShape->size(); for(int i=0;i<size;i++){ const xAOD::HIEventShape *sh=evtShape->at(i); - float Et = sh->Et(); + float Et = sh->et(); if(Et==0) continue; float eta=(sh->etaMin()+sh->etaMax())/2.0; @@ -58,15 +59,9 @@ HLT::ErrorCode UltraCentralHypo::hltExecute(const HLT::TriggerElement* outputTE, } // now cutting - if ( m_FcalEt_max > 0. && m_Tot_Et < m_FcalEt_max ) { - pass = true; - m_Tot_Et_passing = m_Tot_Et; - return HLT::OK; - } - if ( m_FcalEt_min > 0. && m_FcalEt_min < m_Tot_Et ) { + if ( m_FcalEt_min <= m_Tot_Et and m_Tot_Et < m_FcalEt_max ) { pass = true; m_Tot_Et_passing = m_Tot_Et; - return HLT::OK; } return HLT::OK; diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.h b/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.h index 10fec50b47d47dd7ea840492747d16059bbad73a..70334a0f165deb3e9cf6d7f4b3377c797555edf2 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.h +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/UltraCentralHypo.h @@ -3,6 +3,7 @@ */ #include "TrigInterfaces/HypoAlgo.h" +#include <vector> namespace HLT{ class TriggerElement; } @@ -19,10 +20,8 @@ private: // monitoring float m_Tot_Et; - float m_Tot_Et_passing; - - // Coniguration + float m_Tot_Et_passing; + // Configuration float m_FcalEt_min; float m_FcalEt_max; - }; diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.cxx index d25bec0368ffc79e081c480d2fcf67e27b42b8f9..5e3584e732ff46090e91685de416e91f64559ef0 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.cxx +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.cxx @@ -23,15 +23,19 @@ VnHypo::VnHypo(const std::string& name, ISvcLocator* pSvcLocator) declareProperty("QThresholds", m_helper.thresholds, "Values of thresholds above which the hypo accepts, size must match CentralityBins"); declareProperty("QxShifts", m_helper.qxshifts, "Values of q shifts along the x coordinate"); declareProperty("QyShifts", m_helper.qyshifts, "Values of q shifts along the y coordinate"); - declareProperty("FlowHarmonic" , m_FlowHarmonic =2 , "The Order of the flow harmonic (2/3)"); + declareProperty("FlowHarmonic" , m_FlowHarmonic =2 , "The Order of the flow harmonic (2/3)"); + declareProperty("UpperLimit", m_upperLimit=false, "Apply q < threshold if true"); } HLT::ErrorCode VnHypo::hltInitialize() { if ( not m_helper.valid() ) { ATH_MSG_ERROR("VnHypoHelper missocnfigured, likely centrality and vn thresholds vectors missmatch"); - return HLT::ERROR; - + return HLT::ERROR; } + + std::transform( m_helper.centcuts.begin(), m_helper.centcuts.end(), + m_helper.centcuts.begin(), [](float x){ return x*1.e6; } ); // convert thresholds to MeV + return HLT::OK; } @@ -67,23 +71,23 @@ HLT::ErrorCode VnHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pas int size=evtShape->size(); for(int i=0;i<size;i++){ const xAOD::HIEventShape *sh=evtShape->at(i); - float Et = sh->Et(); + float Et = sh->et(); if(Et==0) continue; float eta=(sh->etaMin()+sh->etaMax())*0.5; if(std::fabs(eta)<3.2) continue;//FCal Only - const std::vector<float> &c1=sh->Et_cos(); - const std::vector<float> &s1=sh->Et_sin(); + const std::vector<float> &c1=sh->etCos(); + const std::vector<float> &s1=sh->etSin(); m_qnx+=c1[FlowHarmonic_index]; m_qny+=s1[FlowHarmonic_index]; m_Tot_Et+=Et; } - + m_icent=m_helper.getCentBin(m_Tot_Et); if(m_icent==-1) return HLT::OK; - + m_qnx /= m_Tot_Et; m_qny /= m_Tot_Et; m_qnx -= m_helper.getQxShift(m_icent); @@ -93,8 +97,9 @@ HLT::ErrorCode VnHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pas // now cutting float Vn_Threshold=m_helper.getThreshold(m_icent); - - if ( m_qn > Vn_Threshold) { + // ATH_MSG_INFO("Et " << m_Tot_Et << " icent " << m_icent << " threshold " << Vn_Threshold); + if ( (m_upperLimit == true and m_qn < Vn_Threshold) + or (m_upperLimit == false and m_qn > Vn_Threshold) ) { pass = true; m_Tot_Et_passing = m_Tot_Et; m_qn_passing = m_qn; diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.h b/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.h index 8d06becf5e178faa1096b8267535108d438d26f8..0c38d14b8b757396cf33b12d85c2f3ffa89b29b5 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.h +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/VnHypo.h @@ -34,4 +34,5 @@ private: double m_q0xShift; // shifts double m_q0yShift; + bool m_upperLimit; };