CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

WenuPlots Class Reference

#include <WenuPlots.h>

Inheritance diagram for WenuPlots:
edm::EDAnalyzer

List of all members.

Public Member Functions

 WenuPlots (const edm::ParameterSet &)
 ~WenuPlots ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
bool CheckCut (const pat::Electron *wenu, int i)
bool CheckCutInv (const pat::Electron *wenu, int i)
bool CheckCuts (const pat::Electron *ele)
bool CheckCutsInverse (const pat::Electron *ele)
bool CheckCutsNminusOne (const pat::Electron *ele, int jj)
virtual void endJob ()
double ReturnCandVar (const pat::Electron *ele, int i)

Private Attributes

std::vector< Double_t > CutVars_
Double_t deta_EB_
bool deta_EB_inv
Double_t deta_EE_
bool deta_EE_inv
Double_t dphi_EB_
bool dphi_EB_inv
Double_t dphi_EE_
bool dphi_EE_inv
Double_t ecalIso_EB_
bool ecalIso_EB_inv
Double_t ecalIso_EE_
bool ecalIso_EE_inv
TH1F * h_EB_deta
TH1F * h_EB_dphi
TH1F * h_EB_ecaliso
TH1F * h_EB_hcaliso
TH1F * h_EB_HoE
TH1F * h_EB_sIetaIeta
TH1F * h_EB_trkiso
TH1F * h_EE_deta
TH1F * h_EE_dphi
TH1F * h_EE_ecaliso
TH1F * h_EE_hcaliso
TH1F * h_EE_HoE
TH1F * h_EE_sIetaIeta
TH1F * h_EE_trkiso
TH1F * h_met
TH1F * h_met_EB
TH1F * h_met_EE
TH1F * h_met_inverse
TH1F * h_met_inverse_EB
TH1F * h_met_inverse_EE
TH1F * h_mt
TH1F * h_mt_EB
TH1F * h_mt_EE
TH1F * h_mt_inverse
TH1F * h_mt_inverse_EB
TH1F * h_mt_inverse_EE
TH1F * h_scEt
TH1F * h_scEta
TH1F * h_scPhi
TH1F * h_trackIso_eb_NmOne
TH1F * h_trackIso_ee_NmOne
Double_t hcalIso_EB_
bool hcalIso_EB_inv
Double_t hcalIso_EE_
bool hcalIso_EE_inv
TFile * histofile
Double_t hoe_EB_
bool hoe_EB_inv
Double_t hoe_EE_
bool hoe_EE_inv
std::vector< Double_t > InvVars_
int nBarrelVars_
std::string outputFile_
Double_t sihih_EB_
bool sihih_EB_inv
Double_t sihih_EE_
bool sihih_EE_inv
Double_t trackIso_EB_
bool trackIso_EB_inv
Double_t trackIso_EE_
bool trackIso_EE_inv
Double_t userIso_EB_
bool userIso_EB_inv
Double_t userIso_EE_
bool userIso_EE_inv
edm::InputTag wenuCollectionTag_

Detailed Description

Definition at line 29 of file WenuPlots.h.


Constructor & Destructor Documentation

WenuPlots::WenuPlots ( const edm::ParameterSet iConfig) [explicit]

Definition at line 47 of file WenuPlots.cc.

References deta_EB_, deta_EB_inv, deta_EE_, deta_EE_inv, dphi_EB_, dphi_EB_inv, dphi_EE_, dphi_EE_inv, ecalIso_EB_, ecalIso_EB_inv, ecalIso_EE_, ecalIso_EE_inv, edm::ParameterSet::getUntrackedParameter(), hcalIso_EB_, hcalIso_EB_inv, hcalIso_EE_, hcalIso_EE_inv, hoe_EB_, hoe_EB_inv, hoe_EE_, hoe_EE_inv, outputFile_, sihih_EB_, sihih_EB_inv, sihih_EE_, sihih_EE_inv, trackIso_EB_, trackIso_EB_inv, trackIso_EE_, trackIso_EE_inv, userIso_EB_, userIso_EB_inv, userIso_EE_, userIso_EE_inv, and wenuCollectionTag_.

{
//                   I N P U T      P A R A M E T E R S
//
//  WENU COLLECTION   //////////////////////////////////////////////////////
//
  
  wenuCollectionTag_ = iConfig.getUntrackedParameter<edm::InputTag>
    ("wenuCollectionTag");
  //
  // code parameters
  //
  std::string outputFile_D = "histos.root";
  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile",
                                                           outputFile_D);
  //
  //
  // the selection cuts:
  trackIso_EB_ = iConfig.getUntrackedParameter<Double_t>("trackIso_EB");
  ecalIso_EB_ = iConfig.getUntrackedParameter<Double_t>("ecalIso_EB");
  hcalIso_EB_ = iConfig.getUntrackedParameter<Double_t>("hcalIso_EB");
  //
  trackIso_EE_ = iConfig.getUntrackedParameter<Double_t>("trackIso_EE");
  ecalIso_EE_ = iConfig.getUntrackedParameter<Double_t>("ecalIso_EE");
  hcalIso_EE_ = iConfig.getUntrackedParameter<Double_t>("hcalIso_EE");
  //
  sihih_EB_ = iConfig.getUntrackedParameter<Double_t>("sihih_EB");
  dphi_EB_ = iConfig.getUntrackedParameter<Double_t>("dphi_EB");
  deta_EB_ = iConfig.getUntrackedParameter<Double_t>("deta_EB");
  hoe_EB_ = iConfig.getUntrackedParameter<Double_t>("hoe_EB");
  userIso_EB_ = iConfig.getUntrackedParameter<Double_t>("userIso_EB", 1000.);
  //
  sihih_EE_ = iConfig.getUntrackedParameter<Double_t>("sihih_EE");
  dphi_EE_ = iConfig.getUntrackedParameter<Double_t>("dphi_EE");
  deta_EE_ = iConfig.getUntrackedParameter<Double_t>("deta_EE");
  hoe_EE_ = iConfig.getUntrackedParameter<Double_t>("hoe_EE");
  userIso_EE_ = iConfig.getUntrackedParameter<Double_t>("userIso_EE", 1000.);
  //
  trackIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("trackIso_EB_inv", 
                                                            false);
  ecalIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("ecalIso_EB_inv",
                                                           false);
  hcalIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("hcalIso_EB_inv",
                                                           false);
  //
  trackIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("trackIso_EE_inv",
                                                            false);
  ecalIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("ecalIso_EE_inv",
                                                           false);
  hcalIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("hcalIso_EE_inv",
                                                           false);

  //
  sihih_EB_inv = iConfig.getUntrackedParameter<Bool_t>("sihih_EB_inv",
                                                         false);
  dphi_EB_inv = iConfig.getUntrackedParameter<Bool_t>("dphi_EB_inv",
                                                        false);
  deta_EB_inv = iConfig.getUntrackedParameter<Bool_t>("deta_EB_inv",
                                                        false);
  hoe_EB_inv = iConfig.getUntrackedParameter<Bool_t>("hoe_EB_inv",
                                                        false);
  userIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("userIso_EB_inv",
                                                         false);
  //
  sihih_EE_inv = iConfig.getUntrackedParameter<Bool_t>("sihih_EE_inv",
                                                         false);
  dphi_EE_inv = iConfig.getUntrackedParameter<Bool_t>("dphi_EE_inv",
                                                        false);
  deta_EE_inv = iConfig.getUntrackedParameter<Bool_t>("deta_EE_inv",
                                                        false);
  hoe_EE_inv = iConfig.getUntrackedParameter<Bool_t>("hoe_EE_inv",
                                                        false);
  userIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("userIso_EE_inv",
                                                         false);

}
WenuPlots::~WenuPlots ( )

Definition at line 130 of file WenuPlots.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

void WenuPlots::analyze ( const edm::Event iEvent,
const edm::EventSetup es 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 145 of file WenuPlots.cc.

References CheckCuts(), CheckCutsInverse(), CheckCutsNminusOne(), funct::cos(), gather_cfg::cout, pat::EcalIso, edm::Event::getByLabel(), h_EB_deta, h_EB_dphi, h_EB_ecaliso, h_EB_hcaliso, h_EB_HoE, h_EB_sIetaIeta, h_EB_trkiso, h_EE_deta, h_EE_dphi, h_EE_ecaliso, h_EE_hcaliso, h_EE_HoE, h_EE_sIetaIeta, h_EE_trkiso, h_met, h_met_EB, h_met_EE, h_met_inverse, h_met_inverse_EB, h_met_inverse_EE, h_mt, h_mt_EB, h_mt_EE, h_mt_inverse, h_mt_inverse_EB, h_mt_inverse_EE, h_scEt, h_scEta, h_scPhi, h_trackIso_eb_NmOne, h_trackIso_ee_NmOne, pat::HcalIso, CaloMET_cfi::met, funct::sin(), mathSSE::sqrt(), reco::RecoCandidate::superCluster(), pat::TrackIso, and wenuCollectionTag_.

{
  using namespace std;
  //
  //  Get the collections here
  //
  edm::Handle<pat::CompositeCandidateCollection> WenuCands;
  iEvent.getByLabel(wenuCollectionTag_, WenuCands);

  if (not WenuCands.isValid()) {
    cout << "Warning: no wenu candidates in this event..." << endl;
    return;
  }
  //
  //
  const pat::CompositeCandidateCollection *wcands = WenuCands.product();
  const pat::CompositeCandidateCollection::const_iterator 
    wenuIter = wcands->begin();
  const pat::CompositeCandidate wenu = *wenuIter;
  //
  // get the parts of the composite candidate:
  const pat::Electron * myElec=
    dynamic_cast<const pat::Electron*> (wenu.daughter("electron"));
  const pat::MET * myMet=
    dynamic_cast<const pat::MET*> (wenu.daughter("met"));
  // some variables here
  double scEta = myElec->superCluster()->eta();
  double scPhi = myElec->superCluster()->phi();
  double scEt = myElec->superCluster()->energy()/cosh(scEta);
  double met    = myMet->et();
  double metPhi = myMet->phi();
  double mt  = sqrt(2.0*scEt*met*(1.0-(cos(scPhi)*cos(metPhi)+sin(scPhi)*sin(metPhi))));

  double trackIso = myElec->userIsolation(pat::TrackIso);
  double ecalIso = myElec->userIsolation(pat::EcalIso);
  double hcalIso = myElec->userIsolation(pat::HcalIso);
  double sihih = myElec->scSigmaIEtaIEta();
  double dphi = myElec->deltaPhiSuperClusterTrackAtVtx();
  double deta = myElec->deltaEtaSuperClusterTrackAtVtx();
  double HoE = myElec->hadronicOverEm();




  //
  //
  //
  // the inverted selection plots:
  if (CheckCutsInverse(myElec)){
    //std::cout << "-----------------INVERSION-----------passed" << std::endl;
    h_met_inverse->Fill(met);
    h_mt_inverse->Fill(mt);
    if(fabs(scEta)<1.479){
      h_met_inverse_EB->Fill(met);
      h_mt_inverse_EB->Fill(mt);
    }
    if(fabs(scEta)>1.479){
      h_met_inverse_EE->Fill(met);
      h_mt_inverse_EE->Fill(mt);
    }
  }


  //
  // N-1 plots: plot some variable so that all the other cuts are satisfied
  if ( fabs(scEta) < 1.479) { // reminder: the precise fiducial cuts are in
                              // in the filter
    if (CheckCutsNminusOne(myElec, 0)) 
      h_trackIso_eb_NmOne->Fill(trackIso);
  }
  else {
    if (CheckCutsNminusOne(myElec, 0)) 
      h_trackIso_ee_NmOne->Fill(trackIso);
  }
  // from here on you have only events that pass the full selection
  if (not CheckCuts(myElec)) return;

  h_met->Fill(met);
  h_mt->Fill(mt);
  if(fabs(scEta)<1.479){
    h_met_EB->Fill(met);
    h_mt_EB->Fill(mt);

    h_EB_trkiso->Fill( trackIso );
    h_EB_ecaliso->Fill( ecalIso );
    h_EB_hcaliso->Fill( hcalIso );
    h_EB_sIetaIeta->Fill( sihih );
    h_EB_dphi->Fill( dphi );
    h_EB_deta->Fill( deta );
    h_EB_HoE->Fill( HoE );

  }
  if(fabs(scEta)>1.479){
    h_met_EE->Fill(met);
    h_mt_EE->Fill(mt);

    h_EE_trkiso->Fill( trackIso );
    h_EE_ecaliso->Fill( ecalIso );
    h_EE_hcaliso->Fill( hcalIso );
    h_EE_sIetaIeta->Fill( sihih );
    h_EE_dphi->Fill( dphi );
    h_EE_deta->Fill( deta );
    h_EE_HoE->Fill( HoE );

  }
  // uncomment for debugging purposes
  //std::cout << "tracIso: " <<  trackIso << ", " << myElec->trackIso() << ", ecaliso: " << ecalIso << ", " << myElec->ecalIso() << ", hcaliso: " << hcalIso << ", "  << myElec->hcalIso() << std::endl;

  h_scEt->Fill(scEt);
  h_scEta->Fill(scEta);
  h_scPhi->Fill(scPhi);

}
void WenuPlots::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 342 of file WenuPlots.cc.

References CutVars_, deta_EB_, deta_EB_inv, deta_EE_, deta_EE_inv, dphi_EB_, dphi_EB_inv, dphi_EE_, dphi_EE_inv, ecalIso_EB_, ecalIso_EB_inv, ecalIso_EE_, ecalIso_EE_inv, h_EB_deta, h_EB_dphi, h_EB_ecaliso, h_EB_hcaliso, h_EB_HoE, h_EB_sIetaIeta, h_EB_trkiso, h_EE_deta, h_EE_dphi, h_EE_ecaliso, h_EE_hcaliso, h_EE_HoE, h_EE_sIetaIeta, h_EE_trkiso, h_met, h_met_EB, h_met_EE, h_met_inverse, h_met_inverse_EB, h_met_inverse_EE, h_mt, h_mt_EB, h_mt_EE, h_mt_inverse, h_mt_inverse_EB, h_mt_inverse_EE, h_scEt, h_scEta, h_scPhi, h_trackIso_eb_NmOne, h_trackIso_ee_NmOne, hcalIso_EB_, hcalIso_EB_inv, hcalIso_EE_, hcalIso_EE_inv, hoe_EB_, hoe_EB_inv, hoe_EE_, hoe_EE_inv, InvVars_, nBarrelVars_, sihih_EB_, sihih_EB_inv, sihih_EE_, sihih_EE_inv, trackIso_EB_, trackIso_EB_inv, trackIso_EE_, trackIso_EE_inv, userIso_EB_, userIso_EB_inv, userIso_EE_, and userIso_EE_inv.

{
  //std::cout << "In beginJob()" << std::endl;
  //  Double_t Pi = TMath::Pi();
  //  TString histo_file = outputFile_;
  //  histofile = new TFile( histo_file,"RECREATE");

  h_met         = new TH1F("h_met",         "h_met",         200, 0, 200);
  h_met_inverse = new TH1F("h_met_inverse", "h_met_inverse", 200, 0, 200);

  h_mt         = new TH1F("h_mt",         "h_mt",         200, 0, 200);
  h_mt_inverse = new TH1F("h_mt_inverse", "h_mt_inverse", 200, 0, 200);


  h_met_EB         = new TH1F("h_met_EB",         "h_met_EB",         200, 0, 200);
  h_met_inverse_EB = new TH1F("h_met_inverse_EB", "h_met_inverse_EB", 200, 0, 200);

  h_mt_EB         = new TH1F("h_mt_EB",         "h_mt_EB",         200, 0, 200);
  h_mt_inverse_EB = new TH1F("h_mt_inverse_EB", "h_mt_inverse_EB", 200, 0, 200);


  h_met_EE         = new TH1F("h_met_EE",         "h_met_EE",         200, 0, 200);
  h_met_inverse_EE = new TH1F("h_met_inverse_EE", "h_met_inverse_EE", 200, 0, 200);

  h_mt_EE         = new TH1F("h_mt_EE",         "h_mt_EE",         200, 0, 200);
  h_mt_inverse_EE = new TH1F("h_mt_inverse_EE", "h_mt_inverse_EE", 200, 0, 200);


  h_scEt  = new TH1F("h_scEt",  "h_scEt",  200,  0, 100);
  h_scEta = new TH1F("h_scEta", "h_scEta", 200, -3, 3);
  h_scPhi = new TH1F("h_scPhi", "h_scPhi", 200, -4, 4);


  //VALIDATION PLOTS
  //EB
  h_EB_trkiso = new TH1F("h_EB_trkiso","h_EB_trkiso",200 , 0.0, 9.0);
  h_EB_ecaliso = new TH1F("h_EB_ecaliso","h_EB_ecaliso",200, 0.0 , 9.0);
  h_EB_hcaliso = new TH1F("h_EB_hcaliso","h_EB_hcaliso",200, 0.0 , 9.0);
  h_EB_sIetaIeta = new TH1F("h_EB_sIetaIeta","h_EB_sIetaIeta",200, 0.0 , 0.02 );
  h_EB_dphi = new TH1F("h_EB_dphi","h_EB_dphi",200, -0.03 , 0.03 );
  h_EB_deta = new TH1F("h_EB_deta","h_EB_deta",200, -0.01 , 0.01) ;
  h_EB_HoE = new TH1F("h_EB_HoE","h_EB_HoE",200, 0.0 , 0.2 );
  //EE
  h_EE_trkiso = new TH1F("h_EE_trkiso","h_EE_trkiso",200 , 0.0, 9.0);
  h_EE_ecaliso = new TH1F("h_EE_ecaliso","h_EE_ecaliso",200, 0.0 , 9.0);
  h_EE_hcaliso = new TH1F("h_EE_hcaliso","h_EE_hcaliso",200, 0.0 , 9.0);
  h_EE_sIetaIeta = new TH1F("h_EE_sIetaIeta","h_EE_sIetaIeta",200, 0.0 , 0.1 );
  h_EE_dphi = new TH1F("h_EE_dphi","h_EE_dphi",200, -0.03 , 0.03 );
  h_EE_deta = new TH1F("h_EE_deta","h_EE_deta",200, -0.01 , 0.01) ;
  h_EE_HoE = new TH1F("h_EE_HoE","h_EE_HoE",200, 0.0 , 0.2 );


  //
  //
  h_trackIso_eb_NmOne = 
    new TH1F("h_trackIso_eb_NmOne","trackIso EB N-1 plot",80,0,8);
  h_trackIso_ee_NmOne = 
    new TH1F("h_trackIso_ee_NmOne","trackIso EE N-1 plot",80,0,8);

  
  // if you add some new variable change the nBarrelVars_ accordingly
  nBarrelVars_ = 8;
  //
  // Put EB variables together and EE variables together
  // number of barrel variables = number of endcap variable
  // if you don't want to use some variable put a very high cut
  CutVars_.push_back( trackIso_EB_ );//0
  CutVars_.push_back( ecalIso_EB_ ); //1
  CutVars_.push_back( hcalIso_EB_ ); //2
  CutVars_.push_back( sihih_EB_ );   //3
  CutVars_.push_back( dphi_EB_ );    //4
  CutVars_.push_back( deta_EB_ );    //5
  CutVars_.push_back( hoe_EB_ );     //6
  CutVars_.push_back( userIso_EB_ ); //7
  
  CutVars_.push_back( trackIso_EE_);//0
  CutVars_.push_back( ecalIso_EE_); //1
  CutVars_.push_back( hcalIso_EE_); //2
  CutVars_.push_back( sihih_EE_);   //3
  CutVars_.push_back( dphi_EE_);    //4
  CutVars_.push_back( deta_EE_);    //5
  CutVars_.push_back( hoe_EE_ );    //6 
  CutVars_.push_back( userIso_EE_ );//7 
  //
  InvVars_.push_back( trackIso_EB_inv);//0
  InvVars_.push_back( ecalIso_EB_inv); //1
  InvVars_.push_back( hcalIso_EB_inv); //2
  InvVars_.push_back( sihih_EB_inv);   //3
  InvVars_.push_back( dphi_EB_inv);    //4
  InvVars_.push_back( deta_EB_inv);    //5
  InvVars_.push_back( hoe_EB_inv);     //6
  InvVars_.push_back( userIso_EB_inv); //7
  //
  InvVars_.push_back( trackIso_EE_inv);//0
  InvVars_.push_back( ecalIso_EE_inv); //1
  InvVars_.push_back( hcalIso_EE_inv); //2
  InvVars_.push_back( sihih_EE_inv);   //3
  InvVars_.push_back( dphi_EE_inv);    //4
  InvVars_.push_back( deta_EE_inv);    //5
  InvVars_.push_back( hoe_EE_inv);     //6
  InvVars_.push_back( userIso_EE_inv); //7
  //


}
bool WenuPlots::CheckCut ( const pat::Electron wenu,
int  i 
) [private]

Definition at line 303 of file WenuPlots.cc.

References CutVars_, i, nBarrelVars_, ReturnCandVar(), and pat::Electron::superCluster().

Referenced by CheckCuts(), and CheckCutsNminusOne().

                                                      {
  double fabseta = fabs(ele->superCluster()->eta());
  if ( fabseta<1.479) {
    return fabs(ReturnCandVar(ele, i)) < CutVars_[i];
  }
  return fabs(ReturnCandVar(ele, i)) < CutVars_[i+nBarrelVars_];
}
bool WenuPlots::CheckCutInv ( const pat::Electron wenu,
int  i 
) [private]

Definition at line 311 of file WenuPlots.cc.

References CutVars_, i, InvVars_, nBarrelVars_, ReturnCandVar(), and pat::Electron::superCluster().

Referenced by CheckCutsInverse().

                                                         {
  double fabseta = fabs(ele->superCluster()->eta());
  if ( fabseta<1.479) {
    if (InvVars_[i]) 
    return fabs(ReturnCandVar(ele, i))>CutVars_[i];
    return fabs(ReturnCandVar(ele, i)) < CutVars_[i];
  }
  if (InvVars_[i+nBarrelVars_]) {
    if (InvVars_[i])
      return fabs(ReturnCandVar(ele, i))>CutVars_[i+nBarrelVars_];    
  }
  return fabs(ReturnCandVar(ele, i)) < CutVars_[i+nBarrelVars_];
}
bool WenuPlots::CheckCuts ( const pat::Electron ele) [private]

Definition at line 276 of file WenuPlots.cc.

References CheckCut(), i, and nBarrelVars_.

Referenced by analyze().

{
  for (int i=0; i<nBarrelVars_; ++i) {
    if (not CheckCut(ele, i)) return false;
  }
  return true;
}
bool WenuPlots::CheckCutsInverse ( const pat::Electron ele) [private]

Definition at line 285 of file WenuPlots.cc.

References CheckCutInv(), i, and nBarrelVars_.

Referenced by analyze().

{
  for (int i=0; i<nBarrelVars_; ++i){
    if ( CheckCutInv(ele, i) == false) return false;
  }
  return true;

}
bool WenuPlots::CheckCutsNminusOne ( const pat::Electron ele,
int  jj 
) [private]

Definition at line 294 of file WenuPlots.cc.

References CheckCut(), i, and nBarrelVars_.

Referenced by analyze().

{
  for (int i=0; i<nBarrelVars_; ++i){
    if (i==jj) continue;
    if ( CheckCut(ele, i) == false) return false;
  }
  return true;
}
void WenuPlots::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 450 of file WenuPlots.cc.

References h_EB_deta, h_EB_dphi, h_EB_ecaliso, h_EB_hcaliso, h_EB_HoE, h_EB_sIetaIeta, h_EB_trkiso, h_EE_deta, h_EE_dphi, h_EE_ecaliso, h_EE_hcaliso, h_EE_HoE, h_EE_sIetaIeta, h_EE_trkiso, h_met, h_met_EB, h_met_EE, h_met_inverse, h_met_inverse_EB, h_met_inverse_EE, h_mt, h_mt_EB, h_mt_EE, h_mt_inverse, h_mt_inverse_EB, h_mt_inverse_EE, h_scEt, h_scEta, h_scPhi, h_trackIso_eb_NmOne, h_trackIso_ee_NmOne, runonSM::newfile, and outputFile_.

                  {
  TFile * newfile = new TFile(TString(outputFile_),"RECREATE");
  h_met->Write();
  h_met_inverse->Write();
  h_mt->Write();
  h_mt_inverse->Write();

  h_met_EB->Write();
  h_met_inverse_EB->Write();
  h_mt_EB->Write();
  h_mt_inverse_EB->Write();

  h_met_EE->Write();
  h_met_inverse_EE->Write();
  h_mt_EE->Write();
  h_mt_inverse_EE->Write();

  h_scEt->Write();
  h_scEta->Write();
  h_scPhi->Write();

  h_EB_trkiso->Write();
  h_EB_ecaliso->Write();
  h_EB_hcaliso->Write();
  h_EB_sIetaIeta->Write();
  h_EB_dphi->Write();
  h_EB_deta->Write();
  h_EB_HoE->Write();

  h_EE_trkiso->Write();
  h_EE_ecaliso->Write();
  h_EE_hcaliso->Write();
  h_EE_sIetaIeta->Write();
  h_EE_dphi->Write();
  h_EE_deta->Write();
  h_EE_HoE->Write();

  //
  h_trackIso_eb_NmOne->Write();
  h_trackIso_ee_NmOne->Write();
  //
  newfile->Close();

}
double WenuPlots::ReturnCandVar ( const pat::Electron ele,
int  i 
) [private]

Definition at line 325 of file WenuPlots.cc.

References gather_cfg::cout, reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), pat::EcalIso, reco::GsfElectron::hadronicOverEm(), pat::HcalIso, reco::GsfElectron::scSigmaIEtaIEta(), pat::TrackIso, pat::User1Iso, and pat::Lepton< LeptonType >::userIsolation().

Referenced by CheckCut(), and CheckCutInv().

                                                             {
  if (i==0) return ele->userIsolation(pat::TrackIso);
  else if (i==1) return ele->userIsolation(pat::EcalIso);
  else if (i==2) return ele->userIsolation(pat::HcalIso);
  else if (i==3) return ele->scSigmaIEtaIEta();
  else if (i==4) return ele->deltaPhiSuperClusterTrackAtVtx();
  else if (i==5) return ele->deltaEtaSuperClusterTrackAtVtx();
  else if (i==6) return ele->hadronicOverEm();
  else if (i==7) return ele->userIsolation(pat::User1Iso);
  std::cout << "Error in WenuPlots::ReturnCandVar" << std::endl;
  return -1.;

}

Member Data Documentation

std::vector<Double_t> WenuPlots::CutVars_ [private]

Definition at line 138 of file WenuPlots.h.

Referenced by beginJob(), CheckCut(), and CheckCutInv().

Double_t WenuPlots::deta_EB_ [private]

Definition at line 104 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::deta_EB_inv [private]

Definition at line 124 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::deta_EE_ [private]

Definition at line 110 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::deta_EE_inv [private]

Definition at line 130 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::dphi_EB_ [private]

Definition at line 105 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::dphi_EB_inv [private]

Definition at line 125 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::dphi_EE_ [private]

Definition at line 111 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::dphi_EE_inv [private]

Definition at line 131 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::ecalIso_EB_ [private]

Definition at line 96 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::ecalIso_EB_inv [private]

Definition at line 116 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::ecalIso_EE_ [private]

Definition at line 100 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::ecalIso_EE_inv [private]

Definition at line 120 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

TH1F* WenuPlots::h_EB_deta [private]

Definition at line 78 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EB_dphi [private]

Definition at line 77 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EB_ecaliso [private]

Definition at line 74 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EB_hcaliso [private]

Definition at line 75 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EB_HoE [private]

Definition at line 79 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EB_sIetaIeta [private]

Definition at line 76 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EB_trkiso [private]

Definition at line 73 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_deta [private]

Definition at line 86 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_dphi [private]

Definition at line 85 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_ecaliso [private]

Definition at line 82 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_hcaliso [private]

Definition at line 83 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_HoE [private]

Definition at line 87 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_sIetaIeta [private]

Definition at line 84 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_EE_trkiso [private]

Definition at line 81 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_met [private]

Definition at line 53 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_met_EB [private]

Definition at line 58 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_met_EE [private]

Definition at line 63 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_met_inverse [private]

Definition at line 54 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_met_inverse_EB [private]

Definition at line 59 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_met_inverse_EE [private]

Definition at line 64 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_mt [private]

Definition at line 55 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_mt_EB [private]

Definition at line 60 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_mt_EE [private]

Definition at line 65 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_mt_inverse [private]

Definition at line 56 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_mt_inverse_EB [private]

Definition at line 61 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_mt_inverse_EE [private]

Definition at line 66 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_scEt [private]

Definition at line 69 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_scEta [private]

Definition at line 70 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* WenuPlots::h_scPhi [private]

Definition at line 71 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

Definition at line 90 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

Definition at line 91 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and endJob().

Double_t WenuPlots::hcalIso_EB_ [private]

Definition at line 97 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::hcalIso_EB_inv [private]

Definition at line 117 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::hcalIso_EE_ [private]

Definition at line 101 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::hcalIso_EE_inv [private]

Definition at line 121 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

TFile* WenuPlots::histofile [private]

Definition at line 49 of file WenuPlots.h.

Double_t WenuPlots::hoe_EB_ [private]

Definition at line 106 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::hoe_EB_inv [private]

Definition at line 126 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::hoe_EE_ [private]

Definition at line 112 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::hoe_EE_inv [private]

Definition at line 132 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

std::vector<Double_t> WenuPlots::InvVars_ [private]

Definition at line 139 of file WenuPlots.h.

Referenced by beginJob(), and CheckCutInv().

int WenuPlots::nBarrelVars_ [private]
std::string WenuPlots::outputFile_ [private]

Definition at line 47 of file WenuPlots.h.

Referenced by endJob(), and WenuPlots().

Double_t WenuPlots::sihih_EB_ [private]

Definition at line 103 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::sihih_EB_inv [private]

Definition at line 123 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::sihih_EE_ [private]

Definition at line 109 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::sihih_EE_inv [private]

Definition at line 129 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::trackIso_EB_ [private]

Definition at line 95 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Definition at line 115 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::trackIso_EE_ [private]

Definition at line 99 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Definition at line 119 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::userIso_EB_ [private]

Definition at line 107 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::userIso_EB_inv [private]

Definition at line 127 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::userIso_EE_ [private]

Definition at line 113 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

bool WenuPlots::userIso_EE_inv [private]

Definition at line 133 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Definition at line 48 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().