Analysis Tools Tutorial: Demonstration/Example/Exercise Ketevi A. Assamagan CERN, September 20 th, 2004.

Slides:



Advertisements
Similar presentations
Lists: An internal look
Advertisements

Atlantis Event Display with AOD and EV ntuples Juergen Thomas* on behalf of the Atlantis team: *University of Birmingham (UK) University College London.
K A Assamagan Analysis Tutorial – December 19, Tucson, 2004 Overview of ATLAS Software and the Athena Framework (extracted from an earlier talk by S. R.
ESD analysis of jets Belen Salvachua High Energy Physics Division Argonne National Laboratory US ATLAS Analysis Jamboree: ANL Tuesday 19th January 2010.
Alessandro Fois Detection of  particles in B meson decay.
10/14/20051 Tau reconstruction and H/A →  H/A →  MC events: PYTHIA ⇒ OSCAR ⇒ DIGI (mass 120 GeV ?) 10k events overnight DIGI ⇒ DST: crashes DIGI ⇒
Jet Reconstruction and Calibration in Athena US ATLAS Software Workshop BNL, 27/08/03 Ambreesh Gupta, for the JetRec Group University of Chicago Outline:
AOD Tutorial, March 10, 2005M. Wielers, RAL1 AOD Tutorial These slides can be found in ppt in /tutorial/Tutorial_AOD_ ppt.
LAr Athena Tutorial – November 2, 2004 Software Tutorial (Minimally modified transparencies from Offline Software Tutorial of Srini R., Hong M., David.
Tutorial TopReco 26-FEB-2010 Event Selection… …and Event Dumping A. Lleres, A. Lucotte IN2P3-LPSC Grenoble A. Lucotte / LPSC, CNRS/IN2P3 I. Context II.
TRIGGER-AWARE ANALYSIS TUTORIAL ARTEMIS Workshop – Pisa – 18 th to 19 th June 2009 Alessandro Cerri (CERN), Ricardo Gonçalo – Royal Holloway.
The New TrigDecision Nicolas Berger, Till Eifert, Ricardo Gonçalo Physics Analysis Tools session ATLAS Software Workshop – Munich, March 2007.
What’s in the ATLAS data : Trigger Decision ATLAS Offline Software Tutorial CERN, August 2008 Ricardo Gonçalo - RHUL.
Steps toward ttH (H->bb) in the Atlas ‘PhysicsAnalysis’ Environment. Chris Collins-Tooth Christian Shaw.
Athena and HEC Test Beam Reconstruction Tutorial October 12, 2001 CERN N. Kanaya, M. Marino, S. Rajagopalan, M. Wielers.
Event View G. Watts (UW) O. Harris (UW). Philosophy EventView Goals Object Identification & Interpretation Is that a jet or an electron? Is that jet a.
Jets and Missing-ET in the Atlantis Event Display Qiang Lu, Juergen Thomas, Peter Watkins (Birmingham) Hans Drevermann (CERN) Andrew Haas (Columbia) Eric.
CERN Tutorial, September Job Options and Printing.
Job Options and Printing 1 LHCb software tutorial - September 2011.
TtH(H  bb) AOD-Based Analysis And DPD maker Simon Dean University College London ATLAS-UK Top Physics Meeting 17/09/2008.
Generation of Radiative B-Decays Decay Channels Bs  Phi + Gamma Bd  K * + Gamma Gareth Brown, RAL PPD5/10/06 Thanks to, Bill, John, Monica and Julie.
Introduction to the HARP Software reconstructed drift chamber triplets (MC data)
Level 2 ID-tracking truth association Trigger AOD discussion 13 December 2006 Ricardo Gonçalo - RHUL.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
AOD Data in Atlantis Event Display Qiang Lu, Juergen Thomas, Peter Watkins (Birmingham) Hans Drevermann (CERN) Andrew Haas (Columbia) Eric Jansen, Pieter.
Use of Gaudi in Reconstruction Weidong Li 23/06/2004.
LVL2 ID ESD/AOD classes Status and plans. PESA L2 ID Algorithms Review - RAL 25 July Ricardo Goncalo ESD/AOD More and more interest from physics.
Gaudi Framework Tutorial, April Algorithm Tools: what they are, how to write them, how to use them.
Gaudi Framework Tutorial, April Job Options and Printing.
9-13/9/03 Atlas Overview WeekPeter Sherwood 1 Atlfast, Artemis and Atlantis What, Where and How.
Tutorial on Testbeam Software - CERN, March 10th 2005 Daniela Rebuzzi – Pavia University and INFN CTB_G4Sim Simulation.
P4Helpers P4Helpers.h provides static helper functions for kinematic calculation on objects deriving from I4Momentum. Anthony Denton-Farnworth, The University.
Argonne Jamboree January 2010 Esteban Fullana AOD example analysis.
AOD/ESD plans Status and plans focusing on LVL2 e/  and some items for discussion On behalf of: J.Baines, P.Casado, G.Comune, A.DiMattia, S.George, R.Goncalo,
Higgs to 4 leptons in Athena with eventView Stathes Paganis (University of Sheffield) with Rosy.Nikolaidou (Saclay) Nektarios Benekos (Max Planck Institute)
Software offline tutorial, CERN, Dec 7 th Electrons and photons in ATHENA Frédéric DERUE – LPNHE Paris ATLAS offline software tutorial Detectors.
Bologna Tutorial, April Job Options and Printing.
Setup and run athena locally and on grid Cunfeng feng
Tutorial: Examples (09may00 - ATLAS Software LBNL) May 2000 Prototype Framework Tutorial: Examples Paolo Calafiura, Charles Leggett HCG/NERSC/LBNL.
Reconstruction of t  bl. Ricardo GoncaloCSC ttH, H->bb; 11 Oct 062 The idea is (try to) to improve the reconstruction of the top decaying as t  bl –To.
The “Comparator” Atlfast vs. Full Reco Automated Comparison Chris Collins-Tooth 19 th February 2006.
Fully Hadronic Top Anti-Top Decay (Using TopView) Fully Hadronic Top Anti-Top Decay (Using TopView) Ido Mussche NIPHAD meeting, Februari 9 th :
Hadronic Jet Energy Scale Hadronic t-t bar selection and Jet Energy Scale calibration Part I : Accessing the trigger information 09/02 - Menelaos Tsiakiris.
28/4/2006Chris Collins-Tooth tth, (h → bb) with EventViews Chris Collins-Tooth, Christian Shaw 03-May-2006.
Advanced Athena Tutorial ADL/StoreGate ADL Exercises CERN, May/Mai 5, 2002.
Athena Tutorial: Liquid Argon Example ATHENA The ATLAS Control Framework Tutorial: Liquid Argon Example Based on original by S. Rajagopalan BNL.
27/02/04 ATLAS weekTileCal Athena tutorial, part 21 TileCal Athena tutorial Part 2: Reading GEANT hits from ZEBRA and POOL Reading HLT and testbeam ByteStream.
Proposal for extension of GaudiAlgorithm and GaudiTool classes Vanya Belyaev CERN & ITEP/Moscow.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
Athena StoreGate Tutorial: May 30, Objectives Learn how to access data objects using StoreGate How to record/retrieve by TYPE Optionally using keys.
Physics Analysis Tools Kétévi A. Assamagan BNL. 2 Introduction Discussion list:
ATLAS Physics Analysis Framework James R. Catmore Lancaster University.
News on Rho PANDA Collaboration Meeting, Bochum K. Götzen, GSI 1.
Doing ESD analysis at T3g Belen Salvachua High Energy Physics Division Argonne National Laboratory US ATLAS Analysis Jamboree: ANL Friday 2 nd April 2010.
Starting Analysis with Athena (Esteban Fullana Torregrosa) Rik Yoshida High Energy Physics Division Argonne National Laboratory.
ATLAS Distributed Computing Tutorial Tags: What, Why, When, Where and How? Mike Kenyon University of Glasgow.
An AOD analysis example Esteban Fullana Torregrosa High Energy Physics Division Argonne National Laboratory.
AOD example analysis Argonne Jamboree January 2010
Monitoring of L1Calo EM Efficiencies
“Algorithm Tools” what they are, how to get them and how to use them
MINERVA Z Mass Exercise
Writing Physics Tools Schedule: Timing Topic 20 minutes Lecture
Jets and Missing-ET in the Atlantis Event Display
Introduction to Athena
2 Getting Started.
2 Getting Started.
2 Getting Started.
The Top Chromo-magnetic Moment
Presentation transcript:

Analysis Tools Tutorial: Demonstration/Example/Exercise Ketevi A. Assamagan CERN, September 20 th, 2004

Exercise 0 Login to lxplus and setup CMT Go to your working area for this tutorial and checkout this package too: –cmt co PhysicsAnalysis/AnalysisCommon/SpecialUtils –Now you should have 3 packages checked out, namely: UserAnalysis AnalysisExamples SpecialUtils cd to the cmt directory of RecExCommon make sure that your requirements file have these 2 lines: use UserAnalysis UserAnalysis-* PhysicsAnalysis/AnalysisCommon use AnalysisExamples AnalysisExamples-* PhysicsAnalysis/AnalysisCommon  Now do “cmt config”, “source setup.sh” and “cmt broadcast gmake”  cd../run  cp ~ketevi/w0/aod/PoolFileCatalog.xml.

Pre-Selection  You retrieve the electron AOD container from POOL  You iterate over the container  For each “electron” in the container, you do some test  If the test is successful you save that electron in another container for further processing: pre-selection  You can record the container your pre- selection in StoreGate or not

Pre-Selection: example  m_userElectronContainer = new ElectronContainer(SG::VIEW_ELEMENTS);  sc = m_storeGate->record(m_userParticleContainer,m_userContainerName);  if (sc.isFailure()) { mLog << MSG::ERROR << "Unable to record user Electron Container in StoreGate" << endreq; return sc; } else mLog << MSG::DEBUG << "User container of electrons recorded in StoreGate." << endreq;  const ElectronContainer* elecTES=0;  sc=m_storeGate->retrieve( elecTES, m_aodContainerName);  if( sc.isFailure() || !elecTES ) { mLog << MSG::WARNING << "No AOD electron container found in TDS" << endreq; return StatusCode::SUCCESS; }  ElectronContainer::const_iterator elecItr = elecTES->begin();  ElectronContainer::const_iterator elecItrE = elecTES->end();  for (; elecItr != elecItrE; ++elecItr) { bool check = (*elecItr)->pt() > m_etElecCut; if (m_checkDataType) check = check && showerShapeCut(*elecItr); if (check) { … m_userElectronContainer->push_back(*elecItr); }

Creating Your Own Containers  MuonContainer * muonContainer = new MuonContainer(); Muon * newMuon = new Muon(); newMuon  set_IDTrack(…); … muonContainer->push_back(newMuon);  The muonContainer “owns” all the newMuon inside it: Delete muonContainer; will also delete all the newMuon  PhotonContainer* photonContainer= new PhotonContainer(SG::VIEW_ELEMENTS); photonContainer  push_back(newPhoton); photonContainer does not own the newPhoton inside it Delete photonContainer; will NOT delete the newPhotons  The AOD container that you retrieve from POOL owns its AOD  If you create your own container of pre-selected AOD, be careful: See previous transparency m_userElectronContainer->push_back(*elecItr); *elecItr is pointer to an Electron AOD in original electron AOD container: that container own *elecItr: m_userElectronContainer can NOT own *elecItr. So m_userElectronContainer must be previously created with “View elements”  Container ownerShip: SG::OWN_ELEMENTS, SG::VIEW_ELEMENTS

Pre-selection, selection cuts  Your analysis code is an ATHENA algorithm  Algorithms have properties, modifiable in job options  Your analysis cuts are properties of your analysis, properties that you set, adjust in your analysis job options:  In your analysis code: DoElectron::DoElectron(const std::string& name, ISvcLocator* pSvcLocator) : DoParticle(name, pSvcLocator) { declareProperty("ElectronEtCut", m_etElecCut = 10.0*GeV); declareProperty("ElectronEtaCut", m_etaElecCut = 2.5); declareProperty("ElectronCone", m_elecCone = 0.9); ….; }  In your jobOptions.py DoElectron = Algorithm( "DoElectron" ) DoElectron.DeltaRMatchCut = 0.2 DoElectron.MaxDeltaR = DoElectron.AODContainerName = "ElectronCollection“ DoElectron.TruthContainerName = "SpclMC" DoElectron.UserContainerName = "MyPreSelectedElectrons" DoElectron.ElectronEtCut = 5.0*GeV DoElectron.ElectronEtaCut = 2.5 DoElectron.ElectronCone = 0.9 DoElectron.NtupleLocID = "/FILE1/Electron/100" DoElectron.NtuplePrefix = "Electron" DoElectron.HistDirectoryName = "Electron"

Analysis Tools, Utilities  Combination  Permutation  DeltaR matching  Selector  Filter  Special Utilities  Navigation  Association The following tools are currently available

Analysis Combination Retrieve the container of AOD jets If the container has more than 2 jets, get all the combinations of 2 jets and do something: AnalysisUtils::Combination comb(jetTDS,2); std::vector jj; while (comb.get(jj)) { double mjj = (jj[0]->hlv()+jj[1]->hlv()).m(); m_jj->fill(mjj,m_eventWeight); if ( fabs(mjj-mW) < m_deltaMjj ) { CompositeParticle * Wjj = new CompositeParticle(); Wjj->add(jetTDS,jj[0],jj[1]); Wjj->set_charge(1); Wjj->set_pdgId(PDG::W_plus); Wjj->set_dataType(m_dataType); m_WjjContainer->push_back(Wjj); } } }

Analysis Permutation  AnalysisUtils::Permutation permute(bjetTDS,2);  std::vector bb;  …  while (permute.get(bb)) { IParticleContainer::const_iterator wjjItr = m_WjjContainer- >begin(); IParticleContainer::const_iterator wjjItrE = m_WjjContainer->end(); … }

DeltaR Matching  Get a handle on the tools in the initialize() method: IAlgTool *tmp_analysisTools; sc = toolSvc->retrieveTool("AnalysisTools",tmp_analysisTools); if (StatusCode::SUCCESS != sc) { omLog << MSG::ERROR << "Can't get handle on analysis tools" << endreq; oreturn StatusCode::FAILURE; } m_analysisTools=dynamic_cast (tmp_analysisTools);  int index = -1;  double deltaRMatch;  /// find a match to this electron in the MC truth container /// the index and deltaR are returned bool findAMatch = m_analysisTools->matchR((*elecItr), mcpartTES, index, deltaRMatch, (*elecItr)->pdgId());  /// the matched object and deltaR are returned bool findAMatch = m_analysisTools->matchR((*elecItr), mcpartTES, element, deltaRMatch, (*elecItr)->pdgId());

Selector  class DoMuon {... static bool criteria (const Muon *mu, DoMuon *self); };  bool DoMuon::criteria (const Muon *mu, DoMuon *self) {... bool findAMatch = self->m_analysisTools ->matchR(mu,self->m_mcpartTES,index,deltaRMatch,mu- >pdgId()); if (!findAMatch) return false;... return true; }  StatusCode DoMuon::doPreSelection() {... m_analysisTools->select(this,DoMuon::criteria,muonTES,"PreMu"); } A collection of selected objects is recorded in StoreGate with key=“PreMu”

Filter The filter uses the Selector For example, you search for W  jj decay in MC truth collection Available but not yet in the repository Code, use case, example provided by S. Binet

Special Utilities  General solutions to a subclass of problem  Objective is: each user does not have to write the same piece of code to do this  Example: use the W mass constraint for the pz solution of the neutrino momentum Return a container of neutrinos as IParticle, for example: for (; leptonItr != leptonItrE; ++leptonItr) { bool findNeutrino = NeutrinoUtils::candidatesFromWMass((*leptonItr), m_pxMiss, m_pyMiss, (*m_neutrinoContainer)); if (findNeutrino) { do something …} } Neutrino from tau -> a+b+missingPt – solution to the collinear appriximation: NeutrinoUtils::candidatesCollinearApproximation(IParticle*, IParticle* m_pxMiss, m_pyMiss, (*m_neutrinoContainer));

Navigation  Back navigation to ESD (see Tadashi’s demonstration)  Navigation to Constituents, for example:  CompositeParticle* W = new CompositeParticle();  W->add(jetContainer, jet1, jet2);  If (!W->contains(jet3)) { do something;}  NavigationToken * cellToken = new NavigationToken (); jet->fillToken(*cellToken); NavigationToken ::const_iterator c = cellToken->begin(); NavigationToken ::const_iterator cend = cellToken->end(); for(; c != cend; ++c) { oconst CaloCell* thisCell = *c; odouble weight = jet->getParameter(thisCell); // odouble weight = (*c).second; odouble et = weight * thisCell->et();

Association  For example, Jet to TrackParticle Association: relation but not belonging: –AssociationLink: 1-to-1 reconstructed-MC truth association soft-hard electron overlap –AssociationVector: 1-to-many –AssociationMap: many-to-many (W  jj MC, W  jj reconstructed) P. Loch, S. Binet

The CompositeParticle  class CompositeParticle : public ParticleBase, public Navigable, public P4PxPyPzE {};  CompositeParticle* W = new CompositeParticle(); W  add(jetContainer,jet1); W  add(jetContainer,jet2); double wMass = W  m(); HepLorentzVector p = W  hlv();  Navigation if (W  contains(jet1)) { Navigate to CaloCell (see page 21) }  Composite of other Composites CompositeParticle * Z1 = new CompositeParticle(); Z1  add(electronContainer, e1, e2); CompositeParticle * Z2 = new CompositeParticle(); Z2  add(MuonContainer,mu1,mu2); CompositeParticle * theHiggs = new CompositeParticle(); theHiggs  add(zContainer,Z1,Z2); double higgsMass = theHiggs  m();

The 4Momentum  Design already proposed by the RTF – implementation by Rousseau et al. Look at the CVS package offline/Event/FourMom  Particles: Electron, Muon, Photon, BJet, TauJet, ParticleJet, Neutrino & CompositeParticle:  Get methods: p(), m(), px(), hlv(), etc double mass = Z  m();  Set methods: TauJet * tJet = new TauJet(); double px = …; double py = …; double pz = …, double e= …; tJet  set4Mom(HepLorentzVector(px,py,pz,e));

The Particle Classes  class Muon : public ParticleBase, public P4IPtCotThPhiM, public Navigable { …};  class MuonContainer : public DataVector {...};  For the public methods available to you, look in ParticleEventParticleEvent

The TrackParticle  Look in ParticleParticle  class TrackParticle : public P4PxPyPzE, public NavigableTerminalNode, virtual public INavigable4Momentum { public: …; TrackParticle(const Trk::Track* parTrack, TrackParticleOrigin prtOrigin, const Vtx::RecVertex* recVertex); …; protected: //!< pointer to a TrkTrack ElementLink m_originalTrack; …; };

Exercise 1 (1)Go back the UserAnalysis package (2) Create a container of pre-selected electrons (3) Record this container into StoreGate (4) Retrieve the AOD electron container from StoreGate (5) Loop over AOD electron, do pre-selection and Insert pre-selected AOD electron in the new container created in step (2) (6) Retrieve the container of pre-selected electrons from StoreGate (7) Create Composite Z  e+e- and histogram m_ee (8) Compile, build and run the code (9) Plot the Z  ee invariant mass

Exercise 2 (1) Repackage exercise 1 into a private method, say zee() (2) Add a private method Wjj(), for W  jj reconstruction (3) Add a private method t  Wj for the top reconstruction (4) Add a private method for t  Wb reconstruction

Acknowledgements  All the participants of the UCL workshop, April , London  All the participants of the Analysis Tools Meetings  H. Ma, F. Paige, S. Rajagopalan, P. Calafiura  D. Rousseau, D. Costanzo, F. Akesson, A. Wildauer, et al  K. Cranmer, P. Loch, T. Maeno, S. Binet, I. Hinchliffe