void XZHydrostatic_Omega<EvalT, Traits>:: evaluateFields(typename Traits::EvalData workset) { for (int cell=0; cell < workset.numCells; ++cell) { for (int qp=0; qp < numQPs; ++qp) { for (int level=0; level < numLevels; ++level) { ScalarT sum = Velx(cell,qp,level)*gradp(cell,qp,level) + 0.5*gradpivelx(cell,qp,level)*DeltaEta(cell,qp,level) ; for (int j=0; j<level-1; ++j) { sum -= gradpivelx(cell,qp,level) * DeltaEta(cell,qp,level); } omega(cell,qp,level) = (density(cell,qp,level)/Cp)*sum; } } } }
bool Electron::PassUserID_EGamma ( ID id, bool verbose ){ //---------------------------------------------------------------------- // Barrel electron cut values //---------------------------------------------------------------------- // See: https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedElectronIdentificationRun2 double l_b_f5x5sieie [4] = {0.011100, 0.010557, 0.010399, 0.010181 }; double l_b_dEtaIn [4] = {0.016315, 0.012442, 0.007641, 0.006574 }; double l_b_dPhiIn [4] = {0.252044, 0.072624, 0.032643, 0.022868 }; double l_b_hoe [4] = {0.345843, 0.121476, 0.060662, 0.037553 }; double l_b_pfRelIso [4] = {0.164369, 0.120026, 0.097213, 0.074355 }; double l_b_ooemoop [4] = {0.248070, 0.221803, 0.153897, 0.131191 }; double l_b_d0 [4] = {0.060279, 0.022664, 0.011811, 0.009924 }; double l_b_dZ [4] = {0.800538, 0.173670, 0.070775, 0.015310 }; int l_b_missHits [4] = {2, 1, 1, 1}; //---------------------------------------------------------------------- // Endcap electron cut values //---------------------------------------------------------------------- double l_e_f5x5sieie [4] = {0.033987, 0.032602, 0.029524, 0.028766 }; double l_e_dEtaIn [4] = {0.010671, 0.010654, 0.009285, 0.005681 }; double l_e_dPhiIn [4] = {0.245263, 0.145129, 0.042447, 0.032046 }; double l_e_hoe [4] = {0.134691, 0.131862, 0.104263, 0.081902 }; double l_e_pfRelIso [4] = {0.212604, 0.162914, 0.116708, 0.090185 }; double l_e_ooemoop [4] = {0.157160, 0.142283, 0.137468, 0.106055 }; double l_e_d0 [4] = {0.273097, 0.097358, 0.051682, 0.027261 }; double l_e_dZ [4] = {0.885860, 0.198444, 0.180720, 0.147154 }; int l_e_missHits [4] = {3, 1, 1, 1}; //---------------------------------------------------------------------- // Bools that depend on barrel vs. endcap //---------------------------------------------------------------------- bool pass_full5x5SigmaIetaIeta = false; bool pass_deltaEta = false; bool pass_deltaPhi = false; bool pass_hoe = false; bool pass_pfIsoWBetaOverPt = false; bool pass_ooEmooP = false; bool pass_vtxDistXY = false; // aka d0 bool pass_vtxDistZ = false; bool pass_missingHits = false; bool pass_convVeto = false; //---------------------------------------------------------------------- // Define EGamma ep parameter //---------------------------------------------------------------------- const float ecal_energy_inverse = 1.0/EcalEnergy(); const float eSCoverP = ESuperClusterOverP(); const float ooEmooP = std::abs(1.0 - eSCoverP)*ecal_energy_inverse; //---------------------------------------------------------------------- // Define DeltaBeta PF Isolation //---------------------------------------------------------------------- double ptCutoff = 20.0; double deltaBetaConstant = 0.5; bool relativeIso = true; // const float chad = PFChargedHadronIso03(); const float nhad = PFNeutralHadronIso03(); const float pho = PFPhotonIso03(); const float puchad = PFPUIso03(); float iso = chad + std::max(0.0, nhad + pho - deltaBetaConstant*puchad); if(relativeIso) iso /= Pt(); //---------------------------------------------------------------------- // Barrel electron test //---------------------------------------------------------------------- if ( fabs(SCEta()) < 1.479 ){ pass_full5x5SigmaIetaIeta = bool ( Full5x5SigmaIEtaIEta() < l_b_f5x5sieie [ id ] ); pass_deltaEta = bool ( fabs(DeltaEta()) < l_b_dEtaIn [ id ] ); pass_deltaPhi = bool ( fabs(DeltaPhi()) < l_b_dPhiIn [ id ] ); pass_hoe = bool ( HoE() < l_b_hoe [ id ] ); pass_pfIsoWBetaOverPt = bool ( ooEmooP < l_b_ooemoop [ id ] ); pass_ooEmooP = bool ( iso < l_b_pfRelIso [ id ] ); pass_vtxDistXY = bool ( fabs(VtxDistXY()) < l_b_d0 [ id ] ); pass_vtxDistZ = bool ( fabs(VtxDistZ ()) < l_b_dZ [ id ] ); pass_missingHits = bool ( MissingHits() < l_b_missHits [ id ] ); pass_convVeto = ! HasMatchedConvPhot(); } //---------------------------------------------------------------------- // Endcap electron test //---------------------------------------------------------------------- else if ( fabs(SCEta()) > 1.479 && fabs(SCEta()) < 2.5 ){ pass_full5x5SigmaIetaIeta = bool ( Full5x5SigmaIEtaIEta() < l_e_f5x5sieie [ id ] ); pass_deltaEta = bool ( fabs(DeltaEta()) < l_e_dEtaIn [ id ] ); pass_deltaPhi = bool ( fabs(DeltaPhi()) < l_e_dPhiIn [ id ] ); pass_hoe = bool ( HoE() < l_e_hoe [ id ] ); pass_pfIsoWBetaOverPt = bool ( ooEmooP < l_e_ooemoop [ id ] ); pass_ooEmooP = bool ( iso < l_e_pfRelIso [ id ] ); pass_vtxDistXY = bool ( fabs(VtxDistXY()) < l_e_d0 [ id ] ); pass_vtxDistZ = bool ( fabs(VtxDistZ ()) < l_e_dZ [ id ] ); pass_missingHits = bool ( MissingHits() < l_e_missHits [ id ] ); pass_convVeto = ! HasMatchedConvPhot(); } bool decision = ( pass_full5x5SigmaIetaIeta && pass_deltaEta && pass_deltaPhi && pass_hoe && pass_pfIsoWBetaOverPt && pass_ooEmooP && pass_vtxDistXY && pass_vtxDistZ && pass_missingHits && pass_convVeto ); return decision; }