160 likes | 274 Views
Particle identification and Hadron/Jet correlations analysis framework. Description, Status, HOW TO use and TO DO list. Recent changes in ESDs and AODs. AliESDCaloCluster and AliAODCaloCluster : Removed fM11 data member, added fTOF data member. Also added/removed related Setters and Getters.
E N D
Particle identification and Hadron/Jet correlations analysis framework Description, Status, HOW TO use and TO DO list Gustavo Conesa Balbastre @ PWG4
Recent changes in ESDs and AODs • AliESDCaloCluster and AliAODCaloCluster: • Removed fM11 data member, added fTOF data member. Also added/removed related Setters and Getters. • Modifications needed in AliEMCALReconstructor, AliPHOSReconstructor and HLT • Backward compatible (as far as I know) • AliAODCluster: • Particle type list changed, now is the same as in AliPID plus kCharged and kNeutral • Added Getter of the labels array • AliAODEvent: • Added methods to get the list of PHOS or EMCAL AODs like for the ESDs. • Actual version of AliAnalysisTaskESDfilter is complete in the part of filling AliAODCaloClusters • Until 2 months ago the matched tracks, the labels, PID and shower shape information were not filled • Last week 2 bugs corrected. • REMINDER!!!! • EMCAL Pseudoclusters do not exist anymore. • Any method in ESDCaloCluster with the name digits in it is doing nothing, it is just there for backward compatibility reasons. • In AliESD(AOD)CaloClusters we keep for each cluster the list of AbsId of the digits that created the cluster and the list of the fraction of the digits energy used to create the cluster (used only by PHOS right now). • In AliESD(AOD)CaloCells we keep the full list of digits amplitude, absId and time (time is not kept in AODs) Gustavo Conesa Balbastre @ PWG4
What has changed in the PWG4 frame • Frame completely redesigned since last Alice offline meeting, now: • AODs are produced and read. • More modular: initially developed for the case of direct gamma and correlations physics. Now more kind of analysis can be added easily. • Library name: PWG4Gamma to PWG4PartCorr Gustavo Conesa Balbastre @ PWG4
Particle identification and correlations analysis frame description: Schema AliAnalisisTaskParticleCorrelation AliAnalysisTaskSE Data Output: AliAODParticleCorrelation and/or AliAODCaloClusters and/or Histograms Data AliAODCaloTrackReader ESD, AOD, MC AliAnaMaker aodEMCal, aodPHOS, aodCTS aodEMCal, aodPHOS, aodCTS aodParticleCorr AliAnaXXX derives from AliAnaBaseClass AliAnaYYY derives from AliAnaBaseClass AliAnaNNN derives from AliAnaBaseClass … Gustavo Conesa Balbastre @ PWG4
Analysis manager Bool_t AliAnaMaker::ProcessEvent(Int_t iEntry){ … //Each event needs an empty branch fAODBranch->Clear(); //Tell the reader to fill the data in the detector lists ReadInputEvent(); //Loop on analysis algorithms Int_t nana = fAnalysisContainer->GetEntries() ; for(Int_t iana = 0; iana < nana; iana++){ AliAnaBaseClass * ana = ((AliAnaBaseClass *) fAnalysisContainer->At(iana)) ; //Set reader and aod branch for each analysis ana->SetReader(fReader); ana->SetAODBranch(fAODBranch); //Make analysis, create aods in aod branch or AODCaloClusters if(fMakeAOD) ana->MakeAnalysisFillAOD() ; //Make further analysis with aod branch and fill histograms if(fMakeHisto) ana->MakeAnalysisFillHistograms() ; } fReader->ResetLists(); • Steering class to connect analysis and data readers : AliAnaMaker • Connects the data (ESD/AOD/MC) with the analysis algorithm • Executes all analysis that user has provided in the appropriate order. • First analysis generating AODs (if needed) • Second analysis generating histograms from AODs (if needed) • Several analysis can be executed one after the other, taking as input the AOD output of the precedent analysis. • Initializes all parameters and histograms connects them with output of general analysis frame. Gustavo Conesa Balbastre @ PWG4
Particle identification and correlation analysis frame description: Data Readers • Classes to read the ESD, AOD or MC derive from: AliCaloTrackReader • Output 3 TClonesArray: EMCAL AODCaloClusters, PHOS AODCaloCluster, CTS AODTrack. • Arrays filled if user wants (by default all filled):SwitchOnCTS(); SwitchOnEMCAL(); SwitchOnPHOS() • Recover the lists in analysis: GetAODCTS(); GetAODEMCAL(); GetAODPHOS(); • Also provides the corresponding CaloCells (not in MC case). If reader is ESD it returns AliESDCaloCells, if AOD it returns AliAODCaloCells: • SwitchOnEMCALCells(); SwitchOnEMCALCells() • GetEMCALCells(); GetPHOSCells() • You can get Generator information: • virtual AliStack* GetStack() const ; • virtual AliHeader* GetHeader() const ; • virtual AliGenEventHeader* GetGenEventHeader() const ; • More if needed Gustavo Conesa Balbastre @ PWG4
Particle identification and correlation analysis frame description: Data Readers • AliCaloTrackESDReader: Done and tested locally and on grid. • AliCaloTrackAODReader: Done, test in progress. • AliCaloTrackMCReader: Done and tested locally. • Output 3 TClonesArray: EMCAL, PHOS and CTS TParticles or standard AODs whatever the user wants. • SetClonesArrayType(Int_t type) • 1 (default) is AOD, 0 is TParticle • Select particles with a given status code: • SwitchOnStatusSelection(); KeepParticleWithStatus(Int_t status) • Default keeps status 1 • In CTS array keep only charged particles in CTS acceptance • In Calo arrays keep only neutral particles in Calo acceptances • Skip some neutral particles (default skip neutrinos): SkipNeutralParticles(Int_t pdg) • Add some charged particles (electrons): KeepChargedParticles(Int_t pdg) • In PYTHIA by default pi0 has status 1 and is not decayed. Option to decay it by “hand”: • SwitchOnPi0Decay() Gustavo Conesa Balbastre @ PWG4
Analysis algorithm base class //To fill AODs virtual void AddAODCaloCluster(AliAODCaloCluster calo) ; virtual void AddAODParticleCorrelation(AliAODParticleCorrelation pc) ; virtual void ConnectAODCaloClusters(); //Init Histograms virtual TList * GetCreateOutputObjects(){ return (new TList) ;} //MAIN ANALYSIS METHODS virtual void MakeAnalysisFillAOD() {;}//Creates AODPhotons orAODCaloClusters that will be kept in file virtual void MakeAnalysisFillHistograms() {;} //Final analysis withAODPhotons and production of histograms //Reader virtual AliCaloTrackReader * GetReader() const {return fReader ; } virtual void SetReader(AliGammaReader * reader) { fReader = reader ; } //AOD lists, outputs //AOD lists, outputs virtual TClonesArray* GetAODBranch() const {return fAODBranch ;} virtual TClonesArray* GetAODCaloClusters() const {return fAODCaloClusters ;} //AOD lists, data for the analysis virtual TClonesArray* GetAODCTS() const ; virtual TClonesArray* GetAODEMCAL() const ; virtual TClonesArray* GetAODPHOS() const ; virtual AliStack * GetMCStack() const ; virtual void SetAODBranch(TClonesArray * tca) { fAODBranch = tca ; } virtual AliCaloPID * GetCaloPID() const {return fCaloPID ;} virtual void SetCaloPID(AliCaloPID * pid) { fCaloPID = pid ;} virtual AliIsolationCut * GetIsolationCut() const {return fIC ;} virtual void SetIsolationCut(AliIsolationCut * fc) { fIC = fc ;} virtual AliFidutialCut * GetFidutialCut() const {return fFidCut ;} virtual void SetFidutialCut(AliFidutialCut * fc) { fFidCut = fc ;} • Analysis base class: AliAnaBaseClass • All analysis classes must derive from this one. • External modules that can be called by the analysis classes • AliCaloPID • Given the PID weights returns probable pdg id • Use as base class for PID recalculation? • AliFidutialCut: • Acceptance selection • Allows selection in n regions in the detectors • AliNeutralMesonSelection • Given a pair of photons select event by event as p0 or by invariant mass or opening angle • AliIsolationCut • Selects particle if isolated. • more if needed. Gustavo Conesa Balbastre @ PWG4
Output AODs: AliAODParticleCorrelation • Output can be « standard » AODs, AODCaloClusters, or « non standard » AODs, AliAODParticleCorrelation. • AliAODParticleCorrelation is basically a list of TLorentzVectors each one with the following extra information: • Several TRefArrays: • Array of cluster/tracks in the isolation cone • Array of cluster/track used for hadron correlation or used for jet reconstruction (if JETAN not used) • Array of cluster/track used for background estimation • PID of the TLVector (photon, pi0, hadron …). • Monte Carlo label. • Another label to be set by user • in my case, with the help of MC, I label the photons from decay, fragmentation and conversion, for example. • TLorentzVectors with found Leading particle, Jet and Background kinematics. • Reference to jet found with JETAN Gustavo Conesa Balbastre @ PWG4
//_________________________________________________ TList * AliAnaExample::GetCreateOutputObjects() { // Create histograms to be saved in output file and // store them in fOutputContainer AliDebug(1,"Init parton histograms"); TList * outputContainer = new TList() ; outputContainer->SetName("GammaExampleHistos") ; fhPt = new TH1F ("hPt","p_T distribution", 100,0,100); fhPt->SetXTitle("p_{T} (GeV/c)"); outputContainer->Add(fhPt); fhPhi = new TH1F ("hPhi","#phi distribution", 100,0,TMath::TwoPi()); fhPhi->SetXTitle("#phi (rad)"); outputContainer->Add(fhPhi); … return outputContainer; } Analysis class example //__________________________________________________________________ void AliAnaExample::MakeAnalysisFillAOD() { //Do analysis and fill aods ConnectAODCaloClusters(); //Do Only when filling AODCaloClusters //Get vertex for photon momentum calculation Double_t v[3] ; //vertex ; GetReader()->GetVertex(v); //Fill AODCaloClusters and AODParticleCorrelation with aods PHOS for(Int_t i = 0; i < GetAODPHOS()->GetEntries(); i++){ AliAODCaloCluster * calo = dynamic_cast<AliAODCaloCluster*> (GetAODPHOS()->At(i)); … do whatever selection with the clusters //Fill AODCaloClusters AddAODCaloCluster(*calo); //Fill AODPhoton after some selection TLorentzVector mom ; calo->GetMomentum(mom,v); Double_t pid[10]; calo->GetPID(pid); Int_t pdg = GetCaloPID()->GetPdg("PHOS",pid,mom.E()); Bool_t in = GetFidutialCut()->IsInFidutialCut(mom,"PHOS") ; if(GetDebug() > 0) printf("pT %3.2f, in %d, pdg %d\n",mom.Pt(), in,pdg); if(mom.Pt() > fPtMin && in && pdg ==AliCaloPID::kPhoton) { AliAODParticleCorrelation ph = AliAODParticleCorrelation(mom); ph.SetLabel(calo->GetLabel(0)); ph.SetPdg(pdg); AddAODParticleCorrelation(ph); } //________________________________________________________ void AliAnaExample::MakeAnalysisFillHistograms() { //Do analysis and fill histograms //Loop on stored AOD photons Int_t naod = GetAODBranch()->GetEntriesFast(); if(GetDebug() > 0) printf("histo aod branch entries %d\n", naod); for(Int_t iaod = 0; iaod < naod ; iaod++){ AliAODPhoton* ph = dynamic_cast<AliAODPhoton*> (GetAODBranch()->At(iaod)); fhPt->Fill(ph->Pt()); fhPhi->Fill(ph->Phi()); … } } Gustavo Conesa Balbastre @ PWG4
Configuration file example AliAnaMaker* ConfigAnalysis(){ //Detector Fidutial Cuts AliFidutialCut * fidCut = new AliFidutialCut(); fidCut->DoCTSFidutialCut(kFALSE) ; fidCut->DoEMCALFidutialCut(kTRUE) ; fidCut->DoPHOSFidutialCut(kTRUE) ; fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.); fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.); fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.); // Reader AliCaloTrackReader *reader = new AliCaloTrackESDReader(); //Min particle pT reader->SetEMCALPtMin(2.); reader->SetPHOSPtMin(2.); reader->SetCTSPtMin(.2); reader->SetFidutialCut(fidCut); reader->SwitchOnEMCAL(); reader->SwitchOnPHOS(); reader->SwitchOffCTS(); // Analysis algorithm AliCaloPID * pid = new AliCaloPID(); // use selection with simple weights pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7); pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7); AliAnaExample *ana = new AliAnaExample(); ana->SetCaloPID(pid); ana->SetFidutialCut(fidCut2); //AliAnaExample *ana2 = new AliAnaExample(); // Set analysis algorithm and reader maker = new AliAnaMaker(); maker->SetReader(reader);//pointer to reader maker->AddAnalysis(ana,0); //maker->AddAnalysis(ana2,1); maker->SetAODBranchName(« MyAOD"); maker->SwitchOnHistogramsMaker() ; maker->SwitchOnAODsMaker() ; return maker ;} Gustavo Conesa Balbastre @ PWG4
Direct Gamma analysis code and hadron/jet correlation • 2 different analysis modules to be executed one after the other or even independently if the AODParticleCorrelations with all the necessary information are already created • AliAnaGammaDirect • Looks for high pT trigger particle: photons identified • Check if they are direct: Isolation Cut • Fill AODParticleCorrelation and/or histograms • Test in progress • Correlations: With the trigger particle (direct photon or anything) correlate • AliAnaParticlePartonCorrelation: Delta pT, eta and phi plots. Done, not tested. • AliAnaParticleHadronCorrelation: Azimuthal correlation plots and momentum imbalance correlation function. Done, not tested. • AliAnaParticleLeadJetCone: Non standard jet finder with the trigger particle as seed for the back-jet. Done, not tested. • AliAnaParticleJetFinder: Connects trigger particle and back-jet found with JETAN (to be done) • Fill AODParticleCorrelations and/or histograms Gustavo Conesa Balbastre @ PWG4
HOW TO • Recipe, ingredients needed: • “par” file containing analysis frame: ESD.par, AOD.par, STEERBase.par, ANALYSIS.par, ANALYSISalice.par, PWG4PartCorr.par • Do in $ALICE_ROOT, “make PWG4PartCorr.par”, or let the analysis macro do it for you. • Configuration file: ConfigXXX.C () • Examples ConfigAnalysisGammaDirect.C and ConfigAnalysisExample.C inside $ALICE_ROOT/PWG4/macros • Analysis execution file: ana.C • Example inside $ALICE_ROOT/PWG4/macros • Exec “root ana.C” • Read carefully ana.C, performs analysis locally, on grid or CAF (last not tested) and different options can be set. Gustavo Conesa Balbastre @ PWG4
Summary and TO DO • New particle and correlations analysis frame, • Originally designed for photon tagging hadrons/jets • More modularity, new analysis algorithms can be added easily • Produces AODs and/or histograms • Can be used by everyone, you are invited to help me improve it. • To Do • Needs full test locally and with GRID and as a wagon of the analysis frame. • Add new analysis cases, specially analysis relevant for the first physics. • Implement event mixing. • Write tutorial • … Gustavo Conesa Balbastre @ PWG4
Back-up Gustavo Conesa Balbastre @ PWG4
General Analysis Frame, short description • In order to do an analysis you need Root or AliRoot and the libraries: • STEERbase • ESD • AOD • ANALYSIS • ANALYSISalice, contains: • The more user friendly AliAnalysisTaskSE. • It is recommended that all the user analysis code derives from this class. • AliAnalysisTaskESDfilter: Main wagon of the analysis train, in charge of creating the standard AODs: AODtracks and AODCaloClusters. • Your analysis library • The way to execute the analysis: • Load the libraries: Create a par file with them (cd $ALICE_ROOT; make ESD.par;) and compile the code. • Init the manager (AliAnalysisManager) and data handlers (MCHandler, AODHandler, ESDHandler), your analysis task and output containers • Output can be AODs or histograms • Create the chain of data, ESDs or AODs • Feed the manager with the chain of data and execute the analysis. • Example of analysis task deriving from AliAnalysisTaskSE in $ALICE_ROOT/PWG4/AliAnalysisTaskPHOSExample.cxx, .h • Example of macro to execute analysis in $ALICE_ROOT/PWG4/macros/anaExampleTask.C Gustavo Conesa Balbastre @ PWG4