CMS 3D CMS Logo

pat::HistoElectron Class Reference

#include <PhysicsTools/StarterKit/interface/HistoElectron.h>

Inheritance diagram for pat::HistoElectron:

pat::HistoGroup< PHYS_OBJECT >

List of all members.

Public Member Functions

void clearVec ()
 clearVec: resets PhysVarHisto ntuple cache
virtual void fill (const reco::ShallowClonePtrCandidate &electron, uint iPart=1, double weight=1.0)
virtual void fill (const reco::ShallowClonePtrCandidate *electron, uint iPart=1, double weight=1.0)
 Fill all histograms for one Physics Object.
virtual void fill (const Electron &electron, uint iPart=1, double weight=1.0)
virtual void fill (const Electron *electron, uint iPart=1, double weight=1.0)
virtual void fillCollection (const std::vector< Electron > &coll, double weight=1.0)
 HistoElectron (std::string dir="electron", std::string group="Electron", std::string pre="e", double pt1=0, double pt2=200, double m1=0, double m2=200, TFileDirectory *parentDir=0)
virtual ~HistoElectron ()

Protected Attributes

PhysVarHistoh_caloIso_
PhysVarHistoh_ele_charge_
PhysVarHistoh_ele_chi2_
PhysVarHistoh_ele_classes_
PhysVarHistoh_ele_dEtaSc_propVtx_
PhysVarHistoh_ele_dPhiCl_propOut_
PhysVarHistoh_ele_dPhiSc_propVtx_
PhysVarHistoh_ele_EoP_
PhysVarHistoh_ele_EoPout_
PhysVarHistoh_ele_eta_
PhysVarHistoh_ele_eta_golden_
PhysVarHistoh_ele_eta_goldenFrac_
PhysVarHistoh_ele_eta_shower_
PhysVarHistoh_ele_eta_showerFrac_
PhysVarHistoh_ele_etaEff_
PhysVarHistoh_ele_foundHits_
PhysVarHistoh_ele_HoE_
PhysVarHistoh_ele_matchingObjectEta_
PhysVarHistoh_ele_matchingObjectEta_matched_
PhysVarHistoh_ele_matchingObjectPhi_
PhysVarHistoh_ele_matchingObjectPhi_matched_
PhysVarHistoh_ele_matchingObjectPt_
PhysVarHistoh_ele_matchingObjectPt_matched_
PhysVarHistoh_ele_matchingObjectZ_
PhysVarHistoh_ele_matchingObjectZ_matched_
PhysVarHistoh_ele_phiEff_
PhysVarHistoh_ele_PinMnPout_mode_
PhysVarHistoh_ele_ptEff_
PhysVarHistoh_ele_vertexEta_
PhysVarHistoh_ele_vertexP_
PhysVarHistoh_ele_vertexPhi_
PhysVarHistoh_ele_vertexPt_
PhysVarHistoh_ele_vertexX_
PhysVarHistoh_ele_vertexY_
PhysVarHistoh_ele_vertexZ_
PhysVarHistoh_ele_zEff_
PhysVarHistoh_leptonID_
PhysVarHistoh_trackIso_


Detailed Description

Definition at line 50 of file HistoElectron.h.


Constructor & Destructor Documentation

HistoElectron::HistoElectron ( std::string  dir = "electron",
std::string  group = "Electron",
std::string  pre = "e",
double  pt1 = 0,
double  pt2 = 200,
double  m1 = 0,
double  m2 = 200,
TFileDirectory parentDir = 0 
)

Definition at line 9 of file HistoElectron.cc.

References pat::HistoGroup< PHYS_OBJECT >::addHisto(), pat::HistoGroup< PHYS_OBJECT >::currDir_, h_caloIso_, h_ele_charge_, h_ele_chi2_, h_ele_classes_, h_ele_dEtaSc_propVtx_, h_ele_dPhiCl_propOut_, h_ele_dPhiSc_propVtx_, h_ele_EoP_, h_ele_EoPout_, h_ele_eta_, h_ele_eta_golden_, h_ele_eta_goldenFrac_, h_ele_eta_shower_, h_ele_eta_showerFrac_, h_ele_etaEff_, h_ele_foundHits_, h_ele_HoE_, h_ele_matchingObjectEta_, h_ele_matchingObjectEta_matched_, h_ele_matchingObjectPhi_, h_ele_matchingObjectPhi_matched_, h_ele_matchingObjectPt_, h_ele_matchingObjectPt_matched_, h_ele_matchingObjectZ_, h_ele_matchingObjectZ_matched_, h_ele_phiEff_, h_ele_PinMnPout_mode_, h_ele_ptEff_, h_ele_vertexEta_, h_ele_vertexP_, h_ele_vertexPhi_, h_ele_vertexPt_, h_ele_vertexX_, h_ele_vertexY_, h_ele_vertexZ_, h_ele_zEff_, h_leptonID_, h_trackIso_, and type_.

00011                                                            :
00012   HistoGroup<Electron>( dir, group, pre, pt1, pt2, m1, m2, parentDir)
00013 {
00014   // book relevant electron histograms
00015 
00016   addHisto( h_trackIso_      =
00017             new PhysVarHisto( pre + "TrackIso",       "Electron Track Isolation"    , 100, 0, 10, currDir_, "", "vD")
00018             );
00019   addHisto( h_caloIso_       =
00020             new PhysVarHisto( pre + "CaloIso",        "Electron Calo Isolation"     , 100, -20, 20, currDir_, "", "vD")
00021             );
00022   addHisto( h_leptonID_      =
00023             new PhysVarHisto( pre + "LeptonID",       "Electron Lepton ID"          , 100, 0, 1, currDir_, "", "vD")
00024             );
00025 
00026   std::string type_="SC";
00027   
00028   std::string htitle, hlabel;
00029   hlabel="h"+type_+"eta"; htitle=type_+" #eta";
00030   addHisto( h_ele_matchingObjectEta_      =
00031             new PhysVarHisto( pre + hlabel.c_str() , htitle.c_str()                , 100, 0, 1, currDir_, "", "vD")
00032             );
00033 
00034   hlabel="h"+type_+"Pt"; htitle=type_+" pt";
00035   addHisto( h_ele_matchingObjectPt_      =
00036             new PhysVarHisto( pre + hlabel.c_str() , htitle.c_str()                , 100, 0, 1, currDir_, "", "vD")
00037             );
00038 
00039   hlabel="h"+type_+"phi"; htitle=type_+" phi";
00040   addHisto( h_ele_matchingObjectPhi_      =
00041             new PhysVarHisto( pre + hlabel.c_str() , htitle.c_str()                , 100, -0, 1, currDir_, "", "vD")
00042             );
00043 
00044   hlabel="h"+type_+"z"; htitle=type_+" z";
00045   addHisto( h_ele_matchingObjectZ_      =
00046             new PhysVarHisto( pre + hlabel.c_str() , htitle.c_str()                , 100, 0, 1, currDir_, "", "vD")
00047             );
00048 
00049 
00050   addHisto( h_ele_matchingObjectEta_matched_      =
00051             new PhysVarHisto( pre + "matchingObjectEtamatched",       "matching SC #eta", 100, 0, 1, currDir_, "", "vD")
00052             );
00053 
00054   addHisto( h_ele_matchingObjectPt_matched_      =
00055             new PhysVarHisto( pre + "matchingObjectPtmatched",       "matching SC p_{T}"          , 100, 0, 1, currDir_, "", "vD")
00056             );
00057 
00058   addHisto( h_ele_matchingObjectPhi_matched_      =
00059             new PhysVarHisto( pre + "matchingObjectPhimatched",       "matching SC phi"          , 100, 0, 1, currDir_, "", "vD")
00060             );
00061 
00062   addHisto( h_ele_matchingObjectZ_matched_      =
00063             new PhysVarHisto( pre + "matchingObjectZmatched",       "matching SC z"          , 100, 0, 1, currDir_, "", "vD")
00064             );
00065 
00066 //electron basic quantities
00067 
00068   addHisto( h_ele_vertexP_      =
00069             new PhysVarHisto( pre + "vertexP",       "ele p at vertex"          , 100, 0., 120., currDir_, "", "vD")
00070             );
00071 
00072   addHisto( h_ele_vertexPt_      =
00073             new PhysVarHisto( pre + "vertexPt",       "ele p_{T} at vertex"          , 100, 0., 40., currDir_, "", "vD")
00074             );
00075 
00076   addHisto( h_ele_vertexEta_      =
00077             new PhysVarHisto( pre + "vertexEta",       "ele #eta at vertex"          , 100, -3.5, 3.5, currDir_, "", "vD")
00078             );
00079 
00080   addHisto( h_ele_vertexPhi_      =
00081             new PhysVarHisto( pre + "vertexPhi",       "ele #phi at vertex"          , 100, -3.14, 3.14, currDir_, "", "vD")
00082             );
00083 
00084   addHisto( h_ele_vertexX_      =
00085             new PhysVarHisto( pre + "vertexX",       "ele x at vertex"          , 100,- 0.1,0.1, currDir_, "", "vD")
00086             );
00087   addHisto( h_ele_vertexY_      =
00088             new PhysVarHisto( pre + "vertexY",       "ele y at vertex"          , 100, -0.1, 0.1, currDir_, "", "vD")
00089             );
00090   addHisto( h_ele_vertexZ_      =
00091             new PhysVarHisto( pre + "vertexZ",       "ele z at vertex"          , 100, -25., 25., currDir_, "", "vD")
00092             );
00093   addHisto( h_ele_charge_      =
00094             new PhysVarHisto( pre + "charge",       "ele charge"          , 5, -2., 2., currDir_, "", "vD")
00095             );
00096 
00097 
00098 //electron matching and ID
00099 
00100   addHisto( h_ele_EoP_      =
00101             new PhysVarHisto( pre + "EoP",       "ele E/P_{vertex}"          , 100, 0, 10., currDir_, "", "vD")
00102             );
00103 
00104   addHisto( h_ele_EoPout_      =
00105             new PhysVarHisto( pre + "EoPout",       "ele E/P_{out}"          , 100, 0, 15., currDir_, "", "vD")
00106             );
00107   addHisto( h_ele_dEtaSc_propVtx_      =
00108             new PhysVarHisto( pre + "dEtaScpropVtx",       "ele #eta_{sc} - #eta_{tr} - prop from vertex"          , 100, -0.2, 0.2, currDir_, "", "vD")
00109             );
00110   addHisto( h_ele_dPhiSc_propVtx_      =
00111             new PhysVarHisto( pre + "dPhiScpropVtx",       "ele #phi_{sc} - #phi_{tr} - prop from vertex"          , 100, -0.2, 0.2, currDir_, "", "vD")
00112             );
00113   addHisto( h_ele_dPhiCl_propOut_      =
00114             new PhysVarHisto( pre + "dPhiClpropOut",       "ele #phi_{cl} - #phi_{tr} - prop from outermost"          , 100, -0.3, 0.3, currDir_, "", "vD")
00115             );
00116   addHisto( h_ele_HoE_      =
00117             new PhysVarHisto( pre + "HoE",       "ele H/E"          , 55, -0.05, 0.5, currDir_, "", "vD")
00118             );
00119   addHisto( h_ele_PinMnPout_mode_      =
00120             new PhysVarHisto( pre + "PinMnPoutmode",       "ele track inner p - outer p, mode"          , 100, -20., 100., currDir_, "", "vD")
00121             );
00122   addHisto( h_ele_classes_      =
00123             new PhysVarHisto( pre + "classes",       "ele electron classes"          , 150, 0., 150., currDir_, "", "vD")
00124             );
00125   addHisto( h_ele_eta_golden_      =
00126             new PhysVarHisto( pre + "etagolden",       "ele electron eta golden"          , 100, 0.0, 3.5, currDir_, "", "vD")
00127             );
00128   addHisto( h_ele_eta_shower_      =
00129             new PhysVarHisto( pre + "etashower",       "ele electron eta showering"          , 100, 0.0, 3.5, currDir_, "", "vD")
00130             );
00131   addHisto( h_ele_eta_goldenFrac_      =
00132             new PhysVarHisto( pre + "etagoldenFrac",       "ele electron eta golden"          , 100, 0., 3.5, currDir_, "", "vD")
00133             );
00134   addHisto( h_ele_eta_showerFrac_      =
00135             new PhysVarHisto( pre + "etashowerFrac",       "ele electron eta showering"          , 100, 0., 3.5, currDir_, "", "vD")
00136             );
00137 
00138   addHisto( h_ele_eta_      =
00139             new PhysVarHisto( pre + "eta",       "ele electron eta"          , 100, 0., 3.5, currDir_, "", "vD")
00140             );
00141 
00142 //electron track
00143   addHisto( h_ele_foundHits_      =
00144             new PhysVarHisto( pre + "foundHits",       "ele track # found hits"          , 100, 0, 50, currDir_, "", "vD")
00145             );
00146   addHisto( h_ele_chi2_      =
00147             new PhysVarHisto( pre + "chi2",       "ele track #chi^{2}"          , 100, 0., 15., currDir_, "", "vD")
00148             );
00149 
00150 // efficiencies
00151   addHisto( h_ele_etaEff_      =
00152             new PhysVarHisto( pre + "etaEff",       "matching SC #eta"          , 100, -3.5, 3.5, currDir_, "", "vD")
00153             );
00154   addHisto( h_ele_ptEff_      =
00155             new PhysVarHisto( pre + "ptEff",       "matching SC p_{T}"          , 100, 5., 20., currDir_, "", "vD")
00156             );
00157   addHisto( h_ele_phiEff_      =
00158             new PhysVarHisto( pre + "phiEff",       "matching SC phi"          , 100, 0., 3.14, currDir_, "", "vD")
00159             );
00160   addHisto( h_ele_zEff_      =
00161             new PhysVarHisto( pre + "zEff",       "matching SC z"          , 100, -25., 25., currDir_, "", "vD")
00162             );
00163 
00164 
00165 }

HistoElectron::~HistoElectron (  )  [virtual]

Definition at line 167 of file HistoElectron.cc.

00168 {
00169 }


Member Function Documentation

void HistoElectron::clearVec (  )  [virtual]

clearVec: resets PhysVarHisto ntuple cache

Reimplemented from pat::HistoGroup< PHYS_OBJECT >.

Definition at line 350 of file HistoElectron.cc.

References pat::PhysVarHisto::clearVec(), h_caloIso_, h_ele_charge_, h_ele_chi2_, h_ele_classes_, h_ele_dEtaSc_propVtx_, h_ele_dPhiCl_propOut_, h_ele_dPhiSc_propVtx_, h_ele_EoP_, h_ele_EoPout_, h_ele_eta_, h_ele_eta_golden_, h_ele_eta_goldenFrac_, h_ele_eta_shower_, h_ele_eta_showerFrac_, h_ele_etaEff_, h_ele_foundHits_, h_ele_HoE_, h_ele_matchingObjectEta_, h_ele_matchingObjectEta_matched_, h_ele_matchingObjectPhi_, h_ele_matchingObjectPhi_matched_, h_ele_matchingObjectPt_, h_ele_matchingObjectPt_matched_, h_ele_matchingObjectZ_, h_ele_matchingObjectZ_matched_, h_ele_phiEff_, h_ele_PinMnPout_mode_, h_ele_ptEff_, h_ele_vertexEta_, h_ele_vertexP_, h_ele_vertexPhi_, h_ele_vertexPt_, h_ele_vertexX_, h_ele_vertexY_, h_ele_vertexZ_, h_ele_zEff_, and h_trackIso_.

Referenced by PhysicsHistograms::clearVec().

00351 {
00352   HistoGroup<Electron>::clearVec();
00353 
00354   h_trackIso_->clearVec();
00355   h_caloIso_->clearVec();
00356 //  h_leptonID_->clearVec();
00357 
00358 
00359   h_ele_matchingObjectEta_->clearVec();
00360   h_ele_matchingObjectPt_->clearVec();
00361   h_ele_matchingObjectPhi_->clearVec();
00362   h_ele_matchingObjectZ_->clearVec();
00363 
00364   h_ele_matchingObjectEta_matched_->clearVec();
00365   h_ele_matchingObjectPt_matched_->clearVec();
00366   h_ele_matchingObjectPhi_matched_->clearVec();
00367   h_ele_matchingObjectZ_matched_->clearVec();
00368 
00369 // electron basic quantities
00370 
00371   h_ele_vertexP_->clearVec();
00372   h_ele_vertexPt_->clearVec();
00373   h_ele_vertexEta_->clearVec();
00374   h_ele_vertexPhi_->clearVec();
00375   h_ele_vertexX_->clearVec();
00376   h_ele_vertexY_->clearVec();
00377   h_ele_vertexZ_->clearVec();
00378   h_ele_charge_->clearVec();
00379 
00380 // electron matching and ID
00381 
00382   h_ele_EoP_->clearVec();
00383   h_ele_EoPout_->clearVec();
00384   h_ele_dEtaSc_propVtx_->clearVec();
00385   h_ele_dPhiSc_propVtx_->clearVec();
00386   h_ele_dPhiCl_propOut_->clearVec();
00387   h_ele_HoE_->clearVec();
00388   h_ele_PinMnPout_mode_->clearVec();
00389   h_ele_classes_->clearVec();
00390   h_ele_eta_golden_->clearVec();
00391   h_ele_eta_shower_->clearVec();
00392   h_ele_eta_goldenFrac_->clearVec();
00393   h_ele_eta_showerFrac_->clearVec();
00394 
00395   h_ele_eta_->clearVec();
00396 
00397 // electron track
00398   h_ele_foundHits_->clearVec();
00399   h_ele_chi2_->clearVec();
00400 
00401 // efficiencies
00402   h_ele_etaEff_->clearVec();
00403   h_ele_ptEff_->clearVec();
00404   h_ele_phiEff_->clearVec();
00405   h_ele_zEff_->clearVec();
00406 
00407 }

virtual void pat::HistoElectron::fill ( const reco::ShallowClonePtrCandidate electron,
uint  iPart = 1,
double  weight = 1.0 
) [inline, virtual]

Reimplemented from pat::HistoGroup< PHYS_OBJECT >.

Definition at line 66 of file HistoElectron.h.

References fill(), and weight.

00067     { fill(&electron, iPart,weight); }

void HistoElectron::fill ( const reco::ShallowClonePtrCandidate obj,
uint  imulti = 1,
double  weight = 1.0 
) [virtual]

Fill all histograms for one Physics Object.

Fill the reco::Cand basic histograms: pt, eta, phi.

This is done for shallow clones

Reimplemented from pat::HistoGroup< PHYS_OBJECT >.

Definition at line 249 of file HistoElectron.cc.

References pat::Lepton< LeptonType >::caloIso(), GenMuonPlsPt100GeV_cfg::cout, metsig::electron, lat::endl(), edm::pset::fill(), pat::PhysVarHisto::fill(), pat::Electron::gsfTrack(), h_caloIso_, h_ele_charge_, h_ele_chi2_, h_ele_classes_, h_ele_dEtaSc_propVtx_, h_ele_dPhiCl_propOut_, h_ele_dPhiSc_propVtx_, h_ele_EoP_, h_ele_EoPout_, h_ele_eta_, h_ele_eta_golden_, h_ele_eta_shower_, h_ele_foundHits_, h_ele_HoE_, h_ele_PinMnPout_mode_, h_ele_vertexEta_, h_ele_vertexP_, h_ele_vertexPhi_, h_ele_vertexPt_, h_ele_vertexX_, h_ele_vertexY_, h_ele_vertexZ_, h_trackIso_, and pat::Lepton< LeptonType >::trackIso().

00250 {
00251 
00252   // Get the underlying object that the shallow clone represents
00253   const pat::Electron * electron = dynamic_cast<const pat::Electron*>(pshallow);
00254 
00255   if ( electron == 0 ) {
00256     cout << "Error! Was passed a shallow clone that is not at heart a electron" << endl;
00257     return;
00258   }
00259 
00260 
00261   // First fill common 4-vector histograms
00262   HistoGroup<Electron>::fill( pshallow, iE, weight );
00263 
00264   // fill relevant electron histograms
00265   h_trackIso_       ->fill( electron->trackIso(), iE, weight );
00266   h_caloIso_        ->fill( electron->caloIso(), iE, weight );
00267 //  h_leptonID_       ->fill( electron->leptonID(), iE, weight );
00268 
00269 /*
00270           h_ele_matchingObjectEta_       ->fill( moIter->eta(), iE, weight );
00271           h_ele_matchingObjectPt_       ->fill( moIter->energy()/cosh(moIter->eta()), iE, weight );
00272           h_ele_matchingObjectPhi_       ->fill( moIter->phi(), iE, weight );
00273           h_ele_matchingObjectZ_       ->fill( moIter->z(), iE, weight );
00274 
00275       // find best matched electron
00276 //       reco::GsfElectron bestGsfElectron;
00277 
00278           h_ele_matchingObjectEta_matched_       ->fill( moIter->eta(), iE, weight );
00279           h_ele_matchingObjectPt_matched_       ->fill( moIter->energy()/cosh(moIter->eta()), iE, weight );
00280           h_ele_matchingObjectPhi_matched_       ->fill( moIter->phi(), iE, weight );
00281           h_ele_matchingObjectZ_matched_       ->fill( moIter->z(), iE, weight );
00282 */
00283         //electron basic quantities
00284 
00285          // electron related distributions
00286           h_ele_vertexP_       ->fill( electron->p(), iE, weight );
00287           h_ele_vertexPt_       ->fill( electron->pt(), iE, weight );
00288           h_ele_vertexEta_       ->fill( electron->eta(), iE, weight );
00289 
00290 
00291           h_ele_vertexPhi_       ->fill( electron->phi(), iE, weight );
00292           h_ele_vertexX_       ->fill( electron->vertex().x(), iE, weight );
00293           h_ele_vertexY_       ->fill( electron->vertex().y(), iE, weight );
00294           h_ele_vertexZ_       ->fill( electron->vertex().z(), iE, weight );
00295           h_ele_charge_       ->fill(  electron->charge(), iE, weight );
00296 
00297         //electron matching and ID
00298          // match distributions 
00299           h_ele_EoP_       ->fill(  electron->eSuperClusterOverP(), iE, weight );
00300           h_ele_EoPout_       ->fill( electron->eSeedClusterOverPout(), iE, weight );
00301           h_ele_dEtaSc_propVtx_       ->fill( electron->deltaEtaSuperClusterTrackAtVtx(), iE, weight );
00302           h_ele_dPhiSc_propVtx_       ->fill( electron->deltaPhiSuperClusterTrackAtVtx(), iE, weight );
00303           h_ele_dPhiCl_propOut_       ->fill( electron->deltaPhiSeedClusterTrackAtCalo(), iE, weight );
00304           h_ele_HoE_       ->fill( electron->hadronicOverEm(), iE, weight );
00305 
00306         // from electron interface, hence using mode
00307           h_ele_PinMnPout_mode_       ->fill( electron->trackMomentumAtVtx().R() - electron->trackMomentumOut().R(), iE, weight );
00308 
00309         //classes
00310          int eleClass = electron->classification();
00311           h_ele_classes_       ->fill( eleClass, iE, weight );
00312 
00313          eleClass = eleClass%100; // get rid of barrel/endcap distinction
00314 
00315         if (eleClass == 0) {
00316           h_ele_eta_golden_       ->fill( fabs(electron->eta()), iE, weight );
00317         }
00318          if (eleClass == 30 || eleClass == 31 || eleClass == 32  || eleClass == 33 || eleClass == 34 ) {
00319           h_ele_eta_shower_       ->fill( fabs(electron->eta()), iE, weight );
00320         }
00321 
00322           h_ele_eta_       ->fill( fabs(electron->eta()), iE, weight );
00323 
00324         // electron track
00325          // track related distributions
00326 
00327           h_ele_foundHits_       ->fill( electron->gsfTrack()->numberOfValidHits(), iE, weight );
00328           h_ele_chi2_       ->fill( electron->gsfTrack()->normalizedChi2(), iE, weight );
00329 
00330 //     } //loop over matching object   
00331 
00332 }

virtual void pat::HistoElectron::fill ( const Electron electron,
uint  iPart = 1,
double  weight = 1.0 
) [inline, virtual]

Definition at line 61 of file HistoElectron.h.

References fill(), and weight.

00061 { fill(&electron, iPart,weight); }

void HistoElectron::fill ( const Electron electron,
uint  iPart = 1,
double  weight = 1.0 
) [virtual]

Definition at line 172 of file HistoElectron.cc.

References pat::Lepton< LeptonType >::caloIso(), edm::pset::fill(), pat::PhysVarHisto::fill(), pat::Electron::gsfTrack(), h_caloIso_, h_ele_charge_, h_ele_chi2_, h_ele_classes_, h_ele_dEtaSc_propVtx_, h_ele_dPhiCl_propOut_, h_ele_dPhiSc_propVtx_, h_ele_EoP_, h_ele_EoPout_, h_ele_eta_, h_ele_eta_golden_, h_ele_eta_shower_, h_ele_foundHits_, h_ele_HoE_, h_ele_PinMnPout_mode_, h_ele_vertexEta_, h_ele_vertexP_, h_ele_vertexPhi_, h_ele_vertexPt_, h_ele_vertexX_, h_ele_vertexY_, h_ele_vertexZ_, h_trackIso_, and pat::Lepton< LeptonType >::trackIso().

Referenced by fill(), and fillCollection().

00173 {
00174 
00175   // First fill common 4-vector histograms
00176   HistoGroup<Electron>::fill( electron, iE , weight);
00177 
00178   // fill relevant electron histograms
00179   h_trackIso_       ->fill( electron->trackIso(), iE, weight );
00180   h_caloIso_        ->fill( electron->caloIso(), iE, weight );
00181 //  h_leptonID_       ->fill( electron->leptonID(), iE, weight );
00182 
00183 /*
00184           h_ele_matchingObjectEta_       ->fill( moIter->eta(), iE, weight );
00185           h_ele_matchingObjectPt_       ->fill( moIter->energy()/cosh(moIter->eta()), iE, weight );
00186           h_ele_matchingObjectPhi_       ->fill( moIter->phi(), iE, weight );
00187           h_ele_matchingObjectZ_       ->fill( moIter->z(), iE, weight );
00188 
00189       // find best matched electron
00190 //       reco::GsfElectron bestGsfElectron;
00191 
00192           h_ele_matchingObjectEta_matched_       ->fill( moIter->eta(), iE, weight );
00193           h_ele_matchingObjectPt_matched_       ->fill( moIter->energy()/cosh(moIter->eta()), iE, weight );
00194           h_ele_matchingObjectPhi_matched_       ->fill( moIter->phi(), iE, weight );
00195           h_ele_matchingObjectZ_matched_       ->fill( moIter->z(), iE, weight );
00196 */
00197         //electron basic quantities
00198 
00199          // electron related distributions
00200           h_ele_vertexP_       ->fill( electron->p(), iE, weight );
00201           h_ele_vertexPt_       ->fill( electron->pt(), iE, weight );
00202           h_ele_vertexEta_       ->fill( electron->eta(), iE, weight );
00203 
00204 
00205           h_ele_vertexPhi_       ->fill( electron->phi(), iE, weight );
00206           h_ele_vertexX_       ->fill( electron->vertex().x(), iE, weight );
00207           h_ele_vertexY_       ->fill( electron->vertex().y(), iE, weight );
00208           h_ele_vertexZ_       ->fill( electron->vertex().z(), iE, weight );
00209           h_ele_charge_       ->fill(  electron->charge(), iE, weight );
00210 
00211         //electron matching and ID
00212          // match distributions 
00213           h_ele_EoP_       ->fill(  electron->eSuperClusterOverP(), iE, weight );
00214           h_ele_EoPout_       ->fill( electron->eSeedClusterOverPout(), iE, weight );
00215           h_ele_dEtaSc_propVtx_       ->fill( electron->deltaEtaSuperClusterTrackAtVtx(), iE, weight );
00216           h_ele_dPhiSc_propVtx_       ->fill( electron->deltaPhiSuperClusterTrackAtVtx(), iE, weight );
00217           h_ele_dPhiCl_propOut_       ->fill( electron->deltaPhiSeedClusterTrackAtCalo(), iE, weight );
00218           h_ele_HoE_       ->fill( electron->hadronicOverEm(), iE, weight );
00219 
00220         // from electron interface, hence using mode
00221           h_ele_PinMnPout_mode_       ->fill( electron->trackMomentumAtVtx().R() - electron->trackMomentumOut().R(), iE, weight );
00222 
00223         //classes
00224          int eleClass = electron->classification();
00225           h_ele_classes_       ->fill( eleClass, iE, weight );
00226 
00227          eleClass = eleClass%100; // get rid of barrel/endcap distinction
00228 
00229         if (eleClass == 0) {
00230           h_ele_eta_golden_       ->fill( fabs(electron->eta()), iE, weight );
00231         }
00232          if (eleClass == 30 || eleClass == 31 || eleClass == 32  || eleClass == 33 || eleClass == 34 ) {
00233           h_ele_eta_shower_       ->fill( fabs(electron->eta()), iE, weight );
00234         }
00235 
00236           h_ele_eta_       ->fill( fabs(electron->eta()), iE, weight );
00237 
00238         // electron track
00239          // track related distributions
00240 
00241           h_ele_foundHits_       ->fill( electron->gsfTrack()->numberOfValidHits(), iE, weight );
00242           h_ele_chi2_       ->fill( electron->gsfTrack()->normalizedChi2(), iE, weight );
00243 
00244 //    }//loop over matching object
00245 
00246 }

void HistoElectron::fillCollection ( const std::vector< Electron > &  coll,
double  weight = 1.0 
) [virtual]

Save the size of the collection.

Fortran-style indexing

&*iobj dereferences to the pointer to a PHYS_OBJ*

Definition at line 335 of file HistoElectron.cc.

References fill(), pat::PhysVarHisto::fill(), pat::HistoGroup< PHYS_OBJECT >::h_size_, and i.

Referenced by PhysicsHistograms::fillCollection().

00336 {
00337  
00338   h_size_->fill( coll.size(), 1, weight );     
00339 
00340   std::vector<Electron>::const_iterator
00341     iobj = coll.begin(),
00342     iend = coll.end();
00343 
00344   uint i = 1;              
00345   for ( ; iobj != iend; ++iobj, ++i ) {
00346     fill( &*iobj, i, weight);      
00347   } 
00348 }


Member Data Documentation

PhysVarHisto* pat::HistoElectron::h_caloIso_ [protected]

Definition at line 76 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_charge_ [protected]

Definition at line 97 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_chi2_ [protected]

Definition at line 119 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_classes_ [protected]

Definition at line 107 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_dEtaSc_propVtx_ [protected]

Definition at line 102 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_dPhiCl_propOut_ [protected]

Definition at line 104 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_dPhiSc_propVtx_ [protected]

Definition at line 103 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_EoP_ [protected]

Definition at line 100 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_EoPout_ [protected]

Definition at line 101 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_eta_ [protected]

Definition at line 114 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_eta_golden_ [protected]

Definition at line 108 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_eta_goldenFrac_ [protected]

Definition at line 110 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_eta_shower_ [protected]

Definition at line 109 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_eta_showerFrac_ [protected]

Definition at line 111 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_etaEff_ [protected]

Definition at line 122 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_foundHits_ [protected]

Definition at line 118 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_HoE_ [protected]

Definition at line 105 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectEta_ [protected]

Definition at line 79 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectEta_matched_ [protected]

Definition at line 84 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectPhi_ [protected]

Definition at line 81 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectPhi_matched_ [protected]

Definition at line 86 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectPt_ [protected]

Definition at line 80 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectPt_matched_ [protected]

Definition at line 85 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectZ_ [protected]

Definition at line 82 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_matchingObjectZ_matched_ [protected]

Definition at line 87 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_phiEff_ [protected]

Definition at line 124 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_PinMnPout_mode_ [protected]

Definition at line 106 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_ptEff_ [protected]

Definition at line 123 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexEta_ [protected]

Definition at line 92 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexP_ [protected]

Definition at line 90 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexPhi_ [protected]

Definition at line 93 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexPt_ [protected]

Definition at line 91 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexX_ [protected]

Definition at line 94 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexY_ [protected]

Definition at line 95 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_vertexZ_ [protected]

Definition at line 96 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_ele_zEff_ [protected]

Definition at line 125 of file HistoElectron.h.

Referenced by clearVec(), and HistoElectron().

PhysVarHisto* pat::HistoElectron::h_leptonID_ [protected]

Definition at line 77 of file HistoElectron.h.

Referenced by HistoElectron().

PhysVarHisto* pat::HistoElectron::h_trackIso_ [protected]

Definition at line 75 of file HistoElectron.h.

Referenced by clearVec(), fill(), and HistoElectron().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:49:40 2009 for CMSSW by  doxygen 1.5.4