? edglog.log ? genConf ? cmt/cdb.log ? run/AnalysisSkeleton_topOptions.py ? run/NOTES ? run/edglog.log Index: UserAnalysis/AnalysisSkeleton.h =================================================================== RCS file: /atlascvs/offline/PhysicsAnalysis/AnalysisCommon/UserAnalysis/UserAnalysis/AnalysisSkeleton.h,v retrieving revision 1.23 diff -c -r1.23 AnalysisSkeleton.h *** UserAnalysis/AnalysisSkeleton.h 11 Aug 2007 18:40:42 -0000 1.23 --- UserAnalysis/AnalysisSkeleton.h 25 Feb 2008 11:20:15 -0000 *************** *** 53,58 **** --- 53,59 ---- /** method called by CBNT_execute() - to be removed if not needed */ StatusCode electronSkeleton(); + StatusCode muonSkeleton(); private: *************** *** 70,93 **** /** name of the AOD electron container to retrieve from StoreGate */ std::string m_electronContainerName; - /** name of the AOD truth particle container to retrieve from StoreGate */ - std::string m_truthParticleContainerName; /** cuts for user pre selected electrons, muons and taus - to be modified thru job options */ - double m_deltaRMatchCut; - double m_maxDeltaR; - /** electron specific cuts */ double m_etElecCut; double m_elecCone; double m_etaElecCut; - /** Histograms */ - TH1F* m_h_elecpt; - TH1F* m_h_eleceta; /** Athena-Aware Ntuple (AAN) variables - branches of the AAN TTree */ --- 71,91 ---- /** name of the AOD electron container to retrieve from StoreGate */ std::string m_electronContainerName; + std::string m_muonContainerName; /** cuts for user pre selected electrons, muons and taus - to be modified thru job options */ double m_etElecCut; double m_elecCone; double m_etaElecCut; + bool m_doElec; + + double m_etMuonCut; + bool m_doMuon; /** Athena-Aware Ntuple (AAN) variables - branches of the AAN TTree */ *************** *** 95,101 **** int m_aan_size; std::vector * m_aan_eta; std::vector * m_aan_pt; ! std::vector * m_aan_elecetres; /////////////////////// the above to be removed if not needed //////////////////// --- 93,102 ---- int m_aan_size; std::vector * m_aan_eta; std::vector * m_aan_pt; ! ! int m_Mu_N; ! std::vector * m_Mu_eta; ! std::vector * m_Mu_pt; /////////////////////// the above to be removed if not needed //////////////////// Index: cmt/requirements =================================================================== RCS file: /atlascvs/offline/PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt/requirements,v retrieving revision 1.62 diff -c -r1.62 requirements *** cmt/requirements 24 Apr 2007 20:42:07 -0000 1.62 --- cmt/requirements 25 Feb 2008 11:20:15 -0000 *************** *** 23,28 **** --- 23,30 ---- use AtlasAnalysisRunTime AtlasAnalysisRunTime-* library UserAnalysis *.cxx components/*.cxx + # library UserAnalysis *2.cxx components/*.cxx + # library UserAnalysis2 UserAnalysis2.cxx components/UserAnalysis2.cxx apply_tag ROOTBasicLibs apply_tag ROOTMathLibs Index: src/AnalysisSkeleton.cxx =================================================================== RCS file: /atlascvs/offline/PhysicsAnalysis/AnalysisCommon/UserAnalysis/src/AnalysisSkeleton.cxx,v retrieving revision 1.52 diff -c -r1.52 AnalysisSkeleton.cxx *** src/AnalysisSkeleton.cxx 11 Aug 2007 18:51:49 -0000 1.52 --- src/AnalysisSkeleton.cxx 25 Feb 2008 11:20:15 -0000 *************** *** 26,33 **** #include "StoreGate/StoreGateSvc.h" #include "egammaEvent/ElectronContainer.h" ! ! #include "McParticleEvent/TruthParticleContainer.h" #include "GaudiKernel/ITHistSvc.h" #include "TTree.h" --- 26,32 ---- #include "StoreGate/StoreGateSvc.h" #include "egammaEvent/ElectronContainer.h" ! #include "muonEvent/MuonContainer.h" #include "GaudiKernel/ITHistSvc.h" #include "TTree.h" *************** *** 53,76 **** /** switches to control the analysis through job options */ - /////////////// Remove this if not needed ////////////////////////////////////////// - /// This is here only for distributed analysis example declareProperty( "AnalysisTools", m_analysisTools ); declareProperty("ElectronContainer", m_electronContainerName = "ElectronAODCollection"); ! declareProperty("MCParticleContainer", m_truthParticleContainerName = "SpclMC"); ! ! /** the cuts - default values - to be modified in job options */ - declareProperty("DeltaRMatchCut", m_deltaRMatchCut = 0.2); - declareProperty("MaxDeltaR", m_maxDeltaR = 0.9999); /** for electrons */ declareProperty("ElectronEtCut", m_etElecCut = 10.0*GeV); declareProperty("ElectronEtaCut", m_etaElecCut = 2.5); declareProperty("ElectronCone", m_elecCone = 0.9); - ///////////////// Remove the above if not needed /////////////////////////////////// } --- 52,73 ---- /** switches to control the analysis through job options */ declareProperty( "AnalysisTools", m_analysisTools ); declareProperty("ElectronContainer", m_electronContainerName = "ElectronAODCollection"); ! declareProperty("MuonContainer",m_muonContainerName="StacoMuonCollection"); /** for electrons */ declareProperty("ElectronEtCut", m_etElecCut = 10.0*GeV); declareProperty("ElectronEtaCut", m_etaElecCut = 2.5); declareProperty("ElectronCone", m_elecCone = 0.9); + declareProperty("DoElectron",m_doElec=true); + + declareProperty("MuonEtCut",m_etMuonCut=10.0*GeV); + declareProperty("DoMuon",m_doMuon=true); + } *************** *** 126,149 **** /** now add branches and leaves to the AAN tree */ ! addBranch("NElectrons", m_aan_size, "NElectrons/i"); ! addBranch("ElectronEta", m_aan_eta); ! addBranch("ElectronPt", m_aan_pt); ! addBranch("ElecPtRatio", m_aan_elecetres); ! ! /// ROOT histograms --------------------------------------- ! ! m_h_elecpt = new TH1F("elec_pt","pt el",50,0,250.*GeV); ! sc = m_thistSvc->regHist("/AANT/Electron/elec_pt",m_h_elecpt); - m_h_eleceta = new TH1F("elec_eta","eta el",70,-3.5,3.5); - sc = m_thistSvc->regHist("/AANT/Electron/elec_eta",m_h_eleceta); - - if (sc.isFailure()) { - mLog << MSG::ERROR << "ROOT Hist registration failed" << endreq; - return sc; - } - /// end ROOT Histograms ------------------------------------------ ////////////////////// The above to be removed if not needed //////////////////// --- 123,136 ---- /** now add branches and leaves to the AAN tree */ ! addBranch("El_N", m_aan_size, "NElectrons/i"); ! addBranch("El_eta", m_aan_eta); ! addBranch("El_p_T", m_aan_pt); ! ! addBranch("Mu_N", m_Mu_N, "Mu_N/i"); ! addBranch("Mu_p_T", m_Mu_pt); ! addBranch("Mu_eta", m_Mu_eta); ////////////////////// The above to be removed if not needed //////////////////// *************** *** 168,174 **** m_aan_size = 0; m_aan_eta->clear(); m_aan_pt->clear(); ! m_aan_elecetres->clear(); return StatusCode::SUCCESS; } --- 155,164 ---- m_aan_size = 0; m_aan_eta->clear(); m_aan_pt->clear(); ! ! m_Mu_N=0; ! m_Mu_eta->clear(); ! m_Mu_pt->clear(); return StatusCode::SUCCESS; } *************** *** 181,195 **** mLog << MSG::DEBUG << "in execute()" << endreq; ! /// remove the lines if not needed for your analysis ! /// they are here to exercice the Distributed Analysis ! ! ////////////////// To Be removed if NOT needed //////////////////////////////// ! StatusCode sc = electronSkeleton(); ! if (sc.isFailure()) { ! mLog << MSG::ERROR << "The method electronSkeleton() failed" << endreq; ! return StatusCode::SUCCESS; } return StatusCode::SUCCESS; --- 171,190 ---- mLog << MSG::DEBUG << "in execute()" << endreq; ! StatusCode sc; ! if(m_doElec){sc = electronSkeleton(); ! if (sc.isFailure()) { ! mLog << MSG::ERROR << "The method electronSkeleton() failed" << endreq; ! return StatusCode::SUCCESS; ! } ! } ! if(m_doMuon){ ! sc=muonSkeleton(); ! if(sc.isFailure()){ ! mLog<retrieve( mcpartTES, m_truthParticleContainerName); - if( sc.isFailure() || !mcpartTES ) { - mLog << MSG::WARNING - << "No AOD MC truth particle container found in TDS" - << endreq; - return StatusCode::SUCCESS; - } - mLog <retrieve( elecTES, m_electronContainerName); if( sc.isFailure() || !elecTES ) { mLog << MSG::WARNING << "No AOD electron container found in TDS" --- 199,208 ---- mLog << MSG::DEBUG << "in electronSkeleton()" << endreq; /** get the AOD electron container for TES */ const ElectronContainer* elecTES = 0; ! StatusCode sc=m_storeGate->retrieve( elecTES, m_electronContainerName); if( sc.isFailure() || !elecTES ) { mLog << MSG::WARNING << "No AOD electron container found in TDS" *************** *** 233,277 **** for (; elecItr != elecItrE; ++elecItr) { /** check for the author of the electron */ ! bool author = (*elecItr)->author() == egammaParameters::AuthorElectron; if ( !author || (*elecItr)->pt() < m_etElecCut ) continue; m_aan_size++; - /** fill histograms */ - m_h_elecpt->Fill( (*elecItr)->pt(), 1.); - m_h_eleceta->Fill( (*elecItr)->eta(), 1.); /** fill Athena-Aware NTuple */ m_aan_eta->push_back((*elecItr)->eta()); m_aan_pt->push_back((*elecItr)->pt()); ! /** find a match to this electron in the MC truth container ! the index and deltaR are returned */ ! int index = -1; ! double deltaRMatch; ! if( (*elecItr)->trackParticle() && (*elecItr)->pt()> m_etElecCut ) { ! const TruthParticleContainer * truthContainer = mcpartTES; ! bool findAMatch = m_analysisTools->matchR((*elecItr), truthContainer, ! index, deltaRMatch, (*elecItr)->pdgId()); ! if (findAMatch) { ! deltaRMatch = (deltaRMatch > m_maxDeltaR) ? m_maxDeltaR : deltaRMatch; ! ! /** check for good match */ ! if ( deltaRMatch < m_deltaRMatchCut) { ! const TruthParticle* electronMCMatch = (*mcpartTES)[index]; ! double res = (*elecItr)->pt() / electronMCMatch->pt(); ! m_aan_elecetres->push_back(res); ! } ! } ! } ! } ! ! /// remove the above lines if not needed for your analysis ! /// they are there to exercice Distributed Analysis ! ////////////////// The above to be remove if not needed ///////////////////////////////// mLog << MSG::DEBUG << "electronSkeleton() succeeded" << endreq; return StatusCode::SUCCESS; } --- 218,273 ---- for (; elecItr != elecItrE; ++elecItr) { /** check for the author of the electron */ ! bool author = (*elecItr)->author(egammaParameters::AuthorElectron); if ( !author || (*elecItr)->pt() < m_etElecCut ) continue; m_aan_size++; /** fill Athena-Aware NTuple */ m_aan_eta->push_back((*elecItr)->eta()); m_aan_pt->push_back((*elecItr)->pt()); ! } ! mLog << MSG::DEBUG << "electronSkeleton() succeeded" << endreq; return StatusCode::SUCCESS; } + + //////////////////////////////////////////////////////////////////////////////////// + //muonSkeleton + StatusCode AnalysisSkeleton::muonSkeleton(){ + MsgStream mLog(messageService(),name()); + mLog<retrieve(muonTES,m_muonContainerName); + if( sc.isFailure() || !muonTES){ + mLog<begin(); + MuonContainer::const_iterator muonItrE = muonTES->end(); + + for(; muonItr != muonItrE; ++muonItr){ + if((*muonItr)->et()push_back((*muonItr)->eta()); + m_Mu_pt->push_back((*muonItr)->pt()); + + } + } + + mLog<