|
|
Go to the documentation of this file.
92 std::cout <<
"WenuPlots: Warning: you have demanded a valid 1st layer PXB hit" << std::endl;
94 std::cout <<
"WenuPlots: Warning: you have demanded egamma conversion rejection criteria to be applied"
98 <<
" missing inner hits " << std::endl;
120 "PrimaryVerticesCollection",
edm::InputTag(
"offlinePrimaryVertices")));
122 "PrimaryVerticesCollectionBS",
edm::InputTag(
"offlinePrimaryVerticesWithBS")));
207 cout <<
"Warning: no wenu candidates in this event..." << endl;
211 const pat::CompositeCandidateCollection::const_iterator wenuIter = wcands->begin();
217 const pat::MET *myPfMet = dynamic_cast<const pat::MET *>(wenu.
daughter(
"pfmet"));
218 const pat::MET *myTcMet = dynamic_cast<const pat::MET *>(wenu.
daughter(
"tcmet"));
269 const std::vector<reco::Vertex> Vtx = *(pVtx.
product());
273 const std::vector<reco::Vertex> VtxBS = *(pVtxBS.
product());
285 if (!VtxBS.empty()) {
335 for (
int i = 0;
i < 5; ++
i) {
354 float *nCaloET =
new float[nCaloJets];
355 float *nCaloEta =
new float[nCaloJets];
356 float *nCaloPhi =
new float[nCaloJets];
357 reco::CaloJetCollection::const_iterator cjet =
caloJets->begin();
359 for (; cjet !=
caloJets->end(); ++cjet) {
364 nCaloEta[
counter] = cjet->eta();
365 nCaloPhi[
counter] = cjet->phi();
369 int *caloJetSorted =
new int[nCaloJets];
370 TMath::Sort(nCaloJets, nCaloET, caloJetSorted,
true);
371 for (
int i = 0;
i < nCaloJets; ++
i) {
378 delete[] caloJetSorted;
392 float *nPfET =
new float[nPfJets];
393 float *nPfEta =
new float[nPfJets];
394 float *nPfPhi =
new float[nPfJets];
395 reco::PFJetCollection::const_iterator pjet =
pfJets->begin();
397 for (; pjet !=
pfJets->end(); ++pjet) {
407 int *pfJetSorted =
new int[nPfJets];
408 TMath::Sort(nPfJets, nPfET, pfJetSorted,
true);
409 for (
int i = 0;
i < nPfJets; ++
i) {
416 delete[] pfJetSorted;
475 const pat::Electron *mySecondElec = dynamic_cast<const pat::Electron *>(wenu.
daughter(
"secondElec"));
500 if (fabs(mySecondElec->
electronID(
"simpleEleId60relIso") - 7) < 0.1)
502 else if (fabs(mySecondElec->
electronID(
"simpleEleId70relIso") - 7) < 0.1)
504 else if (fabs(mySecondElec->
electronID(
"simpleEleId80relIso") - 7) < 0.1)
506 else if (fabs(mySecondElec->
electronID(
"simpleEleId85relIso") - 7) < 0.1)
508 else if (fabs(mySecondElec->
electronID(
"simpleEleId90relIso") - 7) < 0.1)
510 else if (fabs(mySecondElec->
electronID(
"simpleEleId95relIso") - 7) < 0.1)
542 if (!VtxBS.empty()) {
563 for (Int_t
i = 0;
i < (Int_t)Vtx.size(); ++
i) {
567 for (Int_t
i = 0;
i < (Int_t)VtxBS.size(); ++
i) {
595 Double_t scEt = myElec->
superCluster()->energy() / TMath::CosH(scEta);
597 Double_t metPhi =
myMet->phi();
598 Double_t
mt = TMath::Sqrt(2.0 * scEt *
met *
599 (1.0 - (TMath::Cos(scPhi) * TMath::Cos(metPhi) + TMath::Sin(scPhi) * TMath::Sin(metPhi))));
765 if (fabseta < 1.479) {
773 if (fabseta < 1.479) {
810 return fabs(ele->
dB());
819 std::cout <<
"Error in WenuPlots::ReturnCandVar" << std::endl;
824 Bool_t passConvRej =
true;
825 Bool_t passPXB =
true;
826 Bool_t passEMH =
true;
828 if (ele->
hasUserInt(
"PassConversionRejection")) {
830 if (not(ele->
userInt(
"PassConversionRejection") == 1))
833 std::cout <<
"WenuPlots: WARNING: Conversion Rejection Request Disregarded: "
834 <<
"you must calculate it before " << std::endl;
839 if (ele->
hasUserInt(
"PassValidFirstPXBHit")) {
841 if (not(ele->
userInt(
"PassValidFirstPXBHit") == 1))
844 std::cout <<
"WenuPlots: WARNING: Valid First PXB Hit Request Disregarded: "
845 <<
"you must calculate it before " << std::endl;
850 if (ele->
hasUserInt(
"NumberOfExpectedMissingHits")) {
855 std::cout <<
"WenuPlots: WARNING: Number of Expected Missing Hits Request Disregarded: "
856 <<
"you must calculate it before " << std::endl;
860 return passConvRej && passPXB && passEMH;
869 h_met =
new TH1F(
"h_met",
"h_met", 200, 0, 200);
870 h_met_inverse =
new TH1F(
"h_met_inverse",
"h_met_inverse", 200, 0, 200);
872 h_mt =
new TH1F(
"h_mt",
"h_mt", 200, 0, 200);
873 h_mt_inverse =
new TH1F(
"h_mt_inverse",
"h_mt_inverse", 200, 0, 200);
875 h_met_EB =
new TH1F(
"h_met_EB",
"h_met_EB", 200, 0, 200);
876 h_met_inverse_EB =
new TH1F(
"h_met_inverse_EB",
"h_met_inverse_EB", 200, 0, 200);
878 h_mt_EB =
new TH1F(
"h_mt_EB",
"h_mt_EB", 200, 0, 200);
879 h_mt_inverse_EB =
new TH1F(
"h_mt_inverse_EB",
"h_mt_inverse_EB", 200, 0, 200);
881 h_met_EE =
new TH1F(
"h_met_EE",
"h_met_EE", 200, 0, 200);
882 h_met_inverse_EE =
new TH1F(
"h_met_inverse_EE",
"h_met_inverse_EE", 200, 0, 200);
884 h_mt_EE =
new TH1F(
"h_mt_EE",
"h_mt_EE", 200, 0, 200);
885 h_mt_inverse_EE =
new TH1F(
"h_mt_inverse_EE",
"h_mt_inverse_EE", 200, 0, 200);
887 h_scEt =
new TH1F(
"h_scEt",
"h_scEt", 200, 0, 100);
888 h_scEta =
new TH1F(
"h_scEta",
"h_scEta", 200, -3, 3);
889 h_scPhi =
new TH1F(
"h_scPhi",
"h_scPhi", 200, -4, 4);
893 h_EB_trkiso =
new TH1F(
"h_EB_trkiso",
"h_EB_trkiso", 200, 0.0, 9.0);
894 h_EB_ecaliso =
new TH1F(
"h_EB_ecaliso",
"h_EB_ecaliso", 200, 0.0, 9.0);
895 h_EB_hcaliso =
new TH1F(
"h_EB_hcaliso",
"h_EB_hcaliso", 200, 0.0, 9.0);
896 h_EB_sIetaIeta =
new TH1F(
"h_EB_sIetaIeta",
"h_EB_sIetaIeta", 200, 0.0, 0.02);
897 h_EB_dphi =
new TH1F(
"h_EB_dphi",
"h_EB_dphi", 200, -0.03, 0.03);
898 h_EB_deta =
new TH1F(
"h_EB_deta",
"h_EB_deta", 200, -0.01, 0.01);
899 h_EB_HoE =
new TH1F(
"h_EB_HoE",
"h_EB_HoE", 200, 0.0, 0.2);
901 h_EE_trkiso =
new TH1F(
"h_EE_trkiso",
"h_EE_trkiso", 200, 0.0, 9.0);
902 h_EE_ecaliso =
new TH1F(
"h_EE_ecaliso",
"h_EE_ecaliso", 200, 0.0, 9.0);
903 h_EE_hcaliso =
new TH1F(
"h_EE_hcaliso",
"h_EE_hcaliso", 200, 0.0, 9.0);
904 h_EE_sIetaIeta =
new TH1F(
"h_EE_sIetaIeta",
"h_EE_sIetaIeta", 200, 0.0, 0.1);
905 h_EE_dphi =
new TH1F(
"h_EE_dphi",
"h_EE_dphi", 200, -0.03, 0.03);
906 h_EE_deta =
new TH1F(
"h_EE_deta",
"h_EE_deta", 200, -0.01, 0.01);
907 h_EE_HoE =
new TH1F(
"h_EE_HoE",
"h_EE_HoE", 200, 0.0, 0.2);
986 vbtfSele_tree =
new TTree(
"vbtfSele_tree",
"Tree to store the W Candidates that pass the VBTF selection");
1057 vbtfPresele_tree =
new TTree(
"vbtfPresele_tree",
"Tree to store the W Candidates that pass the VBTF preselection");
Bool_t CheckCutsInverse(const pat::Electron *ele)
std::string usePrecalcIDType_
float dr03TkSumPt() const
math::XYZVectorF trackMomentumOut() const
Int_t ele2nd_cr_mhitsinner
T const * product() const
Bool_t CheckCuts(const pat::Electron *ele)
float deltaPhiSuperClusterTrackAtVtx() const
Analysis-level particle class.
Bool_t CheckCutsNminusOne(const pat::Electron *ele, Int_t jj)
Bool_t storeExtraInformation_
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster
double vz() const override
z coordinate of vertex position
edm::EDGetTokenT< pat::CompositeCandidateCollection > wenuCollectionToken_
std::string WENU_VBTFpreseleFileName_
std::vector< CompositeCandidate > CompositeCandidateCollection
const IsolationVariables & dr03IsolationVariables() const
std::vector< Int_t > VtxTracksSize
double vx() const override
x coordinate of vertex position
float userIsolation(IsolationKeys key) const
T getUntrackedParameter(std::string const &, T const &) const
std::string WENU_VBTFselectionFileName_
Bool_t CheckCutInv(const pat::Electron *wenu, Int_t i)
reco::TrackRef closestCtfTrackRef() const override
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
float userFloat(const std::string &key) const
float hadronicOverEm() const
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionToken_
TFile * WENU_VBTFselectionFile_
std::vector< Int_t > VtxTracksSizeBS
edm::InputTag pfJetCollectionTag_
std::vector< Bool_t > InvVars_
Int_t ele2nd_passes_selection
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
Double_t ReturnCandVar(const pat::Electron *ele, Int_t i)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionBSToken_
bool hasUserFloat(const std::string &key) const
Return true if there is a user-defined float with a given name.
const ChargeInfo & chargeInfo() const
math::XYZVectorF trackMomentumAtVtx() const
bool ecalDrivenSeed() const
float hcalDepth1TowerSumEt
Bool_t useExpectedMissingHits_
Bool_t useConversionRejection_
double dB(IPTYPE type) const
Impact parameter wrt primary vertex or beamspot.
Double_t DRJetFromElectron_
Double_t usePrecalcIDValue_
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
TFile * WENU_VBTFpreseleFile_
Int_t event_triggerDecision
Bool_t trackIsoUser_EE_inv
float deltaEtaSuperClusterTrackAtVtx() const
std::vector< Float_t > VtxNormalizedChi2BS
double eta() const final
momentum pseudorapidity
Bool_t hcalIsoUser_EB_inv
bool isNonnull() const
Checks for non-null.
edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollectionToken_
TH1F * h_trackIso_eb_NmOne
static int position[264][3]
edm::InputTag caloJetCollectionTag_
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
Bool_t trackIsoUser_EB_inv
Analysis-level MET class.
static std::atomic< unsigned int > counter
Bool_t storeAllSecondElectronVariables_
Bool_t useValidFirstPXBHit_
Float_t ele_hltmatched_dr
std::vector< Double_t > CutVars_
Bool_t PassPreselectionCriteria(const pat::Electron *ele)
Bool_t ecalIsoUser_EB_inv
const LorentzVector & p4(P4Kind kind) const
Float_t event_caloMET_phi
Int_t maxNumberOfExpectedMissingHits_
float sigmaIetaIeta() const
double et() const final
transverse energy
Bool_t CheckCut(const pat::Electron *wenu, Int_t i)
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
double phi() const final
momentum azimuthal angle
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Bool_t ecalIsoUser_EE_inv
Bool_t includeJetInformationInNtuples_
bool isElectronIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Electron.
std::string usePrecalcIDSign_
float eSuperClusterOverP() const
float hcalDepth2TowerSumEt
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Float_t ele2nd_hltmatched_dr
Analysis-level electron class.
Bool_t hcalIsoUser_EE_inv
WenuPlots(const edm::ParameterSet &)
TH1F * h_trackIso_ee_NmOne
int32_t userInt(const std::string &key) const
myMet
store a preIso track event.preIsoTrack.append(track)
Double_t trackIsoUser_EB_
float dr03HcalTowerSumEt() const
float scSigmaIEtaIEta() const
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
std::vector< Float_t > VtxNormalizedChi2
float dr03EcalRecHitSumEt() const
double vy() const override
y coordinate of vertex position
Double_t trackIsoUser_EE_
edm::EDGetTokenT< reco::PFJetCollection > pfJetCollectionToken_