CMS 3D CMS Logo

PhotonValidator Class Reference

$Id: PhotonValidator
Date
2008/09/30 18:38:04
Revision
1.11
More...

#include <Validation/RecoEgamma/interface/PhotonValidator.h>

Inheritance diagram for PhotonValidator:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (const edm::EventSetup &)
virtual void beginRun (edm::Run &r, edm::EventSetup const &theEventSetup)
virtual void endJob ()
 PhotonValidator (const edm::ParameterSet &)
virtual ~PhotonValidator ()

Private Member Functions

void doProfileX (MonitorElement *th2m, MonitorElement *me)
void doProfileX (TH2 *th2, MonitorElement *me)
std::vector< float > errors (TH1 *histo1, TH1 *histo2)
float etaTransformation (float a, float b)
void fillPlotFromVectors (MonitorElement *h, std::vector< int > &numerator, std::vector< int > &denominator, std::string type)
void initVectors ()
float phiNormalization (float &a)

Private Attributes

edm::InputTag barrelEcalHits_
edm::InputTag bcBarrelCollection_
edm::InputTag bcEndcapCollection_
double bcEtLow_
MonitorElementconvEffEtaOneTrack_
MonitorElementconvEffEtaTwoTracks_
MonitorElementconvEffEtTwoTracks_
MonitorElementconvEffPhiOneTrack_
MonitorElementconvEffPhiTwoTracks_
MonitorElementconvEffROneTrack_
MonitorElementconvEffRTwoTracks_
MonitorElementconvEffZOneTrack_
MonitorElementconvEffZTwoTracks_
std::string conversionIOTrackProducer_
std::string conversionOITrackProducer_
MonitorElementconvFakeRateEtaTwoTracks_
MonitorElementconvFakeRateEtTwoTracks_
MonitorElementconvFakeRatePhiTwoTracks_
MonitorElementconvFakeRateRTwoTracks_
MonitorElementconvFakeRateZTwoTracks_
DQMStoredbe_
bool dCotCutOn_
double dCotCutValue_
double dCotHardCutValue_
double ecalEtSumCut_
double ecalIsolRadius_
edm::InputTag endcapEcalHits_
std::vector< double > etaintervals_
std::vector< double > etaintervalslarge_
std::vector< double > etintervals_
std::string fName_
MonitorElementh2_Chi2VsEta_ [3]
MonitorElementh2_Chi2VsR_ [3]
MonitorElementh2_convVtxdRVsR_
MonitorElementh2_DCotTracksVsEta_
MonitorElementh2_DCotTracksVsR_
MonitorElementh2_DPhiTracksAtEcalVsEta_
MonitorElementh2_DPhiTracksAtEcalVsR_
MonitorElementh2_DPhiTracksAtVtxVsEta_
MonitorElementh2_DPhiTracksAtVtxVsR_
MonitorElementh2_dzPVVsR_
MonitorElementh2_EoverEtrueVsEoverP_ [3]
MonitorElementh2_EoverEtrueVsEta_ [3]
MonitorElementh2_EoverEtrueVsR_ [3]
MonitorElementh2_EoverPVsEta_ [3]
MonitorElementh2_EoverPVsR_ [3]
MonitorElementh2_eResVsEta_ [3]
MonitorElementh2_PoverPtrueVsEoverP_ [3]
MonitorElementh2_PoverPtrueVsEta_ [3]
MonitorElementh2_PtRecVsPtSim_ [3]
MonitorElementh2_r9VsEta_ [3]
MonitorElementh2_TkPtPull_ [3]
MonitorElementh_convERes_ [2][3]
MonitorElementh_convEta_ [2]
MonitorElementh_convPhi_ [2]
MonitorElementh_convPRes_ [2][3]
MonitorElementh_convVtxdR_
MonitorElementh_convVtxdX_
MonitorElementh_convVtxdY_
MonitorElementh_convVtxdZ_
MonitorElementh_convVtxRvsZ_ [3]
MonitorElementh_DCotTracks_ [2][3]
MonitorElementh_DEtaTracksAtEcal_ [2][3]
MonitorElementh_distMinAppTracks_ [2][3]
MonitorElementh_DPhiTracksAtEcal_ [2][3]
MonitorElementh_DPhiTracksAtVtx_ [2][3]
MonitorElementh_dzPVFromTracks_ [2]
MonitorElementh_EoverPTracks_ [2][3]
MonitorElementh_invMass_ [2][3]
MonitorElementh_nConv_ [2][3]
 info per conversion
MonitorElementh_nHitsVsEta_ [2]
MonitorElementh_nHitsVsR_ [2]
MonitorElementh_nPho_ [2][3]
MonitorElementh_nSimConv_ [2]
MonitorElementh_nSimPho_
MonitorElementh_phoDEta_ [2]
MonitorElementh_phoDPhi_ [2]
MonitorElementh_phoE_ [2][3]
MonitorElementh_phoERes_ [3][3]
MonitorElementh_phoEt_ [2][3]
MonitorElementh_phoEta_ [2]
MonitorElementh_phoPhi_ [2]
MonitorElementh_PoverETracks_ [2][3]
MonitorElementh_r9_ [3][3]
MonitorElementh_r9VsNofTracks_ [2][3]
MonitorElementh_scE_ [2][3]
MonitorElementh_scEt_ [2][3]
MonitorElementh_scEta_ [2]
MonitorElementh_scEtaPhi_ [2]
MonitorElementh_scPhi_ [2]
MonitorElementh_SimConvE_ [2]
MonitorElementh_SimConvEt_ [2]
MonitorElementh_SimConvEta_ [2]
MonitorElementh_SimConvEtaPix_ [2]
MonitorElementh_SimConvPhi_ [2]
MonitorElementh_SimConvR_ [2]
MonitorElementh_SimConvZ_ [2]
MonitorElementh_SimPhoE_
MonitorElementh_SimPhoEt_
MonitorElementh_SimPhoEta_
MonitorElementh_SimPhoPhi_
MonitorElementh_simTkEta_
MonitorElementh_simTkPt_
MonitorElementh_tkChi2_ [2]
MonitorElementh_TkD0_ [3]
MonitorElementh_TkPtPull_ [3]
MonitorElementh_zPVFromTracks_ [2]
MonitorElementhBCEnergyOverTrackPout_ [3]
double hcalEtSumCut_
double hcalHitEtLow_
double hcalIsolExtRadius_
double hcalIsolInnRadius_
edm::InputTag label_tp_
double lip_
double mcConvR_
double mcConvX_
double mcConvY_
double mcConvZ_
double mcEta_
double mcPhi_
 global variable for the MC photon
double minPhoEtCut_
int nEntry_
int nEvt_
MonitorElementnHitsVsEta_ [2]
MonitorElementnHitsVsR_ [2]
int nInvalidPCA_
int nMatched_
int nRecConv_
int nRecConvAss_
int nRecConvAssWithEcal_
int nSimConv_ [2]
int nSimPho_
int numOfTracksInCone_
MonitorElementp_Chi2VsEta_ [3]
MonitorElementp_Chi2VsR_ [3]
MonitorElementp_convVtxdRVsR_
MonitorElementp_DCotTracksVsEta_
MonitorElementp_DCotTracksVsR_
MonitorElementp_DPhiTracksAtEcalVsEta_
MonitorElementp_DPhiTracksAtEcalVsR_
MonitorElementp_DPhiTracksAtVtxVsEta_
MonitorElementp_DPhiTracksAtVtxVsR_
MonitorElementp_dzPVVsR_
MonitorElementp_EoverEtrueVsEta_ [3]
MonitorElementp_EoverEtrueVsR_ [3]
MonitorElementp_EoverPVsEta_ [3]
MonitorElementp_EoverPVsR_ [3]
MonitorElementp_eResVsEta_ [3]
MonitorElementp_PoverPtrueVsEta_ [3]
MonitorElementp_r9VsEta_ [3]
MonitorElementp_TkPtPull_ [3]
edm::ParameterSet parameters_
std::vector< double > phiintervals_
MonitorElementphoEffEta_
MonitorElementphoEffPhi_
std::string photonCollection_
std::string photonCollectionProducer_
double recMaxPt_
double recMinPt_
 Global variables for reco Photon.
std::vector< double > rintervals_
double simMaxPt_
double simMinPt_
edm::ESHandle< CaloGeometrytheCaloGeom_
edm::ESHandle< CaloTopologytheCaloTopo_
std::vector< TrackingParticleReftheConvTP_
edm::ESHandle< MagneticFieldtheMF_
PhotonMCTruthFinderthePhotonMCTruthFinder_
TrackAssociatorBasetheTrackAssociator_
std::vector< inttotMatchedRecConvEtaTwoTracks_
std::vector< inttotMatchedRecConvEtTwoTracks_
std::vector< inttotMatchedRecConvPhiTwoTracks_
std::vector< inttotMatchedRecConvRTwoTracks_
std::vector< inttotMatchedRecConvZTwoTracks_
std::vector< inttotMatchedSimConvEtaOneTrack_
std::vector< inttotMatchedSimConvEtaTwoTracks_
std::vector< inttotMatchedSimConvEtTwoTracks_
std::vector< inttotMatchedSimConvPhiOneTrack_
std::vector< inttotMatchedSimConvPhiTwoTracks_
std::vector< inttotMatchedSimConvROneTrack_
std::vector< inttotMatchedSimConvRTwoTracks_
std::vector< inttotMatchedSimConvZOneTrack_
std::vector< inttotMatchedSimConvZTwoTracks_
std::vector< inttotMatchedSimPhoEta_
std::vector< inttotMatchedSimPhoPhi_
std::vector< inttotRecAssConvEtaTwoTracks_
std::vector< inttotRecAssConvEtTwoTracks_
std::vector< inttotRecAssConvPhiTwoTracks_
std::vector< inttotRecAssConvRTwoTracks_
std::vector< inttotRecAssConvZTwoTracks_
std::vector< inttotSimConvEt_
std::vector< inttotSimConvEta_
std::vector< inttotSimConvPhi_
std::vector< inttotSimConvR_
std::vector< inttotSimConvZ_
std::vector< inttotSimPhoEta_
std::vector< inttotSimPhoPhi_
double trkIsolExtRadius_
double trkIsolInnRadius_
double trkPtLow_
double trkPtSumCut_
int verbosity_
std::vector< double > zintervals_


Detailed Description

$Id: PhotonValidator
Date
2008/09/30 18:38:04
Revision
1.11

$Id: PhotonValidator

Date
2008/09/30 18:37:58
Revision
1.12

Author:
Nancy Marinelli, U. of Notre Dame, US

Definition at line 44 of file PhotonValidator.h.


Constructor & Destructor Documentation

PhotonValidator::PhotonValidator ( const edm::ParameterSet pset  )  [explicit]

Definition at line 84 of file PhotonValidator.cc.

References barrelEcalHits_, bcEtLow_, conversionIOTrackProducer_, conversionOITrackProducer_, dCotCutOn_, dCotCutValue_, dCotHardCutValue_, ecalEtSumCut_, ecalIsolRadius_, endcapEcalHits_, fName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalEtSumCut_, hcalHitEtLow_, hcalIsolExtRadius_, hcalIsolInnRadius_, label_tp_, lip_, minPhoEtCut_, numOfTracksInCone_, parameters_, photonCollection_, photonCollectionProducer_, thePhotonMCTruthFinder_, trkIsolExtRadius_, trkIsolInnRadius_, trkPtLow_, trkPtSumCut_, and verbosity_.

00085   {
00086 
00087     fName_     = pset.getUntrackedParameter<std::string>("Name");
00088     verbosity_ = pset.getUntrackedParameter<int>("Verbosity");
00089     parameters_ = pset;
00090 
00091     
00092     photonCollectionProducer_ = pset.getParameter<std::string>("phoProducer");
00093     photonCollection_ = pset.getParameter<std::string>("photonCollection");
00094 
00095    
00096     label_tp_   = pset.getParameter<edm::InputTag>("label_tp");
00097 
00098     barrelEcalHits_   = pset.getParameter<edm::InputTag>("barrelEcalHits");
00099     endcapEcalHits_   = pset.getParameter<edm::InputTag>("endcapEcalHits");
00100 
00101     conversionOITrackProducer_ = pset.getParameter<std::string>("conversionOITrackProducer");
00102     conversionIOTrackProducer_ = pset.getParameter<std::string>("conversionIOTrackProducer");
00103 
00104 
00105 
00106     minPhoEtCut_ = pset.getParameter<double>("minPhoEtCut");   
00107 
00108 
00109     trkIsolExtRadius_ = pset.getParameter<double>("trkIsolExtR");   
00110     trkIsolInnRadius_ = pset.getParameter<double>("trkIsolInnR");   
00111     trkPtLow_     = pset.getParameter<double>("minTrackPtCut");   
00112     lip_       = pset.getParameter<double>("lipCut");   
00113     ecalIsolRadius_ = pset.getParameter<double>("ecalIsolR");   
00114     bcEtLow_     = pset.getParameter<double>("minBcEtCut");   
00115     hcalIsolExtRadius_ = pset.getParameter<double>("hcalIsolExtR");   
00116     hcalIsolInnRadius_ = pset.getParameter<double>("hcalIsolInnR");   
00117     hcalHitEtLow_     = pset.getParameter<double>("minHcalHitEtCut");   
00118 
00119     numOfTracksInCone_ = pset.getParameter<int>("maxNumOfTracksInCone");   
00120     trkPtSumCut_  = pset.getParameter<double>("trkPtSumCut");   
00121     ecalEtSumCut_ = pset.getParameter<double>("ecalEtSumCut");   
00122     hcalEtSumCut_ = pset.getParameter<double>("hcalEtSumCut");   
00123     dCotCutOn_ = pset.getParameter<bool>("dCotCutOn");   
00124     dCotCutValue_ = pset.getParameter<double>("dCotCutValue");   
00125     dCotHardCutValue_ = pset.getParameter<double>("dCotHardCutValue");   
00126 
00127 
00128     thePhotonMCTruthFinder_ = new PhotonMCTruthFinder();
00129    
00130 
00131   }

PhotonValidator::~PhotonValidator (  )  [virtual]

Definition at line 145 of file PhotonValidator.cc.

References thePhotonMCTruthFinder_.

00145                                   {
00146   
00147   delete thePhotonMCTruthFinder_;
00148 
00149 
00150 }


Member Function Documentation

void PhotonValidator::analyze ( const edm::Event e,
const edm::EventSetup esup 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 775 of file PhotonValidator.cc.

References TrackAssociatorBase::associateRecoToSim(), TrackAssociatorBase::associateSimToReco(), barrelEcalHits_, TwoTrackMinimumDistance::calculate(), conversionIOTrackProducer_, conversionOITrackProducer_, conversions_cfi::conversions, reco::Photon::conversions(), GenMuonPlsPt100GeV_cfg::cout, debug_cff::d0, dCotCutOn_, dCotCutValue_, dCotHardCutValue_, deltaPhi(), TwoTrackMinimumDistance::distance(), EcalClusterTools::e3x3(), edm::AssociationMap< Tag >::end(), endcapEcalHits_, lat::endl(), reco::Particle::energy(), reco::Particle::eta(), etaintervals_, etaintervalslarge_, etaTransformation(), etintervals_, f, MonitorElement::Fill(), PhotonMCTruthFinder::find(), edm::AssociationMap< Tag >::find(), edm::EventSetup::get(), edm::Event::getByLabel(), h2_Chi2VsEta_, h2_Chi2VsR_, h2_convVtxdRVsR_, h2_DCotTracksVsEta_, h2_DCotTracksVsR_, h2_DPhiTracksAtEcalVsEta_, h2_DPhiTracksAtEcalVsR_, h2_DPhiTracksAtVtxVsEta_, h2_DPhiTracksAtVtxVsR_, h2_dzPVVsR_, h2_EoverEtrueVsEoverP_, h2_EoverEtrueVsEta_, h2_EoverEtrueVsR_, h2_EoverPVsEta_, h2_EoverPVsR_, h2_eResVsEta_, h2_PoverPtrueVsEoverP_, h2_PoverPtrueVsEta_, h2_PtRecVsPtSim_, h2_r9VsEta_, h2_TkPtPull_, h_convERes_, h_convEta_, h_convPhi_, h_convPRes_, h_convVtxdR_, h_convVtxdX_, h_convVtxdY_, h_convVtxdZ_, h_convVtxRvsZ_, h_DCotTracks_, h_DEtaTracksAtEcal_, h_distMinAppTracks_, h_DPhiTracksAtEcal_, h_DPhiTracksAtVtx_, h_dzPVFromTracks_, h_EoverPTracks_, h_invMass_, h_nConv_, h_nSimConv_, h_nSimPho_, h_phoDEta_, h_phoDPhi_, h_phoE_, h_phoERes_, h_phoEt_, h_phoEta_, h_phoPhi_, h_PoverETracks_, h_r9_, h_r9VsNofTracks_, h_scE_, h_scEt_, h_scEta_, h_scPhi_, h_SimConvE_, h_SimConvEt_, h_SimConvEta_, h_SimConvEtaPix_, h_SimConvPhi_, h_SimConvR_, h_SimConvZ_, h_SimPhoE_, h_SimPhoEt_, h_SimPhoEta_, h_SimPhoPhi_, h_simTkEta_, h_simTkPt_, h_tkChi2_, h_TkD0_, h_TkPtPull_, h_zPVFromTracks_, hBCEnergyOverTrackPout_, i, edm::Event::id(), index, reco::TransientTrack::initialFreeState(), edm::Ref< C, T, F >::isNonnull(), edm::Handle< T >::isValid(), j, edm::InputTag::label(), label_tp_, mcConvR_, mcConvX_, mcConvY_, mcConvZ_, mcEta_, mcPhi_, minPhoEtCut_, nEvt_, nHitsVsEta_, nHitsVsR_, nInvalidPCA_, nRecConv_, nRecConvAss_, nRecConvAssWithEcal_, nSimConv_, nSimPho_, reco::Particle::phi(), phiintervals_, phiNormalization(), configurableAnalysis::Photon, photonCollection_, photonCollectionProducer_, pi, funct::pow(), edm::ESHandle< T >::product(), edm::Handle< T >::product(), r9, recPt, rintervals_, funct::sqrt(), TwoTrackMinimumDistance::status(), reco::Photon::superCluster(), theCaloGeom_, theCaloTopo_, theConvTP_, thePhotonMCTruthFinder_, theTrackAssociator_, totMatchedRecConvEtaTwoTracks_, totMatchedRecConvEtTwoTracks_, totMatchedRecConvPhiTwoTracks_, totMatchedRecConvRTwoTracks_, totMatchedRecConvZTwoTracks_, totMatchedSimConvEtaTwoTracks_, totMatchedSimConvEtTwoTracks_, totMatchedSimConvPhiTwoTracks_, totMatchedSimConvRTwoTracks_, totMatchedSimConvZTwoTracks_, totMatchedSimPhoEta_, totMatchedSimPhoPhi_, totRecAssConvEtaTwoTracks_, totRecAssConvEtTwoTracks_, totRecAssConvPhiTwoTracks_, totRecAssConvRTwoTracks_, totRecAssConvZTwoTracks_, totSimConvEt_, totSimConvEta_, totSimConvPhi_, totSimConvR_, totSimConvZ_, totSimPhoEta_, totSimPhoPhi_, tp, trackingParticles_cfi::trackingParticles, tracks, x, y, z, and zintervals_.

00776 {
00777   
00778   
00779   using namespace edm;
00780   const float etaPhiDistance=0.01;
00781   // Fiducial region
00782   const float TRK_BARL =0.9;
00783   const float BARL = 1.4442; // DAQ TDR p.290
00784   const float END_LO = 1.566;
00785   const float END_HI = 2.5;
00786   // Electron mass
00787   const Float_t mElec= 0.000511;
00788 
00789 
00790   nEvt_++;  
00791   LogInfo("PhotonValidator") << "PhotonValidator Analyzing event number: " << e.id() << " Global Counter " << nEvt_ <<"\n";
00792   //  LogDebug("PhotonValidator") << "PhotonValidator Analyzing event number: "  << e.id() << " Global Counter " << nEvt_ <<"\n";
00793   std::cout << "PhotonValidator Analyzing event number: "  << e.id() << " Global Counter " << nEvt_ <<"\n";
00794 
00795 
00796   // get the  calo topology  from the event setup:
00797   edm::ESHandle<CaloTopology> pTopology;
00798   esup.get<CaloTopologyRecord>().get(theCaloTopo_);
00799   const CaloTopology *topology = theCaloTopo_.product();
00800 
00801   // get the geometry from the event setup:
00802   esup.get<CaloGeometryRecord>().get(theCaloGeom_);
00803 
00804 
00805  // Transform Track into TransientTrack (needed by the Vertex fitter)
00806   edm::ESHandle<TransientTrackBuilder> theTTB;
00807   esup.get<TransientTrackRecord>().get("TransientTrackBuilder",theTTB);
00808 
00809 
00811   Handle<reco::PhotonCollection> photonHandle; 
00812   e.getByLabel(photonCollectionProducer_, photonCollection_ , photonHandle);
00813   const reco::PhotonCollection photonCollection = *(photonHandle.product());
00814   if (!photonHandle.isValid()) {
00815     edm::LogError("PhotonProducer") << "Error! Can't get the Photon collection "<< std::endl;
00816     return; 
00817   }
00818 
00819 
00821   Handle< edm::View<reco::Track> > outInTrkHandle;
00822   e.getByLabel(conversionOITrackProducer_,  outInTrkHandle);
00823   //std::cout << "ConvPhoAnalyzerWithOfficialAssociation  outInTrack collection size " << (*outInTrkHandle).size() << "\n";
00824   
00826   Handle< edm::View<reco::Track> > inOutTrkHandle;
00827   e.getByLabel(conversionIOTrackProducer_, inOutTrkHandle);
00828   //std::cout  << " ConvPhoAnalyzerWithOfficialAssociation inOutTrack collection size " << (*inOutTrkHandle).size() << "\n";
00829   
00830   
00831 
00832 
00834   //get simtrack info
00835   std::vector<SimTrack> theSimTracks;
00836   std::vector<SimVertex> theSimVertices;
00837   
00838   edm::Handle<SimTrackContainer> SimTk;
00839   edm::Handle<SimVertexContainer> SimVtx;
00840   e.getByLabel("g4SimHits",SimTk);
00841   e.getByLabel("g4SimHits",SimVtx);
00842   
00843   theSimTracks.insert(theSimTracks.end(),SimTk->begin(),SimTk->end());
00844   theSimVertices.insert(theSimVertices.end(),SimVtx->begin(),SimVtx->end());
00845   std::vector<PhotonMCTruth> mcPhotons=thePhotonMCTruthFinder_->find (theSimTracks,  theSimVertices);  
00846 
00847   // Get electron tracking truth
00848   edm::Handle<TrackingParticleCollection> ElectronTPHandle;
00849   e.getByLabel(label_tp_,ElectronTPHandle);
00850   //  e.getByLabel("mergedtruth","MergedTrackTruth",ElectronTPHandle);
00851   const TrackingParticleCollection trackingParticles = *(ElectronTPHandle.product());
00852 
00854   std::vector<reco::PhotonCollection::const_iterator> StoRMatchedConvertedPhotons;
00855   // Sim to Reco
00856   reco::SimToRecoCollection OISimToReco = theTrackAssociator_->associateSimToReco(outInTrkHandle, ElectronTPHandle, &e);
00857   reco::SimToRecoCollection IOSimToReco = theTrackAssociator_->associateSimToReco(inOutTrkHandle, ElectronTPHandle, &e);
00858   // Reco to Sim
00859   reco::RecoToSimCollection OIRecoToSim = theTrackAssociator_->associateRecoToSim(outInTrkHandle, ElectronTPHandle, &e);
00860   reco::RecoToSimCollection IORecoToSim = theTrackAssociator_->associateRecoToSim(inOutTrkHandle, ElectronTPHandle, &e);
00861   //
00862   vector<reco::SimToRecoCollection*> StoRCollPtrs;
00863   StoRCollPtrs.push_back(&OISimToReco);
00864   StoRCollPtrs.push_back(&IOSimToReco);
00865   vector<reco::RecoToSimCollection*> RtoSCollPtrs;
00866   RtoSCollPtrs.push_back(&OIRecoToSim);
00867   RtoSCollPtrs.push_back(&IORecoToSim);
00868   //
00869 
00870   nSimPho_=0;
00871   nSimConv_[0]=0;
00872   nSimConv_[1]=0;
00873   for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
00874     if ( (*mcPho).fourMomentum().et() < minPhoEtCut_ ) continue;
00875   
00876     float mcPhi= (*mcPho).fourMomentum().phi();
00877     mcPhi_= phiNormalization(mcPhi);
00878     mcEta_= (*mcPho).fourMomentum().pseudoRapidity();   
00879     mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() ); 
00880     
00881     mcConvR_= (*mcPho).vertex().perp();    
00882     mcConvX_= (*mcPho).vertex().x();    
00883     mcConvY_= (*mcPho).vertex().y();    
00884     mcConvZ_= (*mcPho).vertex().z();    
00885 
00886 
00887 
00888     
00889     if ( ! (  fabs(mcEta_) <= BARL || ( fabs(mcEta_) >= END_LO && fabs(mcEta_) <=END_HI ) ) ) 
00890       continue;  // all ecal fiducial region
00891 
00892 
00893     nSimPho_++;
00894     h_SimPhoE_->Fill(  (*mcPho).fourMomentum().e());
00895     h_SimPhoEt_->Fill(  (*mcPho).fourMomentum().et());
00896     h_SimPhoEta_->Fill( mcEta_ ) ;
00897     h_SimPhoPhi_->Fill( mcPhi_ );
00898 
00899     for (unsigned int f=0; f<etaintervals_.size()-1; f++){
00900       if (mcEta_>etaintervals_[f]&&
00901           mcEta_<etaintervals_[f+1]) {
00902         totSimPhoEta_[f]++;
00903       }
00904     }
00905     for (unsigned int f=0; f<phiintervals_.size()-1; f++){
00906       if (mcPhi_>phiintervals_[f]&&
00907           mcPhi_<phiintervals_[f+1]) {
00908         totSimPhoPhi_[f]++;
00909       }
00910     }
00911 
00912 
00914     
00915     bool goodSimConversion=false;
00916     bool visibleConversion=false;
00917     bool visibleConversionsWithTwoSimTracks=false;
00918     if (  (*mcPho).isAConversion() == 1 ) {
00919       nSimConv_[0]++;
00920       h_SimConvE_[0]->Fill(  (*mcPho).fourMomentum().e());
00921       h_SimConvEt_[0]->Fill(  (*mcPho).fourMomentum().et());
00922       h_SimConvEta_[0]->Fill( mcEta_ ) ;
00923 
00924       if ( mcConvR_ <15) h_SimConvEtaPix_[0]->Fill( mcEta_ ) ;
00925 
00926       h_SimConvPhi_[0]->Fill( mcPhi_ );
00927       h_SimConvR_[0]->Fill( mcConvR_ );
00928       h_SimConvZ_[0]->Fill( mcConvZ_ );
00929 
00930       if ( ( fabs(mcEta_) <= BARL && mcConvR_ <85 )  || 
00931            ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 )  ) visibleConversion=true;
00932       
00933 
00934 
00935       theConvTP_.clear(); 
00936       std::cout << " PhotonValidator TrackingParticles   TrackingParticleCollection size "<<  trackingParticles.size() <<  "\n";
00937       for(size_t i = 0; i < trackingParticles.size(); ++i){
00938         TrackingParticleRef tp (ElectronTPHandle,i);
00939         //std::cout << "  Electron pt " << tp -> pt() << " charge " << tp -> charge() << " pdgId " << tp->pdgId() << " Hits for this track: " << tp -> trackPSimHit().size() << std::endl;      
00940         //std::cout << " track vertex position x " <<  tp->vertex().x() << " y " << tp->vertex().y() << " z " << tp->vertex().z() << std::endl;
00941         //std::cout << " track vertex position x " <<  tp->vx() << " y " << tp->vy() << " z " << tp->vz() << std::endl;
00942         //std::cout << " conversion vertex position x " <<  (*mcPho).vertex().x() << " y " << (*mcPho).vertex().y() << " z " << (*mcPho).vertex().z() << std::endl;
00943         if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.001   &&
00944              fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.001   &&
00945              fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.001) {
00946           
00947           //std::cout << " From conversion Electron pt " << tp -> pt() << " charge " << tp -> charge() << " pdgId " << tp->pdgId() << " Hits for this track: " << tp -> trackPSimHit().size() << std::endl;      
00948           //    std::cout << " track vertex position x " <<  tp->vertex().x() << " y " << tp->vertex().y() << " z " << tp->vertex().z() << std::endl;
00949           //std::cout << " conversion vertex position x " <<  (*mcPho).vertex().x() << " y " << (*mcPho).vertex().y() << " z " << (*mcPho).vertex().z() << "  R " <<  (*mcPho).vertex().perp() << std::endl;
00950           theConvTP_.push_back( tp );   
00951         }
00952       }
00953       //      std::cout << " PhotonValidator  theConvTP_ size " <<   theConvTP_.size() << std::endl;    
00954 
00955       if ( theConvTP_.size() == 2 )   visibleConversionsWithTwoSimTracks=true;
00956       goodSimConversion=false;
00957 
00958       if (   visibleConversion && visibleConversionsWithTwoSimTracks )  goodSimConversion=true;
00959       if ( goodSimConversion ) {
00960         nSimConv_[1]++; 
00961         h_SimConvE_[1]->Fill(  (*mcPho).fourMomentum().e());
00962         h_SimConvEt_[1]->Fill(  (*mcPho).fourMomentum().et());
00963         h_SimConvEta_[1]->Fill( mcEta_ ) ;
00964         h_SimConvPhi_[1]->Fill( mcPhi_ );
00965         h_SimConvR_[1]->Fill( mcConvR_ );
00966         h_SimConvZ_[1]->Fill( mcConvZ_ );
00967         
00968         for ( vector<TrackingParticleRef>::iterator iTrk=theConvTP_.begin(); iTrk!=theConvTP_.end(); ++iTrk) {
00969           h_simTkPt_ -> Fill ( (*iTrk)->pt() );
00970           h_simTkEta_ -> Fill ( (*iTrk)->eta() );
00971 
00972         }
00973 
00975         for (unsigned int f=0; f<etaintervalslarge_.size()-1; f++){
00976           if (mcEta_>etaintervalslarge_[f]&&
00977               mcEta_<etaintervalslarge_[f+1]) {
00978             totSimConvEta_[f]++;
00979           }
00980         }
00981         for (unsigned int f=0; f<phiintervals_.size()-1; f++){
00982           if (mcPhi_>phiintervals_[f]&&
00983               mcPhi_<phiintervals_[f+1]) {
00984             totSimConvPhi_[f]++;
00985           }
00986         }
00987         for (unsigned int f=0; f<rintervals_.size()-1; f++){
00988           if (mcConvR_>rintervals_[f]&&
00989               mcConvR_<rintervals_[f+1]) {
00990             totSimConvR_[f]++;
00991           }
00992         }
00993         for (unsigned int f=0; f<zintervals_.size()-1; f++){
00994           if (mcConvZ_>zintervals_[f]&&
00995               mcConvZ_<zintervals_[f+1]) {
00996             totSimConvZ_[f]++;
00997           }
00998         }
00999         for (unsigned int f=0; f<etintervals_.size()-1; f++){
01000           if ((*mcPho).fourMomentum().et() >etintervals_[f]&&
01001               (*mcPho).fourMomentum().et()<etintervals_[f+1]) {
01002             totSimConvEt_[f]++;
01003           }
01004         }
01005 
01006 
01007       
01008       }
01009       
01010     }  
01011 
01012 
01013     
01014     float minDelta=10000.;
01015     std::vector<reco::Photon> thePhotons;
01016     int index=0;
01017     int iMatch=-1;
01018     bool matched=false;
01019     
01020     for( reco::PhotonCollection::const_iterator  iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
01021       reco::Photon aPho = reco::Photon(*iPho);
01022       thePhotons.push_back(aPho);
01023       float phiPho=aPho.phi();
01024       float etaPho=aPho.eta();
01025       float deltaPhi = phiPho-mcPhi_;
01026       float deltaEta = etaPho-mcEta_;
01027       if ( deltaPhi > pi )  deltaPhi -= twopi;
01028       if ( deltaPhi < -pi) deltaPhi += twopi;
01029       deltaPhi=pow(deltaPhi,2);
01030       deltaEta=pow(deltaEta,2);
01031       float delta = sqrt( deltaPhi+deltaEta); 
01032       if ( delta<0.1 && delta < minDelta ) {
01033         minDelta=delta;
01034         iMatch=index;
01035          
01036       }
01037       index++;
01038     }  // end loop over reco photons
01039     if ( iMatch>-1 ) matched=true; 
01040 
01041   
01042     if ( matched ) {
01043       for (unsigned int f=0; f<etaintervals_.size()-1; f++){
01044         if (mcEta_>etaintervals_[f]&&
01045             mcEta_<etaintervals_[f+1]) {
01046           totMatchedSimPhoEta_[f]++;
01047         }
01048       }
01049       for (unsigned int f=0; f<phiintervals_.size()-1; f++){
01050         if (mcPhi_>phiintervals_[f]&&
01051             mcPhi_<phiintervals_[f+1]) {
01052           totMatchedSimPhoPhi_[f]++;
01053         }
01054       }
01055     }
01056 
01057 
01058 
01059 
01060     if ( ! matched) continue;
01061 
01062     bool  phoIsInBarrel=false;
01063     bool  phoIsInEndcap=false;
01064 
01065     reco::Photon matchingPho = thePhotons[iMatch];
01066 
01067     if ( fabs(matchingPho.superCluster()->position().eta() ) < 1.479 ) {
01068       phoIsInBarrel=true;
01069     } else {
01070       phoIsInEndcap=true;
01071     }
01072     edm::Handle<EcalRecHitCollection>   ecalRecHitHandle;
01073     if ( phoIsInBarrel ) {
01074       
01075       // Get handle to rec hits ecal barrel 
01076       e.getByLabel(barrelEcalHits_, ecalRecHitHandle);
01077       if (!ecalRecHitHandle.isValid()) {
01078         edm::LogError("PhotonProducer") << "Error! Can't get the product "<<barrelEcalHits_.label();
01079         return;
01080       }
01081       
01082       
01083     } else if ( phoIsInEndcap ) {    
01084       
01085       // Get handle to rec hits ecal encap 
01086       e.getByLabel(endcapEcalHits_, ecalRecHitHandle);
01087       if (!ecalRecHitHandle.isValid()) {
01088         edm::LogError("PhotonProducer") << "Error! Can't get the product "<<endcapEcalHits_.label();
01089         return;
01090       }
01091       
01092     }
01093 
01094     int type=0;
01095     const EcalRecHitCollection ecalRecHitCollection = *(ecalRecHitHandle.product());
01096     float e3x3=   EcalClusterTools::e3x3(  *(  matchingPho.superCluster()->seed()  ), &ecalRecHitCollection, &(*topology)); 
01097     float r9 =e3x3/( matchingPho.superCluster()->rawEnergy()+ matchingPho.superCluster()->preshowerEnergy());
01098 
01099     //    float photonE=matchingPho.superCluster()->energy();
01100     // float photonEt= matchingPho.superCluster()->energy()/cosh( matchingPho.superCluster()->eta()) ;
01101 
01102     float photonE = matchingPho.energy();
01103     float photonEt= matchingPho.energy()/cosh( matchingPho.eta()) ;
01104 
01105 
01106 
01107     if ( r9 < 0.93 && phoIsInEndcap) { 
01108       //      photonE = matchingPho.energy() +  matchingPho.superCluster()->preshowerEnergy();
01109       //photonEt=  photonE/cosh( matchingPho.superCluster()->eta()); 
01110     }
01111 
01112     h_scEta_[type]->Fill( matchingPho.superCluster()->eta() );
01113     h_scPhi_[type]->Fill( matchingPho.superCluster()->phi() );
01114     h_scE_[type][0]->Fill( matchingPho.superCluster()->energy() );
01115     h_scEt_[type][0]->Fill( matchingPho.superCluster()->energy()/cosh( matchingPho.superCluster()->eta()) );
01116     h_r9_[type][0]->Fill( r9 );
01117     h2_r9VsEta_[0] -> Fill (mcEta_, r9);      
01118      
01119       
01120     h_phoEta_[type]->Fill( matchingPho.eta() );
01121     h_phoPhi_[type]->Fill( matchingPho.phi() );
01122     h_phoDEta_[0]->Fill (  matchingPho.eta() - (*mcPho).fourMomentum().eta() );
01123     h_phoDPhi_[0]->Fill (  matchingPho.phi() - mcPhi_ );
01124     //    h_phoE_[type][0]->Fill( matchingPho.energy() );
01125     // h_phoEt_[type][0]->Fill( matchingPho.energy()/ cosh( matchingPho.eta()) );
01126     h_phoE_[type][0]->Fill( photonE );
01127     h_phoEt_[type][0]->Fill( photonEt);
01128       
01129 
01130       
01131 
01132     h_phoERes_[0][0]->Fill( photonE / (*mcPho).fourMomentum().e() );
01133     h2_eResVsEta_[0]->Fill (mcEta_, photonE/(*mcPho).fourMomentum().e()  ) ;
01134 
01135     if (  (*mcPho).isAConversion() == 0 ) {
01136       h2_eResVsEta_[1]->Fill (mcEta_, photonE/ (*mcPho).fourMomentum().e()  ) ;
01137       h2_r9VsEta_[1] -> Fill (mcEta_, r9);      
01138     } 
01139 
01140 
01141 
01142 
01143 
01144  
01145     if ( photonE/(*mcPho).fourMomentum().e()  < 0.3 &&   photonE/(*mcPho).fourMomentum().e() > 0.1 ) {
01146       //      std::cout << " Eta sim " << mcEta_ << " sc eta " << matchingPho.superCluster()->eta() << " pho eta " << matchingPho.eta() << std::endl;
01147  
01148     }
01149 
01150 
01151     if ( r9 > 0.93 )  h_phoERes_[1][0]->Fill( photonE / (*mcPho).fourMomentum().e() );
01152     if ( r9 <= 0.93 )  h_phoERes_[2][0]->Fill(photonE / (*mcPho).fourMomentum().e() );
01153          
01154           
01155     if ( phoIsInBarrel ) {
01156       h_scE_[type][1]->Fill( matchingPho.superCluster()->energy() );
01157       h_scEt_[type][1]->Fill( matchingPho.superCluster()->energy()/cosh( matchingPho.superCluster()->eta()) );
01158       h_r9_[type][1]->Fill( r9 );
01159       h_phoE_[type][1]->Fill( photonE );
01160       h_phoEt_[type][1]->Fill( photonEt );
01161       h_nConv_[type][1]->Fill(float( matchingPho.conversions().size()));
01162       
01163       h_phoERes_[0][1]->Fill( photonE / (*mcPho).fourMomentum().e() );
01164       if ( r9 > 0.93 ) {  
01165            h_phoERes_[1][1]->Fill(  photonE  / (*mcPho).fourMomentum().e() );
01166       }
01167       if ( r9 <= 0.93 )  { 
01168        h_phoERes_[2][1]->Fill( photonE / (*mcPho).fourMomentum().e() );
01169       }
01170     }
01171     if ( phoIsInEndcap ) {
01172       h_scE_[type][2]->Fill( matchingPho.superCluster()->energy() );
01173       h_scEt_[type][2]->Fill( matchingPho.superCluster()->energy()/cosh( matchingPho.superCluster()->eta()) );
01174       h_r9_[type][2]->Fill( r9 );
01175       h_phoE_[type][2]->Fill( photonE );
01176       h_phoEt_[type][2]->Fill( photonEt );
01177       h_nConv_[type][2]->Fill(float( matchingPho.conversions().size()));
01178       h_phoERes_[0][2]->Fill( photonE / (*mcPho).fourMomentum().e() );
01179       if ( r9 > 0.93 ) {  
01180 
01181         h_phoERes_[1][2]->Fill( photonE / (*mcPho).fourMomentum().e() );
01182       }
01183       if ( r9 <= 0.93 ) {
01184          h_phoERes_[2][2]->Fill( photonE / (*mcPho).fourMomentum().e() );
01185       }
01186     }
01187       
01188 
01189 
01190 
01191 
01192     if ( ! (visibleConversion &&  visibleConversionsWithTwoSimTracks ) ) continue;
01193     h_r9_[1][0]->Fill( r9 );
01194     if ( phoIsInBarrel ) h_r9_[1][1]->Fill( r9 );
01195     if ( phoIsInEndcap ) h_r9_[1][2]->Fill( r9 );
01196 
01197 
01198     h_nConv_[type][0]->Fill(float( matchingPho.conversions().size()));          
01199 
01200 
01202     std::vector<reco::ConversionRef> conversions = matchingPho.conversions();
01203     for (unsigned int iConv=0; iConv<conversions.size(); iConv++) {
01204 
01205 
01206       h2_EoverEtrueVsEta_[1]->Fill (mcEta_,matchingPho.superCluster()->energy()/ (*mcPho).fourMomentum().e()  ) ;
01207 
01208       reco::ConversionRef aConv=conversions[iConv];
01209       std::vector<reco::TrackRef> tracks = aConv->tracks();
01210       if (tracks.size() < 2 ) continue;
01211  
01212       if ( dCotCutOn_ ) {
01213         if (  (fabs(mcEta_) > 1.1 && fabs (mcEta_)  < 1.4  )  &&
01214              fabs( aConv->pairCotThetaSeparation() ) > dCotHardCutValue_ ) continue;
01215         if ( fabs( aConv->pairCotThetaSeparation() ) > dCotCutValue_ ) continue;
01216       }
01217 
01218 
01219       nRecConv_++;
01220 
01221       h_convEta_[0]->Fill( aConv->caloCluster()[0]->eta() );
01222       h_convPhi_[0]->Fill( aConv->caloCluster()[0]->phi() );
01223       h_convERes_[0][0]->Fill( aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() );
01224       h_r9VsNofTracks_[0][0]->Fill( r9, aConv->nTracks() ) ; 
01225 
01226       if ( phoIsInBarrel )  {
01227         h_convERes_[0][1]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() );
01228         h_r9VsNofTracks_[0][1]->Fill( r9, aConv->nTracks() ) ; 
01229       }
01230       if ( phoIsInEndcap ) {
01231         h_convERes_[0][2]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() );
01232         h_r9VsNofTracks_[0][2]->Fill( r9, aConv->nTracks() ) ; 
01233       }
01234 
01235 
01236       std::map<reco::TrackRef,TrackingParticleRef> myAss;
01237       std::map<reco::TrackRef,TrackingParticleRef>::const_iterator itAss;
01238       std::map<reco::TrackRef,TrackingParticleRef>::const_iterator itAssMin;
01239       std::map<reco::TrackRef,TrackingParticleRef>::const_iterator itAssMax;
01240       //     
01241 
01242       int nAssT2=0;
01243       int nAssT1=0;
01244       float px=0;
01245       float py=0;
01246       float pz=0;
01247       float e=0;
01248       //std::cout << " Before loop on tracks  tracks size " << tracks.size() << " or " << aConv->tracks().size() <<  " nAssT2 " << nAssT2 << std::endl;
01249       for (unsigned int i=0; i<tracks.size(); i++) {
01250 
01251 
01252 
01253 
01254 
01255         type =0;
01256         nHitsVsEta_[type] ->Fill (mcEta_,   float(tracks[i]->numberOfValidHits()) );
01257         nHitsVsR_[type] ->Fill (mcConvR_,   float(tracks[i]->numberOfValidHits()) );
01258         h_tkChi2_[type] ->Fill (tracks[i]->normalizedChi2() ); 
01259 
01260         px+= tracks[i]->innerMomentum().x();
01261         py+= tracks[i]->innerMomentum().y();
01262         pz+= tracks[i]->innerMomentum().z();
01263         e +=  sqrt (  tracks[i]->innerMomentum().x()*tracks[i]->innerMomentum().x() +
01264                       tracks[i]->innerMomentum().y()*tracks[i]->innerMomentum().y() +
01265                       tracks[i]->innerMomentum().z()*tracks[i]->innerMomentum().z() +
01266                       +  mElec*mElec ) ;
01267 
01268         
01270         TrackingParticleRef myTP;
01271         for (size_t j = 0; j < RtoSCollPtrs.size(); j++) {          
01272           reco::RecoToSimCollection q = *(RtoSCollPtrs[j]);
01273           
01274           RefToBase<reco::Track> myTk( aConv->tracks()[i] );
01275           
01276           if( q.find(myTk ) != q.end() ) {
01277             std::vector<std::pair<TrackingParticleRef, double> > tp = q[myTk];
01278             for (int itp=0; itp<tp.size(); itp++) {
01279               myTP=tp[itp].first;
01280               //      std::cout << " associated with TP " << myTP->pdgId() << " pt " << sqrt(myTP->momentum().perp2()) << std::endl;
01281               myAss.insert( std::make_pair ( aConv->tracks()[i]  , myTP) );
01282               nAssT2++;
01283             }
01284           }
01285         }
01286         
01287 
01288 
01289       }
01290 
01291 
01292     
01293 
01294       float totP = sqrt(px*px +py*py + pz*pz);
01295       float invM=  (e + totP) * (e-totP) ;
01296       if ( invM> 0.) {
01297         invM= sqrt( invM);
01298       } else {
01299         invM=-1;
01300       }
01301 
01302       type=0;
01303       h_invMass_[type][0] ->Fill( invM);
01304       if ( phoIsInBarrel ) h_invMass_[type][1] ->Fill(invM);
01305       if ( phoIsInEndcap ) h_invMass_[type][2] ->Fill(invM);
01306 
01307       
01308 
01309 
01311       if ( nAssT2 ==2 ) {
01312 
01313 
01314       h_r9_[2][0]->Fill( r9 );
01315       if ( phoIsInBarrel ) h_r9_[2][1]->Fill( r9 );
01316       if ( phoIsInEndcap ) h_r9_[2][2]->Fill( r9 );
01317 
01318 
01319         nRecConvAss_++;
01320 
01321 
01322         for (unsigned int f=0; f<etaintervalslarge_.size()-1; f++){
01323           if (mcEta_>etaintervalslarge_[f]&&
01324               mcEta_<etaintervalslarge_[f+1]) {
01325             totMatchedSimConvEtaTwoTracks_[f]++;
01326           }
01327         }
01328         for (unsigned int f=0; f<phiintervals_.size()-1; f++){
01329           if (mcPhi_>phiintervals_[f]&&
01330               mcPhi_<phiintervals_[f+1]) {
01331             totMatchedSimConvPhiTwoTracks_[f]++;
01332           }
01333         }
01334         for (unsigned int f=0; f<rintervals_.size()-1; f++){
01335           if (mcConvR_>rintervals_[f]&&
01336               mcConvR_<rintervals_[f+1]) {
01337             totMatchedSimConvRTwoTracks_[f]++;
01338           }
01339         }
01340         for (unsigned int f=0; f<zintervals_.size()-1; f++){
01341           if (mcConvZ_>zintervals_[f]&&
01342               mcConvZ_<zintervals_[f+1]) {
01343             totMatchedSimConvZTwoTracks_[f]++;
01344           }
01345         }
01346         for (unsigned int f=0; f<etintervals_.size()-1; f++){
01347           if ((*mcPho).fourMomentum().et()>etintervals_[f]&&
01348               (*mcPho).fourMomentum().et()<etintervals_[f+1]) {
01349             totMatchedSimConvEtTwoTracks_[f]++;
01350           }
01351         }
01352 
01353 
01355         type =1;
01356         float eoverp= aConv->EoverP();
01357 
01358         h_invMass_[type][0] ->Fill( invM);
01359         h_convPRes_[type][0]->Fill( totP / (*mcPho).fourMomentum().e() );
01360         h_EoverPTracks_[type][0] ->Fill( eoverp ) ;
01361         h_PoverETracks_[type][0] ->Fill( 1./eoverp ) ;
01362         h2_EoverEtrueVsEoverP_[0] ->Fill( eoverp,matchingPho.superCluster()->energy()/ (*mcPho).fourMomentum().e()  ) ;
01363         h2_PoverPtrueVsEoverP_[0] ->Fill( eoverp, totP/ (*mcPho).fourMomentum().e()  ) ;
01364         h2_EoverEtrueVsEta_[0]->Fill (mcEta_,matchingPho.superCluster()->energy()/ (*mcPho).fourMomentum().e()  ) ;
01365         h2_EoverEtrueVsR_[0]->Fill (mcConvR_,matchingPho.superCluster()->energy()/ (*mcPho).fourMomentum().e()  ) ;
01366 
01367         h2_PoverPtrueVsEta_[0]->Fill (mcEta_,totP/ (*mcPho).fourMomentum().e()  ) ;
01368 
01369         h2_EoverPVsEta_[0]->Fill (mcEta_, eoverp);
01370         h2_EoverPVsR_[0]->Fill (mcConvR_, eoverp);
01371 
01372         
01373 
01374         reco::TrackRef track1 = tracks[0];
01375         reco::TrackRef track2 = tracks[1];
01376         reco::TransientTrack tt1 = (*theTTB).build( &track1);
01377         reco::TransientTrack tt2 = (*theTTB).build( &track2);
01378         TwoTrackMinimumDistance md;
01379         md.calculate  (  tt1.initialFreeState(),  tt2.initialFreeState() );
01380         if (md.status() )  {
01381           //cout << " Min Dist " << md.distance() << std::endl;
01382           h_distMinAppTracks_[1][0]->Fill ( md.distance() );
01383         }  else {
01384           nInvalidPCA_++;
01385 
01386         }
01387 
01388         float  dPhiTracksAtVtx = -99;
01389         float phiTk1=  tracks[0]->innerMomentum().phi();
01390         float phiTk2=  tracks[1]->innerMomentum().phi();
01391         dPhiTracksAtVtx = phiTk1-phiTk2;
01392         dPhiTracksAtVtx = phiNormalization( dPhiTracksAtVtx );
01393 
01394         h_DPhiTracksAtVtx_[type][0]->Fill( dPhiTracksAtVtx);
01395         h2_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
01396         h2_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
01397 
01398 
01399         h_DCotTracks_[type][0] ->Fill ( aConv->pairCotThetaSeparation() );
01400         h2_DCotTracksVsEta_->Fill( mcEta_, aConv->pairCotThetaSeparation() );
01401         h2_DCotTracksVsR_->Fill( mcConvR_, aConv->pairCotThetaSeparation() );
01402 
01403 
01404 
01405 
01406 
01407         if ( phoIsInBarrel ) {
01408           h_invMass_[type][1] ->Fill(invM);
01409           h_convPRes_[type][1]->Fill( totP / (*mcPho).fourMomentum().e() );
01410           h_EoverPTracks_[type][1] ->Fill( eoverp ) ;
01411           h_PoverETracks_[type][1] ->Fill( 1./eoverp ) ;
01412           h_DPhiTracksAtVtx_[type][1]->Fill( dPhiTracksAtVtx);
01413           h_DCotTracks_[type][1] ->Fill ( aConv->pairCotThetaSeparation() );
01414 
01415           h2_EoverEtrueVsEoverP_[1] ->Fill( eoverp,matchingPho.superCluster()->energy()/ (*mcPho).fourMomentum().e()  ) ;
01416 
01417           h2_PoverPtrueVsEoverP_[1] ->Fill( eoverp, totP/ (*mcPho).fourMomentum().e()  ) ;
01418         }
01419 
01420 
01421         if ( phoIsInEndcap ) {
01422           h_invMass_[type][2] ->Fill(invM);
01423           h_convPRes_[type][2]->Fill( totP / (*mcPho).fourMomentum().e() );
01424           h_EoverPTracks_[type][2] ->Fill( eoverp ) ;
01425           h_PoverETracks_[type][2] ->Fill( 1./eoverp ) ;
01426           h_DPhiTracksAtVtx_[type][2]->Fill( dPhiTracksAtVtx);
01427           h_DCotTracks_[type][2] ->Fill ( aConv->pairCotThetaSeparation() );
01428           h2_EoverEtrueVsEoverP_[2] ->Fill( eoverp,matchingPho.superCluster()->energy()/ (*mcPho).fourMomentum().e()  ) ;
01429           h2_PoverPtrueVsEoverP_[2] ->Fill( eoverp, totP/ (*mcPho).fourMomentum().e()  ) ;
01430         }
01431 
01432 
01433 
01434         if ( aConv->conversionVertex().isValid() ) {
01435           h_convVtxRvsZ_[0] ->Fill ( fabs (aConv->conversionVertex().position().z() ),  sqrt(aConv->conversionVertex().position().perp2())  ) ;
01436           h_convVtxdX_ ->Fill ( aConv->conversionVertex().position().x() - mcConvX_);
01437           h_convVtxdY_ ->Fill ( aConv->conversionVertex().position().y() - mcConvY_);
01438           h_convVtxdZ_ ->Fill ( aConv->conversionVertex().position().z() - mcConvZ_);
01439           h_convVtxdR_ ->Fill ( sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
01440           h2_convVtxdRVsR_ ->Fill (mcConvR_, sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_ );
01441           if ( fabs(matchingPho.superCluster()->position().eta() ) <= 1.)       h_convVtxRvsZ_[1] ->Fill ( fabs (aConv->conversionVertex().position().z() ),  sqrt(aConv->conversionVertex().position().perp2())  ) ;
01442           if ( fabs(matchingPho.superCluster()->position().eta() ) > 1.) h_convVtxRvsZ_[2] ->Fill ( fabs (aConv->conversionVertex().position().z() ),  sqrt(aConv->conversionVertex().position().perp2())  ) ;
01443 
01444         }
01445 
01446 
01447 
01448         h_zPVFromTracks_[type]->Fill ( aConv->zOfPrimaryVertexFromTracks() );
01449         h_dzPVFromTracks_[type]->Fill ( aConv->zOfPrimaryVertexFromTracks() - (*mcPho).primaryVertex().z() );
01450         h2_dzPVVsR_ ->Fill(mcConvR_, aConv->zOfPrimaryVertexFromTracks() - (*mcPho).primaryVertex().z() );
01451 
01452 
01453         float  dPhiTracksAtEcal=-99;
01454         float  dEtaTracksAtEcal=-99;
01455         if (aConv->bcMatchingWithTracks()[0].isNonnull() && aConv->bcMatchingWithTracks()[1].isNonnull() ) {
01456           nRecConvAssWithEcal_++;
01457           float recoPhi1 = aConv->ecalImpactPosition()[0].phi();
01458           float recoPhi2 = aConv->ecalImpactPosition()[1].phi();
01459           float recoEta1 = aConv->ecalImpactPosition()[0].eta();
01460           float recoEta2 = aConv->ecalImpactPosition()[1].eta();
01461           float bcPhi1 = aConv->bcMatchingWithTracks()[0]->phi();
01462           float bcPhi2 = aConv->bcMatchingWithTracks()[1]->phi();
01463           float bcEta1 = aConv->bcMatchingWithTracks()[0]->eta();
01464           float bcEta2 = aConv->bcMatchingWithTracks()[1]->eta();
01465           recoPhi1 = phiNormalization(recoPhi1);
01466           recoPhi2 = phiNormalization(recoPhi2);
01467           bcPhi1 = phiNormalization(bcPhi1);
01468           bcPhi2 = phiNormalization(bcPhi2);
01469           dPhiTracksAtEcal = recoPhi1 -recoPhi2;
01470           dPhiTracksAtEcal = phiNormalization( dPhiTracksAtEcal );
01471           dEtaTracksAtEcal = recoEta1 -recoEta2;
01472           
01473 
01474           h_DPhiTracksAtEcal_[type][0]->Fill( fabs(dPhiTracksAtEcal));
01475           h2_DPhiTracksAtEcalVsR_ ->Fill (mcConvR_, fabs(dPhiTracksAtEcal));
01476           h2_DPhiTracksAtEcalVsEta_ ->Fill (mcEta_, fabs(dPhiTracksAtEcal));
01477 
01478           h_DEtaTracksAtEcal_[type][0]->Fill( dEtaTracksAtEcal);
01479 
01480           if ( phoIsInBarrel ) {
01481             h_DPhiTracksAtEcal_[type][1]->Fill( fabs(dPhiTracksAtEcal));
01482             h_DEtaTracksAtEcal_[type][1]->Fill( dEtaTracksAtEcal);
01483           }
01484           if ( phoIsInEndcap ) {
01485             h_DPhiTracksAtEcal_[type][2]->Fill( fabs(dPhiTracksAtEcal));
01486             h_DEtaTracksAtEcal_[type][2]->Fill( dEtaTracksAtEcal);
01487           }
01488           
01489         }
01490         
01491         
01492         
01493 
01495         for (unsigned int i=0; i<tracks.size(); i++) {
01496           itAss= myAss.find(  aConv->tracks()[i] );
01497           if ( itAss == myAss.end()  ) continue;
01498 
01499           nHitsVsEta_[type] ->Fill (mcEta_,   float(tracks[i]->numberOfValidHits()) );
01500           nHitsVsR_[type] ->Fill (mcConvR_,   float(tracks[i]->numberOfValidHits()) );
01501           h_tkChi2_[type] ->Fill (tracks[i]->normalizedChi2() ); 
01502           h2_Chi2VsEta_[0] ->Fill(  mcEta_, tracks[i]->normalizedChi2() ); 
01503           h2_Chi2VsR_[0] ->Fill(  mcConvR_, tracks[i]->normalizedChi2() ); 
01504 
01505           
01506 
01507           float simPt = sqrt( ((*itAss).second)->momentum().perp2() );
01508           float recPt =   sqrt( aConv->tracks()[i]->innerMomentum().Perp2() ) ;
01509           float ptres= recPt - simPt ;
01510           float pterror = aConv->tracks()[i]->ptError();
01511           h2_PtRecVsPtSim_[0]->Fill ( simPt, recPt);
01512 
01513 
01514 
01515           h_TkPtPull_[0] ->Fill(ptres/pterror);
01516           h2_TkPtPull_[0] ->Fill(mcEta_, ptres/pterror);
01517 
01518           h_TkD0_[0]->Fill ( tracks[i]->d0()* tracks[i]->charge() );
01519 
01520 
01521           if ( aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[0]->Fill  ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2())  );
01522 
01523           if ( phoIsInBarrel ) {
01524             h_TkD0_[1]->Fill ( tracks[i]->d0()* tracks[i]->charge() );
01525             h_TkPtPull_[1] ->Fill(ptres/pterror);
01526             h2_PtRecVsPtSim_[1]->Fill ( simPt, recPt);
01527             if ( aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[1]->Fill  ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2())  );
01528 
01529           }
01530           if ( phoIsInEndcap ) { 
01531             h_TkD0_[2]->Fill ( tracks[i]->d0()* tracks[i]->charge() );
01532             h_TkPtPull_[2] ->Fill(ptres/pterror);
01533             h2_PtRecVsPtSim_[2]->Fill ( simPt, recPt);
01534             if ( aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[2]->Fill  ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2())  );
01535           }
01536           
01537 
01538 
01539         } // end loop over track
01540 
01541 
01542 
01543       } // end analysis of two associated tracks
01544       
01545 
01546 
01547 
01548 
01549     } // loop over conversions
01550 
01551 
01552     
01553   } // End loop over simulated Photons
01554  
01555 
01556   h_nSimPho_->Fill(float(nSimPho_));
01557   h_nSimConv_[0]->Fill(float(nSimConv_[0]));
01558   h_nSimConv_[1]->Fill(float(nSimConv_[1]));
01559   
01560 
01561 
01563   for( reco::PhotonCollection::const_iterator  iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
01564     reco::Photon aPho = reco::Photon(*iPho);
01565     float et= aPho.superCluster()->energy()/cosh( aPho.superCluster()->eta()) ;    
01566     std::vector<reco::ConversionRef> conversions = aPho.conversions();
01567     for (unsigned int iConv=0; iConv<conversions.size(); iConv++) {
01568     
01569 
01570       reco::ConversionRef aConv=conversions[iConv];
01571       std::vector<reco::TrackRef> tracks = aConv->tracks();
01572 
01573       if (tracks.size() < 2 ) continue;
01574 
01575       if ( dCotCutOn_ ) {
01576         if ( ( fabs(mcEta_) > 1.1 && fabs (mcEta_)  < 1.4  )  &&
01577              fabs( aConv->pairCotThetaSeparation() ) > dCotHardCutValue_ )  continue;
01578         if ( fabs( aConv->pairCotThetaSeparation() ) > dCotCutValue_ ) continue;
01579       }
01580 
01581 
01582       
01583       for (unsigned int f=0; f<etaintervalslarge_.size()-1; f++){
01584         if (aPho.eta()>etaintervalslarge_[f]&&
01585             aPho.eta()<etaintervalslarge_[f+1]) {
01586           totMatchedRecConvEtaTwoTracks_[f]++;
01587         }
01588 
01589       }
01590       for (unsigned int f=0; f<phiintervals_.size()-1; f++){
01591         if (aPho.phi()>phiintervals_[f]&&
01592             aPho.phi()<phiintervals_[f+1]) {
01593           totMatchedRecConvPhiTwoTracks_[f]++;
01594         }
01595       }
01596 
01597       for (unsigned int f=0; f<rintervals_.size()-1; f++){
01598         if (mcConvR_>rintervals_[f]&&
01599             mcConvR_<rintervals_[f+1]) {
01600           totMatchedRecConvRTwoTracks_[f]++;
01601         }
01602       }
01603       for (unsigned int f=0; f<zintervals_.size()-1; f++){
01604         if (mcConvZ_>zintervals_[f]&&
01605             mcConvZ_<zintervals_[f+1]) {
01606           totMatchedRecConvZTwoTracks_[f]++;
01607         }
01608       }
01609 
01610       for (unsigned int f=0; f<etintervals_.size()-1; f++){
01611         if ( et >etintervals_[f]&&
01612              et <etintervals_[f+1]) {
01613           totMatchedRecConvEtTwoTracks_[f]++;
01614         }
01615       }
01616 
01617       
01618       
01619       int  nAssT2=0;
01620 
01621       std::map<reco::TrackRef,TrackingParticleRef> myAss;
01622       for (unsigned int i=0; i<tracks.size(); i++) {
01623         
01624         TrackingParticleRef myTP;
01625         for (size_t j = 0; j < RtoSCollPtrs.size(); j++) {          
01626           reco::RecoToSimCollection q = *(RtoSCollPtrs[j]);
01627           
01628           RefToBase<reco::Track> myTk( aConv->tracks()[i] );
01629           
01630           if( q.find(myTk ) != q.end() ) {
01631             std::vector<std::pair<TrackingParticleRef, double> > tp = q[myTk];
01632             for (int itp=0; itp<tp.size(); itp++) {
01633               myTP=tp[itp].first;
01634               //              std::cout << " associated with TP " << myTP->pdgId() << " pt " << sqrt(myTP->momentum().perp2()) << std::endl;
01635               myAss.insert( std::make_pair ( aConv->tracks()[i]  , myTP) );
01636               nAssT2++;
01637             }
01638           }
01639         }
01640         
01641         if ( nAssT2 == 2) {
01642           
01643           for (unsigned int f=0; f<etaintervalslarge_.size()-1; f++){
01644             if (aPho.eta()>etaintervalslarge_[f]&&
01645                 aPho.eta()<etaintervalslarge_[f+1]) {
01646               totRecAssConvEtaTwoTracks_[f]++;
01647             }
01648 
01649           }
01650           for (unsigned int f=0; f<phiintervals_.size()-1; f++){
01651             if (aPho.phi()>phiintervals_[f]&&
01652                 aPho.phi()<phiintervals_[f+1]) {
01653               totRecAssConvPhiTwoTracks_[f]++;
01654             }
01655           }
01656           
01657           for (unsigned int f=0; f<rintervals_.size()-1; f++){
01658             if (mcConvR_>rintervals_[f]&&
01659                 mcConvR_<rintervals_[f+1]) {
01660               totRecAssConvRTwoTracks_[f]++;
01661             }
01662           }
01663           for (unsigned int f=0; f<zintervals_.size()-1; f++){
01664             if (mcConvZ_>zintervals_[f]&&
01665                 mcConvZ_<zintervals_[f+1]) {
01666               totRecAssConvZTwoTracks_[f]++;
01667             }
01668           }
01669           for (unsigned int f=0; f<etintervals_.size()-1; f++){
01670             if ( et >etintervals_[f]&&
01671                  et <etintervals_[f+1]) {
01672               totRecAssConvEtTwoTracks_[f]++;
01673             }
01674           }
01675 
01676 
01677           
01678           
01679         }
01680       }
01681     }
01682   }
01683   
01684 
01685 
01686 
01687 
01688 }

void PhotonValidator::beginJob ( const edm::EventSetup setup  )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 263 of file PhotonValidator.cc.

References DQMStore::book1D(), DQMStore::book2D(), convEffEtaTwoTracks_, convEffEtTwoTracks_, convEffPhiTwoTracks_, convEffRTwoTracks_, convEffZTwoTracks_, convFakeRateEtaTwoTracks_, convFakeRateEtTwoTracks_, convFakeRatePhiTwoTracks_, convFakeRateRTwoTracks_, convFakeRateZTwoTracks_, dbe_, gen_hydjet_hard_muon_trigger_cfg::etaMax, gen_hydjet_hard_muon_trigger_cfg::etaMin, edm::EventSetup::get(), edm::ParameterSet::getParameter(), h2_Chi2VsEta_, h2_Chi2VsR_, h2_convVtxdRVsR_, h2_DCotTracksVsEta_, h2_DCotTracksVsR_, h2_DPhiTracksAtEcalVsEta_, h2_DPhiTracksAtEcalVsR_, h2_DPhiTracksAtVtxVsEta_, h2_DPhiTracksAtVtxVsR_, h2_dzPVVsR_, h2_EoverEtrueVsEoverP_, h2_EoverEtrueVsEta_, h2_EoverEtrueVsR_, h2_EoverPVsEta_, h2_EoverPVsR_, h2_eResVsEta_, h2_PoverPtrueVsEoverP_, h2_PoverPtrueVsEta_, h2_PtRecVsPtSim_, h2_r9VsEta_, h2_TkPtPull_, h_convERes_, h_convEta_, h_convPhi_, h_convPRes_, h_convVtxdR_, h_convVtxdX_, h_convVtxdY_, h_convVtxdZ_, h_convVtxRvsZ_, h_DCotTracks_, h_DEtaTracksAtEcal_, h_distMinAppTracks_, h_DPhiTracksAtEcal_, h_DPhiTracksAtVtx_, h_dzPVFromTracks_, h_EoverPTracks_, h_invMass_, h_nConv_, h_nHitsVsEta_, h_nHitsVsR_, h_nSimConv_, h_nSimPho_, h_phoDEta_, h_phoDPhi_, h_phoE_, h_phoERes_, h_phoEt_, h_phoEta_, h_phoPhi_, h_PoverETracks_, h_r9_, h_r9VsNofTracks_, h_scE_, h_scEt_, h_scEta_, h_scPhi_, h_SimConvE_, h_SimConvEt_, h_SimConvEta_, h_SimConvEtaPix_, h_SimConvPhi_, h_SimConvR_, h_SimConvZ_, h_SimPhoE_, h_SimPhoEt_, h_SimPhoEta_, h_SimPhoPhi_, h_simTkEta_, h_simTkPt_, h_tkChi2_, h_TkD0_, h_TkPtPull_, h_zPVFromTracks_, hBCEnergyOverTrackPout_, initVectors(), nEntry_, nEvt_, nHitsVsEta_, nHitsVsR_, nInvalidPCA_, nRecConv_, nRecConvAss_, nRecConvAssWithEcal_, p_Chi2VsEta_, p_Chi2VsR_, p_convVtxdRVsR_, p_DCotTracksVsEta_, p_DCotTracksVsR_, p_DPhiTracksAtEcalVsEta_, p_DPhiTracksAtEcalVsR_, p_DPhiTracksAtVtxVsEta_, p_DPhiTracksAtVtxVsR_, p_dzPVVsR_, p_EoverEtrueVsEta_, p_EoverEtrueVsR_, p_EoverPVsEta_, p_EoverPVsR_, p_eResVsEta_, p_PoverPtrueVsEta_, p_r9VsEta_, p_TkPtPull_, parameters_, phoEffEta_, phoEffPhi_, edm::ESHandle< T >::product(), DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), theTrackAssociator_, and verbosity_.

00264 {
00265 
00266 
00267 
00268 
00269   nEvt_=0;
00270   nEntry_=0;
00271   nRecConv_=0;
00272   nRecConvAss_=0;
00273   nRecConvAssWithEcal_=0;
00274    
00275   nInvalidPCA_=0;
00276   
00277   dbe_ = 0;
00278   dbe_ = edm::Service<DQMStore>().operator->();
00279   
00280 
00281   edm::ESHandle<TrackAssociatorBase> theHitsAssociator;
00282   setup.get<TrackAssociatorRecord>().get("TrackAssociatorByHits",theHitsAssociator);
00283   theTrackAssociator_ = (TrackAssociatorBase *) theHitsAssociator.product();
00284 
00285 
00286   if (dbe_) {
00287     if (verbosity_ > 0 ) {
00288       dbe_->setVerbose(1);
00289     } else {
00290       dbe_->setVerbose(0);
00291     }
00292   }
00293   if (dbe_) {
00294     if (verbosity_ > 0 ) dbe_->showDirStructure();
00295   }
00296 
00297 
00298 
00299   double resMin = parameters_.getParameter<double>("resMin");
00300   double resMax = parameters_.getParameter<double>("resMax");
00301   int resBin = parameters_.getParameter<int>("resBin");
00302 
00303   double eMin = parameters_.getParameter<double>("eMin");
00304   double eMax = parameters_.getParameter<double>("eMax");
00305   int eBin = parameters_.getParameter<int>("eBin");
00306 
00307   double etMin = parameters_.getParameter<double>("etMin");
00308   double etMax = parameters_.getParameter<double>("etMax");
00309   int etBin = parameters_.getParameter<int>("etBin");
00310 
00311   double etaMin = parameters_.getParameter<double>("etaMin");
00312   double etaMax = parameters_.getParameter<double>("etaMax");
00313   int etaBin = parameters_.getParameter<int>("etaBin");
00314   int etaBin2 = parameters_.getParameter<int>("etaBin2");
00315 
00316   double dEtaMin = parameters_.getParameter<double>("dEtaMin");
00317   double dEtaMax = parameters_.getParameter<double>("dEtaMax");
00318   int dEtaBin = parameters_.getParameter<int>("dEtaBin");
00319  
00320   double phiMin = parameters_.getParameter<double>("phiMin");
00321   double phiMax = parameters_.getParameter<double>("phiMax");
00322   int    phiBin = parameters_.getParameter<int>("phiBin");
00323 
00324   double dPhiMin = parameters_.getParameter<double>("dPhiMin");
00325   double dPhiMax = parameters_.getParameter<double>("dPhiMax");
00326   int    dPhiBin = parameters_.getParameter<int>("dPhiBin");
00327 
00328   double rMin = parameters_.getParameter<double>("rMin");
00329   double rMax = parameters_.getParameter<double>("rMax");
00330   int    rBin = parameters_.getParameter<int>("rBin");
00331 
00332   double zMin = parameters_.getParameter<double>("zMin");
00333   double zMax = parameters_.getParameter<double>("zMax");
00334   int    zBin = parameters_.getParameter<int>("zBin");
00335  
00336 
00337  
00338   double r9Min = parameters_.getParameter<double>("r9Min"); 
00339   double r9Max = parameters_.getParameter<double>("r9Max"); 
00340   int r9Bin = parameters_.getParameter<int>("r9Bin");
00341 
00342   double dPhiTracksMin = parameters_.getParameter<double>("dPhiTracksMin"); 
00343   double dPhiTracksMax = parameters_.getParameter<double>("dPhiTracksMax"); 
00344   int dPhiTracksBin = parameters_.getParameter<int>("dPhiTracksBin"); 
00345   
00346   double dEtaTracksMin = parameters_.getParameter<double>("dEtaTracksMin"); 
00347   double dEtaTracksMax = parameters_.getParameter<double>("dEtaTracksMax"); 
00348   int    dEtaTracksBin = parameters_.getParameter<int>("dEtaTracksBin"); 
00349 
00351   initVectors();
00352 
00353 
00354 
00355   if (dbe_) {  
00357     // SC from reco photons
00358 
00359     dbe_->setCurrentFolder("Egamma/PhotonValidator/SimulationInfo");
00360 
00361     std::string histname = "nOfSimPhotons";    
00362     h_nSimPho_ = dbe_->book1D(histname,"# of Sim photons per event ",20,-0.5,19.5);
00363     histname = "SimPhoE";    
00364     h_SimPhoE_ = dbe_->book1D(histname,"Sim photon energy spectrum",eBin,eMin,eMax);
00365     histname = "SimPhoEt";    
00366     h_SimPhoEt_ = dbe_->book1D(histname,"Sim photon tranverse energy spectrum",etBin,etMin,etMax);
00367     h_SimPhoEta_ = dbe_->book1D("SimPhoEta"," Sim Photon Eta ",etaBin,etaMin, etaMax) ;
00368     h_SimPhoPhi_ = dbe_->book1D("SimPhoPhi"," Sim Photon  Phi ",phiBin,phiMin,phiMax) ;
00369     //
00370     histname = "nOfSimConversions";    
00371     h_nSimConv_[0] = dbe_->book1D(histname,"# of Sim conversions per event ",20,-0.5,19.5);
00372     histname = "SimConvE";    
00373     h_SimConvE_[0]= dbe_->book1D(histname,"Sim conversions energy spectrum",eBin,eMin,eMax);
00374     histname = "SimConvEt";    
00375     h_SimConvEt_[0] = dbe_->book1D(histname,"Sim conversion tranverse energy spectrum",etBin,etMin,etMax);
00376     h_SimConvEta_[0] = dbe_->book1D("SimConvEta"," Sim Conversion Eta ",etaBin,etaMin, etaMax) ;
00377 
00378 
00379 
00380     h_SimConvPhi_[0] = dbe_->book1D("SimConvPhi"," Sim Conversion  Phi ",phiBin,phiMin,phiMax) ;
00381     h_SimConvR_[0] = dbe_->book1D("SimConvR"," Sim Conversion Radius ",rBin,rMin,rMax) ;
00382     h_SimConvZ_[0] = dbe_->book1D("SimConvZ"," Sim Conversion Z ",zBin,zMin,zMax) ;
00383     //   
00384     histname = "nOfVisSimConversions";    
00385     h_nSimConv_[1] = dbe_->book1D(histname,"# of Sim conversions per event ",20,-0.5,19.5);
00386     histname = "VisSimConvE";    
00387     h_SimConvE_[1]= dbe_->book1D(histname,"Sim conversions energy spectrum",eBin,eMin,eMax);
00388     histname = "VisSimConvEt";    
00389     h_SimConvEt_[1] = dbe_->book1D(histname,"Visible Sim conversion tranverse energy spectrum",etBin,etMin,etMax);
00390     h_SimConvEta_[1] = dbe_->book1D("VisSimConvEta"," Visible Sim Conversion Eta ",etaBin,etaMin, etaMax) ;
00391 
00392     h_SimConvEtaPix_[0] = dbe_->book1D("simConvEtaPix"," sim converted Photon Eta: Pix ",etaBin,etaMin, etaMax) ;
00393 
00394 
00395     h_SimConvPhi_[1] = dbe_->book1D("VisSimConvPhi"," Visible Sim Conversion  Phi ",phiBin,phiMin,phiMax) ;
00396     h_SimConvR_[1] = dbe_->book1D("VisSimConvR"," Visible Sim Conversion Radius ",rBin,rMin,rMax) ;
00397     h_SimConvZ_[1] = dbe_->book1D("VisSimConvZ"," Visible Sim Conversion Z ",zBin,zMin,zMax) ;
00398     h_simTkPt_ = dbe_->book1D("simTkPt","Sim conversion tracks pt ",etBin*3,0.,etMax);
00399     h_simTkEta_ = dbe_->book1D("simTkEta","Sim conversion tracks eta ",etaBin,etaMin,etaMax);
00400    
00401 
00402     dbe_->setCurrentFolder("Egamma/PhotonValidator/Photons");
00403 
00405     histname = "recoEffVsEta";
00406     phoEffEta_ =  dbe_->book1D(histname,histname,etaBin,etaMin, etaMax);
00407     histname = "recoEffVsPhi";
00408     phoEffPhi_ =  dbe_->book1D(histname,histname,phiBin,phiMin, phiMax);
00409 
00410 
00411     h_phoEta_[0] = dbe_->book1D("phoEta"," Photon Eta ",etaBin,etaMin, etaMax) ;
00412     h_phoPhi_[0] = dbe_->book1D("phoPhi"," Photon  Phi ",phiBin,phiMin,phiMax) ;
00413 
00414     h_phoDEta_[0] = dbe_->book1D("phoDEta"," Photon Eta(rec)-Eta(true) ",dEtaBin,dEtaMin, dEtaMax) ;
00415     h_phoDPhi_[0] = dbe_->book1D("phoDPhi"," Photon  Phi(rec)-Phi(true) ",dPhiBin,dPhiMin,dPhiMax) ;
00416 
00417     h_scEta_[0] =   dbe_->book1D("scEta"," SC Eta ",etaBin,etaMin, etaMax);
00418     h_scPhi_[0] =   dbe_->book1D("scPhi"," SC Phi ",phiBin,phiMin,phiMax);
00419 
00420 
00421     histname = "scE";
00422     h_scE_[0][0] = dbe_->book1D(histname+"All"," SC Energy: All Ecal  ",eBin,eMin, eMax);
00423     h_scE_[0][1] = dbe_->book1D(histname+"Barrel"," SC Energy: Barrel ",eBin,eMin, eMax);
00424     h_scE_[0][2] = dbe_->book1D(histname+"Endcap"," SC Energy: Endcap ",eBin,eMin, eMax);
00425 
00426     histname = "scEt";
00427     h_scEt_[0][0] = dbe_->book1D(histname+"All"," SC Et: All Ecal ",etBin,etMin, etMax) ;
00428     h_scEt_[0][1] = dbe_->book1D(histname+"Barrel"," SC Et: Barrel",etBin,etMin, etMax) ;
00429     h_scEt_[0][2] = dbe_->book1D(histname+"Endcap"," SC Et: Endcap",etBin,etMin, etMax) ;
00430 
00431 
00432 
00433     histname = "r9";
00434     h_r9_[0][0] = dbe_->book1D(histname+"All",   " r9: All Ecal",r9Bin,r9Min, r9Max) ;
00435     h_r9_[0][1] = dbe_->book1D(histname+"Barrel"," r9: Barrel ",r9Bin,r9Min, r9Max) ;
00436     h_r9_[0][2] = dbe_->book1D(histname+"Endcap"," r9: Endcap ",r9Bin,r9Min, r9Max) ;
00437     //
00438     histname = "r9ConvFromMC";
00439     h_r9_[1][0] = dbe_->book1D(histname+"All",   " r9: All Ecal",r9Bin,r9Min, r9Max) ;
00440     h_r9_[1][1] = dbe_->book1D(histname+"Barrel"," r9: Barrel ",r9Bin,r9Min, r9Max) ;
00441     h_r9_[1][2] = dbe_->book1D(histname+"Endcap"," r9: Endcap ",r9Bin,r9Min, r9Max) ;
00442     //
00443     histname = "r9ConvFromReco";
00444     h_r9_[2][0] = dbe_->book1D(histname+"All",   " r9: All Ecal",r9Bin,r9Min, r9Max) ;
00445     h_r9_[2][1] = dbe_->book1D(histname+"Barrel"," r9: Barrel ",r9Bin,r9Min, r9Max) ;
00446     h_r9_[2][2] = dbe_->book1D(histname+"Endcap"," r9: Endcap ",r9Bin,r9Min, r9Max) ;
00447 
00448     histname="R9VsEta";
00449     h2_r9VsEta_[0] = dbe_->book2D(histname+"All"," All photons r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
00450     histname="pR9VsEta";
00451     p_r9VsEta_[0] = dbe_->book1D(histname+"All"," All photons r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00452     histname="R9VsEta";
00453     h2_r9VsEta_[1] = dbe_->book2D(histname+"Unconv"," All photons r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
00454     histname="pR9VsEta";
00455     p_r9VsEta_[1] = dbe_->book1D(histname+"Unconv"," All photons r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00456 
00457 
00458 
00459     //
00460     histname = "phoE";
00461     h_phoE_[0][0]=dbe_->book1D(histname+"All"," Photon Energy: All ecal ", eBin,eMin, eMax);
00462     h_phoE_[0][1]=dbe_->book1D(histname+"Barrel"," Photon Energy: barrel ",eBin,eMin, eMax);
00463     h_phoE_[0][2]=dbe_->book1D(histname+"Endcap"," Photon Energy: Endcap ",eBin,eMin, eMax);
00464 
00465     histname = "phoEt";
00466     h_phoEt_[0][0] = dbe_->book1D(histname+"All"," Photon Transverse Energy: All ecal ", etBin,etMin, etMax);
00467     h_phoEt_[0][1] = dbe_->book1D(histname+"Barrel"," Photon Transverse Energy: Barrel ",etBin,etMin, etMax);
00468     h_phoEt_[0][2] = dbe_->book1D(histname+"Endcap"," Photon Transverse Energy: Endcap ",etBin,etMin, etMax);
00469 
00470     histname = "eRes";
00471     h_phoERes_[0][0] = dbe_->book1D(histname+"All"," Photon rec/true Energy: All ecal ", resBin,resMin, resMax);
00472     h_phoERes_[0][1] = dbe_->book1D(histname+"Barrel"," Photon rec/true Energy: Barrel ",resBin,resMin, resMax);
00473     h_phoERes_[0][2] = dbe_->book1D(histname+"Endcap"," Photon rec/true Energy: Endcap ",resBin,resMin, resMax);
00474 
00475     h_phoERes_[1][0] = dbe_->book1D(histname+"unconvAll"," Photon rec/true Energy if r9>0.93: All ecal ", resBin,resMin, resMax);
00476     h_phoERes_[1][1] = dbe_->book1D(histname+"unconvBarrel"," Photon rec/true Energy if r9>0.93: Barrel ",resBin,resMin, resMax);
00477     h_phoERes_[1][2] = dbe_->book1D(histname+"unconvEndcap"," Photon rec/true Energyif r9>0.93: Endcap ",resBin,resMin, resMax);
00478 
00479     h_phoERes_[2][0] = dbe_->book1D(histname+"convAll"," Photon rec/true Energy if r9<0.93: All ecal ", resBin,resMin, resMax);
00480     h_phoERes_[2][1] = dbe_->book1D(histname+"convBarrel"," Photon rec/true Energyif r9<0.93: Barrel ",resBin,resMin, resMax);
00481     h_phoERes_[2][2] = dbe_->book1D(histname+"convEndcap"," Photon rec/true Energyif r9<0.93: Endcap ",resBin,resMin, resMax);
00482 
00483     histname="eResVsEta";
00484     h2_eResVsEta_[0] = dbe_->book2D(histname+"All"," All photons E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
00485     histname="pEResVsEta";
00486     p_eResVsEta_[0] = dbe_->book1D(histname+"All"," All photons  E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00487     histname="eResVsEta";
00488     h2_eResVsEta_[1] = dbe_->book2D(histname+"Unconv"," Unconv photons E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
00489     histname="pEResVsEta";
00490     p_eResVsEta_[1] = dbe_->book1D(histname+"Unconv"," Unconv photons  E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00491 
00492 
00493 
00494     dbe_->setCurrentFolder("Egamma/PhotonValidator/ConversionInfo");
00495 
00496     histname = "convEffVsEtaTwoTracks";
00497     convEffEtaTwoTracks_ =  dbe_->book1D(histname,histname,etaBin2,etaMin, etaMax);
00498     histname = "convEffVsEtTwoTracks";
00499     convEffEtTwoTracks_ =  dbe_->book1D(histname,histname,etBin,etMin, etMax);
00500     histname = "convEffVsPhiTwoTracks";
00501     convEffPhiTwoTracks_ =  dbe_->book1D(histname,histname,phiBin,phiMin,phiMax);
00502     histname = "convEffVsRTwoTracks";
00503     convEffRTwoTracks_ =  dbe_->book1D(histname,histname,rBin,rMin, rMax);
00504     histname = "convEffVsZTwoTracks";
00505     convEffZTwoTracks_ =  dbe_->book1D(histname,histname,zBin,zMin,zMax);
00506 
00507 
00508     histname = "convFakeRateVsEtaTwoTracks";
00509     convFakeRateEtaTwoTracks_ =  dbe_->book1D(histname,histname,etaBin2,etaMin, etaMax);
00510     histname = "convFakeRateVsPhiTwoTracks";
00511     convFakeRatePhiTwoTracks_ =  dbe_->book1D(histname,histname,phiBin,phiMin,phiMax);
00512     histname = "convFakeRateVsRTwoTracks";
00513     convFakeRateRTwoTracks_ =  dbe_->book1D(histname,histname,rBin,rMin, rMax);
00514     histname = "convFakeRateVsZTwoTracks";
00515     convFakeRateZTwoTracks_ =  dbe_->book1D(histname,histname,zBin,zMin,zMax);
00516     histname = "convFakeRateVsEtTwoTracks";
00517     convFakeRateEtTwoTracks_ =  dbe_->book1D(histname,histname,etBin,etMin, etMax);
00518 
00519 
00520     histname="nConv";
00521     h_nConv_[0][0] = dbe_->book1D(histname+"All","Number Of Conversions per isolated candidates per events: All Ecal  ",10,-0.5, 9.5);
00522     h_nConv_[0][1] = dbe_->book1D(histname+"Barrel","Number Of Conversions per isolated candidates per events: Ecal Barrel  ",10,-0.5, 9.5);
00523     h_nConv_[0][2] = dbe_->book1D(histname+"Endcap","Number Of Conversions per isolated candidates per events: Ecal Endcap ",10,-0.5, 9.5);
00524 
00525     h_convEta_[0] = dbe_->book1D("convEta"," converted Photon Eta ",etaBin,etaMin, etaMax) ;
00526     h_convPhi_[0] = dbe_->book1D("convPhi"," converted Photon  Phi ",phiBin,phiMin,phiMax) ;
00527 
00528     histname = "convERes";
00529     h_convERes_[0][0] = dbe_->book1D(histname+"All"," Conversion rec/true Energy: All ecal ", resBin,resMin, resMax);
00530     h_convERes_[0][1] = dbe_->book1D(histname+"Barrel"," Conversion rec/true Energy: Barrel ",resBin,resMin, resMax);
00531     h_convERes_[0][2] = dbe_->book1D(histname+"Endcap"," Conversion rec/true Energy: Endcap ",resBin,resMin, resMax);
00532     histname = "convPRes";
00533     h_convPRes_[1][0] = dbe_->book1D(histname+"All"," Conversion rec/true Energy: All ecal ", resBin,resMin, resMax);
00534     h_convPRes_[1][1] = dbe_->book1D(histname+"Barrel"," Conversion rec/true Energy: Barrel ",resBin,resMin, resMax);
00535     h_convPRes_[1][2] = dbe_->book1D(histname+"Endcap"," Conversion rec/true Energy: Endcap ",resBin,resMin, resMax);
00536 
00537 
00538 
00539     histname="r9VsTracks";
00540     h_r9VsNofTracks_[0][0] = dbe_->book2D(histname+"All"," photons r9 vs nTracks from conversions: All Ecal",r9Bin,r9Min, r9Max, 3, -0.5, 2.5) ;
00541     h_r9VsNofTracks_[0][1] = dbe_->book2D(histname+"Barrel"," photons r9 vs nTracks from conversions: Barrel Ecal",r9Bin,r9Min, r9Max, 3, -0.5, 2.5) ;
00542     h_r9VsNofTracks_[0][2] = dbe_->book2D(histname+"Endcap"," photons r9 vs nTracks from conversions: Endcap Ecal",r9Bin,r9Min, r9Max, 3, -0.5, 2.5) ;
00543 
00544     histname="EoverPtracks";
00545     h_EoverPTracks_[1][0] = dbe_->book1D(histname+"All"," photons conversion E/p: all Ecal ",100, 0., 5.);
00546     h_EoverPTracks_[1][1] = dbe_->book1D(histname+"Barrel"," photons conversion E/p: Barrel Ecal",100, 0., 5.);
00547     h_EoverPTracks_[1][2] = dbe_->book1D(histname+"Endcap"," photons conversion E/p: Endcap Ecal ",100, 0., 5.);
00548 
00549     histname="PoverEtracks";
00550     h_PoverETracks_[1][0] = dbe_->book1D(histname+"All"," photons conversion p/E: all Ecal ",100, 0., 5.);
00551     h_PoverETracks_[1][1] = dbe_->book1D(histname+"Barrel"," photons conversion p/E: Barrel Ecal",100, 0., 5.);
00552     h_PoverETracks_[1][2] = dbe_->book1D(histname+"Endcap"," photons conversion p/E: Endcap Ecal ",100, 0., 5.);
00553 
00554 
00555 
00556     histname="EoverEtrueVsEoverP";
00557     h2_EoverEtrueVsEoverP_[0] = dbe_->book2D(histname+"All"," photons conversion E/Etrue vs E/P: all Ecal ",100, 0., 5., 100, 0.5, 1.5);
00558     h2_EoverEtrueVsEoverP_[1] = dbe_->book2D(histname+"Barrel"," photons conversion  E/Etrue vs E/: Barrel Ecal",100, 0., 5.,100, 0.5, 1.5);
00559     h2_EoverEtrueVsEoverP_[2] = dbe_->book2D(histname+"Endcap"," photons conversion  E/Etrue vs E/: Endcap Ecal ",100, 0., 5., 100, 0.5, 1.5);
00560     histname="PoverPtrueVsEoverP";
00561     h2_PoverPtrueVsEoverP_[0] = dbe_->book2D(histname+"All"," photons conversion P/Ptrue vs E/P: all Ecal ",100, 0., 5., 100, 0., 2.5);
00562     h2_PoverPtrueVsEoverP_[1] = dbe_->book2D(histname+"Barrel"," photons conversion  P/Ptrue vs E/: Barrel Ecal",100, 0., 5.,100, 0., 2.5);
00563     h2_PoverPtrueVsEoverP_[2] = dbe_->book2D(histname+"Endcap"," photons conversion  P/Ptrue vs E/: Endcap Ecal ",100, 0., 5., 100, 0., 2.5);
00564 
00565     histname="EoverEtrueVsEta";
00566     h2_EoverEtrueVsEta_[0] = dbe_->book2D(histname+"All"," photons conversion with 2 (associated) reco tracks  E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
00567     histname="pEoverEtrueVsEta";
00568     p_EoverEtrueVsEta_[0] = dbe_->book1D(histname+"All"," photons conversion with 2 (associated) reco tracks E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00569 
00570     histname="EoverEtrueVsEta";
00571     h2_EoverEtrueVsEta_[1] = dbe_->book2D(histname+"All2"," photons conversion  2 reco tracks  E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
00572     histname="pEoverEtrueVsEta";
00573     p_EoverEtrueVsEta_[1] = dbe_->book1D(histname+"All2"," photons conversion  2 reco tracks  E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00574 
00575 
00576     histname="EoverEtrueVsR";
00577     h2_EoverEtrueVsR_[0] = dbe_->book2D(histname+"All"," photons conversion E/Etrue vs R: all Ecal ",rBin,rMin, rMax,100, 0., 2.5);
00578     histname="pEoverEtrueVsR";
00579     p_EoverEtrueVsR_[0] = dbe_->book1D(histname+"All"," photons conversion E/Etrue vs R: all Ecal ",rBin,rMin,rMax);
00580 
00581 
00582 
00583     histname="PoverPtrueVsEta";
00584     h2_PoverPtrueVsEta_[0] = dbe_->book2D(histname+"All"," photons conversion P/Ptrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 5.);
00585     histname="pPoverPtrueVsEta";
00586     p_PoverPtrueVsEta_[0] = dbe_->book1D(histname+"All"," photons conversion P/Ptrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00587 
00588     histname="EoverPVsEta";
00589     h2_EoverPVsEta_[0] = dbe_->book2D(histname+"All"," photons conversion E/P vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 5.);
00590     histname="pEoverPVsEta";
00591     p_EoverPVsEta_[0] = dbe_->book1D(histname+"All"," photons conversion E/P vs #eta: all Ecal ",etaBin2,etaMin, etaMax);
00592 
00593     histname="EoverPVsR";
00594     h2_EoverPVsR_[0] = dbe_->book2D(histname+"All"," photons conversion E/P vs R: all Ecal ",rBin,rMin, rMax,100, 0., 5.);
00595     histname="pEoverPVsR";
00596     p_EoverPVsR_[0] = dbe_->book1D(histname+"All"," photons conversion E/P vs R: all Ecal ",rBin,rMin,rMax);
00597 
00598 
00599     
00600 
00601     histname="hInvMass";
00602     h_invMass_[0][0]= dbe_->book1D(histname+"All_AllTracks"," Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
00603     h_invMass_[0][1]= dbe_->book1D(histname+"Barrel_AllTracks"," Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
00604     h_invMass_[0][2]= dbe_->book1D(histname+"Endcap_AllTracks"," Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
00605     histname="hInvMass";
00606     h_invMass_[1][0]= dbe_->book1D(histname+"All_AssTracks"," Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
00607     h_invMass_[1][1]= dbe_->book1D(histname+"Barrel_AssTracks"," Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
00608     h_invMass_[1][2]= dbe_->book1D(histname+"Endcap_AssTracks"," Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
00609 
00610 
00611     histname="hDPhiTracksAtVtx";
00612     h_DPhiTracksAtVtx_[1][0] =dbe_->book1D(histname+"All", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax); 
00613     h_DPhiTracksAtVtx_[1][1] =dbe_->book1D(histname+"Barrel", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax); 
00614     h_DPhiTracksAtVtx_[1][2] =dbe_->book1D(histname+"Endcap", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax); 
00615 
00616     histname="hDPhiTracksAtVtxVsEta";
00617     h2_DPhiTracksAtVtxVsEta_ = dbe_->book2D(histname+"All","  Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",etaBin2,etaMin, etaMax,100, -0.5, 0.5);
00618     histname="pDPhiTracksAtVtxVsEta";
00619     p_DPhiTracksAtVtxVsEta_ = dbe_->book1D(histname+"All"," Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",etaBin2,etaMin, etaMax);
00620 
00621     histname="hDPhiTracksAtVtxVsR";
00622     h2_DPhiTracksAtVtxVsR_ = dbe_->book2D(histname+"All","  Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",rBin,rMin, rMax,100, -0.5, 0.5);
00623     histname="pDPhiTracksAtVtxVsR";
00624     p_DPhiTracksAtVtxVsR_ = dbe_->book1D(histname+"All"," Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",rBin,rMin, rMax);
00625 
00626 
00627 
00628 
00629     histname="hDCotTracks";
00630     h_DCotTracks_[1][0]= dbe_->book1D(histname+"All"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax); 
00631     h_DCotTracks_[1][1]= dbe_->book1D(histname+"Barrel"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax); 
00632     h_DCotTracks_[1][2]= dbe_->book1D(histname+"Encap"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax); 
00633 
00634     histname="hDCotTracksVsEta";
00635     h2_DCotTracksVsEta_ = dbe_->book2D(histname+"All","  Photons:Tracks from conversions:  #delta cotg(#Theta) Tracks vs #eta",etaBin2,etaMin, etaMax,100, -0.2, 0.2);
00636     histname="pDCotTracksVsEta";
00637     p_DCotTracksVsEta_ = dbe_->book1D(histname+"All"," Photons:Tracks from conversions:  #delta cotg(#Theta) Tracks vs #eta ",etaBin2,etaMin, etaMax);
00638 
00639     histname="hDCotTracksVsR";
00640     h2_DCotTracksVsR_ = dbe_->book2D(histname+"All","  Photons:Tracks from conversions:  #delta cotg(#Theta)  Tracks at vertex vs R",rBin,rMin, rMax,100, -0.2, 0.2);
00641     histname="pDCotTracksVsR";
00642     p_DCotTracksVsR_ = dbe_->book1D(histname+"All"," Photons:Tracks from conversions:  #delta cotg(#Theta) Tracks at vertex vs R ",rBin,rMin, rMax);
00643 
00644 
00645     histname="hDistMinAppTracks";
00646     h_distMinAppTracks_[1][0]= dbe_->book1D(histname+"All"," Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",dEtaTracksBin,-0.1,0.6); 
00647     h_distMinAppTracks_[1][1]= dbe_->book1D(histname+"Barrel"," Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",dEtaTracksBin,-0.1,0.6); 
00648     h_distMinAppTracks_[1][2]= dbe_->book1D(histname+"Encap"," Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",dEtaTracksBin,-0.1,0.6); 
00649 
00650 
00651 
00652     histname="hDPhiTracksAtEcal";
00653     h_DPhiTracksAtEcal_[1][0]= dbe_->book1D(histname+"All"," Photons:Tracks from conversions:  #delta#phi at Ecal : all Ecal ",dPhiTracksBin,0.,dPhiTracksMax); 
00654     h_DPhiTracksAtEcal_[1][1]= dbe_->book1D(histname+"Barrel"," Photons:Tracks from conversions:  #delta#phi at Ecal : Barrel Ecal ",dPhiTracksBin,0.,dPhiTracksMax); 
00655     h_DPhiTracksAtEcal_[1][2]= dbe_->book1D(histname+"Endcap"," Photons:Tracks from conversions:  #delta#phi at Ecal : Endcap Ecal ",dPhiTracksBin,0.,dPhiTracksMax); 
00656     histname="h2_DPhiTracksAtEcalVsR";
00657     h2_DPhiTracksAtEcalVsR_= dbe_->book2D(histname+"All"," Photons:Tracks from conversions:  #delta#phi at Ecal vs R : all Ecal ",rBin,rMin, rMax, dPhiTracksBin,0.,dPhiTracksMax);
00658     histname="pDPhiTracksAtEcalVsR";
00659     p_DPhiTracksAtEcalVsR_ = dbe_->book1D(histname+"All"," Photons:Tracks from conversions:  #delta#phi at Ecal  vs R ",rBin,rMin, rMax);
00660 
00661     histname="h2_DPhiTracksAtEcalVsEta";
00662     h2_DPhiTracksAtEcalVsEta_= dbe_->book2D(histname+"All"," Photons:Tracks from conversions:  #delta#phi at Ecal vs #eta : all Ecal ",etaBin2,etaMin, etaMax, dPhiTracksBin,0.,dPhiTracksMax);
00663     histname="pDPhiTracksAtEcalVsEta";
00664     p_DPhiTracksAtEcalVsEta_ = dbe_->book1D(histname+"All"," Photons:Tracks from conversions:  #delta#phi at Ecal  vs #eta ",etaBin2,etaMin, etaMax);
00665 
00666 
00667 
00668     histname="hDEtaTracksAtEcal";
00669     h_DEtaTracksAtEcal_[1][0]= dbe_->book1D(histname+"All"," Photons:Tracks from conversions:  #delta#eta at Ecal : all Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax); 
00670     h_DEtaTracksAtEcal_[1][1]= dbe_->book1D(histname+"Barrel"," Photons:Tracks from conversions:  #delta#eta at Ecal : Barrel Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax); 
00671     h_DEtaTracksAtEcal_[1][2]= dbe_->book1D(histname+"Endcap"," Photons:Tracks from conversions:  #delta#eta at Ecal : Endcap Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax); 
00672    
00673 
00674     h_convVtxRvsZ_[0] =   dbe_->book2D("convVtxRvsZAll"," Photon Reco conversion vtx position",100, 0., 280.,200,0., 80.);
00675     h_convVtxRvsZ_[1] =   dbe_->book2D("convVtxRvsZBarrel"," Photon Reco conversion vtx position",100, 0., 280.,200,0., 80.);
00676     h_convVtxRvsZ_[2] =   dbe_->book2D("convVtxRvsZEndcap"," Photon Reco conversion vtx position",100, 0., 280.,200,0., 80.);
00677 
00678     h_convVtxdX_ =   dbe_->book1D("convVtxdX"," Photon Reco conversion vtx dX",100, -20.,20.);
00679     h_convVtxdY_ =   dbe_->book1D("convVtxdY"," Photon Reco conversion vtx dY",100, -20.,20.);
00680     h_convVtxdZ_ =   dbe_->book1D("convVtxdZ"," Photon Reco conversion vtx dZ",100, -20.,20.);
00681     h_convVtxdR_ =   dbe_->book1D("convVtxdR"," Photon Reco conversion vtx dR",100, -20.,20.);
00682     h2_convVtxdRVsR_ =  dbe_->book2D("h2ConvVtxdRVsR","Photon Reco conversion vtx dR vsR" ,rBin,rMin, rMax,100, -20.,20.);
00683     p_convVtxdRVsR_ =  dbe_->book1D("pConvVtxdRVsR","Photon Reco conversion vtx dR vsR" ,rBin,rMin, rMax);
00684     
00685 
00686     h_zPVFromTracks_[1] =  dbe_->book1D("zPVFromTracks"," Photons: PV z from conversion tracks",100, -25., 25.);
00687     h_dzPVFromTracks_[1] =  dbe_->book1D("dzPVFromTracks"," Photons: PV Z_rec - Z_true from conversion tracks",100, -5., 5.);
00688     h2_dzPVVsR_ =  dbe_->book2D("h2dzPVVsR","Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax,100, -3.,3.);
00689     p_dzPVVsR_ =  dbe_->book1D("pdzPVVsR","Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax);
00690 
00691 
00692 
00694     histname="nHitsVsEta";
00695     nHitsVsEta_[0] =  dbe_->book2D(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,25,0., 25.);
00696     histname="h_nHitsVsEta";
00697     h_nHitsVsEta_[0] =  dbe_->book1D(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax);
00698 
00699     histname="nHitsVsEta";
00700     nHitsVsEta_[1] =  dbe_->book2D(histname+"AssTracks","Photons:Tracks from conversions: # of hits vs #eta associated tracks",etaBin,etaMin, etaMax,25,0., 25.);
00701     histname="h_nHitsVsEta";
00702     h_nHitsVsEta_[1] =  dbe_->book1D(histname+"AssTracks","Photons:Tracks from conversions: # of hits vs #eta associated tracks",etaBin,etaMin, etaMax);
00703 
00704 
00705     histname="nHitsVsR";
00706     nHitsVsR_[0] =  dbe_->book2D(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,25,0.,25);
00707     histname="h_nHitsVsR";
00708     h_nHitsVsR_[0] =  dbe_->book1D(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax);
00709     histname="tkChi2";
00710     h_tkChi2_[0] = dbe_->book1D(histname+"AllTracks","Photons:Tracks from conversions: #chi^{2} of all tracks", 100, 0., 20.0); 
00711 
00712     histname="nHitsVsR";
00713     nHitsVsR_[1] =  dbe_->book2D(histname+"AssTracks","Photons:Tracks from conversions: # of hits vs radius associated tracks" ,rBin,rMin, rMax,25,0.,25);
00714     histname="h_nHitsVsR";
00715     h_nHitsVsR_[1] =  dbe_->book1D(histname+"AssTracks","Photons:Tracks from conversions: # of hits vs radius associated tracks",rBin,rMin, rMax);
00716 
00717     histname="tkChi2";
00718     h_tkChi2_[1] = dbe_->book1D(histname+"AssTracks","Photons:Tracks from conversions: #chi^{2} of associated  tracks", 100, 0., 20.0); 
00719     histname="h2Chi2VsEta";
00720     h2_Chi2VsEta_[0]=dbe_->book2D(histname+"All"," Reco Track  #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, 0., 20.);
00721     histname="pChi2VsEta";
00722     p_Chi2VsEta_[0]=dbe_->book1D(histname+"All"," Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax);
00723 
00724     histname="h2Chi2VsR";
00725     h2_Chi2VsR_[0]=dbe_->book2D(histname+"All"," Reco Track  #chi^{2} vs R: All ",rBin,rMin, rMax,100, 0., 20.);
00726     histname="pChi2VsR";
00727     p_Chi2VsR_[0]=dbe_->book1D(histname+"All"," Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax);
00728 
00729 
00730 
00731     histname="hTkD0";
00732     h_TkD0_[0]=dbe_->book1D(histname+"All"," Reco Track D0*q: All ",100,-0.1,0.6);
00733     h_TkD0_[1]=dbe_->book1D(histname+"Barrel"," Reco Track D0*q: Barrel ",100,-0.1,0.6);
00734     h_TkD0_[2]=dbe_->book1D(histname+"Endcap"," Reco Track D0*q: Endcap ",100,-0.1,0.6);
00735 
00736 
00737 
00738     histname="hTkPtPull";
00739     h_TkPtPull_[0]=dbe_->book1D(histname+"All"," Reco Track Pt pull: All ",100, -10., 10.);
00740     histname="hTkPtPull";
00741     h_TkPtPull_[1]=dbe_->book1D(histname+"Barrel"," Reco Track Pt pull: Barrel ",100, -10., 10.);
00742     histname="hTkPtPull";
00743     h_TkPtPull_[2]=dbe_->book1D(histname+"Endcap"," Reco Track Pt pull: Endcap ",100, -10., 10.);
00744 
00745     histname="h2TkPtPullEta";
00746     h2_TkPtPull_[0]=dbe_->book2D(histname+"All"," Reco Track Pt pull: All ",etaBin2,etaMin, etaMax,100, -10., 10.);
00747     histname="pTkPtPullEta";
00748     p_TkPtPull_[0]=dbe_->book1D(histname+"All"," Reco Track Pt pull: All ",etaBin2,etaMin, etaMax);
00749 
00750 
00751     histname="PtRecVsPtSim";
00752     h2_PtRecVsPtSim_[0]=dbe_->book2D(histname+"All", "Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
00753     h2_PtRecVsPtSim_[1]=dbe_->book2D(histname+"Barrel", "Pt Rec vs Pt sim: Barrel ", etBin,etMin,etMax,etBin,etMin, etMax);
00754     h2_PtRecVsPtSim_[2]=dbe_->book2D(histname+"Endcap", "Pt Rec vs Pt sim: Endcap ", etBin,etMin,etMax,etBin,etMin, etMax);
00755 
00756 
00757     histname="eBcOverTkPout";
00758     hBCEnergyOverTrackPout_[0] = dbe_->book1D(histname+"All","Matrching BC E/P_out: all Ecal ",100, 0., 5.);
00759     hBCEnergyOverTrackPout_[1] = dbe_->book1D(histname+"Barrel","Matrching BC E/P_out: Barrel ",100, 0., 5.);
00760     hBCEnergyOverTrackPout_[2] = dbe_->book1D(histname+"Endcap","Matrching BC E/P_out: Endcap ",100, 0., 5.);
00761 
00762 
00763 
00764 
00765   }
00766 
00767   
00768   return ;
00769 }

void PhotonValidator::beginRun ( edm::Run r,
edm::EventSetup const &  theEventSetup 
) [virtual]

Definition at line 134 of file PhotonValidator.cc.

References edm::EventSetup::get(), and theMF_.

00134                                                                                {
00135  
00136     //get magnetic field
00137   edm::LogInfo("ConvertedPhotonProducer") << " get magnetic field" << "\n";
00138   theEventSetup.get<IdealMagneticFieldRecord>().get(theMF_);  
00139 
00140 }

void PhotonValidator::doProfileX ( MonitorElement th2m,
MonitorElement me 
) [private]

Definition at line 1915 of file PhotonValidator.cc.

References doProfileX(), and MonitorElement::getTH2F().

01915                                                                             {
01916     doProfileX(th2m->getTH2F(), me);
01917   }

void PhotonValidator::doProfileX ( TH2 *  th2,
MonitorElement me 
) [private]

Definition at line 1902 of file PhotonValidator.cc.

References Exception, MonitorElement::getNbinsX(), h1, MonitorElement::setBinContent(), and MonitorElement::setBinError().

Referenced by doProfileX(), and endJob().

01902                                                               {
01903     if (th2->GetNbinsX()==me->getNbinsX()){
01904       TH1F * h1 = (TH1F*) th2->ProfileX();
01905       for (int bin=0;bin!=h1->GetNbinsX();bin++){
01906         me->setBinContent(bin+1,h1->GetBinContent(bin+1));
01907         me->setBinError(bin+1,h1->GetBinError(bin+1));
01908       }
01909       delete h1;
01910     } else {
01911       throw cms::Exception("MultiTrackValidator") << "Different number of bins!";
01912     }
01913   }

void PhotonValidator::endJob ( void   )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 1712 of file PhotonValidator.cc.

References convEffEtaTwoTracks_, convEffEtTwoTracks_, convEffPhiTwoTracks_, convEffRTwoTracks_, convEffZTwoTracks_, convFakeRateEtaTwoTracks_, convFakeRateEtTwoTracks_, convFakeRatePhiTwoTracks_, convFakeRateRTwoTracks_, convFakeRateZTwoTracks_, GenMuonPlsPt100GeV_cfg::cout, dbe_, doProfileX(), lat::endl(), fillPlotFromVectors(), edm::ParameterSet::getParameter(), h2_Chi2VsEta_, h2_Chi2VsR_, h2_convVtxdRVsR_, h2_DCotTracksVsEta_, h2_DCotTracksVsR_, h2_DPhiTracksAtEcalVsEta_, h2_DPhiTracksAtEcalVsR_, h2_DPhiTracksAtVtxVsEta_, h2_DPhiTracksAtVtxVsR_, h2_dzPVVsR_, h2_EoverEtrueVsEta_, h2_EoverEtrueVsR_, h2_EoverPVsEta_, h2_EoverPVsR_, h2_eResVsEta_, h2_PoverPtrueVsEta_, h2_TkPtPull_, h_nHitsVsEta_, h_nHitsVsR_, i, nEntry_, nEvt_, nHitsVsEta_, nHitsVsR_, nRecConvAss_, nRecConvAssWithEcal_, iggi_31X_cfg::outputFileName, p_Chi2VsEta_, p_Chi2VsR_, p_convVtxdRVsR_, p_DCotTracksVsEta_, p_DCotTracksVsR_, p_DPhiTracksAtEcalVsEta_, p_DPhiTracksAtEcalVsR_, p_DPhiTracksAtVtxVsEta_, p_DPhiTracksAtVtxVsR_, p_dzPVVsR_, p_EoverEtrueVsEta_, p_EoverEtrueVsR_, p_EoverPVsEta_, p_EoverPVsR_, p_eResVsEta_, p_PoverPtrueVsEta_, p_TkPtPull_, parameters_, phoEffEta_, phoEffPhi_, DQMStore::save(), DQMStore::showDirStructure(), totMatchedRecConvEtaTwoTracks_, totMatchedRecConvEtTwoTracks_, totMatchedRecConvPhiTwoTracks_, totMatchedRecConvRTwoTracks_, totMatchedRecConvZTwoTracks_, totMatchedSimConvEtaTwoTracks_, totMatchedSimConvEtTwoTracks_, totMatchedSimConvPhiTwoTracks_, totMatchedSimConvRTwoTracks_, totMatchedSimConvZTwoTracks_, totMatchedSimPhoEta_, totMatchedSimPhoPhi_, totRecAssConvEtaTwoTracks_, totRecAssConvEtTwoTracks_, totRecAssConvPhiTwoTracks_, totRecAssConvRTwoTracks_, totRecAssConvZTwoTracks_, totSimConvEt_, totSimConvEta_, totSimConvPhi_, totSimConvR_, totSimConvZ_, totSimPhoEta_, and totSimPhoPhi_.

01713 {
01714 
01715 
01716   for (int i=0; i<2; i++) {
01717     doProfileX( nHitsVsEta_[i], h_nHitsVsEta_[i]);
01718     doProfileX( nHitsVsR_[i], h_nHitsVsR_[i]);
01719   }
01720 
01721  
01722   doProfileX( h2_TkPtPull_[0],p_TkPtPull_[0]);
01723  
01724 
01725 
01726   doProfileX( h2_eResVsEta_[0], p_eResVsEta_[0] );
01727   doProfileX( h2_eResVsEta_[1], p_eResVsEta_[1] );
01728 
01729   doProfileX( h2_EoverEtrueVsEta_[0], p_EoverEtrueVsEta_[0] );
01730   doProfileX( h2_EoverEtrueVsEta_[1], p_EoverEtrueVsEta_[1] );
01731 
01732   doProfileX( h2_EoverEtrueVsR_[0], p_EoverEtrueVsR_[0] );
01733   doProfileX( h2_PoverPtrueVsEta_[0], p_PoverPtrueVsEta_[0] );
01734   doProfileX( h2_EoverPVsEta_[0], p_EoverPVsEta_[0] );
01735   doProfileX( h2_EoverPVsR_[0], p_EoverPVsR_[0] );
01736 
01737 
01738   doProfileX( h2_Chi2VsEta_[0], p_Chi2VsEta_[0] ); 
01739   doProfileX( h2_Chi2VsR_[0], p_Chi2VsR_[0] ); 
01740   doProfileX( h2_DPhiTracksAtVtxVsEta_,p_DPhiTracksAtVtxVsEta_);
01741   doProfileX( h2_DPhiTracksAtVtxVsR_,p_DPhiTracksAtVtxVsR_);
01742   doProfileX( h2_DCotTracksVsEta_,p_DCotTracksVsEta_);
01743   doProfileX( h2_DCotTracksVsR_,p_DCotTracksVsR_);
01744 
01745   doProfileX( h2_DPhiTracksAtEcalVsR_, p_DPhiTracksAtEcalVsR_);
01746   doProfileX( h2_DPhiTracksAtEcalVsEta_, p_DPhiTracksAtEcalVsEta_);
01747 
01748   doProfileX( h2_convVtxdRVsR_,  p_convVtxdRVsR_);
01749   doProfileX( h2_dzPVVsR_, p_dzPVVsR_); 
01750 
01751 
01752  
01753   fillPlotFromVectors(phoEffEta_,totMatchedSimPhoEta_,totSimPhoEta_,"effic");
01754   fillPlotFromVectors(phoEffPhi_,totMatchedSimPhoPhi_,totSimPhoPhi_,"effic"); 
01755  //
01756   fillPlotFromVectors(convEffEtaTwoTracks_,totMatchedSimConvEtaTwoTracks_,totSimConvEta_,"effic");
01757   fillPlotFromVectors(convEffPhiTwoTracks_,totMatchedSimConvPhiTwoTracks_,totSimConvPhi_,"effic");
01758   fillPlotFromVectors(convEffRTwoTracks_,totMatchedSimConvRTwoTracks_,totSimConvR_,"effic");
01759   fillPlotFromVectors(convEffZTwoTracks_,totMatchedSimConvZTwoTracks_,totSimConvZ_,"effic");
01760   fillPlotFromVectors(convEffEtTwoTracks_,totMatchedSimConvEtTwoTracks_,totSimConvEt_,"effic");  
01761 
01762   fillPlotFromVectors(convFakeRateEtaTwoTracks_,totRecAssConvEtaTwoTracks_,totMatchedRecConvEtaTwoTracks_,"fakerate");
01763   fillPlotFromVectors(convFakeRatePhiTwoTracks_,totRecAssConvPhiTwoTracks_,totMatchedRecConvPhiTwoTracks_,"fakerate");
01764   fillPlotFromVectors(convFakeRateRTwoTracks_, totRecAssConvRTwoTracks_,totMatchedRecConvRTwoTracks_,"fakerate");
01765   fillPlotFromVectors(convFakeRateZTwoTracks_,totRecAssConvZTwoTracks_,totMatchedRecConvZTwoTracks_,"fakerate");
01766   fillPlotFromVectors(convFakeRateEtTwoTracks_,totRecAssConvEtTwoTracks_,totMatchedRecConvEtTwoTracks_,"fakerate");
01767 
01768 
01769 
01770   dbe_->showDirStructure();
01771   bool outputMEsInRootFile = parameters_.getParameter<bool>("OutputMEsInRootFile");
01772   std::string outputFileName = parameters_.getParameter<std::string>("OutputFileName");
01773   if(outputMEsInRootFile){
01774     dbe_->save(outputFileName);
01775   }
01776   
01777   edm::LogInfo("PhotonValidator") << "Analyzed " << nEvt_  << "\n";
01778   // std::cout  << "::endJob Analyzed " << nEvt_ << " events " << " with total " << nPho_ << " Photons " << "\n";
01779   std::cout  << "PhotonValidator::endJob Analyzed " << nEvt_ << " events " << "\n";
01780   std::cout << " Total number of photons " << nEntry_ << std::endl;
01781   std::cout << " Fraction of conv with two tracks having both BC matching " << float(nRecConvAssWithEcal_)/nRecConvAss_ << std::endl;
01782    
01783   return ;
01784 }

std::vector< float > PhotonValidator::errors ( TH1 *  histo1,
TH1 *  histo2 
) [private]

Definition at line 1838 of file PhotonValidator.cc.

References i, and funct::sqrt().

01838                                                                      {
01839   std::vector<float>  nEntryNum, nEntryDen;
01840   std::vector<float> ratio; 
01841   std::vector<float> erro;
01842 
01844  
01845  
01846   const int nBin1=histo1->GetNbinsX();
01847   const int nBin2=histo2->GetNbinsX();
01848    
01849   //  std::cout << " histo 1 has " << nBin1 << " bins " << std::endl;
01850   // std::cout << " histo 2 has " << nBin2 << " bins " << std::endl;
01851    
01852   static const int sega1=nBin1;  
01853   static const int sega2=nBin2;  
01854 
01855   
01856   nEntryNum.clear();
01857   nEntryDen.clear();
01858   ratio.clear();
01859   erro.clear();
01860  
01861   //  cout << " sizes after clear " << nEntryNum.size() << " " << erro.size() << endl;
01862 
01863   for ( int i=1; i<=nBin1; i++) {
01864     //    cout << " Bin # " << i << " has " << histo1->GetBinContent(i) << " entries " << endl; 
01865     // nEntryNum[i]=histo1->GetBinContent(i);
01866     nEntryNum.push_back( histo1->GetBinContent(i) ) ;
01867   }
01868   for ( int i=1; i<=nBin1; i++) {
01869     // cout << " Bin # " << i << " has " << histo2->GetBinContent(i) << " entries " << endl; 
01870     //  nEntryDen[i]=histo2->GetBinContent(i);
01871    nEntryDen.push_back( histo2->GetBinContent(i) ) ; 
01872 
01873   }
01874   
01875   //  cout << " nEntryNum size " << nEntryNum.size() << " nEntryDen size " << nEntryDen.size() << " erro size " << erro.size() << endl;
01876  
01877   float val, delta;
01878   for ( int i=0; i<nEntryNum.size() ; i++) { 
01879     //   cout << " nEntryNum " << nEntryNum[i] << " nEntryDen " << nEntryDen[i] << endl;
01880     val = 0, delta=0;
01881     if ( nEntryDen[i] !=0 ) {
01882       val= nEntryNum[i]/nEntryDen[i];
01883       delta= sqrt ( val*(1.-val)/ nEntryDen[i]   );
01884       if (delta==0) delta=0.0003; 
01885      
01886     } 
01887 
01888     
01889 
01890     ratio.push_back( val  ) ;
01891     erro.push_back(delta);
01892     //    cout << " ratio " << ratio[i] << " erro " << erro[i] << endl; 
01893   }
01894 
01895 
01896   return erro;
01897 
01898 
01899  }

float PhotonValidator::etaTransformation ( float  a,
float  b 
) [private]

Definition at line 1802 of file PhotonValidator.cc.

References ETA, etaBarrelEndcap, funct::log(), PI, R_ECAL, funct::tan(), TWOPI, and Z_Endcap.

Referenced by analyze().

01802                                                                              {
01803 
01804   //---Definitions
01805   const float PI    = 3.1415927;
01806   const float TWOPI = 2.0*PI;
01807 
01808   //---Definitions for ECAL
01809   const float R_ECAL           = 136.5;
01810   const float Z_Endcap         = 328.0;
01811   const float etaBarrelEndcap  = 1.479; 
01812    
01813   //---ETA correction
01814 
01815   float Theta = 0.0  ; 
01816   float ZEcal = R_ECAL*sinh(EtaParticle)+Zvertex;
01817 
01818   if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
01819   if(Theta<0.0) Theta = Theta+PI ;
01820   float ETA = - log(tan(0.5*Theta));
01821          
01822   if( fabs(ETA) > etaBarrelEndcap )
01823     {
01824       float Zend = Z_Endcap ;
01825       if(EtaParticle<0.0 )  Zend = -Zend ;
01826       float Zlen = Zend - Zvertex ;
01827       float RR = Zlen/sinh(EtaParticle); 
01828       Theta = atan(RR/Zend);
01829       if(Theta<0.0) Theta = Theta+PI ;
01830       ETA = - log(tan(0.5*Theta));                    
01831     } 
01832   //---Return the result
01833   return ETA;
01834   //---end
01835 }

void PhotonValidator::fillPlotFromVectors ( MonitorElement h,
std::vector< int > &  numerator,
std::vector< int > &  denominator,
std::string  type 
) [private]

Definition at line 1692 of file PhotonValidator.cc.

References err, j, MonitorElement::setBinContent(), MonitorElement::setBinError(), funct::sqrt(), and value.

Referenced by endJob().

01692                                                                                                                                    {
01693     double value,err;
01694     for (unsigned int j=0; j<numerator.size(); j++){
01695       if (denominator[j]!=0){
01696         if (type=="effic")
01697           value = ((double) numerator[j])/((double) denominator[j]);
01698         else if (type=="fakerate")
01699           value = 1-((double) numerator[j])/((double) denominator[j]);
01700         else return;
01701         err = sqrt( value*(1-value)/(double) denominator[j] );
01702         h->setBinContent(j+1, value);
01703         h->setBinError(j+1,err);
01704       }
01705       else {
01706         h->setBinContent(j+1, 0);
01707       }
01708     }
01709   }

void PhotonValidator::initVectors (  )  [private]

Definition at line 155 of file PhotonValidator.cc.

References d, etaintervals_, etaintervalslarge_, gen_hydjet_hard_muon_trigger_cfg::etaMax, gen_hydjet_hard_muon_trigger_cfg::etaMin, etintervals_, edm::ParameterSet::getParameter(), k, parameters_, phiintervals_, rintervals_, cmsRelvalreportInput::step, totMatchedRecConvEtaTwoTracks_, totMatchedRecConvEtTwoTracks_, totMatchedRecConvPhiTwoTracks_, totMatchedRecConvRTwoTracks_, totMatchedRecConvZTwoTracks_, totMatchedSimConvEtaTwoTracks_, totMatchedSimConvEtTwoTracks_, totMatchedSimConvPhiTwoTracks_, totMatchedSimConvRTwoTracks_, totMatchedSimConvZTwoTracks_, totMatchedSimPhoEta_, totMatchedSimPhoPhi_, totRecAssConvEtaTwoTracks_, totRecAssConvEtTwoTracks_, totRecAssConvPhiTwoTracks_, totRecAssConvRTwoTracks_, totRecAssConvZTwoTracks_, totSimConvEt_, totSimConvEta_, totSimConvPhi_, totSimConvR_, totSimConvZ_, totSimPhoEta_, totSimPhoPhi_, and zintervals_.

Referenced by beginJob().

00155                                   { 
00156 
00157 
00158 
00159   double etaMin = parameters_.getParameter<double>("etaMin");
00160   double etaMax = parameters_.getParameter<double>("etaMax");
00161   int etaBin = parameters_.getParameter<int>("etaBin");
00162   int etaBin2 = parameters_.getParameter<int>("etaBin2");
00163 
00164 
00165  
00166   double phiMin = parameters_.getParameter<double>("phiMin");
00167   double phiMax = parameters_.getParameter<double>("phiMax");
00168   int    phiBin = parameters_.getParameter<int>("phiBin");
00169 
00170 
00171 
00172   double rMin = parameters_.getParameter<double>("rMin");
00173   double rMax = parameters_.getParameter<double>("rMax");
00174   int    rBin = parameters_.getParameter<int>("rBin");
00175 
00176   double zMin = parameters_.getParameter<double>("zMin");
00177   double zMax = parameters_.getParameter<double>("zMax");
00178   int    zBin = parameters_.getParameter<int>("zBin");
00179  
00180 
00181   double etMin = parameters_.getParameter<double>("etMin");
00182   double etMax = parameters_.getParameter<double>("etMax");
00183   int etBin = parameters_.getParameter<int>("etBin");
00184 
00185  
00186   double step=(etaMax-etaMin)/etaBin;
00187   etaintervals_.push_back(etaMin);
00188     for (int k=1;k<etaBin+1;k++) {
00189       double d=etaMin+k*step;
00190       etaintervals_.push_back(d);
00191       totSimPhoEta_.push_back(0);     
00192       totMatchedSimPhoEta_.push_back(0);     
00193     }   
00194 
00195     step=(etaMax-etaMin)/etaBin2;
00196     etaintervalslarge_.push_back(etaMin);
00197     for (int k=1;k<etaBin2+1;k++) {
00198       double d=etaMin+k*step;
00199       etaintervalslarge_.push_back(d);
00200       totSimConvEta_.push_back(0);     
00201       totMatchedSimConvEtaTwoTracks_.push_back(0); 
00202       totMatchedRecConvEtaTwoTracks_.push_back(0);     
00203       totRecAssConvEtaTwoTracks_.push_back(0);     
00204      
00205     }   
00206 
00207 
00208 
00209     step=(phiMax-phiMin)/phiBin;
00210     phiintervals_.push_back(phiMin);
00211     for (int k=1;k<phiBin+1;k++) {
00212       double d=phiMin+k*step;
00213       phiintervals_.push_back(d);
00214       totSimPhoPhi_.push_back(0);     
00215       totMatchedSimPhoPhi_.push_back(0);     
00216       //
00217       totSimConvPhi_.push_back(0);     
00218       totMatchedSimConvPhiTwoTracks_.push_back(0);     
00219       totMatchedRecConvPhiTwoTracks_.push_back(0);     
00220       totRecAssConvPhiTwoTracks_.push_back(0);     
00221     }   
00222     step=(rMax-rMin)/rBin;
00223     rintervals_.push_back(rMin);
00224     for (int k=1;k<rBin+1;k++) {
00225       double d=rMin+k*step;
00226       rintervals_.push_back(d);
00227       totSimConvR_.push_back(0);     
00228       totMatchedSimConvRTwoTracks_.push_back(0);    
00229       totMatchedRecConvRTwoTracks_.push_back(0);     
00230       totRecAssConvRTwoTracks_.push_back(0);     
00231   
00232     }   
00233     step=(zMax-zMin)/zBin;
00234     zintervals_.push_back(zMin);
00235     for (int k=1;k<zBin+1;k++) {
00236       double d=zMin+k*step;
00237       zintervals_.push_back(d);
00238       totSimConvZ_.push_back(0);     
00239       totMatchedSimConvZTwoTracks_.push_back(0);  
00240       totMatchedRecConvZTwoTracks_.push_back(0);     
00241       totRecAssConvZTwoTracks_.push_back(0);     
00242     
00243     }   
00244 
00245     step=(etMax-etMin)/etBin;
00246     etintervals_.push_back(etMin);
00247     for (int k=1;k<etBin+1;k++) {
00248       double d=etMin+k*step;
00249       etintervals_.push_back(d);
00250       totSimConvEt_.push_back(0);     
00251       totMatchedSimConvEtTwoTracks_.push_back(0);  
00252       totMatchedRecConvEtTwoTracks_.push_back(0);     
00253       totRecAssConvEtTwoTracks_.push_back(0);     
00254     }   
00255     
00256 
00257 
00258 
00259 }

float PhotonValidator::phiNormalization ( float &  a  )  [private]

Definition at line 1786 of file PhotonValidator.cc.

References PI, and TWOPI.

Referenced by analyze().

01787 {
01788   //---Definitions
01789   const float PI    = 3.1415927;
01790   const float TWOPI = 2.0*PI;
01791 
01792 
01793   if(phi >  PI) {phi = phi - TWOPI;}
01794   if(phi < -PI) {phi = phi + TWOPI;}
01795 
01796   //  cout << " Float_t PHInormalization out " << PHI << endl;
01797   return phi;
01798 
01799 }


Member Data Documentation

edm::InputTag PhotonValidator::barrelEcalHits_ [private]

Definition at line 98 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

edm::InputTag PhotonValidator::bcBarrelCollection_ [private]

Definition at line 95 of file PhotonValidator.h.

edm::InputTag PhotonValidator::bcEndcapCollection_ [private]

Definition at line 96 of file PhotonValidator.h.

double PhotonValidator::bcEtLow_ [private]

Definition at line 118 of file PhotonValidator.h.

Referenced by PhotonValidator().

MonitorElement* PhotonValidator::convEffEtaOneTrack_ [private]

Definition at line 194 of file PhotonValidator.h.

MonitorElement* PhotonValidator::convEffEtaTwoTracks_ [private]

Definition at line 181 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convEffEtTwoTracks_ [private]

Definition at line 185 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convEffPhiOneTrack_ [private]

Definition at line 195 of file PhotonValidator.h.

MonitorElement* PhotonValidator::convEffPhiTwoTracks_ [private]

Definition at line 182 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convEffROneTrack_ [private]

Definition at line 196 of file PhotonValidator.h.

MonitorElement* PhotonValidator::convEffRTwoTracks_ [private]

Definition at line 183 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convEffZOneTrack_ [private]

Definition at line 197 of file PhotonValidator.h.

MonitorElement* PhotonValidator::convEffZTwoTracks_ [private]

Definition at line 184 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

std::string PhotonValidator::conversionIOTrackProducer_ [private]

Definition at line 105 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

std::string PhotonValidator::conversionOITrackProducer_ [private]

Definition at line 104 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

MonitorElement* PhotonValidator::convFakeRateEtaTwoTracks_ [private]

Definition at line 187 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convFakeRateEtTwoTracks_ [private]

Definition at line 191 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convFakeRatePhiTwoTracks_ [private]

Definition at line 188 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convFakeRateRTwoTracks_ [private]

Definition at line 189 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::convFakeRateZTwoTracks_ [private]

Definition at line 190 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

DQMStore* PhotonValidator::dbe_ [private]

Definition at line 72 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

bool PhotonValidator::dCotCutOn_ [private]

Definition at line 126 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

double PhotonValidator::dCotCutValue_ [private]

Definition at line 127 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

double PhotonValidator::dCotHardCutValue_ [private]

Definition at line 128 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

double PhotonValidator::ecalEtSumCut_ [private]

Definition at line 124 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::ecalIsolRadius_ [private]

Definition at line 117 of file PhotonValidator.h.

Referenced by PhotonValidator().

edm::InputTag PhotonValidator::endcapEcalHits_ [private]

Definition at line 99 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

std::vector<double> PhotonValidator::etaintervals_ [private]

Definition at line 146 of file PhotonValidator.h.

Referenced by analyze(), and initVectors().

std::vector<double> PhotonValidator::etaintervalslarge_ [private]

Definition at line 146 of file PhotonValidator.h.

Referenced by analyze(), and initVectors().

std::vector<double> PhotonValidator::etintervals_ [private]

Definition at line 147 of file PhotonValidator.h.

Referenced by analyze(), and initVectors().

std::string PhotonValidator::fName_ [private]

Definition at line 71 of file PhotonValidator.h.

Referenced by PhotonValidator().

MonitorElement* PhotonValidator::h2_Chi2VsEta_[3] [private]

Definition at line 311 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_Chi2VsR_[3] [private]

Definition at line 313 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_convVtxdRVsR_ [private]

Definition at line 295 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_DCotTracksVsEta_ [private]

Definition at line 270 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_DCotTracksVsR_ [private]

Definition at line 272 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_DPhiTracksAtEcalVsEta_ [private]

Definition at line 282 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_DPhiTracksAtEcalVsR_ [private]

Definition at line 280 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_DPhiTracksAtVtxVsEta_ [private]

Definition at line 264 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_DPhiTracksAtVtxVsR_ [private]

Definition at line 266 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_dzPVVsR_ [private]

Definition at line 301 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_EoverEtrueVsEoverP_[3] [private]

Definition at line 246 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h2_EoverEtrueVsEta_[3] [private]

Definition at line 254 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_EoverEtrueVsR_[3] [private]

Definition at line 256 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_EoverPVsEta_[3] [private]

Definition at line 249 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_EoverPVsR_[3] [private]

Definition at line 251 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_eResVsEta_[3] [private]

Definition at line 224 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_PoverPtrueVsEoverP_[3] [private]

Definition at line 247 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h2_PoverPtrueVsEta_[3] [private]

Definition at line 260 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h2_PtRecVsPtSim_[3] [private]

Definition at line 321 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h2_r9VsEta_[3] [private]

Definition at line 216 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h2_TkPtPull_[3] [private]

Definition at line 319 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::h_convERes_[2][3] [private]

Definition at line 237 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convEta_[2] [private]

Definition at line 235 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convPhi_[2] [private]

Definition at line 236 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convPRes_[2][3] [private]

Definition at line 238 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convVtxdR_ [private]

Definition at line 294 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convVtxdX_ [private]

Definition at line 291 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convVtxdY_ [private]

Definition at line 292 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convVtxdZ_ [private]

Definition at line 293 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_convVtxRvsZ_[3] [private]

Definition at line 290 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_DCotTracks_[2][3] [private]

Definition at line 269 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_DEtaTracksAtEcal_[2][3] [private]

Definition at line 286 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_distMinAppTracks_[2][3] [private]

Definition at line 275 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_DPhiTracksAtEcal_[2][3] [private]

Definition at line 279 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_DPhiTracksAtVtx_[2][3] [private]

Definition at line 263 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_dzPVFromTracks_[2] [private]

Definition at line 300 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_EoverPTracks_[2][3] [private]

Definition at line 242 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_invMass_[2][3] [private]

Definition at line 240 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_nConv_[2][3] [private]

info per conversion

Definition at line 234 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_nHitsVsEta_[2] [private]

Definition at line 306 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::h_nHitsVsR_[2] [private]

Definition at line 308 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::h_nPho_[2][3] [private]

Definition at line 207 of file PhotonValidator.h.

MonitorElement* PhotonValidator::h_nSimConv_[2] [private]

Definition at line 162 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_nSimPho_ [private]

Definition at line 156 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoDEta_[2] [private]

Definition at line 203 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoDPhi_[2] [private]

Definition at line 204 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoE_[2][3] [private]

Definition at line 220 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoERes_[3][3] [private]

Definition at line 222 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoEt_[2][3] [private]

Definition at line 221 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoEta_[2] [private]

Definition at line 228 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_phoPhi_[2] [private]

Definition at line 229 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_PoverETracks_[2][3] [private]

Definition at line 243 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_r9_[3][3] [private]

Definition at line 215 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_r9VsNofTracks_[2][3] [private]

Definition at line 241 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_scE_[2][3] [private]

Definition at line 212 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_scEt_[2][3] [private]

Definition at line 213 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_scEta_[2] [private]

Definition at line 208 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_scEtaPhi_[2] [private]

Definition at line 210 of file PhotonValidator.h.

MonitorElement* PhotonValidator::h_scPhi_[2] [private]

Definition at line 209 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvE_[2] [private]

Definition at line 163 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvEt_[2] [private]

Definition at line 164 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvEta_[2] [private]

Definition at line 166 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvEtaPix_[2] [private]

Definition at line 167 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvPhi_[2] [private]

Definition at line 165 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvR_[2] [private]

Definition at line 169 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimConvZ_[2] [private]

Definition at line 170 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimPhoE_ [private]

Definition at line 157 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimPhoEt_ [private]

Definition at line 158 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimPhoEta_ [private]

Definition at line 160 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_SimPhoPhi_ [private]

Definition at line 159 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_simTkEta_ [private]

Definition at line 173 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_simTkPt_ [private]

Definition at line 172 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_tkChi2_[2] [private]

Definition at line 310 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_TkD0_[3] [private]

Definition at line 316 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_TkPtPull_[3] [private]

Definition at line 318 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::h_zPVFromTracks_[2] [private]

Definition at line 299 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

MonitorElement* PhotonValidator::hBCEnergyOverTrackPout_[3] [private]

Definition at line 323 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

double PhotonValidator::hcalEtSumCut_ [private]

Definition at line 125 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::hcalHitEtLow_ [private]

Definition at line 121 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::hcalIsolExtRadius_ [private]

Definition at line 119 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::hcalIsolInnRadius_ [private]

Definition at line 120 of file PhotonValidator.h.

Referenced by PhotonValidator().

edm::InputTag PhotonValidator::label_tp_ [private]

Definition at line 101 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

double PhotonValidator::lip_ [private]

Definition at line 116 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::mcConvR_ [private]

Definition at line 133 of file PhotonValidator.h.

Referenced by analyze().

double PhotonValidator::mcConvX_ [private]

Definition at line 136 of file PhotonValidator.h.

Referenced by analyze().

double PhotonValidator::mcConvY_ [private]

Definition at line 135 of file PhotonValidator.h.

Referenced by analyze().

double PhotonValidator::mcConvZ_ [private]

Definition at line 134 of file PhotonValidator.h.

Referenced by analyze().

double PhotonValidator::mcEta_ [private]

Definition at line 132 of file PhotonValidator.h.

Referenced by analyze().

double PhotonValidator::mcPhi_ [private]

global variable for the MC photon

Definition at line 131 of file PhotonValidator.h.

Referenced by analyze().

double PhotonValidator::minPhoEtCut_ [private]

Definition at line 112 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

int PhotonValidator::nEntry_ [private]

Definition at line 77 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

int PhotonValidator::nEvt_ [private]

Definition at line 76 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::nHitsVsEta_[2] [private]

Definition at line 307 of file PhotonValidator.h.

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

MonitorElement* PhotonValidator::nHitsVsR_[2] [private]

Definition at line 309 of file PhotonValidator.h.

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

int PhotonValidator::nInvalidPCA_ [private]

Definition at line 85 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

int PhotonValidator::nMatched_ [private]

Definition at line 80 of file PhotonValidator.h.

int PhotonValidator::nRecConv_ [private]

Definition at line 81 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

int PhotonValidator::nRecConvAss_ [private]

Definition at line 82 of file PhotonValidator.h.

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

int PhotonValidator::nRecConvAssWithEcal_ [private]

Definition at line 83 of file PhotonValidator.h.

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

int PhotonValidator::nSimConv_[2] [private]

Definition at line 79 of file PhotonValidator.h.

Referenced by analyze().

int PhotonValidator::nSimPho_ [private]

Definition at line 78 of file PhotonValidator.h.

Referenced by analyze().

int PhotonValidator::numOfTracksInCone_ [private]

Definition at line 122 of file PhotonValidator.h.

Referenced by PhotonValidator().

MonitorElement* PhotonValidator::p_Chi2VsEta_[3] [private]

Definition at line 312 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_Chi2VsR_[3] [private]

Definition at line 314 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_convVtxdRVsR_ [private]

Definition at line 296 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_DCotTracksVsEta_ [private]

Definition at line 271 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_DCotTracksVsR_ [private]

Definition at line 273 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_DPhiTracksAtEcalVsEta_ [private]

Definition at line 283 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_DPhiTracksAtEcalVsR_ [private]

Definition at line 281 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_DPhiTracksAtVtxVsEta_ [private]

Definition at line 265 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_DPhiTracksAtVtxVsR_ [private]

Definition at line 267 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_dzPVVsR_ [private]

Definition at line 302 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_EoverEtrueVsEta_[3] [private]

Definition at line 255 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_EoverEtrueVsR_[3] [private]

Definition at line 257 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_EoverPVsEta_[3] [private]

Definition at line 250 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_EoverPVsR_[3] [private]

Definition at line 252 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_eResVsEta_[3] [private]

Definition at line 225 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_PoverPtrueVsEta_[3] [private]

Definition at line 261 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::p_r9VsEta_[3] [private]

Definition at line 217 of file PhotonValidator.h.

Referenced by beginJob().

MonitorElement* PhotonValidator::p_TkPtPull_[3] [private]

Definition at line 320 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

edm::ParameterSet PhotonValidator::parameters_ [private]

Definition at line 87 of file PhotonValidator.h.

Referenced by beginJob(), endJob(), initVectors(), and PhotonValidator().

std::vector<double> PhotonValidator::phiintervals_ [private]

Definition at line 146 of file PhotonValidator.h.

Referenced by analyze(), and initVectors().

MonitorElement* PhotonValidator::phoEffEta_ [private]

Definition at line 177 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

MonitorElement* PhotonValidator::phoEffPhi_ [private]

Definition at line 178 of file PhotonValidator.h.

Referenced by beginJob(), and endJob().

std::string PhotonValidator::photonCollection_ [private]

Definition at line 93 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

std::string PhotonValidator::photonCollectionProducer_ [private]

Definition at line 92 of file PhotonValidator.h.

Referenced by analyze(), and PhotonValidator().

double PhotonValidator::recMaxPt_ [private]

Definition at line 144 of file PhotonValidator.h.

double PhotonValidator::recMinPt_ [private]

Global variables for reco Photon.

Definition at line 143 of file PhotonValidator.h.

std::vector<double> PhotonValidator::rintervals_ [private]

Definition at line 146 of file PhotonValidator.h.

Referenced by analyze(), and initVectors().

double PhotonValidator::simMaxPt_ [private]

Definition at line 140 of file PhotonValidator.h.

double PhotonValidator::simMinPt_ [private]

Definition at line 139 of file PhotonValidator.h.

edm::ESHandle<CaloGeometry> PhotonValidator::theCaloGeom_ [private]

Definition at line 88 of file PhotonValidator.h.

Referenced by analyze().

edm::ESHandle<CaloTopology> PhotonValidator::theCaloTopo_ [private]

Definition at line 89 of file PhotonValidator.h.

Referenced by analyze().

std::vector<TrackingParticleRef> PhotonValidator::theConvTP_ [private]

Definition at line 137 of file PhotonValidator.h.

Referenced by analyze().

edm::ESHandle<MagneticField> PhotonValidator::theMF_ [private]

Definition at line 73 of file PhotonValidator.h.

Referenced by beginRun().

PhotonMCTruthFinder* PhotonValidator::thePhotonMCTruthFinder_ [private]

Definition at line 109 of file PhotonValidator.h.

Referenced by analyze(), PhotonValidator(), and ~PhotonValidator().

TrackAssociatorBase* PhotonValidator::theTrackAssociator_ [private]

Definition at line 110 of file PhotonValidator.h.

Referenced by analyze(), and beginJob().

std::vector<int> PhotonValidator::totMatchedRecConvEtaTwoTracks_ [private]

Definition at line 152 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedRecConvEtTwoTracks_ [private]

Definition at line 152 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedRecConvPhiTwoTracks_ [private]

Definition at line 152 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedRecConvRTwoTracks_ [private]

Definition at line 152 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedRecConvZTwoTracks_ [private]

Definition at line 152 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimConvEtaOneTrack_ [private]

Definition at line 151 of file PhotonValidator.h.

std::vector<int> PhotonValidator::totMatchedSimConvEtaTwoTracks_ [private]

Definition at line 150 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimConvEtTwoTracks_ [private]

Definition at line 150 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimConvPhiOneTrack_ [private]

Definition at line 151 of file PhotonValidator.h.

std::vector<int> PhotonValidator::totMatchedSimConvPhiTwoTracks_ [private]

Definition at line 150 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimConvROneTrack_ [private]

Definition at line 151 of file PhotonValidator.h.

std::vector<int> PhotonValidator::totMatchedSimConvRTwoTracks_ [private]

Definition at line 150 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimConvZOneTrack_ [private]

Definition at line 151 of file PhotonValidator.h.

std::vector<int> PhotonValidator::totMatchedSimConvZTwoTracks_ [private]

Definition at line 150 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimPhoEta_ [private]

Definition at line 148 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totMatchedSimPhoPhi_ [private]

Definition at line 148 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totRecAssConvEtaTwoTracks_ [private]

Definition at line 153 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totRecAssConvEtTwoTracks_ [private]

Definition at line 153 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totRecAssConvPhiTwoTracks_ [private]

Definition at line 153 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totRecAssConvRTwoTracks_ [private]

Definition at line 153 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totRecAssConvZTwoTracks_ [private]

Definition at line 153 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimConvEt_ [private]

Definition at line 149 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimConvEta_ [private]

Definition at line 149 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimConvPhi_ [private]

Definition at line 149 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimConvR_ [private]

Definition at line 149 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimConvZ_ [private]

Definition at line 149 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimPhoEta_ [private]

Definition at line 148 of file PhotonValidator.h.

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

std::vector<int> PhotonValidator::totSimPhoPhi_ [private]

Definition at line 148 of file PhotonValidator.h.

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

double PhotonValidator::trkIsolExtRadius_ [private]

Definition at line 113 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::trkIsolInnRadius_ [private]

Definition at line 114 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::trkPtLow_ [private]

Definition at line 115 of file PhotonValidator.h.

Referenced by PhotonValidator().

double PhotonValidator::trkPtSumCut_ [private]

Definition at line 123 of file PhotonValidator.h.

Referenced by PhotonValidator().

int PhotonValidator::verbosity_ [private]

Definition at line 75 of file PhotonValidator.h.

Referenced by beginJob(), and PhotonValidator().

std::vector<double> PhotonValidator::zintervals_ [private]

Definition at line 146 of file PhotonValidator.h.

Referenced by analyze(), and initVectors().


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