90 if (not usePrecalcID_) {
91 if (useValidFirstPXBHit_)
std::cout <<
"WenuPlots: Warning: you have demanded a valid 1st layer PXB hit" << std::endl;
92 if (useConversionRejection_)
std::cout <<
"WenuPlots: Warning: you have demanded egamma conversion rejection criteria to be applied" << std::endl;
93 if (useExpectedMissingHits_)
std::cout <<
"WenuPlots: Warning: you have demanded at most " 94 <<maxNumberOfExpectedMissingHits_ <<
" missing inner hits "<< std::endl;
100 if ((useValidFirstPXBHit_ || useExpectedMissingHits_ || useConversionRejection_) && (not
usePrecalcID_)) {
209 cout <<
"Warning: no wenu candidates in this event..." << endl;
213 const pat::CompositeCandidateCollection::const_iterator
214 wenuIter = wcands->begin();
275 const std::vector<reco::Vertex> Vtx = *(pVtx.
product());
279 const std::vector<reco::Vertex> VtxBS = *(pVtxBS.
product());
280 if (Vtx.size() > 0) {
291 if (VtxBS.size() > 0) {
341 for (
int i=0;
i<5; ++
i) {
354 int nCaloJets = (
int) caloJets->size();
356 float *nCaloET =
new float[nCaloJets];
357 float *nCaloEta =
new float[nCaloJets];
358 float *nCaloPhi =
new float[nCaloJets];
359 reco::CaloJetCollection::const_iterator cjet = caloJets->begin();
361 for (; cjet != caloJets->end(); ++cjet) {
366 nCaloEta[
counter] = cjet->eta();
367 nCaloPhi[
counter] = cjet->phi();
371 int *caloJetSorted =
new int[nCaloJets];
372 TMath::Sort(nCaloJets, nCaloET, caloJetSorted,
true);
373 for (
int i=0;
i<nCaloJets; ++
i) {
379 delete [] caloJetSorted;
385 std::cout <<
"WenuPlots: Could not get caloJet collection with name " 392 int nPfJets = (
int) pfJets->size();
394 float *nPfET =
new float[nPfJets];
395 float *nPfEta =
new float[nPfJets];
396 float *nPfPhi =
new float[nPfJets];
397 reco::PFJetCollection::const_iterator pjet = pfJets->begin();
399 for (; pjet != pfJets->end(); ++pjet) {
409 int *pfJetSorted =
new int[nPfJets];
410 TMath::Sort(nPfJets, nPfET, pfJetSorted,
true);
411 for (
int i=0;
i<nPfJets; ++
i) {
417 delete [] pfJetSorted;
423 std::cout <<
"WenuPlots: Could not get pfJet collection with name " 533 if (Vtx.size() > 0) {
536 if (VtxBS.size() > 0) {
557 for (Int_t
i=0;
i < (Int_t) Vtx.size(); ++
i) {
561 for (Int_t
i=0;
i < (Int_t) VtxBS.size(); ++
i) {
590 Double_t scEt = myElec->
superCluster()->energy()/TMath::CosH(scEta);
591 Double_t
met = myMet->
et();
592 Double_t metPhi = myMet->
phi();
593 Double_t
mt = TMath::Sqrt(2.0*scEt*met*(1.0-(TMath::Cos(scPhi)*TMath::Cos(metPhi)+TMath::Sin(scPhi)*TMath::Sin(metPhi))));
628 if (not usePrecalcID_) {
721 std::cout <<
"Error! not existing ID with name: " 759 if (
CheckCut(ele,
i) ==
false)
return false;
766 if ( fabseta<1.479) {
774 if ( fabseta<1.479) {
803 else if (i==8)
return fabs(ele->
dB());
808 std::cout <<
"Error in WenuPlots::ReturnCandVar" << std::endl;
814 Bool_t passConvRej =
true;
815 Bool_t passPXB =
true;
816 Bool_t passEMH =
true;
818 if (ele->
hasUserInt(
"PassConversionRejection")) {
820 if (not (ele->
userInt(
"PassConversionRejection")==1)) passConvRej =
false;
823 std::cout <<
"WenuPlots: WARNING: Conversion Rejection Request Disregarded: " 824 <<
"you must calculate it before " << std::endl;
829 if (ele->
hasUserInt(
"PassValidFirstPXBHit")) {
831 if (not (ele->
userInt(
"PassValidFirstPXBHit")==1)) passPXB =
false;
834 std::cout <<
"WenuPlots: WARNING: Valid First PXB Hit Request Disregarded: " 835 <<
"you must calculate it before " << std::endl;
840 if (ele->
hasUserInt(
"NumberOfExpectedMissingHits")) {
846 std::cout <<
"WenuPlots: WARNING: Number of Expected Missing Hits Request Disregarded: " 847 <<
"you must calculate it before " << std::endl;
851 return passConvRej && passPXB && passEMH;
862 h_met =
new TH1F(
"h_met",
"h_met", 200, 0, 200);
863 h_met_inverse =
new TH1F(
"h_met_inverse",
"h_met_inverse", 200, 0, 200);
865 h_mt =
new TH1F(
"h_mt",
"h_mt", 200, 0, 200);
866 h_mt_inverse =
new TH1F(
"h_mt_inverse",
"h_mt_inverse", 200, 0, 200);
869 h_met_EB =
new TH1F(
"h_met_EB",
"h_met_EB", 200, 0, 200);
870 h_met_inverse_EB =
new TH1F(
"h_met_inverse_EB",
"h_met_inverse_EB", 200, 0, 200);
872 h_mt_EB =
new TH1F(
"h_mt_EB",
"h_mt_EB", 200, 0, 200);
873 h_mt_inverse_EB =
new TH1F(
"h_mt_inverse_EB",
"h_mt_inverse_EB", 200, 0, 200);
876 h_met_EE =
new TH1F(
"h_met_EE",
"h_met_EE", 200, 0, 200);
877 h_met_inverse_EE =
new TH1F(
"h_met_inverse_EE",
"h_met_inverse_EE", 200, 0, 200);
879 h_mt_EE =
new TH1F(
"h_mt_EE",
"h_mt_EE", 200, 0, 200);
880 h_mt_inverse_EE =
new TH1F(
"h_mt_inverse_EE",
"h_mt_inverse_EE", 200, 0, 200);
883 h_scEt =
new TH1F(
"h_scEt",
"h_scEt", 200, 0, 100);
884 h_scEta =
new TH1F(
"h_scEta",
"h_scEta", 200, -3, 3);
885 h_scPhi =
new TH1F(
"h_scPhi",
"h_scPhi", 200, -4, 4);
890 h_EB_trkiso =
new TH1F(
"h_EB_trkiso",
"h_EB_trkiso",200 , 0.0, 9.0);
891 h_EB_ecaliso =
new TH1F(
"h_EB_ecaliso",
"h_EB_ecaliso",200, 0.0 , 9.0);
892 h_EB_hcaliso =
new TH1F(
"h_EB_hcaliso",
"h_EB_hcaliso",200, 0.0 , 9.0);
893 h_EB_sIetaIeta =
new TH1F(
"h_EB_sIetaIeta",
"h_EB_sIetaIeta",200, 0.0 , 0.02 );
894 h_EB_dphi =
new TH1F(
"h_EB_dphi",
"h_EB_dphi",200, -0.03 , 0.03 );
895 h_EB_deta =
new TH1F(
"h_EB_deta",
"h_EB_deta",200, -0.01 , 0.01) ;
896 h_EB_HoE =
new TH1F(
"h_EB_HoE",
"h_EB_HoE",200, 0.0 , 0.2 );
898 h_EE_trkiso =
new TH1F(
"h_EE_trkiso",
"h_EE_trkiso",200 , 0.0, 9.0);
899 h_EE_ecaliso =
new TH1F(
"h_EE_ecaliso",
"h_EE_ecaliso",200, 0.0 , 9.0);
900 h_EE_hcaliso =
new TH1F(
"h_EE_hcaliso",
"h_EE_hcaliso",200, 0.0 , 9.0);
901 h_EE_sIetaIeta =
new TH1F(
"h_EE_sIetaIeta",
"h_EE_sIetaIeta",200, 0.0 , 0.1 );
902 h_EE_dphi =
new TH1F(
"h_EE_dphi",
"h_EE_dphi",200, -0.03 , 0.03 );
903 h_EE_deta =
new TH1F(
"h_EE_deta",
"h_EE_deta",200, -0.01 , 0.01) ;
904 h_EE_HoE =
new TH1F(
"h_EE_HoE",
"h_EE_HoE",200, 0.0 , 0.2 );
910 new TH1F(
"h_trackIso_eb_NmOne",
"trackIso EB N-1 plot",80,0,8);
912 new TH1F(
"h_trackIso_ee_NmOne",
"trackIso EE N-1 plot",80,0,8);
989 "Tree to store the W Candidates that pass the VBTF selection");
1062 "Tree to store the W Candidates that pass the VBTF preselection");
Analysis-level particle class.
Analysis-level MET class.
Double_t trackIsoUser_EB_
T getUntrackedParameter(std::string const &, T const &) const
bool isElectronIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Electron.
Int_t maxNumberOfExpectedMissingHits_
Bool_t PassPreselectionCriteria(const pat::Electron *ele)
EventAuxiliary const & eventAuxiliary() const override
std::string WENU_VBTFselectionFileName_
bool isNonnull() const
Checks for non-null.
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionBSToken_
const LorentzVector & p4(P4Kind kind) const
float eSuperClusterOverP() const
virtual double eta() const final
momentum pseudorapidity
Double_t trackIsoUser_EE_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
Int_t ele2nd_passes_selection
Float_t event_caloMET_phi
TH1F * h_trackIso_ee_NmOne
math::XYZVectorF trackMomentumAtVtx() const
edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollectionToken_
std::string WENU_VBTFpreseleFileName_
WenuPlots(const edm::ParameterSet &)
bool hasUserFloat(const std::string &key) const
Return true if there is a user-defined float with a given name.
edm::LuminosityBlockNumber_t luminosityBlock() const
Bool_t CheckCutInv(const pat::Electron *wenu, Int_t i)
Bool_t includeJetInformationInNtuples_
Bool_t hcalIsoUser_EE_inv
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionToken_
float hcalDepth1TowerSumEt
Bool_t CheckCutsInverse(const pat::Electron *ele)
Bool_t CheckCuts(const pat::Electron *ele)
std::vector< Double_t > CutVars_
virtual double vy() const
y coordinate of vertex position
Bool_t useExpectedMissingHits_
float userFloat(const std::string &key) const
std::string usePrecalcIDSign_
edm::EDGetTokenT< reco::PFJetCollection > pfJetCollectionToken_
virtual double phi() const final
momentum azimuthal angle
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
virtual double et() const final
transverse energy
reco::SuperClusterRef superCluster() const
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
TFile * WENU_VBTFselectionFile_
Bool_t hcalIsoUser_EB_inv
float deltaEtaSuperClusterTrackAtVtx() const
float sigmaIetaIeta() const
float hadronicOverEm() const
reco::GsfTrackRef gsfTrack() const
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
Bool_t ecalIsoUser_EE_inv
Int_t event_triggerDecision
Float_t ele2nd_hltmatched_dr
reco::TrackRef closestCtfTrackRef() const
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
math::XYZVectorF trackMomentumOut() const
float deltaPhiSuperClusterTrackAtVtx() const
Float_t ele_hltmatched_dr
Double_t usePrecalcIDValue_
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
float dr03TkSumPt() const
edm::InputTag caloJetCollectionTag_
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
std::vector< Int_t > VtxTracksSizeBS
Bool_t storeAllSecondElectronVariables_
Bool_t useConversionRejection_
std::vector< Int_t > VtxTracksSize
Double_t ReturnCandVar(const pat::Electron *ele, Int_t i)
TFile * WENU_VBTFpreseleFile_
virtual double vz() const
z coordinate of vertex position
float scSigmaIEtaIEta() const
myMet
store a preIso track event.preIsoTrack.append(track)
edm::EDGetTokenT< pat::CompositeCandidateCollection > wenuCollectionToken_
TH1F * h_trackIso_eb_NmOne
const ChargeInfo & chargeInfo() const
Bool_t CheckCutsNminusOne(const pat::Electron *ele, Int_t jj)
float userIsolation(IsolationKeys key) const
float hcalDepth2TowerSumEt
std::vector< CompositeCandidate > CompositeCandidateCollection
T const * product() const
Bool_t trackIsoUser_EE_inv
int32_t userInt(const std::string &key) const
Bool_t storeExtraInformation_
Analysis-level electron class.
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
float dr03EcalRecHitSumEt() const
Bool_t useValidFirstPXBHit_
edm::InputTag pfJetCollectionTag_
std::string usePrecalcIDType_
Bool_t ecalIsoUser_EB_inv
double dB(IPTYPE type) const
Impact parameter wrt primary vertex or beamspot.
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Double_t DRJetFromElectron_
const IsolationVariables & dr03IsolationVariables() const
static std::atomic< unsigned int > counter
static int position[264][3]
virtual double vx() const
x coordinate of vertex position
float dr03HcalTowerSumEt() const
Bool_t trackIsoUser_EB_inv
std::vector< Float_t > VtxNormalizedChi2BS
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Int_t ele2nd_cr_mhitsinner
std::vector< Bool_t > InvVars_
EventNumber_t event() const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
bool ecalDrivenSeed() const
std::vector< Float_t > VtxNormalizedChi2
Bool_t CheckCut(const pat::Electron *wenu, Int_t i)