From: gconesab Date: Tue, 24 Jan 2012 10:01:03 +0000 (+0000) Subject: move PWG4 macros to PWGGA corresponding places X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=0ce3960d353b2ed8f01daf3a1be6486efa0bb2a9;p=u%2Fmrichter%2FAliRoot.git move PWG4 macros to PWGGA corresponding places --- diff --git a/PWG4/macros/ana.sh b/PWG4/macros/ana.sh deleted file mode 100755 index 2a47be0efc1..00000000000 --- a/PWG4/macros/ana.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# ana.sh -# -# -# Created by schutz on 09.04.08. -# Copyright 2008 ALICE. All rights reserved. - -#Analysis mode, 0 local, 1 localCAF, 2 PROOF, 3 GRID -export MODE=$1 - -#Local mode parameters -#Data root directory -export INDIR=$2 -#Pattern of data directory name -export PATTERN=Run -#Number of files to analyze -export NEVENT=$3 - -#GRID mode parameters -#name of xml file -export XML=$2 - -#Do the analysis -alienroot -b <Getenv("ELECUTSET")){ - kCutSet = atoi(gSystem->Getenv("ELECUTSET")); - } - if(kCutSet == kLooseTight) { - pOverEmin = 0.6; //loose - pOverEmax = 1.4; //loose - dRmax = 0.02; //tight - } - if(kCutSet == kTightLoose) { - pOverEmin = 0.8; //tight - pOverEmax = 1.2; //tight - dRmax = 0.05; //loose - } - if(kCutSet == kLoose2) { - pOverEmin = 0.6; //loose - pOverEmax = 1.4; //loose - dRmax = 0.05; //loose - } - - //Alternatively, select input via anaInputData environment variable. - if (gSystem->Getenv("anaInputData")){ - TString kInputData = gSystem->Getenv("anaInputData"); - if( kInputData == "AOD" ){ - kInputIsESD = kFALSE; - kFollowsFilter = kFALSE; - } - } - - //Alternatively, adjust for real data based on kMC value. - if (gSystem->Getenv("anakMC")){ - kMC = atoi(gSystem->Getenv("anakMC")); - } - - //Detector Fiducial Cuts - AliFiducialCut * fidCut = new AliFiducialCut(); - fidCut->DoCTSFiducialCut(kFALSE) ; - fidCut->DoEMCALFiducialCut(kFALSE) ; - fidCut->DoPHOSFiducialCut(kFALSE) ; - - //fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.); - //fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.); - //fidCut->SetSimplePHOSFiducialCut(0.13,220.,320.); - - fidCut->Print(""); - - //----------------------------------------------------------- - // Reader - //----------------------------------------------------------- - if(kInputIsESD && !kFollowsFilter)AliCaloTrackESDReader *reader = new AliCaloTrackESDReader(); - else AliCaloTrackAODReader *reader = new AliCaloTrackAODReader(); - reader->SetDebug(-1);//10 for lots of messages - - //Switch on or off the detectors information that you want - reader->SwitchOnEMCAL(); - reader->SwitchOnCTS(); - //reader->SwitchOffEMCALCells(); - reader->SwitchOffPHOS(); - //reader->SwitchOffPHOSCells(); - - //Kine - if(kMC && !kInputIsESD){ - reader->SwitchOffStack(); // On by default, remember to SwitchOnMCData() in analysis classes - reader->SwitchOnAODMCParticles(); // Off by default, remember to SwitchOnMCData() in analysis classes - } - - //Select Trigger Class for real data - if(!kMC) reader->SetFiredTriggerClassName("CINT1B-ABCE-NOPF-ALL"); - - //Min particle pT - reader->SetCTSPtMin(0.0); //new - reader->SetEMCALPtMin(0.0); //new - if(kFollowsFilter)reader->SetTrackStatus(0); //to prevent automatic TPC and ITS refit - - //In case of generating jet events (with PYTHIA), if pt hard bin is small - //reject events with large difference between ptHard and triggered jet - //reader->SetPtHardAndJetPtComparison(kTRUE); - - reader->SetFiducialCut(fidCut); - - if(!kInputIsESD){ - // Analysis with tracks, select only tracks with - // following bits - - // //We want tracks fitted in the detectors: - // ULong_t status=AliAODTrack::kTPCrefit; - // status|=AliAODTrack::kITSrefit; - - // We want tracks whose PID bit is set: - // ULong_t status =AliAODTrack::kITSpid; - // status|=AliAODTrack::kTPCpid; - - // reader->SetTrackStatus(status); - } - - reader->Print(""); - - - //Detector Fiducial Cuts - AliFiducialCut * fidCut2 = new AliFiducialCut(); - fidCut2->DoEMCALFiducialCut(kTRUE) ; - fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.); - - fidCut2->DoCTSFiducialCut(kTRUE) ; - fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.); - - fidCut2->Print(""); - - //--------------------------------------------------------------------- - // Analysis algorithm - //--------------------------------------------------------------------- - - AliAnaElectron *anaelectron = new AliAnaElectron(); - anaelectron->SetDebug(-1); //10 for lots of messages - anaelectron->SetCalorimeter("EMCAL"); - if(kMC){ - anaelectron->SwitchOnDataMC(); - anaelectron->SetMinPt(1.); - } - anaelectron->SetOutputAODName("Electrons"); - anaelectron->SetOutputAODClassName("AliAODPWG4Particle"); - anaelectron->SetWriteNtuple(kFALSE); - //Determine which cuts to use based on enum - anaelectron->SetpOverEmin(pOverEmin); - anaelectron->SetpOverEmax(pOverEmax); - anaelectron->SetResidualCut(dRmax); - //Set Histrograms bins and ranges - anaelectron->SetHistoPtRangeAndNBins(0, 100, 100) ; - anaelectron->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; - anaelectron->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; - anaelectron->Print(""); - - //--------------------------------------------------------------------- - // Set analysis algorithm and reader - //--------------------------------------------------------------------- - maker = new AliAnaPartCorrMaker(); - maker->SetReader(reader);//pointer to reader - maker->AddAnalysis(anaelectron,0); - maker->SetAnaDebug(-1) ; - maker->SwitchOnHistogramsMaker() ; - maker->SwitchOnAODsMaker() ; - - maker->Print(""); - // - printf("============================ \n"); - printf("END ConfigAnalysisElectron() \n"); - printf("============================ \n"); - return maker ; -} diff --git a/PWG4/macros/electrons/ConfigJetAnalysisFastJet.C b/PWG4/macros/electrons/ConfigJetAnalysisFastJet.C deleted file mode 100755 index 730bbbbd7cd..00000000000 --- a/PWG4/macros/electrons/ConfigJetAnalysisFastJet.C +++ /dev/null @@ -1,102 +0,0 @@ -//------------------------------------ -// Configuration macro: -// -// Configure JETAN FastJet analysis. -// -// Modified by: K. Read -// -//------------------------------------ - -AliJetFinder* ConfigJetAnalysis() -{ - // - // Configuration goes here - // - printf("========================== \n"); - printf("ConfigJetAnalysisFastJet() \n"); - printf("========================== \n"); - - Bool_t kInputIsESD = kTRUE; //uncomment for input ESD - //Bool_t kInputIsESD = kFALSE; //uncomment for input AODs - Bool_t kFollowsFilter = kTRUE; //uncomment if follows ESD filter task - //Bool_t kFollowsFilter = kFALSE; //uncomment if no ESD filter task - - //Alternatively, select input via anaInputData environment variable. - if (gSystem->Getenv("anaInputData")){ - TString kInputData = gSystem->Getenv("anaInputData"); - if( kInputData == "AOD" ){ - kInputIsESD = kFALSE; - kFollowsFilter = kFALSE; - } - } - - // Define the grids - AliJetGrid *grid = new AliJetGrid(419,119,0.,2*TMath::Pi(),-0.9,0.9); - grid->SetGridType(1); - grid->InitParams(80.*TMath::Pi()/180,190.*TMath::Pi()/180,-0.7,0.7); - grid->SetMatrixIndexes(); - grid->SetIndexIJ(); - AliJetGrid *grid2 = new AliJetGrid(131,95,80.*TMath::Pi()/180.,190.*TMath::Pi()/180.,-0.7,0.7); - grid2->SetGridType(0); - grid2->SetMatrixIndexes(); - grid2->SetIndexIJ(); - - // Define reader header - if(kInputIsESD && !kFollowsFilter) AliJetESDReaderHeader *jrh = new AliJetESDReaderHeader(); - else AliJetAODReaderHeader *jrh = new AliJetAODReaderHeader(); - jrh->SetComment("Testing"); - if(kInputIsESD && !kFollowsFilter) jrh->SetReadSignalOnly(kFALSE); - - // Detector options: 0 = Charged particles only (MomentumArray) - // 1 = Charged particles only (UnitArray) - // 2 = Neutral cells only (UnitArray) - // 3 = Charged particles + neutral cells (UnitArray) - jrh->SetDetector(3); - //jrh->SetDebug(-1); - //jrh->SetFiducialEta(-0.7,0.7); - //jrh->SetFiducialPhi(80.*TMath::Pi()/180,190.*TMath::Pi()/180); - jrh->SetPtCut(0.1); - jrh->SetFiducialEta(-0.9,0.9); //fiducial range used by AliJetFillUnitArrayTracks - jrh->SetFiducialPhi(0,2*TMath::Pi()); //fiducial range used by AliJetFillUnitArrayTracks - - // Define reader and set its header - if(kInputIsESD && !kFollowsFilter) AliJetESDReader *er = new AliJetESDReader(); - else AliJetAODReader *er = new AliJetAODReader(); - er->SetReaderHeader(jrh); - er->SetTPCGrid(grid); - er->SetEMCalGrid(grid2); - er->SetApplyMIPCorrection(kFALSE); - //hadronic correction - er->SetApplyFractionHadronicCorrection(kTRUE); - er->SetFractionHadronicCorrection(1.0); - - // Define jet header - AliFastJetHeaderV1 *jh=new AliFastJetHeaderV1(); - Double_t R=0.4; - Double_t Rbkg=0.2; - - // AliFastJetHeaderV1 *jh=new AliFastJetHeaderV1(); - jh->SetComment("Fast jet code with default parameters"); - //jh->SetDebug(-1); - //jh->SetBGMode(1); //Do BG Subtraction - jh->SetBGMode(0); //No BG Subtraction. Store AOD track refs. - jh->SetRparam(R); // setup parameters - jh->SetRparamBkg(Rbkg); // setup parameters - jh->SetPtMin(0.2); - //jh->SetGhostEtaMax(0.9); - jh->SetGhostArea(0.01); - jh->SetGhostEtaMax(0.7);//used to set the rap_min and rap_max, that are then used by FJ - jh->SetPhiRange(80.*TMath::Pi()/180+R,190.*TMath::Pi()/180-R);//used in AliFastJetFinder for the range - - // Define jet finder. Set its header and reader - jetFinder = new AliFastJetFinder(); - jetFinder->SetJetHeader(jh); - jetFinder->SetJetReader(er); - //jetFinder->SetPlotMode(kTRUE); - - printf("============================== \n"); - printf("END ConfigJetAnalysisFastJet() \n"); - printf("============================== \n"); - - return jetFinder; -} diff --git a/PWG4/macros/electrons/GetProofLogs.C b/PWG4/macros/electrons/GetProofLogs.C deleted file mode 100644 index dc4d431e92d..00000000000 --- a/PWG4/macros/electrons/GetProofLogs.C +++ /dev/null @@ -1,7 +0,0 @@ -{ - gEnv->SetValue("XSec.GSI.DelegProxy","2"); - logs=TProof::Mgr("kread@localhost")->GetSessionLogs(0); - logs->Display(); - //logs->Grep("segmentation violation"); - logs->Save("*","logs.txt"); -} diff --git a/PWG4/macros/electrons/MergeFileInBins.C b/PWG4/macros/electrons/MergeFileInBins.C deleted file mode 100755 index eb0afadebfb..00000000000 --- a/PWG4/macros/electrons/MergeFileInBins.C +++ /dev/null @@ -1,92 +0,0 @@ - -// -// Author: G. Balbastre -// Modified by K. Read -// -// Usage: -// After previously using mymerger.C to merge each PYHIA hard bin, -// do the following to download one file per pt bin: -// aliensh; cd /output/merged; cp histoss* file: -// Then, adjust binlist below to reflect which histograms are non-empty. -// Then, locally: -// root -b -x MergeFileInBins.C -// -// Note: This macro overwrites the downloaded histograms with the same names. -// It may be appropriate to make a backup of the histograms before running -// this macro. -// - -void MergeFileInBins() -{ - char name[128] ; - TFile * mfile; - TFile * sfile; - TList* list; - TList* newlist; - TString binlist = "00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16"; - - if (binlist.Length()) { - arr = binlist.Tokenize(" "); - TObjString *os; - TIter next(arr); - while ((os=(TObjString*)next())) { - printf("Rescaling histosscaled-merged%s.root\n",os->GetString().Data()); - - //Rescale histograms - sprintf(name,"histosscaled-merged%s.root",os->GetString().Data()); - mfile = new TFile(name,"read"); - list = (TList*) mfile->Get("histosscaled"); - mfile->Close(); - - TObject * h ; - Int_t split = ((TH1F*) list->FindObject("hCount"))->GetEntries(); - cout<<"scale with factor "<GetEntries()<GetName()); - newlist->SetName(name); - - for(Int_t iter = 0; iter < list->GetEntries(); iter++){ - h = list->At(iter); - if(h && (h->GetName()!="hCount")){ - if ( !strncmp(h->ClassName(),"TH",2) ) { - char name[128] ; - sprintf(name, "%s", h->GetName()) ; - //cout< (h->Clone(name)) ; - //if(fSumw2) hout->Sumw2(); - hout->Scale(1./split) ; - newlist->Add(hout) ; - } - } - } - - sprintf(name,"histosscaled-merged%s.root",os->GetString().Data()); - sfile = new TFile(name,"recreate"); - newlist->Write(); - sfile->Close(); - cout<GetString().Data()); - sprintf(name,"histosscaled-merged%s.root",os->GetString().Data()); - m.AddFile(name); - } - m.Merge(); - } - -} diff --git a/PWG4/macros/electrons/README b/PWG4/macros/electrons/README deleted file mode 100644 index c6e343e1fec..00000000000 --- a/PWG4/macros/electrons/README +++ /dev/null @@ -1,5 +0,0 @@ -Documentation of these macros and goodies is located at: - -http://aliceinfo.cern.ch/Offline/Activities/Analysis/PWGDocumentation/PWG4/ElectronMacros.html - -https://twiki.cern.ch/twiki/bin/view/ALICE/PWG4JetElectron diff --git a/PWG4/macros/electrons/ReadAODJete.C b/PWG4/macros/electrons/ReadAODJete.C deleted file mode 100755 index 88ada327f8b..00000000000 --- a/PWG4/macros/electrons/ReadAODJete.C +++ /dev/null @@ -1,99 +0,0 @@ -void ReadAODJete(){ - gSystem->Load("libTree.so"); - gSystem->Load("libPhysics.so"); - gSystem->Load("libGeom.so"); - gSystem->Load("libVMC.so"); - gSystem->Load("libCGAL"); - gSystem->Load("libfastjet"); - gSystem->Load("libSISConePlugin"); - gSystem->Load("libSTEERBase"); - gSystem->Load("libESD"); - gSystem->Load("libAOD"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libANALYSISalice"); - gSystem->Load("libJETAN"); - gSystem->Load("libFASTJETAN"); - gSystem->Load("libPWG4PartCorrBase"); - gSystem->Load("libPWG4PartCorrDep"); - - - TFile* fin=new TFile("aodoutput.root"); - - TTree *aodTree = (TTree*)fin->Get("aodTree"); - AliAODEvent *ev = new AliAODEvent(); - ev->ReadFromTree(aodTree); - Int_t nEvents = aodTree->GetEntries(); - cout<GetUserInfo()->FindObject("AliJetHeader_jets"); - cout<<"Rparam = "<GetRparam()<<" BGmode = "<GetBGMode()<GetEvent(nEv); - - //getting jets - Int_t nJets = ev->GetNJets(); - for(Int_t iJet=0; iJetGetJet(iJet); - cout<Pt()<Print(); - cout<<"*****************************END JET PRINTOUT**************************"<FindListObject("jeteventbackground"); - - cout<<"*******************************evBkg = "<Print(); - - Float_t bkg1=evBkg->GetBackground(0); - Float_t bkg2=evBkg->GetBackground(1); - Float_t bkg3=evBkg->GetBackground(2); - Float_t bkg4=evBkg->GetBackground(3); - - cout<<"ev = "<Fill(bkg1); - h2->Fill(bkg2); - h3->Fill(bkg3); - h4->Fill(bkg4); - } - - } - h1->GetXaxis()->SetTitle("#rho"); - h2->GetXaxis()->SetTitle("#rho"); - h3->GetXaxis()->SetTitle("#rho"); - h4->GetXaxis()->SetTitle("#rho"); - h1->GetYaxis()->SetTitle("Entries"); - h2->GetYaxis()->SetTitle("Entries"); - h3->GetYaxis()->SetTitle("Entries"); - h4->GetYaxis()->SetTitle("Entries"); - - h1->SetTitle("FastJet R=0.2 All"); - h2->SetTitle("FastJet R=0.4 Charged"); - h3->SetTitle("Out-of-cone"); - h4->SetTitle("Out-of-jet"); - - - TCanvas* c1=new TCanvas(); - c1->Divide(2,2); - c1->cd(1); - h1->Draw(); - c1->cd(2); - h2->Draw(); - c1->cd(3); - h3->Draw(); - c1->cd(4); - h4->Draw(); - -} diff --git a/PWG4/macros/electrons/anaJete.C b/PWG4/macros/electrons/anaJete.C deleted file mode 100755 index 02e2382515c..00000000000 --- a/PWG4/macros/electrons/anaJete.C +++ /dev/null @@ -1,729 +0,0 @@ -/* $Id: $ */ -//-------------------------------------------------- -// Example macro to do multi-platform JETAN/FASTJET analysis -// Can be executed with Root and AliRoot -// -// Configured by options and definitions set in the lines below and -// additional external configuration files and environement variables. -// -// Author: K. Read -// -//------------------------------------------------- -enum anaModes {mLocal, mLocalCAF, mPROOF, mGRID, mPLUGIN}; -//mLocal = 0: Analyze locally files in your computer -//mLocalCAF = 1: Analyze locally CAF files -//mPROOF = 2: Analyze CAF files with PROOF -//mGRID = 3: Analyze files on GRID -//mPLUGIN = 4: Analyze files on GRID with AliEn plugin - -//--------------------------------------------------------------------------- -//Settings to read locally several files, only for "mLocal" mode -//The different values are default, they can be set with environmental -//variables: INDIR, PATTERN, NFILES, respectively -//char * kInDir = "/afs/cern.ch/user/k/kread/public/data/"; -char * kInDir = "/user/data/files"; -char * kPattern = ""; // Data are in files kInDir/kPattern+i -Int_t kFile = 1; // Number of files -//--------------------------------------------------------------------------- -//Collection file for grid analysis -char * kXML = "collection.xml"; -//--------------------------------------------------------------------------- -//Data directory for PROOF analysis -char * kmydataset = "/COMMON/COMMON/LHC09a4_run8101X"; -//char * kmydataset = "/PWG4/mcosenti/LHC08d10_ppElectronB_Jets#esdTree"; -//--------------------------------------------------------------------------- -//Scale histograms from file. Change to kTRUE when xsection file exists -//Put name of file containing xsection -//Put number of events per ESD file -//This is an specific case for normalization of Pythia files. -Bool_t kGetXSectionFromFileAndScale = kTRUE; -const char * kXSFileName = "pyxsec.root"; -const Int_t kNumberOfEventsPerFile = 200; -//--------------------------------------------------------------------------- - -Bool_t kMC = kTRUE; //With real data kMC = kFALSE -TString kInputData = "ESD";//ESD, AOD, MC -TString kTreeName = "esdTree"; -//const Bool_t kMergeAODs = kTRUE; //uncomment for AOD merging -const Bool_t kMergeAODs = kFALSE; //uncomment for no AOD merging -const Bool_t kUsePAR = kTRUE; //set to kFALSE for libraries -const Bool_t kDoJetTask = kTRUE; //set to kFALSE to skip JETAN task -Int_t sevent = 0; - -Int_t mode = mLocal; -char sconfig1[1024] = "ConfigPWG4AODtoAOD"; //"ConfigAnalysis"; -char sconfig2[1024] = "ConfigJetAnalysisFastJet.C";//"ConfigAnalysis"; -char sconfig3[1024] = "ConfigAnalysisElectron"; //"ConfigAnalysis"; - -//Initialize the cross section and ntrials values. Do not modify. -Double_t xsection = 0; -Float_t ntrials = 0; - -void anaJete() -{ - // Main - - //Process environmental variables from command line: - ProcessEnvironment(); - printf("Final Variables: kInputData %s, kMC %d, mode %d, config2 %s, config3 %s, sevent %d\n",kInputData.Data(),kMC,mode,sconfig2,sconfig3,sevent); - - if(!kMC) { - kGetXSectionFromFileAndScale = kFALSE; - } - - //-------------------------------------------------------------------- - // Load analysis libraries - // Look at the method below, - // change whatever you need for your analysis case - // ------------------------------------------------------------------ - LoadLibraries(mode) ; - - //------------------------------------------------------------------------------------------------- - //Create chain from ESD and from cross sections files, look below for options. - //------------------------------------------------------------------------------------------------- - if(kInputData == "ESD") kTreeName = "esdTree" ; - else if(kInputData == "AOD") kTreeName = "aodTree" ; - else if (kInputData == "MC") kTreeName = "TE" ; - else { - cout<<"Wrong data type "<SetRunMode("submit"); - //Uncomment the following 3 lines to permit auto xml creation - //plugin->SetGridDataDir("/alice/sim/PDC_08b/LHC08d10/"); //dummy - //plugin->SetDataPattern("AliESDs.root"); //dummy - //plugin->AddRunNumber(30010); //dummy - plugin->AddDataFile("mycollect.xml"); - plugin->SetGridWorkingDir("work3"); - plugin->SetAdditionalLibs("anaJet.C ConfigJetAnalysisFastJet.C ConfigAnalysisElectron.C ANALYSIS.par ANALYSISalice.par AOD.par EMCALUtils.par ESD.par PHOSUtils.par STEERBase.par JETAN.par FASTJETAN.par"); - plugin->SetJDLName("anaJet.jdl"); - plugin->SetExecutable("anaJet.sh"); - plugin->SetOutputFiles("histos.root"); - AliAnalysisGrid *alienHandler = plugin; - if (!alienHandler) return; - - // Connect plug-in to the analysis manager - mgr->SetGridHandler(alienHandler); - } - - // MC handler - if( (kMC && (kInputData == "ESD")) || kInputData == "MC"){ - AliMCEventHandler* mcHandler = new AliMCEventHandler(); - mcHandler->SetReadTR(kFALSE);//Do not search TrackRef file - mgr->SetMCtruthEventHandler(mcHandler); - if( kInputData == "MC") mgr->SetInputEventHandler(NULL); - } - - // AOD output handler - AliAODHandler* aodoutHandler = new AliAODHandler(); - aodoutHandler->SetOutputFileName("aodoutput.root"); - if(kMergeAODs)aodoutHandler->SetCreateNonStandardAOD(); - mgr->SetOutputEventHandler(aodoutHandler); - - //input - if(kInputData == "ESD"){ - // ESD handler - AliESDInputHandler *esdHandler = new AliESDInputHandler(); - mgr->SetInputEventHandler(esdHandler); - } - if(kInputData == "AOD"){ - // AOD handler - AliAODInputHandler *aodHandler = new AliAODInputHandler(); - mgr->SetInputEventHandler(aodHandler); - if(kMergeAODs){ - char path[1024]; - sprintf(path,"AliAOD.root"); - if(gSystem->Getenv("SIMPATH")) - sprintf(path,"%s/AliAOD.root",gSystem->Getenv("SIMPATH")); - cout<<"Config: Second input file: "<SetMergeEvents(kTRUE); - aodHandler->AddFriend(path); - cout<<"Config: Starting event for second input file: "<SetMergeOffset(sevent); - } - } - - mgr->SetDebugLevel(3); // For debugging, do not uncomment if you want no messages. - - - const Bool_t kDoESDFilter = kTRUE; //need this for JETAN with input ESDs - //const Bool_t kDoESDFilter = kFALSE; - if(kInputData == "ESD" && kDoESDFilter){ - printf("Applying ESD filter cuts appropriate for jet analysis\n"); - // - // Set of cuts - // - // standard - AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Loose"); - //esdTrackCutsL->SetMinNClustersTPC(50); - //esdTrackCutsL->SetMaxChi2PerClusterTPC(3.5); - //esdTrackCutsL->SetRequireTPCRefit(kTRUE); - //esdTrackCutsL->SetMaxDCAToVertexXY(2.4); - //esdTrackCutsL->SetMaxDCAToVertexZ(3.2); - //esdTrackCutsL->SetDCAToVertex2D(kTRUE); - //esdTrackCutsL->SetRequireSigmaToVertex(kFALSE); - //esdTrackCutsL->SetAcceptKinkDaughters(kFALSE); - // - // hard - AliESDtrackCuts* esdTrackCutsH = new AliESDtrackCuts("AliESDtrackCuts", "Hard"); - esdTrackCutsH->SetMinNClustersTPC(100); - esdTrackCutsH->SetMaxChi2PerClusterTPC(2.0); - esdTrackCutsH->SetRequireTPCRefit(kTRUE); - esdTrackCutsH->SetMaxDCAToVertexXY(2.4); - esdTrackCutsH->SetMaxDCAToVertexZ(3.2); - esdTrackCutsH->SetDCAToVertex2D(kTRUE); - esdTrackCutsH->SetRequireSigmaToVertex(kFALSE); - esdTrackCutsH->SetAcceptKinkDaughters(kFALSE); - // - AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter"); - trackFilter->AddCuts(esdTrackCutsL); - // trackFilter->AddCuts(esdTrackCutsH); - // - AliAnalysisTaskESDfilter *esdfilter = new AliAnalysisTaskESDfilter("ESD Filter"); - esdfilter->SetTrackFilter(trackFilter); - esdfilter->SetDebugLevel(10); - mgr->AddTask(esdfilter); - } - - - //------------------------------------------------------------------------- - //Define task, put here any other task that you want to use. - //------------------------------------------------------------------------- - - // - // Jet analysis - // - if( kDoJetTask ){ - AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis",chain); - jetana->SetDebugLevel(2); - jetana->SetConfigFile(sconfig2); //Default ConfigJetAnalysisFastJet - //Uncommenting the following line produces too many AddAtAndExpand warnings for now. - if(kMergeAODs)jetana->ReadAODFromOutput(); //Uncomment when AOD merging - mgr->AddTask(jetana); - } - - // - // electron analysis - // - AliAnalysisTaskParticleCorrelation * taskpwg4 = new AliAnalysisTaskParticleCorrelation ("Particle"); - taskpwg4->SetConfigFileName("ConfigAnalysisElectron"); //Default name is ConfigAnalysisElectron - mgr->AddTask(taskpwg4); - - // Create containers for input/output - AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); - AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer(); - AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(), - AliAnalysisManager::kOutputContainer, "histos.root"); - - - if(kInputData == "ESD" && kDoESDFilter){ - mgr->ConnectInput (esdfilter, 0, cinput1 ); - mgr->ConnectOutput (esdfilter, 0, coutput1 ); - } - - if( kDoJetTask ){ - mgr->ConnectInput (jetana, 0, cinput1 ); - mgr->ConnectOutput (jetana, 0, coutput1 ); - mgr->ConnectOutput (jetana, 1, coutput2 ); - } - - mgr->ConnectInput (taskpwg4, 0, cinput1 ); - mgr->ConnectOutput (taskpwg4, 0, coutput1 ); - mgr->ConnectOutput (taskpwg4, 1, coutput2 ); - - - //------------------------ - //Scaling task - //----------------------- - cout<<">>> Scaling Task"<GetListOfFiles()->GetEntriesFast();//chainxs->GetEntries(); - Int_t nevents = chain->GetEntries(); - cout<<"Get? "< 0){ - cout<<"Init AnaScale"<Set(scaleFactor) ; - scale->MakeSumw2(kTRUE);//If you want histograms with error bars set to kTRUE - scale->SetDebugLevel(2); - mgr->AddTask(scale); - - AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("histosscaled", - TList::Class(), AliAnalysisManager::kOutputContainer, "histosscaled.root"); - mgr->ConnectInput (scale, 0, coutput2); - mgr->ConnectOutput (scale, 0, coutput3 ); - } - - //----------------------- - // Run the analysis - //----------------------- - TString smode = ""; - if (mode==mLocal || mode == mLocalCAF) - smode = "local"; - else if (mode==mPROOF) - smode = "proof"; - else if (mode==mGRID) - smode = "local"; - else if (mode==mPLUGIN) - smode = "grid"; - - //mgr->ResetAnalysis(); - mgr->InitAnalysis(); - mgr->PrintStatus(); - if (mode==mPROOF) - mgr->StartAnalysis(smode.Data(),kmydataset,1500,0); - else if (mode==mPLUGIN) - mgr->StartAnalysis(smode.Data()); - else - mgr->StartAnalysis(smode.Data(),chain); - - cout <<" Analysis ended sucessfully "<< endl ; - - } - else cout << "Chain was not produced ! "<>>>>>>>>>> Local mode <<<<<<<<<<<<<< - //---------------------------------------------------------- - if (mode==mLocal || mode == mLocalCAF || mode == mGRID || mode == mPLUGIN) { - - //-------------------------------------- - // Load the needed libraries most of them already loaded by aliroot - //-------------------------------------- - gSystem->Load("libTree.so"); - gSystem->Load("libGeom.so"); - gSystem->Load("libVMC.so"); - gSystem->Load("libXMLIO.so"); - if( kDoJetTask ){ - gSystem->Load("libCGAL"); - gSystem->Load("libfastjet"); - gSystem->Load("libSISConePlugin"); - } - - if(kUsePAR){ - //-------------------------------------------------------- - //If you want to use root and par files from aliroot - //-------------------------------------------------------- - SetupPar("STEERBase"); - SetupPar("ESD"); - SetupPar("AOD"); - SetupPar("ANALYSIS"); - SetupPar("ANALYSISalice"); - SetupPar("PHOSUtils"); - SetupPar("EMCALUtils"); - if( kDoJetTask ){ - cerr<<"Now Loading JETAN"<Load("libSTEERBase"); - gSystem->Load("libESD"); - gSystem->Load("libAOD"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libANALYSISalice"); - gSystem->Load("libPHOSUtils"); - gSystem->Load("libEMCALUtils"); - if( kDoJetTask ){ - gSystem->Load("libJETAN"); - gSystem->Load("libFASTJETAN"); - } - gSystem->Load("libPWG4PartCorrBase"); - gSystem->Load("libPWG4PartCorrDep"); - } - - - } - - //--------------------------------------------------------- - // <<<<<<<<<< PROOF mode >>>>>>>>>>>> - //--------------------------------------------------------- - else if (mode==mPROOF) { - // - // Connect to proof - // Put appropriate username here - // char* myproofname = "alicecaf"; - char* myproofname = "kread@localhost"; - - //TProof::Reset("proof://kread@lxb6046.cern.ch"); - //TProof::Reset("proof://myproofname); - //TProof::Reset("myproofname",kTRUE); - gEnv->SetValue("XSec.GSI.DelegProxy","2"); - //TProof::Mgr(myproofname)->ShowROOTVersions(); - //TProof::Mgr(myproofname)->SetROOTVersion("v5-24-00"); - TProof::Open(myproofname); - - // gProof->ClearPackages(); - // gProof->SetLogLevel(5); - // gProof->ClearPackage("STEERBase"); - // gProof->ClearPackage("ESD"); - // gProof->ClearPackage("AOD"); - // gProof->ClearPackage("ANALYSIS"); - // gProof->ClearPackage("ANALYSISalice"); - // gProof->ClearPackage("PHOSUtils"); - // gProof->ClearPackage("EMCALUtils"); - // if( kDoJetTask ){ - // gProof->ClearPackage("JETAN"); - // gProof->ClearPackage("FASTJETAN"); - // } - // gProof->ClearPackage("PWG4PartCorrBase"); - // gProof->ClearPackage("PWG4PartCorrDep"); - // gProof->ShowEnabledPackages(); - - // Enable the STEERBase Package - gProof->UploadPackage("STEERBase.par"); - gProof->EnablePackage("STEERBase"); - // Enable the ESD Package - gProof->UploadPackage("ESD.par"); - gProof->EnablePackage("ESD"); - // Enable the AOD Package - gProof->UploadPackage("AOD.par"); - gProof->EnablePackage("AOD"); - // Enable the Analysis Package - gProof->UploadPackage("ANALYSIS.par"); - gProof->EnablePackage("ANALYSIS"); - // Enable the Analysis Package - gProof->UploadPackage("ANALYSISalice.par"); - gProof->EnablePackage("ANALYSISalice"); - // Enable the PHOSUtils Package - gProof->UploadPackage("PHOSUtils.par"); - gProof->EnablePackage("PHOSUtils"); - // Enable the EMCALUtils Package - gProof->UploadPackage("EMCALUtils.par"); - gProof->EnablePackage("EMCALUtils"); - if( kDoJetTask ){ - // Enable JETAN analysis - gProof->UploadPackage("JETAN.par"); - gProof->EnablePackage("JETAN"); - // Enable FASTJETAN analysis - gProof->UploadPackage("FASTJETAN.par"); - gProof->EnablePackage("FASTJETAN"); - } - // Enable the PWG4PartCorrBase Package - gProof->UploadPackage("PWG4PartCorrBase.par"); - gProof->EnablePackage("PWG4PartCorrBase"); - // Enable the PWG4PartCorrDep Package - gProof->UploadPackage("PWG4PartCorrDep.par"); - gProof->EnablePackage("PWG4PartCorrDep"); - - gProof->ShowEnabledPackages(); - } - -} - -void SetupPar(char* pararchivename) -{ - //Load par files, create analysis libraries - //For testing, if par file already decompressed and modified - //classes then do not decompress. - - TString cdir(Form("%s", gSystem->WorkingDirectory() )) ; - TString parpar(Form("%s.par", pararchivename)) ; - if ( gSystem->AccessPathName(pararchivename) ) { - TString processline = Form(".! tar xvzf %s",parpar.Data()) ; - gROOT->ProcessLine(processline.Data()); - } - - TString ocwd = gSystem->WorkingDirectory(); - gSystem->ChangeDirectory(pararchivename); - - // check for BUILD.sh and execute - if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) { - printf("*******************************\n"); - printf("*** Building PAR archive ***\n"); - cout<Exec("PROOF-INF/BUILD.sh")) { - Error("runProcess","Cannot Build the PAR Archive! - Abort!"); - return -1; - } - } - // check for SETUP.C and execute - if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) { - printf("*******************************\n"); - printf("*** Setup PAR archive ***\n"); - cout<Macro("PROOF-INF/SETUP.C"); - } - - gSystem->ChangeDirectory(ocwd.Data()); - printf("Current dir: %s\n", ocwd.Data()); -} - - - -void CreateChain(const anaModes mode, TChain * chain, TChain * chainxs){ - //Fills chain with data - - TString datafile=""; - if(kInputData == "ESD") datafile = "AliESDs.root" ; - else if(kInputData == "AOD") datafile = "AliAOD.root" ; - else if(kInputData == "MC") datafile = "galice.root" ; - - if(kInputData == "AOD") kXSFileName = "pyxsec_hists.root"; - - char * kGener = gSystem->Getenv("GENER"); - if(kGener) { - cout<<"GENER "<WorkingDirectory(); - - //----------------------------------------------------------- - //Analysis of CAF data locally - //----------------------------------------------------------- - if(mode == mLocalCAF){ - // Read the input list of files and add them to the chain - TString line; - ifstream in; - in.open("ESDlist.txt"); - while (in.good()) { - in >> line; - if (line.Length() == 0) continue; - // cout << " line = " << line << endl; - chain->Add(line); - } - } - - //--------------------------------------- - //Local files analysis - //--------------------------------------- - else if(mode == mLocal){ - //If you want to add several ESD files sitting in a common directory INDIR - //Specify as environmental variables the directory (INDIR), the number of files - //to analyze (NFILES) and the pattern name of the directories with files (PATTERN) - - if(gSystem->Getenv("INDIR")) - kInDir = gSystem->Getenv("INDIR") ; - else cout<<"INDIR not set, use default: "<Getenv("PATTERN")) - kPattern = gSystem->Getenv("PATTERN") ; - else cout<<"PATTERN not set, use default: "<Getenv("NFILES")) - kFile = atoi(gSystem->Getenv("NFILES")) ; - else cout<<"NFILES not set, use default: "<cd(kInDir) ) {//check if ESDs directory exist - printf("%s does not exist\n", kInDir) ; - return ; - } - - //if(gSystem->Getenv("XSFILE")) - //kXSFileName = gSystem->Getenv("XSFILE") ; - //else cout<<" XS file name not set, use default: "<Get(kTreeName) ) { - Int_t nEventsPerFile = ((TTree*) dataFile->Get(kTreeName)) ->GetEntries(); - printf("++++ Adding %s, with %d events \n", file, nEventsPerFile) ; - chain->AddFile(file); - if(kGetXSectionFromFileAndScale) GetXsection(nEventsPerFile, filexs); - } - } - else { - printf("---- Skipping %s\n", file) ; - skipped++ ; - } - } - printf("number of entries # %lld, skipped %d\n", chain->GetEntries(), skipped*100) ; - } - else { - TString input = "AliESDs.root" ; - cout<<">>>>>> No list added, take a single file <<<<<<<<< "<AddFile(input); - } - - }// local files analysis - - //------------------------------ - //GRID xml files - //----------------------------- - else if(mode == mGRID){ - //Get colection file. It is specified by the environmental - //variable XML - - if(gSystem->Getenv("XML") ) - kXML = gSystem->Getenv("XML"); - else - sprintf(kXML, "collection.xml") ; - - if (!TFile::Open(kXML)) { - printf("No collection file with name -- %s -- was found\n",kXML); - return ; - } - else cout<<"XML file "<Load("libNetx.so") ; - gSystem->Load("libRAliEn.so"); - TGrid::Connect("alien://") ; - - //Feed Grid with collection file - //TGridCollection * collection = (TGridCollection*)gROOT->ProcessLine(Form("TAlienCollection::Open(\"%s\", 0)", kXML)); - TGridCollection * collection = (TGridCollection*) TAlienCollection::Open(kXML); - if (! collection) { - AliError(Form("%s not found", kXML)) ; - return kFALSE ; - } - TGridResult* result = collection->GetGridResult("",0 ,0); - - // Makes the ESD chain - printf("*** Getting the Chain ***\n"); - Int_t nEventsPerFile = 0; - for (Int_t index = 0; index < result->GetEntries(); index++) { - TString alienURL = result->GetKey(index, "turl") ; - cout << "================== " << alienURL << endl ; - chain->Add(alienURL) ; - - if(kGetXSectionFromFileAndScale){ - //Get the number of events per file. - //Do it only once, no need to open all the files. - if(index == 0) { - TFile * df = TFile::Open(alienURL); - nEventsPerFile = ((TTree*) df->Get(kTreeName)) ->GetEntries(); - df->Close(); - } - alienURL.ReplaceAll(datafile,kXSFileName); - GetXsection(nEventsPerFile, alienURL);//chainxs->Add(alienURL) ; - } - } - }// xml analysis - - gSystem->ChangeDirectory(ocwd.Data()); -} - -//________________________________________________ -void GetXsection(Int_t nEventsPerFile, TString filexs) -{ - // Get the cross section from the corresponding file in the directory - // where the data sits. - // The xsection and ntrials global variables are updated per each file. - // The average of these cuantities should be calculated after. - - TFile *fxs = TFile::Open(filexs); - if(kInputData =="AOD") { //needs improvement, in case of train with ESDs, reading output AODs for example this is wrong. - TList *l = (TList*) fxs->Get("cFilterList"); - TH1F * hxs = l->FindObject("h1Xsec") ; - TH1F * htrial = l->FindObject("h1Trials") ; - if(htrial->GetEntries()!=hxs->GetEntries() || htrial->GetEntries()==0){ - cout<<"Careful!!! Entries in histo for cross section "<GetEntries()<< ", for trials "<GetEntries()<GetBinContent(1); - ntrials += htrial->GetBinContent(1)/nEventsPerFile; - cout << "Chain: xsection " <GetBinContent(1)<<" ntrials "<GetBinContent(1)<SetBranchAddress("xsection",&xs); - xstree->SetBranchAddress("ntrials",&ntr); - xstree->GetEntry(0); - cout << "Chain: xsection " <Getenv("anaInputData"); - - if (gSystem->Getenv("anakMC")) - kMC = atoi(gSystem->Getenv("anakMC")); - - if (gSystem->Getenv("MODE")) - mode = atoi(gSystem->Getenv("MODE")); - - if (gSystem->Getenv("CONFIG1")) - sprintf(sconfig1,gSystem->Getenv("CONFIG1")); - - if (gSystem->Getenv("CONFIG2")) - sprintf(sconfig2,gSystem->Getenv("CONFIG2")); - - if (gSystem->Getenv("CONFIG3")) - sprintf(sconfig3,gSystem->Getenv("CONFIG3")); - - if (gSystem->Getenv("SEVENT")) - sevent = atoi (gSystem->Getenv("SEVENT")); - - printf("Process: Variables: kInputData %s, kMC %d, mode %d, config2 %s, config3 %s, sevent %d\n",kInputData.Data(),kMC,mode,sconfig2,sconfig3,sevent); - -} diff --git a/PWG4/macros/electrons/anaJete.jdl b/PWG4/macros/electrons/anaJete.jdl deleted file mode 100644 index 01e49d8fc58..00000000000 --- a/PWG4/macros/electrons/anaJete.jdl +++ /dev/null @@ -1,43 +0,0 @@ -Executable="root"; -Jobtag ={"Analysis: Processing collection for analysis "}; -Packages ={"VO_ALICE@ROOT::v5-24-00","VO_ALICE@APISCONFIG::V2.4","VO_ALICE@fastjet::v2.4.0"}; - -TTL=15000; - -InputFile={"LF:/alice/cern.ch/user/k/kread/work12/anaJete.C", - "LF:/alice/cern.ch/user/k/kread/work12/run.C", - "LF:/alice/cern.ch/user/k/kread/work12/ConfigJetAnalysisFastJet.C", - "LF:/alice/cern.ch/user/k/kread/work12/ConfigAnalysisElectron.C", - "LF:/alice/cern.ch/user/k/kread/work12/STEERBase.par", - "LF:/alice/cern.ch/user/k/kread/work12/ESD.par", - "LF:/alice/cern.ch/user/k/kread/work12/AOD.par", - "LF:/alice/cern.ch/user/k/kread/work12/ANALYSIS.par", - "LF:/alice/cern.ch/user/k/kread/work12/ANALYSISalice.par", - "LF:/alice/cern.ch/user/k/kread/work12/PHOSUtils.par", - "LF:/alice/cern.ch/user/k/kread/work12/EMCALUtils.par", - "LF:/alice/cern.ch/user/k/kread/work12/JETAN.par", - "LF:/alice/cern.ch/user/k/kread/work12/FASTJETAN.par", - "LF:/alice/cern.ch/user/k/kread/work12/PWG4PartCorrBase.par", - "LF:/alice/cern.ch/user/k/kread/work12/PWG4PartCorrDep.par"}; -OutputArchive={"log_archive:stdout,stderr,*.log@ALICE::CERN::ALICEDISK", - "root_archive:*.root@ALICE::CERN::ALICEDISK"}; - -OutputDir = "/alice/cern.ch/user/k/kread/work12/output/#alien_counter_03i#"; - -InputDataCollection = "LF:/alice/cern.ch/user/k/kread/work12/mycollect.xml,nodownload"; - -InputDataListFormat = "xml-single"; -InputDataList = "collection.xml"; - -Split = "se"; -SplitMaxInputFileNumber = "15"; - -splitarguments="run.C --anaInputData ESD --mode 3 --config2 ConfigJetAnalysisFastJet.C --config3 ConfigAnalysisElectron --sevent 0"; - - -# Validation script to be run for each subjob -Validationcommand = "/alice/cern.ch/user/k/kread/work12/validate.sh"; - -OutputFile="histos.root"; -MergeOutputDir = "/alice/cern.ch/user/k/kread/work12/output/merged"; -Merge = {"histos.root:/alice/cern.ch/user/k/kread/work12/mergeout.jdl:histos-merged.root"}; diff --git a/PWG4/macros/electrons/anaJete.sh b/PWG4/macros/electrons/anaJete.sh deleted file mode 100755 index dc4b94b2837..00000000000 --- a/PWG4/macros/electrons/anaJete.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# -# Author: K. Read -# - - export ELECUTSET=0 #kTight2 - default -#export ELECUTSET=1 #kLooseTight - loose p/E, tight dR -#export ELECUTSET=2 #kTightLoose - tight p/E, loose dR -#export ELECUTSET=3 #kLoose2 - both loose - -# Set anaKMC=0 for data or 1 for MC - export anakMC=1 - - export anaInputData=ESD - export INDIR=/work2/data/test - export PATTERN= - export NFILES=1 - -#export anaInputData=AOD -#export INDIR=/work2/data/LHC08d6/AOD/000 -#export PATTERN=01 -#export NFILES=1 - -#export anaInputData=AOD -#export INDIR=/work2/data/bjetfilter/AOD/117005 -#export PATTERN=00 -#export NFILES=5 - - export MODE=0 - - export CONFIG2=ConfigJetAnalysisFastJet.C - export CONFIG3=ConfigAnalysisElectron - - export SIMPATH=/work2/data/bjetfilter/AOD/117005/004 -#export SIMPATH=/work2/data/LHC09a5/000042 -#export SIMPATH=/work2/data/LHC08d6/AOD/000/010 - - export SEVENT=0 - -root -q -b -l anaJete.C diff --git a/PWG4/macros/electrons/anaJetemulti.jdl b/PWG4/macros/electrons/anaJetemulti.jdl deleted file mode 100644 index e4c726ba4b7..00000000000 --- a/PWG4/macros/electrons/anaJetemulti.jdl +++ /dev/null @@ -1,40 +0,0 @@ -Executable="root"; -Jobtag ={"Analysis: Processing $1 collection number $2 for analysis "}; -Packages ={"VO_ALICE@ROOT::v5-24-00","VO_ALICE@APISCONFIG::V2.4","VO_ALICE@fastjet::v2.4.0"}; - -TTL=15000; - -InputFile={"LF:/alice/cern.ch/user/k/kread/$1/anaJete.C", - "LF:/alice/cern.ch/user/k/kread/$1/run.C", - "LF:/alice/cern.ch/user/k/kread/$1/ConfigJetAnalysisFastJet.C", - "LF:/alice/cern.ch/user/k/kread/$1/ConfigAnalysisElectron.C", - "LF:/alice/cern.ch/user/k/kread/$1/STEERBase.par", - "LF:/alice/cern.ch/user/k/kread/$1/ESD.par", - "LF:/alice/cern.ch/user/k/kread/$1/AOD.par", - "LF:/alice/cern.ch/user/k/kread/$1/ANALYSIS.par", - "LF:/alice/cern.ch/user/k/kread/$1/ANALYSISalice.par", - "LF:/alice/cern.ch/user/k/kread/$1/PHOSUtils.par", - "LF:/alice/cern.ch/user/k/kread/$1/EMCALUtils.par", - "LF:/alice/cern.ch/user/k/kread/$1/JETAN.par", - "LF:/alice/cern.ch/user/k/kread/$1/FASTJETAN.par", - "LF:/alice/cern.ch/user/k/kread/$1/PWG4PartCorrBase.par", - "LF:/alice/cern.ch/user/k/kread/$1/PWG4PartCorrDep.par"}; -OutputArchive={"log_archive:stdout,stderr,*.log@ALICE::CERN::ALICEDISK", - "root_archive:*.root@ALICE::CERN::ALICEDISK"}; - -OutputDir = "/alice/cern.ch/user/k/kread/$1/output/$2/#alien_counter_03i#"; - -InputDataCollection = "LF:/alice/cern.ch/user/k/kread/$1/mycollect$2.xml,nodownload"; - -InputDataListFormat = "xml-single"; -InputDataList = "collection.xml"; - -Split = "se"; -SplitMaxInputFileNumber = "1"; - -splitarguments="run.C --anaInputData AOD --mode 3 --config2 ConfigJetAnalysisFastJet.C --config3 ConfigAnalysisElectron --sevent 0"; - -# Validation script to be run for each subjob -Validationcommand = "/alice/cern.ch/user/k/kread/$1/validate.sh"; - -OutputFile="histos.root"; diff --git a/PWG4/macros/electrons/makeCombinedData.C b/PWG4/macros/electrons/makeCombinedData.C deleted file mode 100644 index 9da100d65c1..00000000000 --- a/PWG4/macros/electrons/makeCombinedData.C +++ /dev/null @@ -1,803 +0,0 @@ -///////////////////////////////////////// -// A set of plotting utilities for the -// electron chapter of the PPR -// -// J.L.Klay (Cal Poly) -// 28-Oct-2009 -//////////////////////////////////////// - -TH1F *alltte, *alltrk, *allemc; -TH1F *sumtte, *sumtrk, *sumemc; //all but misid'ed hadrons -TH1F *btte, *btrk, *bemc; -TH1F *ctte, *ctrk, *cemc; -TH1F *cbtte, *cbtrk, *cbemc; -TH1F *convtte, *convtrk, *convemc; -TH1F *daltte, *daltrk, *dalemc; -TH1F *wztte, *wztrk, *wzemc; -TH1F *htte, *htrk, *hemc; - -TH1F *allMC; -TH1F *bMC, *cMC, *cbMC; -TH1F *convMC, *dalMC, *wzMC; -TH1F *mchad; -TH1F *allheratio, *behratio; - -TF1* fpow; - -void makeData(char* jjfname = "data/scaled25Oct09/TOTALhistosscaled-LHC09b2-0.root", - char* bfname = "data/scaled25Oct09/histosscaledLHC09b4AODc.root", - char* wfname = "data/scaled25Oct09/histosWboson.root") { - - //TO AVOID DOUBLE-COUNTING ELECTRONS: - //NOTE: Jet-Jet events are "minimum bias" which means that there - //are B-Jets included and for the higher pThard bins the B-jets will - //play a more important role. So to AVOID DOUBLE-COUNTING - //B-electrons, we will suppress the electrons in the Jet-Jet events - //that come from B->e or B->C->e when we combine the productions - //into the total histograms - - //TO AVOID DOUBLE-COUNTING HADRONS: - //For the hadron yields, we need to use only the yields from the - //Jet-Jet events + W events and NOT USE the hadrons from the B-Jet events - - //For bjet and jet-jet events - double pyscale = (1.E6)*0.5*208*208*100/360; //seconds*lumi*Pb*Pb*acceptance - double bscale = pyscale; //Do we need to scale by Branching ratio - //for forced semi-leptonic decays? - double wscale = pyscale; - - TFile* jjfile = new TFile(jjfname); - if(!jjfile) { printf("NO JET-JET FILE\n"); return; } - TH2F* jjtte = (TH2F*)jjfile->Get("AnaElectron_hPtNPEleTTEScaled"); - TH2F* jjemc = (TH2F*)jjfile->Get("AnaElectron_hPtNPEleEMCALScaled"); - TH2F* jjtrk = (TH2F*)jjfile->Get("AnaElectron_hPtNPEleTPCTRDScaled"); - TH1F* jjmult = (TH1F*)jjfile->Get("AnaElectron_hRefMultScaled"); - Int_t nEvtJJ = jjmult->GetEntries(); - jjtte->Scale(pyscale); - jjemc->Scale(pyscale); - jjtrk->Scale(pyscale); - TH2F* jjmcele = (TH2F*)jjfile->Get("AnaElectron_hPtMCElectronScaled"); - TH1F* jjmchad = (TH1F*)jjfile->Get("AnaElectron_hPtMCHadronScaled"); - jjmcele->Scale(pyscale); - jjmchad->Scale(pyscale); - - TFile* bfile = new TFile(bfname); - if(!bfile) { printf("NO B-JET FILE\n"); return; } - TH2F* bjtte = (TH2F*)bfile->Get("AnaElectron_hPtNPEleTTEScaled"); - TH2F* bjemc = (TH2F*)bfile->Get("AnaElectron_hPtNPEleEMCALScaled"); - TH2F* bjtrk = (TH2F*)bfile->Get("AnaElectron_hPtNPEleTPCTRDScaled"); - TH1F* bjmult = (TH1F*)bfile->Get("AnaElectron_hRefMultScaled"); - Int_t nEvtB = bjmult->GetEntries(); - bjtte->Scale(bscale); - bjemc->Scale(bscale); - bjtrk->Scale(bscale); - TH2F* bjmcele = (TH2F*)bfile->Get("AnaElectron_hPtMCElectronScaled"); - TH1F* bjmchad = (TH1F*)bfile->Get("AnaElectron_hPtMCHadronScaled"); - bjmcele->Scale(bscale); - bjmchad->Scale(bscale); - - TFile* wfile = new TFile(wfname); - if(!wfile) { printf("NO W-BOSON FILE\n"); return; } - TH2F* wjtte = (TH2F*)wfile->Get("AnaElectron_hPtNPEleTTE"); - TH2F* wjemc = (TH2F*)wfile->Get("AnaElectron_hPtNPEleEMCAL"); - TH2F* wjtrk = (TH2F*)wfile->Get("AnaElectron_hPtNPEleTPCTRD"); - TH1F* wjmult = (TH1F*)wfile->Get("AnaElectron_hRefMult"); - Int_t nEvtW = wjmult->GetEntries(); - wjtte->Scale(wscale); //already scaled by evts - wjemc->Scale(wscale); //already scaled by evts - wjtrk->Scale(wscale); //already scaled by evts - TH2F* wjmcele = (TH2F*)wfile->Get("AnaElectron_hPtMCElectron"); - TH1F* wjmchad = (TH1F*)wfile->Get("AnaElectron_hPtMCHadron"); - wjmcele->Scale(wscale); - wjmchad->Scale(wscale); - - printf("Event statistics: %d (JET-JET) %d (B-JET) %d (W-Boson)\n",nEvtJJ,nEvtB,nEvtW); - - makeMCElectrons(jjmcele,bjmcele,wjmcele,jjmchad,wjmchad); - makeTTEElectrons(jjtte,bjtte,wjtte); - makeEMCElectrons(jjemc,bjemc,wjemc); - makeTRKElectrons(jjtrk,bjtrk,wjtrk); - - TFile* fout = new TFile("CombinedCocktailHistograms.root","RECREATE"); - fout->cd(); - alltte->Write(); - alltrk->Write(); - allemc->Write(); - - sumtte->Write(); - sumtrk->Write(); - sumemc->Write(); - - btte->Write(); - btrk->Write(); - bemc->Write(); - - ctte->Write(); - ctrk->Write(); - cemc->Write(); - - cbtte->Write(); - cbtrk->Write(); - cbemc->Write(); - - convtte->Write(); - convtrk->Write(); - convemc->Write(); - - daltte->Write(); - daltrk->Write(); - dalemc->Write(); - - wztte->Write(); - wztrk->Write(); - wzemc->Write(); - - htte->Write(); - htrk->Write(); - hemc->Write(); - - allMC->Write(); - bMC->Write(); - cMC->Write(); - cbMC->Write(); - convMC->Write(); - dalMC->Write(); - wzMC->Write(); - mchad->Write(); - - allheratio->Write(); - behratio->Write(); - - fout->Close(); - -} - - -void ScaleAndConfigure(TH1F* hist,Double_t scale, Int_t color,Bool_t keepErr) -{ - hist->Scale(scale); - hist->SetLineColor(color); - hist->SetMarkerColor(color); - hist->SetLineWidth(2); - if(keepErr == kFALSE) { - //remove the error bars - useful for MC rates - for(Int_t i = 1; i <= hist->GetNbinsX(); i++) { - if(hist->GetBinContent(i) > 0.) { - if(hist->GetBinError(i)/hist->GetBinContent(i) > 0.5) { - Double_t avg = 0.; - if(i > 1 && i < hist->GetNbinsX()) - avg = (hist->GetBinContent(i-1) + hist->GetBinContent(i+1))/2.; - hist->SetBinContent(i,avg); - } - } - hist->SetBinError(i,0.); - } - } else { - //Set the error bars to statistics of the bin content - for(Int_t i = 1; i <= hist->GetNbinsX(); i++) { - if(hist->GetBinContent(i) > 0.) { - if(hist->GetBinError(i)/hist->GetBinContent(i) > 0.5) { - Double_t avg = 0; - if(i > 1 && i < hist->GetNbinsX()) - avg = (hist->GetBinContent(i-1) + hist->GetBinContent(i+1))/2.; - hist->SetBinContent(i,avg); - } - } - hist->SetBinError(i,TMath::Sqrt(hist->GetBinContent(i))); - } - } -} - -TH1F* GetPtCutHisto(TH1F* input) -{ - //Given a rate histogram vs pt, return the histogram with yield - //above a given pTcut - - TH1F* result = (TH1F*)input->Clone(); - char name[100]; - sprintf(name,"%s_ptCut",result->GetName()); - // printf("####### %s #########\n",name); - result->SetNameTitle(name,name); - for(Int_t i = 1; i <= result->GetNbinsX(); i++) { - Double_t val = input->Integral(i,result->GetNbinsX()); - //printf(" value %.2f integral above %.2f\n",i,input->GetBinContent(i),val); - result->SetBinContent(i,val); - result->SetBinError(i,0.); - } - //printf("################\n"); - return result; - -} - -void makeMCElectrons(TH2F* jjmcele, TH2F* bjmcele, TH2F* wjmcele, TH1F* jjmchad, TH1F* wjmchad) { - - //Jet-Jet MC electrons - TH1F* jjallmc = (TH1F*)jjmcele->ProjectionX("jjallmc",1,1); - TH1F* jjbmc = (TH1F*)jjmcele->ProjectionX("jjbmc",2,2); - TH1F* jjcmc = (TH1F*)jjmcele->ProjectionX("jjcmc",3,3); - TH1F* jjcandbmc = (TH1F*)jjmcele->ProjectionX("jjcandbmc",4,4); - TH1F* jjconvmc = (TH1F*)jjmcele->ProjectionX("jjconvmc",5,5); - TH1F* jjdalmc = (TH1F*)jjmcele->ProjectionX("jjdalmc",6,6); - - //Bottom-Jet MC electrons - TH1F* bjallmc = (TH1F*)bjmcele->ProjectionX("bjallmc",1,1); - TH1F* bjbmc = (TH1F*)bjmcele->ProjectionX("bjbmc",2,2); - TH1F* bjcmc = (TH1F*)bjmcele->ProjectionX("bjcmc",3,3); - TH1F* bjcandbmc = (TH1F*)bjmcele->ProjectionX("bjcandbmc",4,4); - TH1F* bjconvmc = (TH1F*)bjmcele->ProjectionX("bjconvmc",5,5); - TH1F* bjdalmc = (TH1F*)bjmcele->ProjectionX("bjdalmc",6,6); - - //W-Jet MC electrons - TH1F* wjallmc = (TH1F*)wjmcele->ProjectionX("wjallmc",1,1); - TH1F* wjbmc = (TH1F*)wjmcele->ProjectionX("wjbmc",2,2); - TH1F* wjcmc = (TH1F*)wjmcele->ProjectionX("wjcmc",3,3); - TH1F* wjcandbmc = (TH1F*)wjmcele->ProjectionX("wjcandbmc",4,4); - TH1F* wjconvmc = (TH1F*)wjmcele->ProjectionX("wjconvmc",5,5); - TH1F* wjdalmc = (TH1F*)wjmcele->ProjectionX("wjdalmc",6,6); - TH1F* wjwzmc = (TH1F*)wjmcele->ProjectionX("wjwzmc",7,7); - - //MC Hadrons (from jj events only) - TCanvas *ctemp = new TCanvas("ctemp"); - ctemp->Divide(2,3); - ctemp->cd(1); gPad->SetLogy(); jjmchad->Draw(); - mchad = (TH1F*)jjmchad->Clone(); mchad->SetName("mchad"); - TH1F* temphad = (TH1F*)mchad->Clone(); temphad->SetName("temphad"); - smoothWithFit(temphad,1e5,-3,10,60,100); - for(Int_t i = 10; i<= mchad->GetNbinsX(); i++) { - Double_t pt = mchad->GetBinCenter(i); - mchad->SetBinContent(i,temphad->GetFunction("fpow")->Eval(pt)); - } - jjmchad->Draw(); - temphad->Draw("same"); - mchad->Draw("same"); - mchad->SetTitle("MC hadrons in Pb+Pb in EMCAL acceptance"); - mchad->SetName("mchad"); - mchad->SetXTitle("p_T (GeV/c)"); - - bMC = (TH1F*)bjbmc->Clone(); bMC->SetName("bMC"); //B-Jet + W-jet - bMC->Add(wjbmc); - ctemp->cd(2); gPad->SetLogy(); bMC->Draw(); - TH1F* foob = (TH1F*)bMC->Clone(); foob->SetName("foob"); - smoothWithFit(foob,1e6,-3,15,50,100); - for(Int_t i = 10; i<= bMC->GetNbinsX(); i++) bMC->SetBinContent(i,foob->GetBinContent(i)); - bMC->Draw(); - foob->Draw("same"); - - cMC = (TH1F*)jjcmc->Clone(); cMC->SetName("cMC"); //Jet-Jet + W-jet - cMC->Add(wjcmc); - ctemp->cd(3); gPad->SetLogy(); cMC->Draw(); - TH1F* fooc = (TH1F*)cMC->Clone(); fooc->SetName("fooc"); - smoothWithFit(fooc,1e6,-3,5,30,100); - for(Int_t i = 5; i<= cMC->GetNbinsX(); i++) cMC->SetBinContent(i,fooc->GetBinContent(i)); - cMC->Draw(); - fooc->Draw("same"); - - cbMC = (TH1F*)bjcandbmc->Clone(); cbMC->SetName("cbMC"); //B-Jet + W-jet - cbMC->Add(wjcandbmc); - ctemp->cd(4); gPad->SetLogy(); cbMC->Draw(); - TH1F* foocb = (TH1F*)cbMC->Clone(); foocb->SetName("foocb"); - smoothWithFit(foocb,1e6,-3,8,35,100); - for(Int_t i = 8; i<= cbMC->GetNbinsX(); i++) cbMC->SetBinContent(i,foocb->GetBinContent(i)); - cbMC->Draw(); - foocb->Draw("same"); - - convMC = (TH1F*)jjconvmc->Clone(); convMC->SetName("convMC"); //Jet-Jet + W-jet - convMC->Add(wjconvmc); - ctemp->cd(5); gPad->SetLogy(); convMC->Draw(); - TH1F* fooconv = (TH1F*)convMC->Clone(); fooconv->SetName("fooconv"); - smoothWithFit(fooconv,1e6,-3,6,40,100); - // for(Int_t i = 6; i<= convMC->GetNbinsX(); i++) convMC->SetBinContent(i,fooconv->GetBinContent(i)); - convMC->Draw(); - fooconv->Draw("same"); - - dalMC = (TH1F*)jjdalmc->Clone(); dalMC->SetName("dalMC"); //Jet-Jet + W-jet - dalMC->Add(wjdalmc); - ctemp->cd(6); gPad->SetLogy(); dalMC->Draw(); - TH1F* foodal = (TH1F*)dalMC->Clone(); foodal->SetName("foodal"); - smoothWithFit(foodal,1e6,-3,3,20,100); - for(Int_t i = 3; i<= dalMC->GetNbinsX(); i++) dalMC->SetBinContent(i,foodal->GetBinContent(i)); - dalMC->Draw(); - foodal->Draw("same"); - - wzMC = (TH1F*)wjwzmc->Clone(); wzMC->SetName("wzMC"); //W-jet only - TCanvas* cw= new TCanvas("cw"); - cw->cd(); gPad->SetLogy(); wzMC->GetYaxis()->SetRangeUser(1,1e3); wzMC->Draw(); - TH1F* foowz = (TH1F*)wzMC->Clone(); foowz->SetName("foowz"); - TF1* fws = new TF1("fws","[0]*(1+exp((x-[1])/[2]))^-1",39,100); - fws->SetParameters(100,30,5); - foowz->Fit(fws,"R"); - TF1* fwzexp = new TF1("fwzexp","[0]+[1]*log(x/[2])^2",4,40); - fwzexp->SetParameters(100,10,3); - foowz->Fit(fwzexp,"R"); - for(Int_t i = 8; i<= wzMC->GetNbinsX(); i++) { - Double_t pt = wzMC->GetBinCenter(i); - if(pt < 40) wzMC->SetBinContent(i,fwzexp->Eval(pt)); - if(pt > 40) wzMC->SetBinContent(i,fws->Eval(pt)); - } - wzMC->GetYaxis()->SetRangeUser(1,1e3); - wzMC->Draw(); - fws->Draw("same"); - foowz->Draw("same"); - - //All mc electrons is the sum of - //Jet-Jet: conversions + direct charm + dalitz - //Bottom-Jet: direct bottom + indirect bottom - //W-Jet: all (because these events are exclusive of the others) - allMC = (TH1F*)wzMC->Clone(); allMC->SetNameTitle("allMC","All MC Electrons"); - allMC->Add(convMC); allMC->Add(cMC); allMC->Add(dalMC); - allMC->Add(bMC); allMC->Add(cbMC); - - //Hadron/electron ratios - allheratio = (TH1F*)allMC->Clone(); allheratio->SetName("allheratio"); - behratio = (TH1F*)bMC->Clone(); behratio->SetName("behratio"); - allheratio->SetTitle("MC hadrons and electrons in Pb+Pb, 5.5 TeV"); - allheratio->SetXTitle("p_{T} (GeV/c)"); - allheratio->SetYTitle("Hadrons/Electrons"); - for(Int_t i = 1; i <= allheratio->GetNbinsX(); i++) { - Double_t vale = allMC->GetBinContent(i); - Double_t valb = bMC->GetBinContent(i); - Double_t valh = mchad->GetBinContent(i); - //printf("pT %.2f, Hadron %.1f, Electron %.1f, B-electron - //%.1f\n",all->GetBinCenter(i),valh,vale,valb); - if(vale>0) allheratio->SetBinContent(i,valh/vale); - else allheratio->SetBinContent(i,0.); - - if(valb>0) behratio->SetBinContent(i,valh/valb); - else behratio->SetBinContent(i,0.); - - allheratio->SetBinError(i,0.); - behratio->SetBinError(i,0.); - } - - double myscale = 1.; //we already scaled them - ScaleAndConfigure(allMC,myscale,kBlack,kFALSE); - ScaleAndConfigure(bMC,myscale,kRed,kFALSE); - ScaleAndConfigure(cMC,myscale,kBlue,kFALSE); - ScaleAndConfigure(cbMC,myscale,kViolet,kFALSE); - ScaleAndConfigure(convMC,myscale,kOrange-3,kFALSE); - ScaleAndConfigure(dalMC,myscale,kGreen-3,kFALSE); - ScaleAndConfigure(wzMC,myscale,kOrange-7,kFALSE); - ScaleAndConfigure(mchad,myscale,kGreen+2,kFALSE); - - return; -} - -void makeTTEElectrons(TH2F* jjtte, TH2F* bjtte, TH2F* wjtte) { - - //Jet-Jet TTE Electrons - TH1F* jjalltte = (TH1F*)jjtte->ProjectionX("jjalltte",1,1); - TH1F* jjbtte = (TH1F*)jjtte->ProjectionX("jjbtte",2,2); - TH1F* jjctte = (TH1F*)jjtte->ProjectionX("jjctte",3,3); - TH1F* jjcbtte = (TH1F*)jjtte->ProjectionX("jjcbtte",4,4); - TH1F* jjconvtte = (TH1F*)jjtte->ProjectionX("jjconvtte",5,5); - TH1F* jjdaltte = (TH1F*)jjtte->ProjectionX("jjdaltte",6,6); - TH1F* jjwztte = (TH1F*)jjtte->ProjectionX("jjwztte",7,7); - TH1F* jjhtte = (TH1F*)jjtte->ProjectionX("jjhtte",9,9); - - //B-Jet TTE Electrons - TH1F* bjalltte = (TH1F*)bjtte->ProjectionX("bjalltte",1,1); - TH1F* bjbtte = (TH1F*)bjtte->ProjectionX("bjbtte",2,2); - TH1F* bjctte = (TH1F*)bjtte->ProjectionX("bjctte",3,3); - TH1F* bjcbtte = (TH1F*)bjtte->ProjectionX("bjcbtte",4,4); - TH1F* bjconvtte = (TH1F*)bjtte->ProjectionX("bjconvtte",5,5); - TH1F* bjdaltte = (TH1F*)bjtte->ProjectionX("bjdaltte",6,6); - TH1F* bjwztte = (TH1F*)bjtte->ProjectionX("bjwztte",7,7); - TH1F* bjhtte = (TH1F*)bjtte->ProjectionX("bjhtte",9,9); - - //W-Jet TTE Electrons - TH1F* wjalltte = (TH1F*)wjtte->ProjectionX("wjalltte",1,1); - TH1F* wjbtte = (TH1F*)wjtte->ProjectionX("wjbtte",2,2); - TH1F* wjctte = (TH1F*)wjtte->ProjectionX("wjctte",3,3); - TH1F* wjcbtte = (TH1F*)wjtte->ProjectionX("wjcbtte",4,4); - TH1F* wjconvtte = (TH1F*)wjtte->ProjectionX("wjconvtte",5,5); - TH1F* wjdaltte = (TH1F*)wjtte->ProjectionX("wjdaltte",6,6); - TH1F* wjwztte = (TH1F*)wjtte->ProjectionX("wjwztte",7,7); - TH1F* wjhtte = (TH1F*)wjtte->ProjectionX("wjhtte",9,9); - - btte = (TH1F*)bjbtte->Clone(); btte->SetName("btte"); //B-Jet + W-jet - btte->Add(wjbtte) - TCanvas * ctemptte = new TCanvas("ctemptte"); - ctemptte->Divide(2,3); - ctemptte->cd(1); gPad->SetLogy(); btte->Draw(); - TH1F* foobtte = (TH1F*)btte->Clone(); foobtte->SetName("foobtte"); - smoothWithFit(foobtte,1e5,-3,8,40,100); - btte->Draw(); foobtte->Draw("same"); - - ctte = (TH1F*)jjctte->Clone(); ctte->SetName("ctte"); //Jet-Jet + W-jet - ctte->Add(wjctte); - ctemptte->cd(2); gPad->SetLogy(); ctte->Draw(); - TH1F* fooctte = (TH1F*)ctte->Clone(); fooctte->SetName("fooctte"); - smoothWithFit(fooctte,1e5,-3,3,12,100); - ctte->Draw(); fooctte->Draw("same"); - - cbtte = (TH1F*)bjcbtte->Clone(); cbtte->SetName("cbtte"); //B-Jet + W-jet - cbtte->Add(wjcbtte); - ctemptte->cd(3); gPad->SetLogy(); cbtte->Draw(); - TH1F* foocbtte = (TH1F*)cbtte->Clone(); foocbtte->SetName("foocbtte"); - smoothWithFit(foocbtte,1e5,-3,5,20,100); - cbtte->Draw(); foocbtte->Draw("same"); - - convtte = (TH1F*)jjconvtte->Clone(); convtte->SetName("convtte"); //Jet-Jet + W-jet - convtte->Add(wjconvtte); - ctemptte->cd(4); gPad->SetLogy(); convtte->Draw(); - TH1F* fooconvtte = (TH1F*)convtte->Clone(); fooconvtte->SetName("fooconvtte"); - smoothWithFit(fooconvtte,1e5,-3,6,13,100); - convtte->Draw(); fooconvtte->Draw("same"); - - daltte = (TH1F*)jjdaltte->Clone(); daltte->SetName("daltte"); //Jet-Jet + W-jet - daltte->Add(wjdaltte); - ctemptte->cd(5); gPad->SetLogy(); daltte->Draw(); - TH1F* foodaltte = (TH1F*)daltte->Clone(); foodaltte->SetName("foodaltte"); - smoothWithFit(foodaltte,1e2,-5,2,10,100); - daltte->Draw(); foodaltte->Draw("same"); - - htte = (TH1F*)jjhtte->Clone(); htte->SetName("htte"); - htte->Add(wjhtte); - ctemptte->cd(6); gPad->SetLogy(); htte->Draw(); - TH1F* foohtte = (TH1F*)htte->Clone(); foohtte->SetName("foohtte"); - smoothWithFit(foohtte,1e5,-3,10,40,100); - htte->Draw(); foohtte->Draw("same"); - - wztte = (TH1F*)wjwztte->Clone(); wztte->SetName("wztte"); //W-jet only - TCanvas* ctempwztte = new TCanvas("ctempwztte"); - ctempwztte->cd(); gPad->SetLogy(); wztte->Draw(); - TH1F* foowztte = (TH1F*)wztte->Clone(); foowztte->SetName("foowztte"); - smoothWithFit(foowztte,1e5,-3,10,40,100); - wztte->Draw(); foowztte->Draw("same"); - - //All TTE electrons is the sum of - //Jet-Jet: conversions + direct charm + dalitz + misid - //Bottom-Jet: direct bottom + indirect bottom - //W-Jet: all (because these events are exclusive of the others) - alltte = (TH1F*)wjalltte->Clone(); alltte->SetName("alltte"); - alltte->Add(jjconvtte); alltte->Add(jjctte); alltte->Add(jjdaltte); alltte->Add(jjhtte); - alltte->Add(bjbtte); alltte->Add(bjcbtte); - sumtte = (TH1F*)wjalltte->Clone(); sumtte->SetName("sumtte"); - sumtte->Add(jjconvtte); sumtte->Add(jjctte); sumtte->Add(jjdaltte); - sumtte->Add(bjbtte); sumtte->Add(bjcbtte); - - double myscale = 1.; //we already scaled them - ScaleAndConfigure(alltte,myscale,kBlack,kFALSE); - ScaleAndConfigure(sumtte,myscale,kBlack,kFALSE); - ScaleAndConfigure(btte,myscale,kRed,kFALSE); - ScaleAndConfigure(ctte,myscale,kBlue,kFALSE); - ScaleAndConfigure(cbtte,myscale,kViolet,kFALSE); - ScaleAndConfigure(convtte,myscale,kOrange-3,kFALSE); - ScaleAndConfigure(daltte,myscale,kGreen-3,kFALSE); - ScaleAndConfigure(htte,myscale,kGreen+2,kFALSE); - ScaleAndConfigure(wztte,myscale,kOrange-7,kFALSE); - - return; -} - -void makeEMCElectrons(TH2F* jjemc, TH2F* bjemc, TH2F* wjemc) { - - //Jet-Jet EMC Electrons - TH1F* jjallemc = (TH1F*)jjemc->ProjectionX("jjallemc",1,1); - TH1F* jjbemc = (TH1F*)jjemc->ProjectionX("jjbemc",2,2); - TH1F* jjcemc = (TH1F*)jjemc->ProjectionX("jjcemc",3,3); - TH1F* jjcbemc = (TH1F*)jjemc->ProjectionX("jjcbemc",4,4); - TH1F* jjconvemc = (TH1F*)jjemc->ProjectionX("jjconvemc",5,5); - TH1F* jjdalemc = (TH1F*)jjemc->ProjectionX("jjdalemc",6,6); - TH1F* jjwzemc = (TH1F*)jjemc->ProjectionX("jjwzemc",7,7); - TH1F* jjhemc = (TH1F*)jjemc->ProjectionX("jjhemc",9,9); - - //B-Jet EMC Electrons - TH1F* bjallemc = (TH1F*)bjemc->ProjectionX("bjallemc",1,1); - TH1F* bjbemc = (TH1F*)bjemc->ProjectionX("bjbemc",2,2); - TH1F* bjcemc = (TH1F*)bjemc->ProjectionX("bjcemc",3,3); - TH1F* bjcbemc = (TH1F*)bjemc->ProjectionX("bjcbemc",4,4); - TH1F* bjconvemc = (TH1F*)bjemc->ProjectionX("bjconvemc",5,5); - TH1F* bjdalemc = (TH1F*)bjemc->ProjectionX("bjdalemc",6,6); - TH1F* bjwzemc = (TH1F*)bjemc->ProjectionX("bjwzemc",7,7); - TH1F* bjhemc = (TH1F*)bjemc->ProjectionX("bjhemc",9,9); - - //W-Jet EMC Electrons - TH1F* wjallemc = (TH1F*)wjemc->ProjectionX("wjallemc",1,1); - TH1F* wjbemc = (TH1F*)wjemc->ProjectionX("wjbemc",2,2); - TH1F* wjcemc = (TH1F*)wjemc->ProjectionX("wjcemc",3,3); - TH1F* wjcbemc = (TH1F*)wjemc->ProjectionX("wjcbemc",4,4); - TH1F* wjconvemc = (TH1F*)wjemc->ProjectionX("wjconvemc",5,5); - TH1F* wjdalemc = (TH1F*)wjemc->ProjectionX("wjdalemc",6,6); - TH1F* wjwzemc = (TH1F*)wjemc->ProjectionX("wjwzemc",7,7); - TH1F* wjhemc = (TH1F*)wjemc->ProjectionX("wjhemc",9,9); - - bemc = (TH1F*)bjbemc->Clone(); bemc->SetName("bemc"); //B-Jet + W-jet - bemc->Add(wjbemc); - TCanvas * ctempemc = new TCanvas("ctempemc","",0,0,800,800); - ctempemc->Divide(2,3); - ctempemc->cd(1); gPad->SetLogy(); bemc->Draw(); - TH1F* foobemc = (TH1F*)bemc->Clone(); foobemc->SetName("foobemc"); - smoothWithFit(foobemc,1e5,-3,8,40,100); - TRandom rand; - for(Int_t i = 8; i<= bemc->GetNbinsX(); i++) { - Double_t dither = rand.Gaus(0.,foobemc->GetBinContent(i)/2.); - if(dither + foobemc->GetBinContent(i) < foobemc->GetBinContent(i)/100.) dither = 0.; - bemc->SetBinContent(i,foobemc->GetBinContent(i)+dither); - bemc->SetBinError(i,sqrt(foobemc->GetBinContent(i))); - } - bemc->Draw(); foobemc->Draw("same"); - - cemc = (TH1F*)jjcemc->Clone(); cemc->SetName("cemc"); //Jet-Jet + W-jet - cemc->Add(wjcemc); - ctempemc->cd(2); gPad->SetLogy(); cemc->Draw(); - TH1F* foocemc = (TH1F*)cemc->Clone(); foocemc->SetName("foocemc"); - smoothWithFit(foocemc,1e5,-3,5,14,100); - for(Int_t i = 5; i<= cemc->GetNbinsX(); i++) { - Double_t dither = rand.Gaus(0.,foocemc->GetBinContent(i)/2.); - if(dither + foocemc->GetBinContent(i) < foocemc->GetBinContent(i)/100.) dither = 0.; - cemc->SetBinContent(i,foocemc->GetBinContent(i)+dither); - cemc->SetBinError(i,sqrt(foocemc->GetBinContent(i))); - } - cemc->Draw(); foocemc->Draw("same"); - - cbemc = (TH1F*)bjcbemc->Clone(); cbemc->SetName("cbemc"); //B-Jet + W-jet - cbemc->Add(wjcbemc); - ctempemc->cd(3); gPad->SetLogy(); cbemc->Draw(); - TH1F* foocbemc = (TH1F*)cbemc->Clone(); foocbemc->SetName("foocbemc"); - smoothWithFit(foocbemc,1e5,-3,8,20,100); - for(Int_t i = 8; i<= cbemc->GetNbinsX(); i++) { - Double_t dither = rand.Gaus(0.,foocbemc->GetBinContent(i)/2.); - if(dither + foocbemc->GetBinContent(i) < foocbemc->GetBinContent(i)/100.) dither = 0.; - cbemc->SetBinContent(i,foocbemc->GetBinContent(i)+dither); - cbemc->SetBinError(i,sqrt(foocbemc->GetBinContent(i))); - } - cbemc->Draw(); foocbemc->Draw("same"); - - convemc = (TH1F*)jjconvemc->Clone(); convemc->SetName("convemc"); //Jet-Jet + W-jet - convemc->Add(wjconvemc); - ctempemc->cd(4); gPad->SetLogy(); convemc->Draw(); - TH1F* fooconvemc = (TH1F*)convemc->Clone(); fooconvemc->SetName("fooconvemc"); - smoothWithFit(fooconvemc,1e6,-3,5,15,100); - for(Int_t i = 5; i<= convemc->GetNbinsX(); i++) { - Double_t dither = rand.Gaus(0.,fooconvemc->GetBinContent(i)/2.); - if(dither + fooconvemc->GetBinContent(i) < fooconvemc->GetBinContent(i)/100.) dither = 0.; - convemc->SetBinContent(i,fooconvemc->GetBinContent(i)+dither); - convemc->SetBinError(i,sqrt(fooconvemc->GetBinContent(i))); - } - convemc->Draw(); fooconvemc->Draw("same"); - - dalemc = (TH1F*)jjdalemc->Clone(); dalemc->SetName("dalemc"); //Jet-Jet + W-jet - dalemc->Add(wjdalemc); - ctempemc->cd(5); gPad->SetLogy(); dalemc->Draw(); - TH1F* foodalemc = (TH1F*)dalemc->Clone(); foodalemc->SetName("foodalemc"); - for(Int_t i = 18; i <= dalemc->GetNbinsX(); i++) { - dalemc->SetBinContent(i,0); - dalemc->SetBinError(i,0); - foodalemc->SetBinContent(i,0); - foodalemc->SetBinError(i,0); - } - // smoothWithFit(foodalemc,1e6,-3,8.,12.,100); - dalemc->Draw(); //foodalemc->Draw("same"); - - hemc = (TH1F*)jjhemc->Clone(); hemc->SetName("hemc"); - hemc->Add(wjhemc); - ctempemc->cd(6); gPad->SetLogy(); hemc->Draw(); - TH1F* foohemc = (TH1F*)hemc->Clone(); foohemc->SetName("foohemc"); - smoothWithFit(foohemc,1e5,-3,10,40,100); - for(Int_t i = 10; i<= hemc->GetNbinsX(); i++) { - Double_t dither = rand.Gaus(0.,foohemc->GetBinContent(i)/2.); - if(dither + foohemc->GetBinContent(i) < foohemc->GetBinContent(i)/100.) dither = 0.; - hemc->SetBinContent(i,foohemc->GetBinContent(i)+dither); - hemc->SetBinError(i,sqrt(foohemc->GetBinContent(i))); - } - hemc->Draw(); foohemc->Draw("same"); - - wzemc = (TH1F*)wjwzemc->Clone(); wzemc->SetName("wzemc"); //W-jet only - TCanvas* ctempwzemc = new TCanvas("ctempwzemc"); - ctempwzemc->cd(); gPad->SetLogy(); wzemc->Draw(); - TH1F* foowzemc = (TH1F*)wzemc->Clone(); foowzemc->SetName("foowzemc"); - TF1* fwsemc = new TF1("fwsemc","[0]*(1+exp((x-[1])/[2]))^-1",30,50); - fwsemc->SetParameters(10,30,3); - foowzemc->Fit(fwsemc,"R"); - TF1* fwzexpemc = new TF1("fwzexpemc","[0]+[1]*log(x/[2])^2",5,20); - fwzexpemc->SetParameters(10,10,3); - // foowzemc->Fit(fwzexpemc,"R"); - /* - for(Int_t i = 8; i<= wzMC->GetNbinsX(); i++) { - Double_t pt = wzMC->GetBinCenter(i); - if(pt < 40) wzMC->SetBinContent(i,fwzexp->Eval(pt)); - if(pt > 40) wzMC->SetBinContent(i,fws->Eval(pt)); - } - */ - wzemc->Draw(); foowzemc->Draw("same"); - fwzexpemc->Draw("same"); - - //All EMC electrons is the sum of - //Jet-Jet: conversions + direct charm + dalitz + misid - //Bottom-Jet: direct bottom + indirect bottom - //W-Jet: all (because these events are exclusive of the others) - allemc = (TH1F*)wjallemc->Clone(); allemc->SetName("allemc"); - allemc->Add(jjconvemc); allemc->Add(jjcemc); allemc->Add(jjdalemc); allemc->Add(jjhemc); - allemc->Add(bjbemc); allemc->Add(bjcbemc); - sumemc = (TH1F*)wjallemc->Clone(); sumemc->SetName("sumemc"); - sumemc->Add(jjconvemc); sumemc->Add(jjcemc); sumemc->Add(jjdalemc); - sumemc->Add(bjbemc); sumemc->Add(bjcbemc); - - double myscale = 1.; //we already scaled them - ScaleAndConfigure(allemc,myscale,kBlack,kFALSE); - ScaleAndConfigure(sumemc,myscale,kBlack,kFALSE); - ScaleAndConfigure(bemc,myscale,kRed,kFALSE); - ScaleAndConfigure(cemc,myscale,kBlue,kFALSE); - ScaleAndConfigure(cbemc,myscale,kViolet,kFALSE); - ScaleAndConfigure(convemc,myscale,kOrange-3,kFALSE); - ScaleAndConfigure(dalemc,myscale,kGreen-3,kFALSE); - ScaleAndConfigure(hemc,myscale,kGreen+2,kFALSE); - ScaleAndConfigure(wzemc,myscale,kOrange-7,kFALSE); - - return; -} - -void makeTRKElectrons(TH2F* jjtrk, TH2F* bjtrk, TH2F* wjtrk) { - - //Jet-Jet TRK Electrons - TH1F* jjalltrk = (TH1F*)jjtrk->ProjectionX("jjalltrk",1,1); - TH1F* jjbtrk = (TH1F*)jjtrk->ProjectionX("jjbtrk",2,2); - TH1F* jjctrk = (TH1F*)jjtrk->ProjectionX("jjctrk",3,3); - TH1F* jjcbtrk = (TH1F*)jjtrk->ProjectionX("jjcbtrk",4,4); - TH1F* jjconvtrk = (TH1F*)jjtrk->ProjectionX("jjconvtrk",5,5); - TH1F* jjdaltrk = (TH1F*)jjtrk->ProjectionX("jjdaltrk",6,6); - TH1F* jjwztrk = (TH1F*)jjtrk->ProjectionX("jjwztrk",7,7); - TH1F* jjhtrk = (TH1F*)jjtrk->ProjectionX("jjhtrk",9,9); - - //B-Jet TRK Electrons - TH1F* bjalltrk = (TH1F*)bjtrk->ProjectionX("bjalltrk",1,1); - TH1F* bjbtrk = (TH1F*)bjtrk->ProjectionX("bjbtrk",2,2); - TH1F* bjctrk = (TH1F*)bjtrk->ProjectionX("bjctrk",3,3); - TH1F* bjcbtrk = (TH1F*)bjtrk->ProjectionX("bjcbtrk",4,4); - TH1F* bjconvtrk = (TH1F*)bjtrk->ProjectionX("bjconvtrk",5,5); - TH1F* bjdaltrk = (TH1F*)bjtrk->ProjectionX("bjdaltrk",6,6); - TH1F* bjwztrk = (TH1F*)bjtrk->ProjectionX("bjwztrk",7,7); - TH1F* bjhtrk = (TH1F*)bjtrk->ProjectionX("bjhtrk",9,9); - - //W-Jet TRK Electrons - TH1F* wjalltrk = (TH1F*)wjtrk->ProjectionX("wjalltrk",1,1); - TH1F* wjbtrk = (TH1F*)wjtrk->ProjectionX("wjbtrk",2,2); - TH1F* wjctrk = (TH1F*)wjtrk->ProjectionX("wjctrk",3,3); - TH1F* wjcbtrk = (TH1F*)wjtrk->ProjectionX("wjcbtrk",4,4); - TH1F* wjconvtrk = (TH1F*)wjtrk->ProjectionX("wjconvtrk",5,5); - TH1F* wjdaltrk = (TH1F*)wjtrk->ProjectionX("wjdaltrk",6,6); - TH1F* wjwztrk = (TH1F*)wjtrk->ProjectionX("wjwztrk",7,7); - TH1F* wjhtrk = (TH1F*)wjtrk->ProjectionX("wjhtrk",9,9); - - btrk = (TH1F*)bjbtrk->Clone(); btrk->SetName("btrk"); //B-Jet + W-jet - btrk->Add(wjbtrk); - TCanvas * ctemptrk = new TCanvas("ctemptrk","",0,0,800,800); - ctemptrk->Divide(2,3); - ctemptrk->cd(1); gPad->SetLogy(); btrk->Draw(); - TH1F* foobtrk = (TH1F*)btrk->Clone(); foobtrk->SetName("foobtrk"); - smoothWithFit(foobtrk,1e5,-3,8,40,100); - TRandom rand2; - for(Int_t i = 8; i<= btrk->GetNbinsX(); i++) { - Double_t dither = rand2.Gaus(0.,foobtrk->GetBinContent(i)/2.); - if(dither + foobtrk->GetBinContent(i) < foobtrk->GetBinContent(i)/100.) dither = 0.; - btrk->SetBinContent(i,foobtrk->GetBinContent(i)+dither); - btrk->SetBinError(i,sqrt(foobtrk->GetBinContent(i))); - } - btrk->Draw(); foobtrk->Draw("same"); - - ctrk = (TH1F*)jjctrk->Clone(); ctrk->SetName("ctrk"); //Jet-Jet + W-jet - ctrk->Add(wjctrk); - ctemptrk->cd(2); gPad->SetLogy(); ctrk->Draw(); - TH1F* fooctrk = (TH1F*)ctrk->Clone(); fooctrk->SetName("fooctrk"); - smoothWithFit(fooctrk,1e5,-3,5,20,100); - for(Int_t i = 5; i<= ctrk->GetNbinsX(); i++) { - Double_t dither = rand2.Gaus(0.,fooctrk->GetBinContent(i)/2.); - if(dither + fooctrk->GetBinContent(i) < fooctrk->GetBinContent(i)/100.) dither = 0.; - ctrk->SetBinContent(i,fooctrk->GetBinContent(i)+dither); - ctrk->SetBinError(i,sqrt(fooctrk->GetBinContent(i))); - } - ctrk->Draw(); fooctrk->Draw("same"); - - cbtrk = (TH1F*)bjcbtrk->Clone(); cbtrk->SetName("cbtrk"); //B-Jet + W-jet - cbtrk->Add(wjcbtrk); - ctemptrk->cd(3); gPad->SetLogy(); cbtrk->Draw(); - TH1F* foocbtrk = (TH1F*)cbtrk->Clone(); foocbtrk->SetName("foocbtrk"); - smoothWithFit(foocbtrk,1e5,-3,5,20,100); - for(Int_t i = 5; i<= cbtrk->GetNbinsX(); i++) { - Double_t dither = rand2.Gaus(0.,foocbtrk->GetBinContent(i)/2.); - if(dither + foocbtrk->GetBinContent(i) < foocbtrk->GetBinContent(i)/100.) dither = 0.; - cbtrk->SetBinContent(i,foocbtrk->GetBinContent(i)+dither); - cbtrk->SetBinError(i,sqrt(foocbtrk->GetBinContent(i))); - } - cbtrk->Draw(); foocbtrk->Draw("same"); - - convtrk = (TH1F*)jjconvtrk->Clone(); convtrk->SetName("convtrk"); //Jet-Jet + W-jet - convtrk->Add(wjconvtrk); - ctemptrk->cd(4); gPad->SetLogy(); convtrk->Draw(); - TH1F* fooconvtrk = (TH1F*)convtrk->Clone(); fooconvtrk->SetName("fooconvtrk"); - smoothWithFit(fooconvtrk,1e6,-3,5,20,100); - for(Int_t i = 5; i<= convtrk->GetNbinsX(); i++) { - Double_t dither = rand2.Gaus(0.,fooconvtrk->GetBinContent(i)/2.); - if(dither + fooconvtrk->GetBinContent(i) < fooconvtrk->GetBinContent(i)/100.) dither = 0.; - convtrk->SetBinContent(i,fooconvtrk->GetBinContent(i)+dither); - convtrk->SetBinError(i,sqrt(fooconvtrk->GetBinContent(i))); - } - convtrk->Draw(); fooconvtrk->Draw("same"); - - daltrk = (TH1F*)jjdaltrk->Clone(); daltrk->SetName("daltrk"); //Jet-Jet + W-jet - daltrk->Add(wjdaltrk); - ctemptrk->cd(5); gPad->SetLogy(); daltrk->Draw(); - TH1F* foodaltrk = (TH1F*)daltrk->Clone(); foodaltrk->SetName("foodaltrk"); - smoothWithFit(foodaltrk,1e6,-3,5.,40.,100); - for(Int_t i = 5; i<= daltrk->GetNbinsX(); i++) { - Double_t dither = rand2.Gaus(0.,foodaltrk->GetBinContent(i)/2.); - if(dither + foodaltrk->GetBinContent(i) < foodaltrk->GetBinContent(i)/100.) dither = 0.; - daltrk->SetBinContent(i,foodaltrk->GetBinContent(i)+dither); - daltrk->SetBinError(i,sqrt(foodaltrk->GetBinContent(i))); - } - daltrk->Draw(); foodaltrk->Draw("same"); - - htrk = (TH1F*)jjhtrk->Clone(); htrk->SetName("htrk"); - htrk->Add(wjhtrk); - ctemptrk->cd(6); gPad->SetLogy(); htrk->Draw(); - TH1F* foohtrk = (TH1F*)htrk->Clone(); foohtrk->SetName("foohtrk"); - smoothWithFit(foohtrk,1e5,-3,5,80,100); - for(Int_t i = 5; i<= htrk->GetNbinsX(); i++) { - Double_t dither = rand2.Gaus(0.,foohtrk->GetBinContent(i)/2.); - if(dither + foohtrk->GetBinContent(i) < foohtrk->GetBinContent(i)/100.) dither = 0.; - htrk->SetBinContent(i,foohtrk->GetBinContent(i)+dither); - htrk->SetBinError(i,sqrt(foohtrk->GetBinContent(i))); - } - htrk->Draw(); foohtrk->Draw("same"); - - wztrk = (TH1F*)wjwztrk->Clone(); wztrk->SetName("wztrk"); //W-jet only - TCanvas* ctempwztrk = new TCanvas("ctempwztrk"); - ctempwztrk->cd(); gPad->SetLogy(); wztrk->Draw(); - TH1F* foowztrk = (TH1F*)wztrk->Clone(); foowztrk->SetName("foowztrk"); - TF1* fwstrk = new TF1("fwstrk","[0]*(1+exp((x-[1])/[2]))^-1",30,50); - fwstrk->SetParameters(10,30,3); - foowztrk->Fit(fwstrk,"R"); - TF1* fwzexptrk = new TF1("fwzexptrk","[0]+[1]*log(x/[2])^2",8,40); - fwzexptrk->SetParameters(10,10,3); - // foowztrk->Fit(fwzexptrk,"R"); - /* - for(Int_t i = 8; i<= wzMC->GetNbinsX(); i++) { - Double_t pt = wzMC->GetBinCenter(i); - if(pt < 40) wzMC->SetBinContent(i,fwzexp->Eval(pt)); - if(pt > 40) wzMC->SetBinContent(i,fws->Eval(pt)); - } - */ - wztrk->Draw(); foowztrk->Draw("same"); - - //All TRK electrons is the sum of - //Jet-Jet: conversions + direct charm + dalitz + misid - //Bottom-Jet: direct bottom + indirect bottom - //W-Jet: all (because these events are exclusive of the others) - alltrk = (TH1F*)wjalltrk->Clone(); alltrk->SetName("alltrk"); - alltrk->Add(jjconvtrk); alltrk->Add(jjctrk); alltrk->Add(jjdaltrk); alltrk->Add(jjhtrk); - alltrk->Add(bjbtrk); alltrk->Add(bjcbtrk); - sumtrk = (TH1F*)wjalltrk->Clone(); sumtrk->SetName("sumtrk"); - sumtrk->Add(jjconvtrk); sumtrk->Add(jjctrk); sumtrk->Add(jjdaltrk); - sumtrk->Add(bjbtrk); sumtrk->Add(bjcbtrk); - - double myscale = 1.; //we already scaled them - ScaleAndConfigure(alltrk,myscale,kBlack,kFALSE); - ScaleAndConfigure(sumtrk,myscale,kBlack,kFALSE); - ScaleAndConfigure(btrk,myscale,kRed,kFALSE); - ScaleAndConfigure(ctrk,myscale,kBlue,kFALSE); - ScaleAndConfigure(cbtrk,myscale,kViolet,kFALSE); - ScaleAndConfigure(convtrk,myscale,kOrange-3,kFALSE); - ScaleAndConfigure(daltrk,myscale,kGreen-3,kFALSE); - ScaleAndConfigure(htrk,myscale,kGreen+2,kFALSE); - ScaleAndConfigure(wztrk,myscale,kOrange-7,kFALSE); - - return; -} - -void smoothWithFit(TH1F* hist, Double_t p0, Double_t p1, Double_t min, Double_t max,Double_t remax) { - - fpow = new TF1("fpow","[0]*pow(x,[1])",min,max); - fpow->SetParameters(p0,p1); - hist->Fit(fpow,"R"); - for(Int_t i = (Int_t)min; i <= (Int_t)remax; i++) { - Double_t pt = hist->GetBinCenter(i); - Double_t val = fpow->Eval(pt); - hist->SetBinContent(i,val); - hist->SetBinError(i,sqrt(val)); - } - - return; -} - - diff --git a/PWG4/macros/electrons/makeSysErr.C b/PWG4/macros/electrons/makeSysErr.C deleted file mode 100644 index 6cd07053f0a..00000000000 --- a/PWG4/macros/electrons/makeSysErr.C +++ /dev/null @@ -1,115 +0,0 @@ - - - -void makeSysErr() { - - TFile* f0 = new TFile("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-0.root"); - TFile* f1 = new TFile("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-1.root"); - TFile* f2 = new TFile("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-2.root"); - TFile* f3 = new TFile("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-3.root"); - - double pyscale = (1.E6)*0.5*208*208*100/360; //seconds*lumi*Pb*Pb*acceptance - - TH2F* tte0 = (TH2F*)f0->Get("AnaElectron_hPtNPEleTTEScaled"); - TH2F* emc0 = (TH2F*)f0->Get("AnaElectron_hPtNPEleEMCALScaled"); - - TH2F* tte1 = (TH2F*)f1->Get("AnaElectron_hPtNPEleTTEScaled"); - TH2F* emc1 = (TH2F*)f1->Get("AnaElectron_hPtNPEleEMCALScaled"); - - TH2F* tte2 = (TH2F*)f2->Get("AnaElectron_hPtNPEleTTEScaled"); - TH2F* emc2 = (TH2F*)f2->Get("AnaElectron_hPtNPEleEMCALScaled"); - - TH2F* tte3 = (TH2F*)f3->Get("AnaElectron_hPtNPEleTTEScaled"); - TH2F* emc3 = (TH2F*)f3->Get("AnaElectron_hPtNPEleEMCALScaled"); - - tte0->Scale(pyscale); - tte1->Scale(pyscale); - tte2->Scale(pyscale); - tte3->Scale(pyscale); - emc0->Scale(pyscale); - emc1->Scale(pyscale); - emc2->Scale(pyscale); - emc3->Scale(pyscale); - - alltte0 = (TH1F*)tte0->ProjectionX("alltte0",1,1); - allemc0 = (TH1F*)emc0->ProjectionX("allemc0",1,1); - alltte0->Rebin(5); - allemc0->Rebin(5); - - alltte1 = (TH1F*)tte1->ProjectionX("alltte1",1,1); - allemc1 = (TH1F*)emc1->ProjectionX("allemc1",1,1); - alltte1->Rebin(5); - allemc1->Rebin(5); - - alltte2 = (TH1F*)tte2->ProjectionX("alltte2",1,1); - allemc2 = (TH1F*)emc2->ProjectionX("allemc2",1,1); - alltte2->Rebin(5); - allemc2->Rebin(5); - - alltte3 = (TH1F*)tte3->ProjectionX("alltte3",1,1); - allemc3 = (TH1F*)emc3->ProjectionX("allemc3",1,1); - alltte3->Rebin(5); - allemc3->Rebin(5); - - Double_t tsum = 0.; - Double_t esum = 0.; - for(Int_t i = 1; i <= alltte0->GetNbinsX(); i++) { - Double_t t0 = alltte0->GetBinContent(i); - Double_t t1 = alltte1->GetBinContent(i); - Double_t t2 = alltte2->GetBinContent(i); - Double_t t3 = alltte3->GetBinContent(i); - Double_t e0 = allemc0->GetBinContent(i); - Double_t e1 = allemc1->GetBinContent(i); - Double_t e2 = allemc2->GetBinContent(i); - Double_t e3 = allemc3->GetBinContent(i); - - Double_t td01 = (t0 - t1)/(t0+t1+t2+t3); - Double_t td02 = (t0 - t2)/(t0+t1+t2+t3); - Double_t td03 = (t0 - t3)/(t0+t1+t2+t3); - - Double_t tave = (TMath::Abs(td01) + TMath::Abs(td02) + TMath::Abs(td03))/2.; - tsum += tave; - - Double_t ed01 = (e0 - e1)/(e0+e1+e2+e3); - Double_t ed02 = (e0 - e2)/(e0+e1+e2+e3); - Double_t ed03 = (e0 - e3)/(e0+e1+e2+e3); - - Double_t eave = (TMath::Abs(ed01) + TMath::Abs(ed02) + TMath::Abs(ed03))/2.; - printf("%d Average unc = %2.2f\n",i,eave); - esum += eave; - } - Double_t tfinal = tsum/alltte0->GetNbinsX(); - Double_t efinal = esum/allemc0->GetNbinsX(); - printf("tfinal %f, efinal %f\n",tfinal,efinal); - - TCanvas *c1 = new TCanvas(); - gPad->SetLogy(); - alltte0->SetLineWidth(2); - alltte0->Draw(); - - TCanvas *c2 = new TCanvas(); - gPad->SetLogy(); - allemc0->SetLineWidth(2); - allemc0->Draw(); - - TGraphErrors* terr = new TGraphErrors(); - terr->SetName("tteErr"); - TGraphErrors* eerr = new TGraphErrors(); - eerr->SetName("emcErr"); - for(Int_t i = 1; i <= alltte0->GetNbinsX(); i++) { - terr->SetPoint(i-1,alltte0->GetBinCenter(i),alltte0->GetBinContent(i)); - terr->SetPointError(i-1,0.,(tfinal)*alltte0->GetBinContent(i)); - - eerr->SetPoint(i-1,allemc0->GetBinCenter(i),allemc0->GetBinContent(i)); - eerr->SetPointError(i-1,0.,(efinal)*allemc0->GetBinContent(i)); - } - c1->cd(); - terr->SetFillColor(kRed-8); - terr->Draw("3same"); - alltte0->Draw("same"); - - c2->cd(); - eerr->SetFillColor(kRed-8); - eerr->Draw("3same"); - allemc0->Draw("same"); -} diff --git a/PWG4/macros/electrons/makeparfilesproperly b/PWG4/macros/electrons/makeparfilesproperly deleted file mode 100644 index d6f99f9ecd1..00000000000 --- a/PWG4/macros/electrons/makeparfilesproperly +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash - -echo "Making parfiles..." - -source /home/aron/root/setup.sh - -/home/aron/root/alice/AliRoot/PWG4/macros/electrons/./parmaker all remote - -tar xvf EMCALUtils.par - -echo "...copying" -#cp /home/aron/root/alice/AliRoot/EMCAL/AliCaloPeakFinderConstants.h EMCALUtils/. -cp -v /home/aron/root/alice/AliRoot/EMCAL/AliCaloConstants.h EMCALUtils/. - -echo "...removing" -rm -v EMCALUtils.par - -echo "...remaking EMCALUtils.par" -/home/aron/root/alice/AliRoot/PWG4/macros/electrons/./parmaker EMCALUtils - -echo "...removing EMCALUtils dir" -rm -rfv EMCALUtils - -echo "...making directory GRID and copying important stuff there" -mkdir GRID - -cp -v *.par parmaker anaJete.C run.C ConfigAnalysisElectron.C ConfigJetAnalysisFastJet.C anaJete.jdl validate.sh mergeout.jdl GRID/. - diff --git a/PWG4/macros/electrons/mergeout.jdl b/PWG4/macros/electrons/mergeout.jdl deleted file mode 100644 index dd8c25ee222..00000000000 --- a/PWG4/macros/electrons/mergeout.jdl +++ /dev/null @@ -1,8 +0,0 @@ -Packages ={"VO_ALICE@ROOT::v5-24-00","VO_ALICE@APISCONFIG::V2.4"}; - -Arguments = "27498605 histos.root histos-merged.root kread /alice/cern.ch/user/k/kread/work12/output"; -Executable = "/alice/bin/mergerootfile"; -Email = ""; -OutputFile = "histos-merged.root@ALICE::CERN::ALICEDISK"; -InputFile = "LF:/alice/macros/mergerootfile.C"; -OutputDir = "/alice/cern.ch/user/k/kread/work12/output/merged"; diff --git a/PWG4/macros/electrons/mergeoutscaled.jdl b/PWG4/macros/electrons/mergeoutscaled.jdl deleted file mode 100644 index 4e2c5535e91..00000000000 --- a/PWG4/macros/electrons/mergeoutscaled.jdl +++ /dev/null @@ -1,8 +0,0 @@ -Packages ={"VO_ALICE@ROOT::v5-24-00","VO_ALICE@APISCONFIG::V2.4"}; - -Arguments = "27498605 histosscaled.root histosscaled-merged.root kread /alice/cern.ch/user/k/kread/work12/output"; -Executable = "/alice/bin/mergerootfile"; -Email = ""; -OutputFile = "histosscaled-merged.root@ALICE::CERN::ALICEDISK"; -InputFile = "LF:/alice/macros/mergerootfile.C"; -OutputDir = "/alice/cern.ch/user/k/kread/work12/output/merged"; diff --git a/PWG4/macros/electrons/mergeoutscaledi.jdl b/PWG4/macros/electrons/mergeoutscaledi.jdl deleted file mode 100644 index ba02d884d05..00000000000 --- a/PWG4/macros/electrons/mergeoutscaledi.jdl +++ /dev/null @@ -1,8 +0,0 @@ -Packages ={"VO_ALICE@ROOT::v5-24-00","VO_ALICE@APISCONFIG::V2.4"}; - -Arguments = "27498605 histosscaled.root histosscaled-merged$2.root kread /alice/cern.ch/user/k/kread/$1/output/$2"; -Executable = "/alice/bin/mergerootfile"; -Email = ""; -OutputFile = "histosscaled-merged$2.root@ALICE::CERN::ALICEDISK"; -InputFile = "LF:/alice/macros/mergerootfile.C"; -OutputDir = "/alice/cern.ch/user/k/kread/$1/output/merged"; diff --git a/PWG4/macros/electrons/mycollect.xml b/PWG4/macros/electrons/mycollect.xml deleted file mode 100644 index a633f4be49a..00000000000 --- a/PWG4/macros/electrons/mycollect.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PWG4/macros/electrons/mylauncher.C b/PWG4/macros/electrons/mylauncher.C deleted file mode 100644 index 6172248faa1..00000000000 --- a/PWG4/macros/electrons/mylauncher.C +++ /dev/null @@ -1,152 +0,0 @@ - -// -// AliEn Multi MasterJob Coordination -// Author: K. Read -// - -void mylauncher() -{ - TString worksubdir = "work12"; //already existing work directory -//TString worksubdir = "LHC09b4"; //a better name for MultiMode - // Name of JDL file to upload. Leave blank for no upload and no submit. - TString jdlfilename = "anaJete.jdl";//ignored for MultiMode - // Name of executable to upload. Leave blank for no upload. - TString collectfilename = "mycollect.xml";//ignored for MultiMode - // List any other files to upload in string filenames separated by blanks. - TString execfilename = ""; - // List any other files to upload in string filenames separated by blanks. - TString filelist = "run.C validate.sh anaJete.C ConfigJetAnalysisFastJet.C ConfigAnalysisElectron.C mergeout.jdl mergeoutscaled.jdl ANALYSIS.par ANALYSISalice.par AOD.par EMCALUtils.par ESD.par PHOSUtils.par STEERBase.par JETAN.par FASTJETAN.par PWG4PartCorrBase.par PWG4PartCorrDep.par"; - TString filename; - - Bool_t kMultiMode = kFALSE;//uncomment for regular mode -//Bool_t kMultiMode = kTRUE; //uncomment for coordinated multiple masterjobs -//MultiMode Variables. All ignored for regular mode. - TString multijdlfilename = "anaJetemulti.jdl"; -//TString datatype = "AliESDs.root";//uncomment for ESDs - TString datatype = "AliAOD.root";//uncomment for AODs - TString findlist = " -/alice/sim/LHC09b4/AOD/000 -/alice/sim/LHC09b4/AOD/001 -/alice/sim/LHC09b4/AOD/002"; //line-feed separated list of desired collections - - - gSystem->Load("libNetx.so") ; - gSystem->Load("libRAliEn.so"); - - TGrid::Connect("alien://") ; - if (gGrid && gGrid->IsConnected()) { - TString homedir = gGrid->GetHomeDirectory(); // has a trailing slash - TString workdir = homedir + worksubdir; - if (gGrid->Cd(workdir)) { - - // Upload files listed - if (filelist.Length()) { - arr = filelist.Tokenize(" "); - TObjString *os; - TIter next(arr); - while ((os=(TObjString*)next())) { - Info("Grid Upload", "Copying %s to your AliEn work directory", os->GetString().Data()); - if (FileExists(os->GetString())) gGrid->Rm(os->GetString()); - TFile::Cp(Form("file:%s",os->GetString().Data()), Form("alien://%s/%s", workdir.Data(), os->GetString().Data())); - } - delete arr; - } - - // Prepare collection(s) - if(kMultiMode){ - // Find collections if desired - if (findlist.Length()) { - arr = findlist.Tokenize("\n"); - TObjString *os; - TIter next(arr); - Int_t count=0; - while ((os=(TObjString*)next())) { - TGridResult *res; - Info("Find", "Making collection for %s", os->GetString().Data()); - res = gGrid->Command(Form("find -x collection %s %s > mycollect%02d.xml", os->GetString().Data(),datatype.Data(),count)); - if(!res) Info("Find", "Failed making collection for %s \n",os->GetString().Data()); - delete res; - count++; - } - } - } - else{ - if (collectfilename.Length()) { - Info("Grid Upload", "Copying %s to your AliEn work directory", collectfilename.Data()); - if (FileExists(collectfilename)) gGrid->Rm(collectfilename); - TFile::Cp(Form("file:%s",collectfilename.Data()), Form("alien://%s/%s", workdir.Data(), collectfilename.Data())); - } - } - - // Upload executable if listed - if (execfilename.Length()) { - filename = Form("%sbin/%s", homedir.Data(), execfilename.Data()); - if (FileExists(filename)) gGrid->Rm(filename); - Info("Grid Upload", "Copying executable file %s to your AliEn bin directory", execfilename.Data()); - TFile::Cp(Form("file:%s",execfilename.Data()), Form("alien://%s", filename.Data())); - } - - // Upload and submit JDL if listed - if (kMultiMode) jdlfilename = multijdlfilename; - if (jdlfilename.Length()) { - filename = Form("%s/%s", workdir.Data(), jdlfilename.Data()); - if (FileExists(filename)) gGrid->Rm(filename); - Info("Grid Upload", "Copying JDL file %s to your AliEn work directory", jdlfilename.Data()); - TFile::Cp(Form("file:%s",jdlfilename.Data()), Form("alien://%s", filename.Data())); - - if (!kMultiMode) Int_t count=1; - for (Int_t index = 0; index < count; index++) { - TGridResult *res; - TString jobID = ""; - if(kMultiMode){ - res = gGrid->Command(Form("submit %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index)); - Info("Launcher:", "Submitting %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index); - } - else{ - res = gGrid->Command(Form("submit %s", jdlfilename.Data())); - Info("Launcher:", "Submitting %s", jdlfilename.Data()); - } - if (res) { - const char *cjobId = res->GetKey(0,"jobId"); - if (!cjobId) { - Error("Launcher:", "Your JDL %s could not be submitted", jdlfilename.Data()); - return; - } - else { - Info("Launcher:", "Your JDL %s was successfully submitted.\n\n\t\t\t THE JOB ID IS: %s\n", - jdlfilename.Data(), cjobId); - } - delete res; - } - } - } - - // Launch alien shell - gSystem->Exec("aliensh"); - - } - } -} - -Bool_t FileExists(const char *lfn) const -{ -// Returns true if file exists. - if (!gGrid) { - Error("FileExists", "No connection to grid"); - return kFALSE; - } - TGridResult *res = gGrid->Ls(lfn); - if (!res) return kFALSE; - TMap *map = dynamic_cast(res->At(0)); - if (!map) { - delete res; - return kFALSE; - } - TObjString *objs = dynamic_cast(map->GetValue("name")); - if (!objs || !objs->GetString().Length()) { - delete res; - return kFALSE; - } - delete res; - return kTRUE; -} diff --git a/PWG4/macros/electrons/mymerger.C b/PWG4/macros/electrons/mymerger.C deleted file mode 100644 index 3c3ded32ee9..00000000000 --- a/PWG4/macros/electrons/mymerger.C +++ /dev/null @@ -1,83 +0,0 @@ - -// -// AliEn Initial PYTHIA pt hard bin-by-bin merging to prepare for rescaling -// Author: K. Read -// - -void mymerger() -{ - TString filename; - TString jdlfilename = "mergeoutscaledi.jdl"; - //TString worksubdir = "LHC09b4b"; - //Int_t maxbin = 15; - TString worksubdir = "LHC09b2ESDb"; - Int_t maxbin = 16; - - //Later do: aliensh; cd worksubdir/output/merged; cp histoss* file: - //And then process files locally with MergeFileInBins.C. - - gSystem->Load("libNetx.so") ; - gSystem->Load("libRAliEn.so"); - - TGrid::Connect("alien://") ; - if (gGrid && gGrid->IsConnected()) { - TString homedir = gGrid->GetHomeDirectory(); // has a trailing slash - TString workdir = homedir + worksubdir; - if (gGrid->Cd(workdir)) { - - // Upload and submit JDL if listed - if (jdlfilename.Length()) { - filename = Form("%s/%s", workdir.Data(), jdlfilename.Data()); - if (FileExists(filename)) gGrid->Rm(filename); - Info("Grid Upload", "Copying JDL file %s to your AliEn work directory", jdlfilename.Data()); - TFile::Cp(Form("file:%s",jdlfilename.Data()), Form("alien://%s", filename.Data())); - - for (Int_t index = 0; index <= maxbin; index++) { - TGridResult *res; - TString jobID = ""; - res = gGrid->Command(Form("submit %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index)); - Info("Launcher:", "Submitting %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index); - if (res) { - const char *cjobId = res->GetKey(0,"jobId"); - if (!cjobId) { - Error("Launcher:", "Your JDL %s could not be submitted", jdlfilename.Data()); - return; - } - else { - Info("Launcher:", "Your JDL %s was successfully submitted.\n\n\t\t\t THE JOB ID IS: %s\n", - jdlfilename.Data(), cjobId); - } - delete res; - } - } - } - - // Launch alien shell - gSystem->Exec("aliensh"); - - } - } -} - -Bool_t FileExists(const char *lfn) const -{ -// Returns true if file exists. - if (!gGrid) { - Error("FileExists", "No connection to grid"); - return kFALSE; - } - TGridResult *res = gGrid->Ls(lfn); - if (!res) return kFALSE; - TMap *map = dynamic_cast(res->At(0)); - if (!map) { - delete res; - return kFALSE; - } - TObjString *objs = dynamic_cast(map->GetValue("name")); - if (!objs || !objs->GetString().Length()) { - delete res; - return kFALSE; - } - delete res; - return kTRUE; -} diff --git a/PWG4/macros/electrons/myplot11.C b/PWG4/macros/electrons/myplot11.C deleted file mode 100644 index c26e81eee71..00000000000 --- a/PWG4/macros/electrons/myplot11.C +++ /dev/null @@ -1,15 +0,0 @@ -{ - TFile *fin = TFile::Open("histos.root"); - TCanvas *myc1 = new TCanvas("myc1","myc1",1); -// myc1->SetLogx(1); -// myc1->SetLogy(1); - histos.Print(); - histos->FindObject("AnaElectron_hPtElectron")->Draw("pe"); -//AnaElectron_hPtElectron->GetXaxis()->SetRangeUser(1,200); -//AnaElectron_hPtElectron->GetYaxis()->SetRangeUser(1,4000); -//AnaElectron_hPtElectron->SetTitle("pT of Electron"); -//AnaElectron_hPtElectron->SetStats(kFALSE); -//AnaElectron_hPtElectron->Draw("pe"); - -// myc1->Print("electron.pdf"); -} diff --git a/PWG4/macros/electrons/myplot11s.C b/PWG4/macros/electrons/myplot11s.C deleted file mode 100644 index e28dc6d660b..00000000000 --- a/PWG4/macros/electrons/myplot11s.C +++ /dev/null @@ -1,15 +0,0 @@ -{ - TFile *fin = TFile::Open("histosscaled.root"); - TCanvas *myc1 = new TCanvas("myc1","myc1",1); -// myc1->SetLogx(1); -// myc1->SetLogy(1); - histosscaled.Print(); - histosscaled->FindObject("AnaElectron_hPtElectronScaled")->Draw("pe"); -//AnaElectron_hPtElectronScaled->GetXaxis()->SetRangeUser(1,200); -// AnaElectron_hPtElectronScaled->GetYaxis()->SetRangeUser(1,4000); -// AnaElectron_hPtElectronScaled->SetTitle("pT of Electron"); -// AnaElectron_hPtElectronScaled->SetStats(kFALSE); -// AnaElectron_hPtElectronScaled->Draw("pe"); - -// myc1->Print("electron.pdf"); -} diff --git a/PWG4/macros/electrons/parmaker b/PWG4/macros/electrons/parmaker deleted file mode 100755 index 077ae2e5ca0..00000000000 --- a/PWG4/macros/electrons/parmaker +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/bash - -# -# Author: K. Read -# -# This script makes PAR files without requiring write access to -# $ALICE_ROOT. It is not necessary to first make AliRoot after doing -# an svn checkout or update. Execute this script in your local area -# with write access. -# -# Usage: -# parmaker JETAN -# parmaker JETAN remote -# parmaker JETAN remote patch -# parmaker all remote -# -# So far only available for these par files: -# ANALYSIS ANALYSISalice AOD EMCALUtils ESD FASTJETAN JETAN -# PHOSUtils PWG4PartCorrBase PWG4PartCorrDep STEERBase -# - -case $2 in - - "remote") - - case $1 in - "all") - ./parmaker ANALYSIS remote - ./parmaker ANALYSISalice remote - ./parmaker AOD remote - ./parmaker EMCALUtils remote - ./parmaker ESD remote - ./parmaker FASTJETAN remote - ./parmaker JETAN remote - ./parmaker PHOSUtils remote - ./parmaker PWG4PartCorrBase remote - ./parmaker PWG4PartCorrDep remote - ./parmaker STEERBase remote - echo " " - echo "finished making complete set of par files" - exit - ;; - "ANALYSIS") - parmaker_input_basedir="ANALYSIS" - parmaker_input_dir_subdir="ANALYSIS" - parmaker_output_dir_subdir="ANALYSIS" - ;; - "ANALYSISalice") - parmaker_input_basedir="ANALYSIS" - parmaker_input_dir_subdir="ANALYSIS" - parmaker_output_dir_subdir="ANALYSISalice" - ;; - "AOD") - parmaker_input_basedir="STEER" - parmaker_input_dir_subdir="STEER" - parmaker_output_dir_subdir="AOD" - ;; - "EMCALUtils") - parmaker_input_basedir="EMCAL" - parmaker_input_dir_subdir="EMCAL" - parmaker_output_dir_subdir="EMCALUtils" - ;; - "ESD") - parmaker_input_basedir="STEER" - parmaker_input_dir_subdir="STEER" - parmaker_output_dir_subdir="ESD" - ;; - "PHOSUtils") - parmaker_input_basedir="PHOS" - parmaker_input_dir_subdir="PHOS" - parmaker_output_dir_subdir="PHOSUtils" - ;; - "PWG4PartCorrBase") - parmaker_input_basedir="PWG4" - parmaker_input_dir_subdir="PWG4/PartCorrBase" - parmaker_output_dir_subdir="PWG4PartCorrBase/PartCorrBase" - ;; - "PWG4PartCorrDep") - parmaker_input_basedir="PWG4" - parmaker_input_dir_subdir="PWG4/PartCorrDep" - parmaker_output_dir_subdir="PWG4PartCorrDep/PartCorrDep" - ;; - "STEERBase") - parmaker_input_basedir="STEER" - parmaker_input_dir_subdir="STEER" - parmaker_output_dir_subdir="STEERBase" - ;; - "JETAN") - parmaker_input_basedir="JETAN" - parmaker_input_dir_subdir="JETAN" - parmaker_output_dir_subdir="JETAN" - ;; - "FASTJETAN") - parmaker_input_basedir="JETAN" - parmaker_input_dir_subdir="JETAN" - parmaker_output_dir_subdir="FASTJETAN" - ;; - *) - echo "parmaker: I'm sorry Dave, I'm afraid I can't do that." - exit - esac - - - echo " " - echo "parmaker to use source $ALICE_ROOT/$parmaker_input_dir_subdir" - if [ -e "$ALICE_ROOT/$parmaker_input_dir_subdir" ] - then - echo "parmaker creating $1.par" - mkdir $1 - if [ $parmaker_input_basedir != $parmaker_input_dir_subdir ] - then - mkdir $parmaker_output_dir_subdir - fi - - list=`grep Ali ${ALICE_ROOT}/${parmaker_input_basedir}/lib${1}.pkg | sed -e '/EXPORT/d' -e '/EINCLUDE/d' -e 's:.cxx::g' -e 's:SRCS::' -e 's:=::' -e 's:+::' -e 's:\\\::'` - for i in $list; do -# echo "adding:" $i - cp $ALICE_ROOT/$parmaker_input_basedir/$i.cxx $parmaker_output_dir_subdir - cp $ALICE_ROOT/$parmaker_input_basedir/$i.h $parmaker_output_dir_subdir - done - - mkdir $1/PROOF-INF - cp -r $ALICE_ROOT/$parmaker_input_basedir/PROOF-INF.$1/* $1/PROOF-INF - cp $ALICE_ROOT/$parmaker_input_basedir/${1}LinkDef.h $1 - cp $ALICE_ROOT/$parmaker_input_basedir/lib${1}.pkg $1 - cp $ROOTSYS/test/Makefile.arch $1 - cp $ALICE_ROOT/$parmaker_input_basedir/Makefile $1/Makefiletemp - sed -e 's:include \$(ROOTSYS)\/test\/Makefile.arch:include Makefile.arch:' -e "s:PACKAGE = .*:PACKAGE = ${1}:" $1/Makefiletemp > $1/Makefile - - /bin/rm $1/Makefiletemp - - -# Apply temporary patches. - if [ -z $3 ] - then - echo "no non-standard patches applied" - else - if [ $3 = "patch" ] - then - if [ -e "patches/$1" ] - then - echo "applying temporary $1 patch" - cp patches/$1/* $parmaker_output_dir_subdir - echo "completed temporary $1 patch" - else - echo "no patches found for $1" - fi - else - echo "argument $3 not processed" - fi - fi - -# Apply further FASTJETAN tweaks. - if [ $1 = "FASTJETAN" ] - then - echo "Making temporary adjustments to FASTJETAN.par." - cp -r $ALICE_ROOT/JETAN/fastjet FASTJETAN - - sed -e "s:CXXFLAGS +:\nALICEINC += -I../JETAN -I./fastjet -I./fastjet/fastjet\n\n\nCXXFLAGS +:" FASTJETAN/Makefile > FASTJETAN/Makefile2 - mv FASTJETAN/Makefile2 FASTJETAN/Makefile - fi - - tar cfzh $1.par $1 - /bin/rm -rf $1 - fi - ;; - - *) - echo "parmaker to use local source $1" - if [ -e "$1" ] - then - echo "parmaker creating $1.par" - tar cfzh $1.par $1 - else - echo "local subdirectory $1 not found" - fi - -esac diff --git a/PWG4/macros/electrons/plotEff.C b/PWG4/macros/electrons/plotEff.C deleted file mode 100644 index a3847cf8671..00000000000 --- a/PWG4/macros/electrons/plotEff.C +++ /dev/null @@ -1,114 +0,0 @@ - - -{ - //=========Macro generated from canvas: c7/7 efficiency per pt - //========= (Sat Oct 24 13:36:23 2009) by ROOT version5.14/00 - TCanvas *c7 = new TCanvas("c7", "7 efficiency per pt",158,233,600,400); - c7->Range(-5,-0.08875,55,0.89875); - c7->SetFillColor(0); - c7->SetBorderMode(0); - c7->SetBorderSize(2); - c7->SetFrameBorderMode(0); - c7->SetFrameBorderMode(0); - - TGraphErrors *gre = new TGraphErrors(5); - gre->SetName("Graph"); - gre->SetTitle("PID efficiency"); - gre->SetFillColor(1); - gre->SetMarkerStyle(20); - gre->SetPoint(0,5,0.140749); - gre->SetPointError(0,0,0); - gre->SetPoint(1,15,0.559721); - gre->SetPointError(1,0,0); - gre->SetPoint(2,25,0.465536); - gre->SetPointError(2,0,0); - gre->SetPoint(3,35,0.418012); - gre->SetPointError(3,0,0); - gre->SetPoint(4,45,0.341103); - gre->SetPointError(4,0,0); - - TH1 *Graph1 = new TH1F("Graph1","PID efficiency",100,1,49); - Graph1->SetMinimum(0.01); - Graph1->SetMaximum(0.8); - Graph1->SetDirectory(0); - Graph1->SetStats(0); - Graph1->GetXaxis()->SetTitle("pT (GeV/c)"); - Graph1->GetYaxis()->SetTitle("efficiency"); - gre->SetHistogram(Graph1); - - gre->Draw("apl"); - - gre = new TGraphErrors(5); - gre->SetName("Graph2"); - gre->SetTitle("Graph2"); - gre->SetFillColor(1); - gre->SetMarkerColor(2); - gre->SetMarkerStyle(20); - gre->SetPoint(0,5,0.136597); - gre->SetPointError(0,0,0); - gre->SetPoint(1,15,0.525284); - gre->SetPointError(1,0,0); - gre->SetPoint(2,25,0.425577); - gre->SetPointError(2,0,0); - gre->SetPoint(3,35,0.397009); - gre->SetPointError(3,0,0); - gre->SetPoint(4,45,0.316323); - gre->SetPointError(4,0,0); - gre->Draw("pl"); - - TLegend *leg = new TLegend(0.5,0.6,0.85,0.85,NULL,"brNDC"); - leg->SetBorderSize(1); - leg->SetLineColor(1); - leg->SetLineStyle(1); - leg->SetLineWidth(1); - leg->SetFillColor(10); - leg->SetFillStyle(1001); - TLegendEntry *entry=leg->AddEntry("Graph","Identified Electrons (EMCAL)","p"); - entry->SetLineColor(1); - entry->SetLineStyle(1); - entry->SetLineWidth(1); - entry->SetMarkerColor(1); - entry->SetMarkerStyle(20); - entry->SetMarkerSize(1); - entry->SetTextAlign(12); - entry->SetTextColor(1); - entry=leg->AddEntry("Graph2","Identified Electrons (EMCAL+TRD+TPC)","p"); - entry->SetLineColor(1); - entry->SetLineStyle(1); - entry->SetLineWidth(1); - entry->SetMarkerColor(2); - entry->SetMarkerStyle(20); - entry->SetMarkerSize(1); - entry->SetTextAlign(12); - entry->SetTextColor(1); - leg->Draw(); - TLatex * tex = new TLatex(0.4,0.91,"LHC09b4, 5.5Tev, b-jet"); - tex->SetNDC(); - tex->SetTextSize(0.04); - tex->SetLineWidth(2); - tex->Draw(); - tex = new TLatex(0.4,0.85,"oct20"); - tex->SetNDC(); - tex->SetTextSize(0.04); - tex->SetLineWidth(2); - tex->Draw(); - tex = new TLatex(0.15,0.85,"version = 99"); - tex->SetNDC(); - tex->SetTextSize(0.04); - tex->SetLineWidth(2); - tex->Draw(); - tex = new TLatex(0.15,0.75,"nEvents=406580"); - tex->SetNDC(); - tex->SetTextSize(0.04); - tex->SetLineWidth(2); - tex->Draw(); - - TPaveText *pt = new TPaveText(0.01,0.940161,0.217919,0.995,"blNDC"); - pt->SetName("title"); - pt->SetBorderSize(1); - text = pt->AddText("PID efficiency"); - pt->Draw(); - c7->Modified(); - c7->cd(); - c7->SetSelected(c7); -} diff --git a/PWG4/macros/electrons/plotHRF.C b/PWG4/macros/electrons/plotHRF.C deleted file mode 100644 index e2ebb04d539..00000000000 --- a/PWG4/macros/electrons/plotHRF.C +++ /dev/null @@ -1,123 +0,0 @@ -{ - //=========Macro generated from canvas: c3/cr - //========= (Sat Oct 24 14:06:41 2009) by ROOT version5.23/01 - TCanvas *c3 = new TCanvas("c3", "cr",0,0,1000,600); - gStyle->SetOptStat(0); - c3->Range(0,0,1,1); - c3->SetFillColor(0); - c3->SetBorderMode(0); - c3->SetBorderSize(2); - c3->SetFrameBorderMode(0); - - TGraphBentErrors *grbe = new TGraphBentErrors(4); - grbe->SetName("Graph"); - grbe->SetTitle("Graph"); - grbe->SetFillColor(1); - grbe->SetMarkerColor(2); - grbe->SetMarkerStyle(21); - grbe->SetPoint(0,10,1163); - grbe->SetPointError(0,0,0,319.8685,242.6435,0,0,0,0); - grbe->SetPoint(1,20,1473); - grbe->SetPointError(1,0,0,355.2512,271.8543,0,0,0,0); - grbe->SetPoint(2,40,2172); - grbe->SetPointError(2,0,0,490.1327,376.0158,0,0,0,0); - grbe->SetPoint(3,80,3329); - grbe->SetPointError(3,0,0,800.9482,426.2069,0,0,0,0); - - TH1 *Graph1 = new TH1F("Graph1","",100,3,87); - Graph1->SetMinimum(10); - Graph1->SetMaximum(5000); - Graph1->SetDirectory(0); - Graph1->SetStats(0); - Graph1->GetXaxis()->SetTitle("p_{T}^{track} (GeV/c)"); - // Graph1->GetXaxis()->SetTitleOffset(1.5); - Graph1->GetYaxis()->SetTitle("Rejection Power"); - //Graph1->GetYaxis()->SetTitleOffset(1.5); - grbe->SetHistogram(Graph1); - - grbe->Draw("apl"); - - grbe = new TGraphBentErrors(4); - grbe->SetName("Grapha"); - grbe->SetTitle("Grapha"); - grbe->SetFillColor(1); - grbe->SetMarkerColor(4); - grbe->SetMarkerStyle(21); - grbe->SetPoint(0,10,214); - grbe->SetPointError(0,0,0,23.04028,20.36199,0,0,0,0); - grbe->SetPoint(1,20,600); - grbe->SetPointError(1,0,0,86.54205,72.02112,0,0,0,0); - grbe->SetPoint(2,40,651); - grbe->SetPointError(2,0,0,77.49317,70.38893,0,0,0,0); - grbe->SetPoint(3,80,1705); - grbe->SetPointError(3,0,0,249.8343,221.2924,0,0,0,0); - - TH1 *Graph2 = new TH1F("Graph2","Rejection Power",100,3,87); - Graph2->SetMinimum(17.42646); - Graph2->SetMaximum(2099.826); - Graph2->SetDirectory(0); - Graph2->SetStats(0); - Graph2->GetXaxis()->SetTitle("p_{T}^{track} (GeV/c)"); - Graph2->GetYaxis()->SetTitle("Rejection Power"); - grbe->SetHistogram(Graph2); - - grbe->Draw("pl"); - - grbe = new TGraphBentErrors(2); - grbe->SetName("Graphb"); - grbe->SetTitle("Graphb"); - grbe->SetFillColor(1); - grbe->SetMarkerColor(6); - grbe->SetMarkerStyle(29); - grbe->SetMarkerSize(2); - grbe->SetPoint(0,40,686); - grbe->SetPointError(0,0,0,0,0,0,0,0,0); - grbe->SetPoint(1,80,1210); - grbe->SetPointError(1,0,0,0,0,0,0,0,0); - - TH1 *Graph3 = new TH1F("Graph3","Rejection Power",100,36,84); - Graph3->SetMinimum(633.6); - Graph3->SetMaximum(1262.4); - Graph3->SetDirectory(0); - Graph3->SetStats(0); - Graph3->GetXaxis()->SetTitle("p_{T}^{track} (GeV/c)"); - Graph3->GetYaxis()->SetTitle("Rejection Power"); - grbe->SetHistogram(Graph3); - - grbe->Draw("pl"); - - TLegend *leg = new TLegend(0.15,0.7,0.7,0.9,NULL,"brNDC"); - leg->SetBorderSize(1); - leg->SetTextFont(62); - leg->SetTextSize(0.03); - leg->SetLineColor(1); - leg->SetLineStyle(1); - leg->SetLineWidth(1); - leg->SetFillColor(0); - leg->SetFillStyle(1001); - TLegendEntry *entry=leg->AddEntry("Graph","80% e^{-} Efficiency - Simulation","p"); - entry->SetLineColor(1); - entry->SetLineStyle(1); - entry->SetLineWidth(1); - entry->SetMarkerColor(1); - entry->SetMarkerStyle(21); - entry->SetMarkerSize(1); - entry=leg->AddEntry("Grapha","90% e^{-} Efficiency - Simulation","p"); - entry->SetLineColor(1); - entry->SetLineStyle(1); - entry->SetLineWidth(1); - entry->SetMarkerColor(1); - entry->SetMarkerStyle(21); - entry->SetMarkerSize(1); - entry=leg->AddEntry("Graphb","90% e^{-} Efficiency - Test Beam","p"); - entry->SetLineColor(1); - entry->SetLineStyle(1); - entry->SetLineWidth(1); - entry->SetMarkerColor(1); - entry->SetMarkerStyle(21); - entry->SetMarkerSize(1); - leg->Draw(); - // c3->Modified(); - //c3->cd(); - //c3->SetSelected(c3); -} diff --git a/PWG4/macros/electrons/plotMCRates.C b/PWG4/macros/electrons/plotMCRates.C deleted file mode 100644 index c0250be1a35..00000000000 --- a/PWG4/macros/electrons/plotMCRates.C +++ /dev/null @@ -1,143 +0,0 @@ -///////////////////////////////////////////////// -// -// Macro for plotting MC rates of electrons -// for the EMCAL PPR -// -// J.L. Klay (Cal Poly) -// -///////////////////////////////////////////////// - -TLegend* leg; - -void plotMCRates() { - - gROOT->LoadMacro("makeCombinedData.C"); - makeData("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-0.root", - "data/scaled25Oct09/histosscaledLHC09b4AODc.root", - "data/scaled25Oct09/histosWboson.root"); - - gStyle->SetOptStat(0); - drawAnnualYields(); - drawPtCutRates(); - drawHadEleRatios(); - -} - -void drawAnnualYields() { - - TCanvas* crates = new TCanvas(); - crates->SetFillColor(0); - crates->SetBorderMode(0); - crates->SetBorderSize(2); - crates->SetFrameBorderMode(0); - crates->SetFrameBorderMode(0); - - crates->cd(); - gPad->SetLogy(); - allMC->SetXTitle("p_{T} (GeV/c)"); - allMC->SetTitle("MC electrons in Pb+Pb, 5.5 TeV"); - allMC->SetYTitle("Annual yield in EMCAL dN/dp_{T} (GeV/c)^{-1}"); - allMC->GetYaxis()->SetRangeUser(1,2.E6); - allMC->GetXaxis()->SetRangeUser(10.,50.); - allMC->Draw(); - bMC->Draw("same"); - cMC->Draw("same"); - cbMC->Draw("same"); - convMC->Draw("same"); - dalMC->Draw("same"); - wzMC->Draw("same"); - - leg = new TLegend(0.6,0.6,0.9,0.9); - leg->SetFillColor(0); - leg->SetTextSize(leg->GetTextSize()*1.2); - leg->AddEntry(allMC,"All MC electrons","l"); - leg->AddEntry(bMC,"Bottom e","l"); - leg->AddEntry(cMC,"Charm e","l"); - leg->AddEntry(cbMC,"B-->C e","l"); - leg->AddEntry(dalMC,"Dalitz e","l"); - leg->AddEntry(convMC,"Conversion e","l"); - leg->AddEntry(wzMC,"W Boson e","l"); - leg->Draw(); - crates->Print("MCRates_all.pdf"); - - TCanvas* crates2 = new TCanvas(); - crates2->Divide(2,4); - crates2->cd(1); gPad->SetLogy(); allMC->Draw(); - crates2->cd(2); gPad->SetLogy(); bMC->Draw(); - crates2->cd(3); gPad->SetLogy(); cMC->Draw(); - crates2->cd(4); gPad->SetLogy(); cbMC->Draw(); - crates2->cd(5); gPad->SetLogy(); convMC->Draw(); - crates2->cd(6); gPad->SetLogy(); dalMC->Draw(); - crates2->cd(7); gPad->SetLogy(); wzMC->Draw(); - crates2->cd(8); gPad->SetLogy(); mchad->Draw(); - -} - -void drawPtCutRates() { - - TCanvas* cptcut = new TCanvas(); - cptcut->SetFillColor(0); - cptcut->SetBorderMode(0); - cptcut->SetBorderSize(2); - cptcut->SetFrameBorderMode(0); - cptcut->SetFrameBorderMode(0); - - cptcut->cd(); - gPad->SetLogy(); - TH1F* alleptcut = GetPtCutHisto(allMC); - TH1F* beleptcut = GetPtCutHisto(bMC); - TH1F* celeptcut = GetPtCutHisto(cMC); - TH1F* cbeleptcut = GetPtCutHisto(cbMC); - TH1F* dalitzptcut = GetPtCutHisto(dalMC); - TH1F* convptcut = GetPtCutHisto(convMC); - TH1F* wzptcut = GetPtCutHisto(wzMC); - alleptcut->GetXaxis()->SetRangeUser(10,50); - alleptcut->GetYaxis()->SetRangeUser(10,2.e6); - alleptcut->SetXTitle("p_{T}^{cut} (GeV/c)"); - alleptcut->SetYTitle("Annual Yield in EMCAL for p_{T}>p_{T}^{cut}"); - alleptcut->SetTitle("MC electrons in Pb+Pb, 5.5 TeV"); - alleptcut->Draw(); - beleptcut->Draw("same"); - celeptcut->Draw("same"); - cbeleptcut->Draw("same"); - dalitzptcut->Draw("same"); - convptcut->Draw("same"); - wzptcut->Draw("same"); - leg->Draw(); - cptcut->Print("MCRates_ptcut_all.pdf"); - -} - -void drawHadEleRatios() { - - TCanvas* ceh = new TCanvas(); - ceh->SetFillColor(0); - ceh->SetBorderMode(0); - ceh->SetBorderSize(2); - ceh->SetFrameBorderMode(0); - ceh->SetFrameBorderMode(0); - - ceh->cd(); - gPad->SetLogy(); - gStyle->SetOptStat(0); - allheratio->Rebin(2); allheratio->Scale(1./2.); - behratio->Rebin(2); behratio->Scale(1./2.); - allheratio->SetLineWidth(2); - allheratio->GetYaxis()->SetRangeUser(10,2e3); - allheratio->GetXaxis()->SetRangeUser(10.,49.); - behratio->GetXaxis()->SetRangeUser(10.,49.); - allheratio->SetMarkerStyle(20); - behratio->SetMarkerStyle(24); - behratio->SetMarkerColor(1); - allheratio->Draw(); - behratio->Draw("psame"); - - TLegend *heleg = new TLegend(0.15,0.15,0.5,0.35); - heleg->SetFillColor(0); - heleg->SetTextSize(heleg->GetTextSize()*1.5); - heleg->AddEntry(allheratio,"All electrons","l"); - heleg->AddEntry(behratio,"Bottom electrons","p"); - heleg->Draw(); - ceh->Print("MCRates_heratio.pdf"); -} - diff --git a/PWG4/macros/electrons/plotNPERates.C b/PWG4/macros/electrons/plotNPERates.C deleted file mode 100644 index 94d0410c082..00000000000 --- a/PWG4/macros/electrons/plotNPERates.C +++ /dev/null @@ -1,315 +0,0 @@ -///////////////////////////////////////////////// -// -// Macro for plotting rates of identified Non-photonic electrons -// for the EMCAL PPR -// -// J.L. Klay (Cal Poly) -// -///////////////////////////////////////////////// - -TLegend* leg; - -void plotNPERates(const char* which = "EMC") { - - gROOT->LoadMacro("makeCombinedData.C"); - makeData("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-0.root", - "data/scaled25Oct09/histosscaledLHC09b4AODc.root", - "data/scaled25Oct09/histosWboson.root"); - - //define common legend - leg = new TLegend(0.5,0.6,0.9,0.9); - leg->SetFillColor(0); - leg->SetTextSize(leg->GetTextSize()*1.2); - //leg->AddEntry(alltte,"All N-P e candidates","l"); - leg->AddEntry(sumtte,"All N-P electrons","l"); - leg->AddEntry(btte,"Bottom e","l"); - leg->AddEntry(ctte,"Charm e","l"); - leg->AddEntry(cbtte,"B-->C e","l"); - leg->AddEntry(daltte,"Dalitz e","l"); - leg->AddEntry(convtte,"Conversion e","l"); - leg->AddEntry(wztte,"W Boson e","l"); - // leg->AddEntry(htte,"Misidentified hadrons","l"); - - gStyle->SetOptStat(0); - // drawAnnualYields(which); - // drawPtCutRates(which); - //drawCompareTruth(); - -} - -void drawAnnualYields(char* which = "EMC") { - - TCanvas* crates = new TCanvas(); - crates->SetFillColor(0); - crates->SetBorderMode(0); - crates->SetBorderSize(2); - crates->SetFrameBorderMode(0); - crates->SetFrameBorderMode(0); - - crates->cd(); - gPad->SetLogy(); - - if(strcmp(which,"EMC")==0) { - allemc->SetXTitle("p_{T} (GeV/c)"); - allemc->SetYTitle("Annual yield"); - allemc->SetTitle("Annual yield of non-phot. electron candidates (EMCAL pid)"); - allemc->Rebin(5); allemc->Scale(0.2); - - sumemc->SetXTitle("p_{T} (GeV/c)"); - sumemc->SetYTitle("Annual yield"); - sumemc->SetTitle("Annual yield of non-phot. electrons (EMCAL pid)"); - sumemc->Rebin(5); sumemc->Scale(0.2); - - bemc->Rebin(5); bemc->Scale(0.2); - cemc->Rebin(5); cemc->Scale(0.2); - cbemc->Rebin(5); cbemc->Scale(0.2); - convemc->Rebin(5); convemc->Scale(0.2); - dalemc->Rebin(5); dalemc->Scale(0.2); - wzemc->Rebin(5); wzemc->Scale(0.2); - hemc->Rebin(5); hemc->Scale(0.2); - - allemc->GetYaxis()->SetRangeUser(1.,2.e6); - allemc->GetXaxis()->SetRangeUser(10.,49.); - //allemc->Draw(); - sumemc->GetYaxis()->SetRangeUser(1.,2.e6); - sumemc->GetXaxis()->SetRangeUser(10.,49.); - sumemc->Draw(); - bemc->Draw("same"); - cemc->Draw("same"); - cbemc->Draw("same"); - convemc->Draw("same"); - dalemc->Draw("same"); - wzemc->Draw("same"); - // hemc->Draw("same"); - leg->Draw(); - crates->Print("NPERates_EMC_all.pdf"); - } - if(strcmp(which,"TRK")==0) { - alltrk->SetXTitle("p_{T} (GeV/c)"); - alltrk->SetYTitle("Annual yield"); - alltrk->SetTitle("Annual yield of non-phot. electron candidates (TPC+TRD pid)"); - alltrk->Rebin(5); alltrk->Scale(0.2); - sumtrk->SetXTitle("p_{T} (GeV/c)"); - sumtrk->SetYTitle("Annual yield"); - sumtrk->SetTitle("Annual yield of non-phot. electrons (TPC+TRD pid)"); - sumtrk->Rebin(5); sumtrk->Scale(0.2); - - btrk->Rebin(5); btrk->Scale(0.2); - ctrk->Rebin(5); ctrk->Scale(0.2); - cbtrk->Rebin(5); cbtrk->Scale(0.2); - convtrk->Rebin(5); convtrk->Scale(0.2); - daltrk->Rebin(5); daltrk->Scale(0.2); - wztrk->Rebin(5); wztrk->Scale(0.2); - htrk->Rebin(5); htrk->Scale(0.2); - - alltrk->GetYaxis()->SetRangeUser(1.,6.e6); - alltrk->GetXaxis()->SetRangeUser(10.,49.); - // alltrk->Draw(); - sumtrk->GetYaxis()->SetRangeUser(1.,6.e6); - sumtrk->GetXaxis()->SetRangeUser(10.,49.); - sumtrk->Draw(); - btrk->Draw("same"); - ctrk->Draw("same"); - cbtrk->Draw("same"); - convtrk->Draw("same"); - daltrk->Draw("same"); - wztrk->Draw("same"); - // htrk->Draw("same"); - leg->Draw(); - crates->Print("NPERates_TRK_all.pdf"); - } - if(strcmp(which,"TTE")==0) { - alltte->SetXTitle("p_{T} (GeV/c)"); - alltte->SetYTitle("Annual yield"); - alltte->SetTitle("Annual yield of non-phot. electron candidates (Tracking+EMCAL pid)"); - alltte->Rebin(5); alltte->Scale(0.2); - sumtte->SetXTitle("p_{T} (GeV/c)"); - sumtte->SetYTitle("Annual yield"); - sumtte->SetTitle("Annual yield of non-phot. electrons (Tracking+EMCAL pid)"); - sumtte->Rebin(5); sumtte->Scale(0.2); - - btte->Rebin(5); btte->Scale(0.2); - ctte->Rebin(5); ctte->Scale(0.2); - cbtte->Rebin(5); cbtte->Scale(0.2); - convtte->Rebin(5); convtte->Scale(0.2); - daltte->Rebin(5); daltte->Scale(0.2); - wztte->Rebin(5); wztte->Scale(0.2); - htte->Rebin(5); htte->Scale(0.2); - - alltte->GetYaxis()->SetRangeUser(1.,2.e6); - alltte->GetXaxis()->SetRangeUser(10.,49.); - // alltte->Draw(); - sumtte->GetYaxis()->SetRangeUser(1.,2.e6); - sumtte->GetXaxis()->SetRangeUser(10.,49.); - sumtte->Draw(); - btte->Draw("same"); - ctte->Draw("same"); - cbtte->Draw("same"); - convtte->Draw("same"); - daltte->Draw("same"); - wztte->Draw("same"); - htte->Draw("same"); - leg->Draw(); - crates->Print("NPERates_TTE_all.pdf"); - } - -} - -void drawPtCutRates(char* which = "EMC") { - - TCanvas* cptcut = new TCanvas(); - cptcut->SetFillColor(0); - cptcut->SetBorderMode(0); - cptcut->SetBorderSize(2); - cptcut->SetFrameBorderMode(0); - cptcut->SetFrameBorderMode(0); - cptcut->cd(); - gPad->SetLogy(); - if(strcmp(which,"EMC")==0) { - // TH1F* alleptcut = GetPtCutHisto(allemc); - TH1F* alleptcut = GetPtCutHisto(sumemc); - TH1F* beleptcut = GetPtCutHisto(bemc); - TH1F* celeptcut = GetPtCutHisto(cemc); - TH1F* cbeleptcut = GetPtCutHisto(cbemc); - TH1F* dalitzptcut = GetPtCutHisto(dalemc); - TH1F* convptcut = GetPtCutHisto(convemc); - TH1F* wzptcut = GetPtCutHisto(wzemc); - TH1F* misidptcut = GetPtCutHisto(hemc); - alleptcut->SetXTitle("p_{T}^{cut} (GeV/c)"); - alleptcut->SetYTitle("Annual Yield in EMCAL for p_{T}>p_{T}^{cut}"); - alleptcut->SetTitle("Pb+Pb, 5.5 TeV reconstructed N-P electrons (EMCAL pid)"); - alleptcut->GetXaxis()->SetRangeUser(10.,49.); - alleptcut->GetYaxis()->SetRangeUser(1,4.e5); - alleptcut->Draw(); - beleptcut->Draw("same"); - celeptcut->Draw("same"); - cbeleptcut->Draw("same"); - dalitzptcut->Draw("same"); - convptcut->Draw("same"); - wzptcut->Draw("same"); - //misidptcut->Draw("same"); - leg->Draw(); - cptcut->Print("NPERates_EMC_ptcut_all.pdf"); - } - if(strcmp(which,"TRK")==0) { - // TH1F* alleptcut = GetPtCutHisto(alltrk); - TH1F* alleptcut = GetPtCutHisto(sumtrk); - TH1F* beleptcut = GetPtCutHisto(btrk); - TH1F* celeptcut = GetPtCutHisto(ctrk); - TH1F* cbeleptcut = GetPtCutHisto(cbtrk); - TH1F* dalitzptcut = GetPtCutHisto(daltrk); - TH1F* convptcut = GetPtCutHisto(convtrk); - TH1F* wzptcut = GetPtCutHisto(wztrk); - TH1F* misidptcut = GetPtCutHisto(htrk); - alleptcut->SetXTitle("p_{T}^{cut} (GeV/c)"); - alleptcut->SetYTitle("Annual Yield in EMCAL for p_{T}>p_{T}^{cut}"); - alleptcut->SetTitle("Pb+Pb, 5.5 TeV reconstructed N-P electrons (TPC+TRD pid)"); - alleptcut->GetXaxis()->SetRangeUser(10.,49.); - alleptcut->GetYaxis()->SetRangeUser(1,6.e6); - alleptcut->Draw(); - beleptcut->Draw("same"); - celeptcut->Draw("same"); - cbeleptcut->Draw("same"); - dalitzptcut->Draw("same"); - convptcut->Draw("same"); - wzptcut->Draw("same"); - //misidptcut->Draw("same"); - leg->Draw(); - cptcut->Print("NPERates_TRK_ptcut_all.pdf"); - } - if(strcmp(which,"TTE")==0) { - // TH1F* alleptcut = GetPtCutHisto(alltte); - TH1F* alleptcut = GetPtCutHisto(sumtte); - TH1F* beleptcut = GetPtCutHisto(btte); - TH1F* celeptcut = GetPtCutHisto(ctte); - TH1F* cbeleptcut = GetPtCutHisto(cbtte); - TH1F* dalitzptcut = GetPtCutHisto(daltte); - TH1F* convptcut = GetPtCutHisto(convtte); - TH1F* wzptcut = GetPtCutHisto(wztte); - TH1F* misidptcut = GetPtCutHisto(htte); - alleptcut->SetXTitle("p_{T}^{cut} (GeV/c)"); - alleptcut->SetYTitle("Annual Yield in EMCAL for p_{T}>p_{T}^{cut}"); - alleptcut->SetTitle("Pb+Pb, 5.5 TeV reconstructed N-P electrons (Tracking+EMCAL pid)"); - alleptcut->GetXaxis()->SetRangeUser(10.,49.); - alleptcut->GetYaxis()->SetRangeUser(1,4.e5); - alleptcut->Draw(); - beleptcut->Draw("same"); - celeptcut->Draw("same"); - cbeleptcut->Draw("same"); - dalitzptcut->Draw("same"); - convptcut->Draw("same"); - wzptcut->Draw("same"); - misidptcut->Draw("same"); - - leg->Draw(); - cptcut->Print("NPERates_TTE_ptcut_all.pdf"); - } - -} - -TH1F* drawCompareTruth() { - - TH1F* mctruth = (TH1F*)belemc->Clone(); - mctruth->SetName("mctruth"); - mctruth->Add(celemc); - mctruth->Add(candbmc); - mctruth->Add(wzmc); - mctruth->Rebin(2); mctruth->Scale(0.5); - - TFile* effic = new TFile("elec_eff.root"); - TH1F* heff = (TH1F*)effic->Get("h111"); - - TH1F* hcorr = (TH1F*)sumHFemc->Clone(); - hcorr->SetName("hcorr"); - for(Int_t i = 1; i < heff->GetNbinsX(); i++) { - Double_t pt = heff->GetBinCenter(i); - Double_t eff = heff->GetBinContent(i); - Double_t corr = 0.; - if(eff > 0.) corr = hcorr->GetBinContent(i)/eff; - hcorr->SetBinContent(i,corr); - } - hcorr->Rebin(2); hcorr->Scale(0.5); - sumHFemc->Rebin(2); sumHFemc->Scale(0.5); - - Double_t efinal = 0.258; - TGraphErrors* eerr = new TGraphErrors(); - eerr->SetName("emcErr"); - for(Int_t i = 1; i <= hcorr->GetNbinsX(); i++) { - eerr->SetPoint(i-1,hcorr->GetBinCenter(i),hcorr->GetBinContent(i)); - eerr->SetPointError(i-1,0.,efinal*hcorr->GetBinContent(i)); - } - eerr->SetFillColor(kRed-8); - - TCanvas* ctruth = new TCanvas(); - ctruth->SetFillColor(0); - ctruth->SetBorderMode(0); - ctruth->SetBorderSize(2); - ctruth->SetFrameBorderMode(0); - ctruth->SetFrameBorderMode(0); - - ctruth->cd(); - gPad->SetLogy(); - mctruth->SetTitle("Comparison of MC and reco HF+W electrons"); - mctruth->SetMarkerColor(kBlack); mctruth->SetLineColor(kBlack); - mctruth->SetYTitle("Annual yield in EMCAL dN/dp_{T} (GeV/c)^{-1}"); - mctruth->SetXTitle("p_{T} (GeV/c)"); - mctruth->GetXaxis()->SetRangeUser(10.,49.); - mctruth->Draw(); - eerr->Draw("3same"); - hcorr->SetMarkerColor(kRed); - hcorr->SetLineColor(kRed); - hcorr->Draw("same"); - sumHFemc->SetMarkerColor(kBlue); - sumHFemc->SetLineColor(kBlue); - sumHFemc->Draw("same"); - TLegend *legy = new TLegend(0.3,0.7,0.9,0.9); - legy->SetFillColor(0); - legy->AddEntry(mctruth,"MC HF+W electrons","l"); - legy->AddEntry(sumHFemc,"Rec (EMCAL) HF+W electrons","l"); - legy->AddEntry(hcorr,"Eff. corrected reco HF+W electrons","l"); - legy->AddEntry(eerr,"Systematic uncertainty","f"); - legy->Draw(); - - ctruth->Print("NPERates_TruthComparison.pdf"); - -} diff --git a/PWG4/macros/electrons/plotPIDCompare.C b/PWG4/macros/electrons/plotPIDCompare.C deleted file mode 100644 index 12e031c5306..00000000000 --- a/PWG4/macros/electrons/plotPIDCompare.C +++ /dev/null @@ -1,229 +0,0 @@ -///////////////////////////////////////////////// -// -// Macro for plotting rates of identified Non-photonic electrons -// for the EMCAL PPR -// -// J.L. Klay (Cal Poly) -// -///////////////////////////////////////////////// - -void plotPIDCompare(char* which = "EMC") { - - gROOT->LoadMacro("makeCombinedData.C"); - makeData("data/scaled25Oct09/TOTALhistosscaled-LHC09b2-0.root", - "data/scaled25Oct09/histosscaledLHC09b4AODc.root", - "data/scaled25Oct09/histosWboson.root"); - - //define common legend - TLegend* leg = new TLegend(0.5,0.6,0.9,0.9); - leg->SetFillColor(0); - leg->SetTextSize(leg->GetTextSize()*1.2); - leg->AddEntry(alltte,"All N-P e candidates","l"); - //leg->AddEntry(sumtte,"All N-P electrons","l"); - leg->AddEntry(btte,"Bottom e","l"); - leg->AddEntry(ctte,"Charm e","l"); - leg->AddEntry(cbtte,"B-->C e","l"); - leg->AddEntry(daltte,"Dalitz e","l"); - leg->AddEntry(convtte,"Conversion e","l"); - leg->AddEntry(wztte,"W Boson e","l"); - //leg->AddEntry(htte,"Mis-identified hadrons","l"); - - gStyle->SetOptStat(0); - - TCanvas* crates = new TCanvas("crates","",0,0,1600,600); - crates->SetFillColor(0); - crates->SetBorderMode(0); - crates->SetBorderSize(2); - crates->SetFrameBorderMode(0); - crates->SetFrameBorderMode(0); - crates->Divide(2,1); - crates->cd(1); - gPad->SetLogy(); - alltrk->SetXTitle("p_{T} (GeV/c)"); - alltrk->SetYTitle("Annual yield in EMCAL dN/dp_{T} (GeV/c)^{-1}"); - alltrk->SetTitle("PID comparison: Tracking only vs. EMCAL only"); - alltrk->Rebin(5); alltrk->Scale(0.2); - alltrk->GetYaxis()->SetRangeUser(10.,alltrk->GetMaximum()*2.); - alltrk->GetXaxis()->SetRangeUser(10.,49.); - alltrk->Draw(); - htrk->Rebin(5); htrk->Scale(0.2); - htrk->Draw("same"); - TH1F* tempallemc = (TH1F*)allemc->Clone(); - tempallemc->SetNameTitle("tempallemc","tempallemc"); - tempallemc->SetLineColor(kBlue); - tempallemc->Rebin(5); tempallemc->Scale(0.2); - tempallemc->Draw("same"); - - TH1F* temphemc = (TH1F*)hemc->Clone(); - temphemc->SetNameTitle("temphemc","temphemc"); - temphemc->SetLineColor(kOrange-3); - temphemc->Rebin(5); temphemc->Scale(0.2); - temphemc->Draw("same"); - - TLegend* leg2 = new TLegend(0.35,0.6,0.9,0.9); - leg2->SetFillColor(0); - leg2->SetTextSize(leg->GetTextSize()*1.2); - leg2->AddEntry(alltrk,"Electron Candidates (Tracking PID only)","l"); - leg2->AddEntry(htrk,"Hadron Contamination (Tracking PID only)","l"); - leg2->AddEntry(tempallemc,"Electron Candidates (EMCAL PID)","l"); - leg2->AddEntry(temphemc,"Hadron Contamination (EMCAL PID)","l"); - leg2->Draw(); - - crates->cd(2); - gPad->SetLogy(); - TH1F* subtrk = (TH1F*)alltrk->Clone(); - for(Int_t i = 1; i <= alltrk->GetNbinsX(); i++) { - Double_t diff = alltrk->GetBinContent(i) - htrk->GetBinContent(i); - Double_t unc = 0.; - if(diff < 0) diff = 0.; - if(diff > 0) - unc = diff/TMath::Sqrt(diff+2.*htrk->GetBinContent(i)); - printf("<%d> Cand %d, Contam %d, diff %d, unc %d\n",i,alltrk->GetBinContent(i),htrk->GetBinContent(i), diff, unc); - subtrk->SetBinContent(i,diff); - subtrk->SetBinError(i,unc); - } - subtrk->SetYTitle("Annual yield in EMCAL dN/dp_{T} (GeV/c)^{-1}"); - subtrk->SetLineColor(kRed); - subtrk->SetMarkerStyle(20); subtrk->SetMarkerColor(kRed); - subtrk->Draw(); - - TH1F* subemc = (TH1F*)tempallemc->Clone(); - for(Int_t i = 1; i <= tempallemc->GetNbinsX(); i++) { - Double_t diff = tempallemc->GetBinContent(i) - temphemc->GetBinContent(i); - Double_t unc = 0.; - if(diff < 0.) diff = subemc->GetBinContent(i-1); - if(diff > 0) - unc = diff/TMath::Sqrt(diff+2.*temphemc->GetBinContent(i)); - // printf("Cand %d, Contam %d, diff %d, unc %d\n",tempallemc->GetBinContent(i),temphemc->GetBinContent(i), diff, unc); - subemc->SetBinContent(i,diff); - subemc->SetBinError(i,unc); - } - - TFile* effic = new TFile("elec_eff.root"); - TH1F* heff = (TH1F*)effic->Get("h111"); - heff->Rebin(5); heff->Scale(0.2); - TH1F* hcorr = (TH1F*)subemc->Clone(); - hcorr->SetName("hcorr"); - for(Int_t i = 1; i < heff->GetNbinsX(); i++) { - Double_t pt = heff->GetBinCenter(i); - Double_t eff = heff->GetBinContent(i); - Double_t corr = 0.; - if(eff > 0.) corr = hcorr->GetBinContent(i)/eff; - hcorr->SetBinContent(i,corr); - } - - Double_t efinal = 0.4; - TGraphErrors* eerr = new TGraphErrors(); - eerr->SetName("emcErr"); - int count=0; - for(Int_t i = 1; i <= hcorr->GetNbinsX(); i++) { - if (hcorr->GetBinCenter(i) <10.0) continue; - if (hcorr->GetBinCenter(i) >50.0) break; - cout <<"bin:"<< i << ", bin-center:"<< hcorr->GetBinCenter(i)<< endl; - eerr->SetPoint(count,hcorr->GetBinCenter(i),hcorr->GetBinContent(i)); - eerr->SetPointError(count,0.,efinal*hcorr->GetBinContent(i)); - // if(hcorr->GetBinCenter(i) <20.0) eerr->SetPointError(count,0.,1.5*efinal*hcorr->GetBinContent(i)); - count++; - } - eerr->SetFillColor(kRed-8); - eerr->Draw("3same"); - subtrk->Draw("same"); - hcorr->SetMarkerStyle(20); hcorr->SetMarkerColor(kBlue); - hcorr->SetLineColor(kBlue); - hcorr->Draw("same"); - - allMC->Draw("same"); - mchad->Draw("same"); - - TLegend *legx = new TLegend(0.3,0.7,0.9,0.9); - legx->SetFillColor(0); - legx->AddEntry(subtrk,"Signal (candidates - contam) (Tracking PID only)","pl"); - legx->AddEntry(hcorr,"Eff. corrected signal (EMCAL PID)","pl"); - legx->AddEntry(eerr,"Systematic uncertainty","f"); - legx->AddEntry(allMC,"MC Electrons","l"); - legx->AddEntry(mchad,"MC Hadrons","l"); - legx->Draw(); - - - TLatex* latex = new TLatex(0.5,0.6,"Unc = #frac{S}{#sqrt{S+2B}}"); - latex->SetNDC(); - // latex->Draw(); - - crates->Print("NPERates_PIDCompare_all.pdf"); - - TCanvas* ccomp = new TCanvas("ccomp","",0,0,600,800); - ccomp->SetFillColor(0); - ccomp->SetBorderMode(0); - ccomp->SetBorderSize(2); - ccomp->SetFrameBorderMode(0); - ccomp->SetFrameBorderMode(0); - TPad* upperPad = new TPad("upperPad", "upperPad", - .005, .2525, .995, .995); - upperPad->SetFillColor(0); - upperPad->SetBorderMode(0); - upperPad->SetBorderSize(2); - upperPad->SetFrameBorderMode(0); - upperPad->SetFrameBorderMode(0); - TPad* lowerPad = new TPad("lowerPad", "lowerPad", - .005, .005, .995, .2525); - lowerPad->SetFillColor(0); - lowerPad->SetFillColor(0); - lowerPad->SetBorderMode(0); - lowerPad->SetBorderSize(2); - lowerPad->SetFrameBorderMode(0); - lowerPad->SetFrameBorderMode(0); - upperPad->Draw(); - lowerPad->Draw(); - upperPad->cd(); - gPad->SetLogy(); - hcorr->SetTitle("Efficiency corrected non-photonic electrons"); - hcorr->SetYTitle("Annual yield in EMCAL dN/dp_{T} (GeV/c)^{-1}"); - hcorr->SetXTitle("p_{T} (GeV/c)"); - hcorr->GetXaxis()->SetRangeUser(10.,49.); - hcorr->GetYaxis()->SetTitleOffset(1.2); - hcorr->Draw(); - eerr->Draw("3same"); - hcorr->Draw("same"); - allMC->Draw("same"); - TLegend *myleg = new TLegend(0.3,0.7,0.9,0.9); - myleg->SetFillColor(0); - myleg->AddEntry(allMC,"MC Electrons","l"); - myleg->AddEntry(hcorr,"Eff. corrected EMCAL N-P electrons","pl"); - myleg->AddEntry(eerr,"Systematic uncertainty","f"); - myleg->Draw(); - lowerPad->cd(); - TH1F* hmc = (TH1F*)allMC->Clone(); hmc->SetName("hmc"); - hmc->Rebin(5); hmc->Scale(0.2); - TH1F* hmcratio = (TH1F*)hcorr->Clone(); hmcratio->SetName("hmcratio"); - hmcratio->Divide(hmc); - hmcratio->SetTitle(); - hmcratio->SetYTitle("MC/Data"); - hmcratio->GetYaxis()->SetRangeUser(0.,2.); - hmcratio->GetYaxis()->SetNdivisions(505); - hmcratio->GetYaxis()->SetLabelSize(2.*hmcratio->GetYaxis()->GetLabelSize()); - hmcratio->GetYaxis()->SetTitleSize(3.*hmcratio->GetYaxis()->GetTitleSize()); - hmcratio->GetYaxis()->SetTitleOffset(0.3); - hmcratio->SetXTitle(""); - hmcratio->GetXaxis()->SetLabelSize(2.*hmcratio->GetXaxis()->GetLabelSize()); - hmcratio->Draw(); - TGraphErrors* rerr = new TGraphErrors(); - rerr->SetName("ratioErr"); - count=0; - for(Int_t i = 1; i <= hmcratio->GetNbinsX(); i++) { - if (hmcratio->GetBinCenter(i) <10.0) continue; - if (hmcratio->GetBinCenter(i) >50.0) break; - rerr->SetPoint(count,hmcratio->GetBinCenter(i),hmcratio->GetBinContent(i)); - rerr->SetPointError(count,0.,efinal*hmcratio->GetBinContent(i)); - //if(hmcratio->GetBinCenter(i) <20.0) rerr->SetPointError(count,0.,1.5*efinal*hmcratio->GetBinContent(i)); - count++; - } - rerr->SetFillColor(kRed-8); - rerr->Draw("3same"); - hmcratio->Draw("same"); - TLine* line = new TLine(10.,1.,50.,1.); - line->SetLineStyle(2); - line->Draw(); - ccomp->Print("EMCAL_NPE.pdf"); - crates->cd(); -} - diff --git a/PWG4/macros/electrons/run.C b/PWG4/macros/electrons/run.C deleted file mode 100644 index 32959a72f8e..00000000000 --- a/PWG4/macros/electrons/run.C +++ /dev/null @@ -1,50 +0,0 @@ -//#define VERBOSEARGS -{ - //Process environmental variables from command line: - char anainputdata[1024]; - char smode[1024]; - char sconfig1[1024]; - char sconfig2[1024]; - char sconfig3[1024]; - char sevent[1024]; - - sprintf(anainputdata,""); - sprintf(smode,""); - sprintf(sconfig1,""); - sprintf(sconfig2,""); - sprintf(sconfig3,""); - sprintf(sevent,""); - - - for (int i=0; i< gApplication->Argc();i++){ -#ifdef VERBOSEARGS - printf("Arg %d: %s\n",i,gApplication->Argv(i)); -#endif - - if (!(strcmp(gApplication->Argv(i),"--anaInputData"))) - sprintf(anainputdata,"%s",gApplication->Argv(i+1)); - if (!(strcmp(gApplication->Argv(i),"--mode"))) - sprintf(smode,"%s",gApplication->Argv(i+1)); - if (!(strcmp(gApplication->Argv(i),"--config1"))) - sprintf(sconfig1,"%s",gApplication->Argv(i+1)); - if (!(strcmp(gApplication->Argv(i),"--config2"))) - sprintf(sconfig2,"%s",gApplication->Argv(i+1)); - if (!(strcmp(gApplication->Argv(i),"--config3"))) - sprintf(sconfig3,"%s",gApplication->Argv(i+1)); - if (!(strcmp(gApplication->Argv(i),"--sevent"))) - sprintf(sevent,"%s",gApplication->Argv(i+1)); - } - - gSystem->Setenv("anaInputData", anainputdata); - gSystem->Setenv("MODE" , smode); - gSystem->Setenv("CONFIG1", sconfig1); - gSystem->Setenv("CONFIG2", sconfig2); - gSystem->Setenv("CONFIG3", sconfig3); - gSystem->Setenv("SEVENT" , sevent); - - - printf("Run.C: Variables: anaInputData %s, mode %s, config1 %s, config2 %s, config3 %s, first event %s\n", anainputdata,smode,sconfig1,sconfig2,sconfig3,sevent); - - gSystem->Exec("root -b -q -l anaJete.C > anaJete.log 2>&1"); - -} diff --git a/PWG4/macros/electrons/validate.sh b/PWG4/macros/electrons/validate.sh deleted file mode 100644 index 7ff8bb4b77c..00000000000 --- a/PWG4/macros/electrons/validate.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -################################################## -validateout=`dirname $0` -validatetime=`date` -validated="0"; -error=0 -if [ -z $validateout ] -then - validateout="." -fi - -cd $validateout; -validateworkdir=`pwd`; - -echo "*******************************************************" >> stdout -echo "* Automatically generated validation script *" >> stdout - -echo "* Time: $validatetime " >> stdout -echo "* Dir: $validateout" >> stdout -echo "* Workdir: $validateworkdir" >> stdout -echo "* ----------------------------------------------------*" >> stdout -ls -la ./ >> stdout -echo "* ----------------------------------------------------*" >> stdout - -################################################## -if ! [ -f histos.root ] ; then - error=1 - echo "Output file(s) not found. Job FAILED !" >> stdout - echo "Output file(s) not found. Job FAILED !" >> stderr -fi -if [ $error = 0 ] ; then - echo "* ---------------- Job Validated ------------------*" >> stdout -fi -echo "* ----------------------------------------------------*" >> stdout -echo "*******************************************************" >> stdout -cd - -exit $error diff --git a/PWG4/macros/AddTaskCaloTrackCorr.C b/PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C similarity index 100% rename from PWG4/macros/AddTaskCaloTrackCorr.C rename to PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C diff --git a/PWG4/macros/AddTaskCaloTrackCorrM.C b/PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorrM.C similarity index 100% rename from PWG4/macros/AddTaskCaloTrackCorrM.C rename to PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorrM.C diff --git a/PWG4/macros/AddTaskPi0.C b/PWGGA/CaloTrackCorrelations/macros/AddTaskPi0.C similarity index 100% rename from PWG4/macros/AddTaskPi0.C rename to PWGGA/CaloTrackCorrelations/macros/AddTaskPi0.C diff --git a/PWG4/macros/AddTaskPi0EMCALPbPb.C b/PWGGA/CaloTrackCorrelations/macros/AddTaskPi0EMCALPbPb.C similarity index 100% rename from PWG4/macros/AddTaskPi0EMCALPbPb.C rename to PWGGA/CaloTrackCorrelations/macros/AddTaskPi0EMCALPbPb.C diff --git a/PWG4/macros/QA/AddTaskCalorimeterQA.C b/PWGGA/CaloTrackCorrelations/macros/QA/AddTaskCalorimeterQA.C similarity index 100% rename from PWG4/macros/QA/AddTaskCalorimeterQA.C rename to PWGGA/CaloTrackCorrelations/macros/QA/AddTaskCalorimeterQA.C diff --git a/PWG4/macros/QA/BadChannelAnalysis.C b/PWGGA/CaloTrackCorrelations/macros/QA/BadChannelAnalysis.C similarity index 100% rename from PWG4/macros/QA/BadChannelAnalysis.C rename to PWGGA/CaloTrackCorrelations/macros/QA/BadChannelAnalysis.C diff --git a/PWG4/macros/QA/QAplots.C b/PWGGA/CaloTrackCorrelations/macros/QA/QAplots.C similarity index 100% rename from PWG4/macros/QA/QAplots.C rename to PWGGA/CaloTrackCorrelations/macros/QA/QAplots.C diff --git a/PWG4/macros/QA/ana.C b/PWGGA/CaloTrackCorrelations/macros/QA/ana.C similarity index 100% rename from PWG4/macros/QA/ana.C rename to PWGGA/CaloTrackCorrelations/macros/QA/ana.C diff --git a/PWG4/macros/QA/trendingCluster.C b/PWGGA/CaloTrackCorrelations/macros/QA/trendingCluster.C similarity index 100% rename from PWG4/macros/QA/trendingCluster.C rename to PWGGA/CaloTrackCorrelations/macros/QA/trendingCluster.C diff --git a/PWG4/macros/ana.C b/PWGGA/CaloTrackCorrelations/macros/ana.C similarity index 100% rename from PWG4/macros/ana.C rename to PWGGA/CaloTrackCorrelations/macros/ana.C diff --git a/PWG4/macros/anaM.C b/PWGGA/CaloTrackCorrelations/macros/anaM.C similarity index 100% rename from PWG4/macros/anaM.C rename to PWGGA/CaloTrackCorrelations/macros/anaM.C diff --git a/PWG4/macros/AddTaskCaloConv.C b/PWGGA/GammaConv/macros/AddTaskCaloConv.C similarity index 100% rename from PWG4/macros/AddTaskCaloConv.C rename to PWGGA/GammaConv/macros/AddTaskCaloConv.C diff --git a/PWG4/macros/AddTaskGammaConvDalitz.C b/PWGGA/GammaConv/macros/AddTaskGammaConvDalitz.C similarity index 100% rename from PWG4/macros/AddTaskGammaConvDalitz.C rename to PWGGA/GammaConv/macros/AddTaskGammaConvDalitz.C diff --git a/PWG4/macros/AddTaskGammaConversion.C b/PWGGA/GammaConv/macros/AddTaskGammaConversion.C similarity index 100% rename from PWG4/macros/AddTaskGammaConversion.C rename to PWGGA/GammaConv/macros/AddTaskGammaConversion.C diff --git a/PWG4/macros/ConfigGammaConversion.C b/PWGGA/GammaConv/macros/ConfigGammaConversion.C similarity index 100% rename from PWG4/macros/ConfigGammaConversion.C rename to PWGGA/GammaConv/macros/ConfigGammaConversion.C diff --git a/PWG4/macros/AddTaskomega3pi.C b/PWGGA/PHOSTasks/omega3pi/AddTaskomega3pi.C similarity index 100% rename from PWG4/macros/AddTaskomega3pi.C rename to PWGGA/PHOSTasks/omega3pi/AddTaskomega3pi.C