54 if ( useSameSelectionOnBothElectrons_ ) {
67 std::cout <<
"ZeePlots: WARNING: you have chosen to use CMSSW precalculated ID for electron #1 with name: >>> " <<
usePrecalcIDType1_<<
" <<< such that the value map " << usePrecalcIDSign1_ <<
" "<< usePrecalcIDValue1_ << std::endl;
79 std::cout <<
"ZeePlots: WARNING: you have chosen to use CMSSW precalculated ID for electron #2 with name: >>> " <<
usePrecalcIDType2_<<
" <<< such that the value map " << usePrecalcIDSign2_ <<
" "<< usePrecalcIDValue2_ << std::endl;
184 std::cout <<
"ZeePlots: WARNING: you have chosen to use CMSSW precalculated ID for electron #1 with name: >>> " <<
usePrecalcIDType1_<<
" <<< such that the value map " << usePrecalcIDSign1_ <<
" "<< usePrecalcIDValue1_ << std::endl;
196 std::cout <<
"ZeePlots: WARNING: you have chosen to use CMSSW precalculated ID for electron #2 with name: >>> " <<
usePrecalcIDType2_<<
" <<< such that the value map " << usePrecalcIDSign2_ <<
" "<< usePrecalcIDValue2_ << std::endl;
291 std::cout <<
"ZeePlots: Warning: you have demanded ValidFirstPXBHit on 1st electron" << std::endl;
294 std::cout <<
"ZeePlots: Warning: you have demanded ValidFirstPXBHit on 2nd electron" << std::endl;
297 std::cout <<
"ZeePlots: Warning: you have demanded Conversion Rejection on 1st electron" << std::endl;
300 std::cout <<
"ZeePlots: Warning: you have demanded Conversion Rejection on 2nd electron" << std::endl;
349 std::cout <<
"Warning: No valid Zee candidates in this event..." << std::endl;
354 const pat::CompositeCandidateCollection::const_iterator zeeIter = zcands->begin();
470 TLorentzVector Zp4 = p4e1 + p4e2 ;
483 for ( Int_t
i=0;
i < 5; ++
i ) {
506 Int_t nCaloJets = (Int_t)( caloJets->size() );
508 if ( nCaloJets > 0 ) {
510 Float_t *nCaloET =
new Float_t[nCaloJets];
511 Float_t *nCaloEta =
new Float_t[nCaloJets];
512 Float_t *nCaloPhi =
new Float_t[nCaloJets];
518 for (reco::CaloJetCollection::const_iterator cjet = caloJets->begin() ; cjet != caloJets->end(); ++cjet) {
527 nCaloEta[
counter] = cjet->eta();
528 nCaloPhi[
counter] = cjet->phi();
533 Int_t *caloJetSorted =
new Int_t[nCaloJets];
535 TMath::Sort(nCaloJets, nCaloET, caloJetSorted,
true);
537 for ( Int_t
i = 0;
i < nCaloJets; ++
i ) {
548 delete [] caloJetSorted;
559 Int_t nPfJets = (Int_t) pfJets->size();
563 Float_t *nPfET =
new Float_t[nPfJets];
564 Float_t *nPfEta =
new Float_t[nPfJets];
565 Float_t *nPfPhi =
new Float_t[nPfJets];
571 for (reco::PFJetCollection::const_iterator pjet = pfJets->begin(); pjet != pfJets->end(); ++pjet) {
587 Int_t *pfJetSorted =
new Int_t[nPfJets];
589 TMath::Sort(nPfJets, nPfET, pfJetSorted,
true);
591 for ( Int_t
i = 0;
i < nPfJets; ++
i ) {
603 delete [] pfJetSorted;
646 if ( ! ( passPre1 && passPre2 ) ) {
648 std::cout <<
"At least one electron fails preselection: Electron #1 = " << passPre1 <<
" - Electron #2 = " << passPre2 << std::endl;
663 e1.SetPtEtaPhiM(myElec1->
et(),myElec1->
eta(),myElec1->
phi(),0.000511);
664 e2.SetPtEtaPhiM(myElec2->
et(),myElec2->
eta(),myElec2->
phi(),0.000511);
667 TLorentzVector
Z = e1 + e2;
669 Double_t mee = Z.M();
902 if ( fabseta < 1.479 ) {
914 if ( fabseta < 1.479 ) {
927 if ( fabseta < 1.479 ) {
951 if ( fabseta < 1.479 ) {
1004 else if ( i == 8 ) {
1005 return ( ele->
dB() ) ;
1007 else if ( i == 9 ) {
1010 else if ( i == 10 ) {
1013 else if ( i == 11 ) {
1016 else if ( i == 12 ) {
1020 std::cout <<
"Error in ZeePlots::ReturnCandVar" << std::endl;
1041 Bool_t passConvRej =
true;
1042 Bool_t passPXB =
true;
1043 Bool_t passEMH =
true;
1047 if ( ele->
hasUserInt(
"PassConversionRejection") ) {
1049 if ( ! (ele->
userInt(
"PassConversionRejection") == 1) ) {
1050 passConvRej =
false;
1054 std::cout <<
"ZeePlots: WARNING: Conversion Rejection Request for electron #1 Disregarded: " <<
"you must calculate it before " << std::endl;
1060 if ( ele->
hasUserInt(
"PassValidFirstPXBHit") ) {
1062 if ( ! (ele->
userInt(
"PassValidFirstPXBHit") == 1) ) {
1067 std::cout <<
"ZeePlots: WARNING: Valid First PXB Hit Request for electron #1 Disregarded: " <<
"you must calculate it before " << std::endl;
1073 if ( ele->
hasUserInt(
"NumberOfExpectedMissingHits") ) {
1080 std::cout <<
"ZeePlots: WARNING: Number of Expected Missing Hits Request for electron #1 Disregarded: " <<
"you must calculate it before " << std::endl;
1084 return ( passConvRej && passPXB && passEMH ) ;
1089 Bool_t passConvRej =
true;
1090 Bool_t passPXB =
true;
1091 Bool_t passEMH =
true;
1095 if ( ele->
hasUserInt(
"PassConversionRejection") ) {
1097 if ( ! (ele->
userInt(
"PassConversionRejection") == 1) ) {
1098 passConvRej =
false;
1102 std::cout <<
"ZeePlots: WARNING: Conversion Rejection Request for electron #2 Disregarded: " <<
"you must calculate it before " << std::endl;
1108 if ( ele->
hasUserInt(
"PassValidFirstPXBHit") ) {
1110 if ( ! (ele->
userInt(
"PassValidFirstPXBHit") == 1) ) {
1115 std::cout <<
"ZeePlots: WARNING: Valid First PXB Hit Request for electron #2 Disregarded: " <<
"you must calculate it before " << std::endl;
1121 if ( ele->
hasUserInt(
"NumberOfExpectedMissingHits") ) {
1128 std::cout <<
"ZeePlots: WARNING: Number of Expected Missing Hits Request for electron #2 Disregarded: " <<
"you must calculate it before " << std::endl;
1132 return ( passConvRej && passPXB && passEMH ) ;
1146 h_mee =
new TH1F(
"h_mee" ,
"h_mee" , 200 , 0.0 , 200.0) ;
1147 h_mee_EBEB =
new TH1F(
"h_mee_EBEB" ,
"h_mee_EBEB" , 200 , 0.0 , 200.0) ;
1148 h_mee_EBEE =
new TH1F(
"h_mee_EBEE" ,
"h_mee_EBEE" , 200 , 0.0 , 200.0) ;
1149 h_mee_EEEE =
new TH1F(
"h_mee_EEEE" ,
"h_mee_EEEE" , 200 , 0.0 , 200.0) ;
1150 h_Zcand_PT =
new TH1F(
"h_Zcand_PT" ,
"h_Zcand_PT" , 200 , 0.0 , 100.0) ;
1151 h_Zcand_Y =
new TH1F(
"h_Zcand_Y" ,
"h_Zcand_Y" , 200 , -5.0 , 5.0) ;
1152 h_e_PT =
new TH1F(
"h_e_PT" ,
"h_e_PT" , 200 , 0.0 , 100.0) ;
1153 h_e_ETA =
new TH1F(
"h_e_ETA" ,
"h_e_ETA" , 200 , -3.0 , 3.0) ;
1154 h_e_PHI =
new TH1F(
"h_e_PHI" ,
"h_e_PHI" , 200 , -4.0 , 4.0) ;
1159 h_EB_trkiso =
new TH1F(
"h_EB_trkiso" ,
"h_EB_trkiso" , 200 , 0.00 , 9.00) ;
1160 h_EB_ecaliso =
new TH1F(
"h_EB_ecaliso" ,
"h_EB_ecaliso" , 200 , 0.00 , 9.00) ;
1161 h_EB_hcaliso =
new TH1F(
"h_EB_hcaliso" ,
"h_EB_hcaliso" , 200 , 0.00 , 9.00) ;
1162 h_EB_sIetaIeta =
new TH1F(
"h_EB_sIetaIeta" ,
"h_EB_sIetaIeta" , 200 , 0.00 , 0.02) ;
1163 h_EB_dphi =
new TH1F(
"h_EB_dphi" ,
"h_EB_dphi" , 200 , -0.03 , 0.03) ;
1164 h_EB_deta =
new TH1F(
"h_EB_deta" ,
"h_EB_deta" , 200 , -0.01 , 0.01) ;
1165 h_EB_HoE =
new TH1F(
"h_EB_HoE" ,
"h_EB_HoE" , 200 , 0.00 , 0.20) ;
1167 h_EE_trkiso =
new TH1F(
"h_EE_trkiso" ,
"h_EE_trkiso" , 200 , 0.00 , 9.00) ;
1168 h_EE_ecaliso =
new TH1F(
"h_EE_ecaliso" ,
"h_EE_ecaliso" , 200 , 0.00 , 9.00) ;
1169 h_EE_hcaliso =
new TH1F(
"h_EE_hcaliso" ,
"h_EE_hcaliso" , 200 , 0.00 , 9.00) ;
1170 h_EE_sIetaIeta =
new TH1F(
"h_EE_sIetaIeta" ,
"h_EE_sIetaIeta" , 200 , 0.00 , 0.10) ;
1171 h_EE_dphi =
new TH1F(
"h_EE_dphi" ,
"h_EE_dphi" , 200 , -0.03 , 0.03) ;
1172 h_EE_deta =
new TH1F(
"h_EE_deta" ,
"h_EE_deta" , 200 , -0.01 , 0.01) ;
1173 h_EE_HoE =
new TH1F(
"h_EE_HoE" ,
"h_EE_HoE" , 200 , 0.00 , 0.20) ;
1309 vbtfSele_tree =
new TTree(
"vbtfSele_tree",
"Tree to store the Z Candidates that pass the VBTF selection");
1406 vbtfPresele_tree =
new TTree(
"vbtfPresele_tree",
"Tree to store the Z Candidates that pass the VBTF preselection");
Double_t trackIsoUser2_EB_
Analysis-level particle class.
Double_t hcalIsoUser1_EB_
Analysis-level MET class.
Bool_t CheckCuts1NminusOne(const pat::Electron *, Int_t)
T getUntrackedParameter(std::string const &, T const &) const
std::string usePrecalcIDSign2_
EventAuxiliary const & eventAuxiliary() const override
bool isNonnull() const
Checks for non-null.
double eta() const final
momentum pseudorapidity
Bool_t CheckCut2(const pat::Electron *, Int_t)
Bool_t useValidFirstPXBHit2_
const LorentzVector & p4(P4Kind kind) const
float eSuperClusterOverP() const
Double_t trackIsoUser1_EE_
edm::EDGetTokenT< pat::CompositeCandidateCollection > zeeCollectionToken_
double vy() const override
y coordinate of vertex position
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Bool_t ecalIsoUser2_EB_inv
Bool_t trackIsoUser1_EE_inv
std::string usePrecalcIDSign1_
Double_t usePrecalcIDValue1_
Bool_t maxNumberOfExpectedMissingHits1_
Double_t hcalIsoUser2_EE_
Bool_t useSameSelectionOnBothElectrons_
edm::LuminosityBlockNumber_t luminosityBlock() const
Bool_t CheckCuts2Inverse(const pat::Electron *)
Bool_t CheckCut1(const pat::Electron *, Int_t)
Bool_t ecalIsoUser1_EE_inv
float hcalDepth1TowerSumEt
Bool_t hcalIsoUser2_EE_inv
Double_t hcalIsoUser2_EB_
Double_t ecalIsoUser2_EE_
Double_t ecalIsoUser1_EE_
Double_t usePrecalcIDValue2_
Double_t hcalIsoUser1_EE_
Bool_t useExpectedMissingHits2_
float userFloat(const std::string &key) const
Double_t ecalIsoUser1_EB_
Bool_t CheckCuts1(const pat::Electron *)
Bool_t hcalIsoUser2_EB_inv
Bool_t CheckCuts2NminusOne(const pat::Electron *, Int_t)
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
TFile * ZEE_VBTFpreseleFile_
float deltaEtaSuperClusterTrackAtVtx() const
Bool_t ecalIsoUser2_EE_inv
Bool_t CheckCut1Inv(const pat::Electron *, Int_t)
Bool_t hcalIsoUser1_EE_inv
#define DEFINE_FWK_MODULE(type)
std::string ZEE_VBTFpreseleFileName_
float sigmaIetaIeta() const
float hadronicOverEm() const
Bool_t useConversionRejection1_
Double_t ecalIsoUser2_EB_
double et() const final
transverse energy
Float_t event_caloMET_phi
float deltaPhiSuperClusterTrackAtVtx() const
std::vector< Double_t > CutVars1_
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
float dr03TkSumPt() const
Bool_t CheckCuts1Inverse(const pat::Electron *)
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
Float_t ele1_cr_mhitsinner
Bool_t ecalIsoUser1_EB_inv
Bool_t maxNumberOfExpectedMissingHits2_
Bool_t trackIsoUser1_EB_inv
Bool_t PassPreselectionCriteria2(const pat::Electron *)
float scSigmaIEtaIEta() const
TFile * ZEE_VBTFselectionFile_
std::string usePrecalcIDType1_
Bool_t hcalIsoUser1_EB_inv
double vz() const override
z coordinate of vertex position
myMet
store a preIso track event.preIsoTrack.append(track)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Double_t DRJetFromElectron_
Double_t trackIsoUser1_EB_
const ChargeInfo & chargeInfo() const
float userIsolation(IsolationKeys key) const
float hcalDepth2TowerSumEt
std::vector< CompositeCandidate > CompositeCandidateCollection
T const * product() const
Bool_t useValidFirstPXBHit1_
int32_t userInt(const std::string &key) const
std::string ZEE_VBTFselectionFileName_
Bool_t PassPreselectionCriteria1(const pat::Electron *)
Analysis-level electron class.
reco::TrackRef closestCtfTrackRef() const override
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
float dr03EcalRecHitSumEt() const
Bool_t trackIsoUser2_EE_inv
Double_t ReturnCandVar(const pat::Electron *, Int_t)
double dB(IPTYPE type) const
Impact parameter wrt primary vertex or beamspot.
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Bool_t useExpectedMissingHits1_
std::string usePrecalcIDType2_
const IsolationVariables & dr03IsolationVariables() const
static std::atomic< unsigned int > counter
Bool_t includeJetInformationInNtuples_
edm::EDGetTokenT< reco::PFJetCollection > pfJetCollectionToken_
float dr03HcalTowerSumEt() const
edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollectionToken_
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
std::vector< Bool_t > InvVars2_
void analyze(const edm::Event &, const edm::EventSetup &) override
Bool_t CheckCuts2(const pat::Electron *)
double phi() const final
momentum azimuthal angle
std::vector< Double_t > CutVars2_
Double_t trackIsoUser2_EE_
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
Bool_t CheckCut2Inv(const pat::Electron *, Int_t)
EventNumber_t event() const
std::vector< Bool_t > InvVars1_
Bool_t trackIsoUser2_EB_inv
double vx() const override
x coordinate of vertex position
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
Bool_t useConversionRejection2_
Float_t ele2_cr_mhitsinner