/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ //_________________________________________________________________________ // Class for Filling JetFinder Plots // -- //*-- Author: Mark Horner (LBL/UCT) // -- // -- #include "TMath.h" #include "AliEMCALJetFinderPlots.h" ClassImp(AliEMCALJetFinderPlots) AliEMCALJetFinderPlots::AliEMCALJetFinderPlots() { // Constructor to initialise variables fInitialised = kFALSE; fNominalEnergy = 0.0; fConeRadius = 0.3; fDebug = 0; fOutput=0; fhFragmFcn=0;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1); fhPartonFragmFcn=0;// = new TH1F("hPartonFragmFcn","Fragmentation Function",100,0,1); fhPartonJT=0;// = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.); fhPartonPL=0;// = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.); fhJetJT=0;// = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.); fhJetPL=0;// = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.); fhJetEt=0;// = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.); fhJetEta=0;// = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9); fhJetPhi=0;// = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1); fhPartonEta=0;// = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9); fhPartonPhi=0;// = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1); fhEtaDiff=0;// = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); fhPhiDiff=0;// = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); fhNJets=0;// = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5); fhEtaPhiSpread=0; fhFragmFcn2=0; // ("hFragmFcn2","Fragmentation Function",100,0,1); fhPartonFragmFcn2=0;// ("hFragmFcn2","Parton Fragmentation Function",100,0,1); fhPartonJT2=0; // ("hPartonJT2","Track Momentum Perpendicular to Parton Axis",100,0.,10.); fhPartonPL2=0; // ("hPartonPL2","Track Momentum Parallel to Parton Axis ",100,0.,100.); fhJetJT2=0; // ("hJetJT2","Track Momentum Perpendicular to Jet Axis",100,0.,10.); fhJetPL2=0; // ("hJetPL2","Track Momentum Parallel to Jet Axis ",100,0.,100.); fhJetEt2=0; // ("hJetEt2","E_{T}^{reco}",250,0.,250.); fhJetEta2=0; // ("hJetEta2","#eta_{jet}^{reco}",180,-0.9,0.9); fhJetPhi2=0; // ("hJetPhi2","#phi_{jet}^{reco}",62,0.,3.1); fhPartonEta2=0; // ("hPartonEta2","#eta_{Parton}",180,-0.9,0.9); fhPartonPhi2=0; // ("hPartonPhi2","#phi_{Parton}",62,0.,3.1); fhEtaDiff2=0; // ("hEtaDiff2","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); fhPhiDiff2=0; // ("hPhiDiff2","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); fhEtaPhiSpread2=0; // ("hEtaPhiSpread2","#eta - #phi Distribution //of Reconstructed Jets",192,-0.7,0.7,288,pi/3,pi); fhNJets2=0; // ("hNJets2","N Reconstructed jets",11,-0.5,10.5); fhJetEtSecond2=0; //("hJetEtSecond2","E_{T}^{reco}",250,0.,250.); fhJetEtRatio2=0; //("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1); fhEtaPhiDist2=0; //("hEtaPhiDist2","Angular Distance Between First and Second",100,0,3); } void AliEMCALJetFinderPlots::InitPlots() { //========================= CASE 1 ======================================= fhFragmFcn = new TH1F("hFragmFcn","Fragmentation Function",100,0,1); fhFragmFcn->Sumw2(); fhPartonFragmFcn = new TH1F("hPartonFragmFcn","Parton Fragmentation Function",100,0,1); fhPartonFragmFcn->Sumw2(); fhPartonJT = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.); fhPartonJT->Sumw2(); fhPartonPL = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.); fhPartonPL->Sumw2(); fhJetJT = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.); fhJetJT->Sumw2(); fhJetPL = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.); fhJetPL->Sumw2(); fhJetEt = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.); fhJetEt->Sumw2(); fhJetEta = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9); fhJetEta->Sumw2(); fhJetPhi = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1); fhJetPhi->Sumw2(); fhPartonEta = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9); fhPartonEta->Sumw2(); fhPartonPhi = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1); fhPartonPhi->Sumw2(); fhEtaDiff = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); fhEtaDiff->Sumw2(); fhPhiDiff = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); fhPhiDiff->Sumw2(); fhNJets = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5); fhNJets->Sumw2(); fhEtaPhiSpread = new TH2F("hEtaPhiSpread","#eta - #phi Distribution of Reconstructed Jets",100,-0.5,0.5,100,-0.5,0.5); fhEtaPhiSpread->Sumw2(); fhNJets->SetXTitle("N_{jets}^{reco}/event"); fhNJets->SetYTitle("N_{events}"); //Jet properties fhJetEt->SetFillColor(16); fhJetEt->SetXTitle("E_{T}^{reco}"); fhJetEta->SetFillColor(16); fhJetEta->SetXTitle("#eta_{jet}^{reco}"); fhJetPhi->SetFillColor(16); fhJetPhi->SetXTitle("#phi_{jet}^{reco}"); fhPartonEta->SetFillColor(16); fhPartonEta->SetXTitle("#eta_{parton}"); fhPartonPhi->SetFillColor(16); fhPartonPhi->SetXTitle("#phi_{parton}"); fhPartonPL->SetXTitle("p (GeV/c)"); fhPartonJT->SetXTitle("p (GeV/c)"); fhPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{parton}"); //Jet component properties fhJetPL->SetXTitle("p (GeV/c)"); fhJetJT->SetXTitle("p (GeV/c)"); fhFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{reco}"); fhPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{reco}"); fhEtaDiff->SetXTitle("#eta_{jet}^{reco}-#eta_{jet}^{input}"); fhPhiDiff->SetXTitle("#phi_{jet}^{reco}-#phi_{jet}^{input}"); fhEtaPhiSpread->SetXTitle("#eta"); fhEtaPhiSpread->SetYTitle("#phi"); //======================= CASE 2 ====================================== fhFragmFcn2 = new TH1F("hFragmFcn2","Fragmentation Function",100,0,1); fhFragmFcn2->Sumw2(); fhPartonFragmFcn2 = new TH1F("hPartonFragmFcn2","Parton Fragmentation Function",100,0,1); fhPartonFragmFcn2->Sumw2(); fhPartonJT2 = new TH1F("hPartonJT2","Track Momentum Perpendicular to Parton Axis",100,0.,10.); fhPartonJT2->Sumw2(); fhPartonPL2 = new TH1F("hPartonPL2","Track Momentum Parallel to Parton Axis ",100,0.,100.); fhPartonPL2->Sumw2(); fhJetJT2 = new TH1F("hJetJT2","Track Momentum Perpendicular to Jet Axis",100,0.,10.); fhJetJT2->Sumw2(); fhJetPL2 = new TH1F("hJetPL2","Track Momentum Parallel to Jet Axis ",100,0.,100.); fhJetPL2->Sumw2(); fhJetEt2 = new TH1F("hJetEt2","E_{T}^{reco}",250,0.,250.); fhJetEt2->Sumw2(); fhJetEta2 = new TH1F("hJetEta2","#eta_{jet}^{reco}",180,-0.9,0.9); fhJetEta2->Sumw2(); fhJetPhi2 = new TH1F("hJetPhi2","#phi_{jet}^{reco}",62,0.,3.1); fhJetPhi2->Sumw2(); fhPartonEta2 = new TH1F("hPartonEta2","#eta_{Parton}",180,-0.9,0.9); fhPartonEta2->Sumw2(); fhPartonPhi2 = new TH1F("hPartonPhi2","#phi_{Parton}",62,0.,3.1); fhPartonPhi2->Sumw2(); fhEtaDiff2 = new TH1F("hEtaDiff2","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); fhEtaDiff2->Sumw2(); fhPhiDiff2 = new TH1F("hPhiDiff2","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); fhPhiDiff2->Sumw2(); fhEtaPhiSpread2 = new TH2F("hEtaPhiSpread2","#eta - #phi Distribution of Reconstructed Jets",100,-0.5,0.5,100,-0.5,0.5); fhEtaPhiSpread2->Sumw2(); fhNJets2 = new TH1F("hNJets2","N Reconstructed jets",11,-0.5,10.5); fhNJets2->Sumw2(); fhJetEtSecond2 = new TH1F("hJetEtSecond2","E_{T}^{reco}",250,0.,250.); fhJetEtSecond2->Sumw2(); fhJetEtRatio2 = new TH1F("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1); fhJetEtRatio2->Sumw2(); fhEtaPhiDist2 = new TH1F("hEtaPhiDist2","Angular Distance Between First and Second",100,0,3); fhEtaPhiDist2->Sumw2(); fInitialised = kTRUE; } AliEMCALJetFinderPlots::~AliEMCALJetFinderPlots() { // To ensure that all requested memory is returned delete fhFragmFcn;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1); delete fhPartonFragmFcn;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1); delete fhPartonJT;// = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.); delete fhPartonPL;// = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.); delete fhJetJT;// = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.); delete fhJetPL;// = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.); delete fhJetEt;// = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.); delete fhJetEta;// = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9); delete fhJetPhi;// = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1); delete fhPartonEta;// = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9); delete fhPartonPhi;// = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1); delete fhEtaDiff;// = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); delete fhPhiDiff;// = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); delete fhNJets;// = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5); delete fhEtaPhiSpread; delete fhFragmFcn2; // ("hFragmFcn2","Fragmentation Function",100,0,1); delete fhPartonFragmFcn2;// ("hFragmFcn2","Parton Fragmentation Function",100,0,1); delete fhPartonJT2; // ("hPartonJT2","Track Momentum Perpendicular to Parton Axis",100,0.,10.); delete fhPartonPL2; // ("hPartonPL2","Track Momentum Parallel to Parton Axis ",100,0.,100.); delete fhJetJT2; // ("hJetJT2","Track Momentum Perpendicular to Jet Axis",100,0.,10.); delete fhJetPL2; // ("hJetPL2","Track Momentum Parallel to Jet Axis ",100,0.,100.); delete fhJetEt2; // ("hJetEt2","E_{T}^{reco}",250,0.,250.); delete fhJetEta2; // ("hJetEta2","#eta_{jet}^{reco}",180,-0.9,0.9); delete fhJetPhi2; // ("hJetPhi2","#phi_{jet}^{reco}",62,0.,3.1); delete fhPartonEta2; // ("hPartonEta2","#eta_{Parton}",180,-0.9,0.9); delete fhPartonPhi2; // ("hPartonPhi2","#phi_{Parton}",62,0.,3.1); delete fhEtaDiff2; // ("hEtaDiff2","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); delete fhPhiDiff2; // ("hPhiDiff2","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); delete fhEtaPhiSpread2; // ("hEtaPhiSpread2","#eta - #phi Distribution //of Reconstructed Jets",192,-0.7,0.7,288,pi/3,pi); delete fhNJets2; // ("hNJets2","N Reconstructed jets",11,-0.5,10.5); delete fhJetEtSecond2; //("hJetEtSecond2","E_{T}^{reco}",250,0.,250.); delete fhJetEtRatio2; //("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1); delete fhEtaPhiDist2; //("hEtaPhiDist2","Angular Distance Between First and Second",100,0,3); } void AliEMCALJetFinderPlots::FillFromOutput(AliEMCALJetFinderOutput* output) { // Fill histograms from an output object if (!fInitialised) InitPlots(); fOutput = output; if (!fOutput) return; fhNJets->Fill(fOutput->GetNJets()); if (fOutput->GetNJets()>1) { //========================= CASE 2 =========================== Int_t nPartons = fOutput->GetNPartons(); fhNJets2->Fill(fOutput->GetNJets()); AliEMCALParton* parton; AliEMCALJet* jethighest=0; AliEMCALJet* jetsecond=0; // Find Highest and Second Highest Jet for (Int_t counter = 0; counterGetNJets();counter++) { if (counter==0){ jethighest = fOutput->GetJet(0); jetsecond = fOutput->GetJet(1); } if (counter>0) { Float_t energyhighest = jethighest->Energy(); Float_t energysecond = jetsecond->Energy(); if ((fOutput->GetJet(counter))->Energy()>energyhighest) { jetsecond=jethighest; jethighest=fOutput->GetJet(counter); }else if ((fOutput->GetJet(counter))->Energy()>energysecond) { jetsecond=fOutput->GetJet(counter); } } } // End finding highest and second highest and continue fhJetEt2->Fill(jethighest->Energy()); fhJetEta2->Fill(jethighest->Eta() ); fhJetPhi2->Fill(jethighest->Phi() ); if (nPartons ==0) return; parton = fOutput->GetParton(0); fhPartonEta2->Fill( parton->Eta() ); fhPartonPhi2->Fill( parton->Phi() ); //hJetEtDiff->Fill( jet->Energy() - parton->Energy() ); fhEtaDiff2->Fill( jethighest->Eta() - parton->Eta() ); fhPhiDiff2->Fill( jethighest->Phi() - parton->Phi() ); fhEtaPhiSpread2->Fill(jethighest->Eta()-parton->Eta(),jethighest->Phi() - parton->Phi()); fhJetEtSecond2->Fill(jetsecond->Energy()); fhJetEtRatio2->Fill(jetsecond->Energy()/jethighest->Energy()); fhEtaPhiDist2->Fill( TMath::Sqrt((jethighest->Eta() - jetsecond->Eta())*(jethighest->Eta() - jetsecond->Eta()) + (jethighest->Phi() - jetsecond->Phi())*(jethighest->Phi() - jetsecond->Phi()) )); /* Float_t *pt,*phi,*eta; Int_t *pdg; pt = new Float_t[parton->GetNTracks()]; eta = new Float_t[parton->GetNTracks()]; phi = new Float_t[parton->GetNTracks()]; pdg = new Int_t[parton->GetNTracks()];*/ Float_t pt[2000]; Float_t eta[2000]; Float_t phi[2000]; Int_t pdg[2000]; parton->GetTrackList(pt,eta,phi,pdg); for(Int_t iT=0; iT< parton->GetNTracks() ; iT++ ) { if ( (eta[iT]-parton->Eta())*(eta[iT]-parton->Eta())+ (phi[iT]-parton->Phi())*(phi[iT]-parton->Phi()) >fConeRadius * fConeRadius ) continue; Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable Double_t rt = 2.0*atan(exp(-parton->Eta())); Double_t ctt = cos(tt); Double_t crt = cos(rt); Double_t stt = sin(tt); Double_t srt = sin(rt); Double_t ctp = cos(phi[iT]); Double_t crp = cos(parton->Phi()); Double_t stp = sin(phi[iT]); Double_t srp = sin(parton->Phi()); Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt); Double_t correctp = pt[iT]/stt; fhPartonPL2->Fill( correctp*cos(alpha)); if ( (parton->Eta()-eta[iT])*(parton->Eta()-eta[iT]) + (parton->Phi()-phi[iT])*(parton->Phi()-phi[iT]) < 0.2*0.2 ) fhPartonJT2->Fill( correctp*sin(alpha)); if (fNominalEnergy == 0.0) { fhPartonFragmFcn2->Fill( correctp*sin(tt)/parton->Energy() ); }else { fhPartonFragmFcn2->Fill(correctp*sin(tt)/fNominalEnergy); } }// loop over tracks /* pt = new Float_t[jet->NTracks()]; eta = new Float_t[jet->NTracks()]; phi = new Float_t[jet->NTracks()]; pdg = new Int_t[jet->NTracks()];*/ jethighest->TrackList(pt,eta,phi,pdg); for(Int_t iT=0; iT< jethighest->NTracks() ; iT++ ) { Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable Double_t rt = 2.0*atan(exp(-jethighest->Eta())); Double_t ctt = cos(tt); Double_t crt = cos(rt); Double_t stt = sin(tt); Double_t srt = sin(rt); Double_t ctp = cos(phi[iT]); Double_t crp = cos(jethighest->Phi()); Double_t stp = sin(phi[iT]); Double_t srp = sin(jethighest->Phi()); Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt); Double_t correctp = pt[iT]/stt; fhJetPL2->Fill( correctp*cos(alpha)); if ( (jethighest->Eta()-eta[iT])*(jethighest->Eta()-eta[iT]) + (jethighest->Phi()-phi[iT])*(jethighest->Phi()-phi[iT]) < 0.2*0.2 ) fhJetJT2->Fill( correctp*sin(alpha)); if (fNominalEnergy==0.0){ fhFragmFcn2->Fill( correctp*sin(tt)/parton->Energy() ); } else { fhFragmFcn2->Fill( correctp*sin(tt)/fNominalEnergy ); } }// loop over tracks } if (fOutput->GetNJets()==1) { //========================= CASE 1 =========================== Int_t nPartons = fOutput->GetNPartons(); if (fOutput->GetNJets()!=1) return; AliEMCALParton* parton; AliEMCALJet* jet; jet = fOutput->GetJet(0); fhJetEt->Fill(jet->Energy()); fhJetEta->Fill(jet->Eta() ); fhJetPhi->Fill(jet->Phi() ); if (nPartons ==0) return; parton = fOutput->GetParton(0); fhPartonEta->Fill( parton->Eta() ); fhPartonPhi->Fill( parton->Phi() ); //hJetEtDiff->Fill( jet->Energy() - parton->Energy() ); fhEtaDiff->Fill( jet->Eta() - parton->Eta() ); fhPhiDiff->Fill( jet->Phi() - parton->Phi() ); fhEtaPhiSpread->Fill(jet->Eta()-parton->Eta(),jet->Phi() - parton->Phi()); /* Float_t *pt,*phi,*eta; Int_t *pdg; pt = new Float_t[parton->GetNTracks()]; eta = new Float_t[parton->GetNTracks()]; phi = new Float_t[parton->GetNTracks()]; pdg = new Int_t[parton->GetNTracks()];*/ Float_t pt[2000]; Float_t eta[2000]; Float_t phi[2000]; Int_t pdg[2000]; parton->GetTrackList(pt,eta,phi,pdg); for(Int_t iT=0; iT< parton->GetNTracks() ; iT++ ) { if ( (eta[iT]-parton->Eta())*(eta[iT]-parton->Eta())+ (phi[iT]-parton->Phi())*(phi[iT]-parton->Phi()) >fConeRadius * fConeRadius ) continue; Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable Double_t rt = 2.0*atan(exp(-parton->Eta())); Double_t ctt = cos(tt); Double_t crt = cos(rt); Double_t stt = sin(tt); Double_t srt = sin(rt); Double_t ctp = cos(phi[iT]); Double_t crp = cos(parton->Phi()); Double_t stp = sin(phi[iT]); Double_t srp = sin(parton->Phi()); Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt); Double_t correctp = pt[iT]/stt; fhPartonPL->Fill( correctp*cos(alpha)); if ( (parton->Eta()-eta[iT])*(parton->Eta()-eta[iT]) + (parton->Phi()-phi[iT])*(parton->Phi()-phi[iT]) < 0.2*0.2 ) fhPartonJT->Fill( correctp*sin(alpha)); if (fNominalEnergy == 0.0) { fhPartonFragmFcn->Fill( correctp*sin(tt)/parton->Energy() ); }else { fhPartonFragmFcn->Fill(correctp*sin(tt)/fNominalEnergy); } }// loop over tracks /* pt = new Float_t[jet->NTracks()]; eta = new Float_t[jet->NTracks()]; phi = new Float_t[jet->NTracks()]; pdg = new Int_t[jet->NTracks()];*/ jet->TrackList(pt,eta,phi,pdg); for(Int_t iT=0; iT< jet->NTracks() ; iT++ ) { Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable Double_t rt = 2.0*atan(exp(-jet->Eta())); Double_t ctt = cos(tt); Double_t crt = cos(rt); Double_t stt = sin(tt); Double_t srt = sin(rt); Double_t ctp = cos(phi[iT]); Double_t crp = cos(jet->Phi()); Double_t stp = sin(phi[iT]); Double_t srp = sin(jet->Phi()); Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt); Double_t correctp = pt[iT]/stt; fhJetPL->Fill( correctp*cos(alpha)); if ( (jet->Eta()-eta[iT])*(jet->Eta()-eta[iT]) + (jet->Phi()-phi[iT])*(jet->Phi()-phi[iT]) < 0.2*0.2 ) fhJetJT->Fill( correctp*sin(alpha)); if (fNominalEnergy==0.0){ fhFragmFcn->Fill( correctp*sin(tt)/parton->Energy() ); } else { fhFragmFcn->Fill( correctp*sin(tt)/fNominalEnergy ); } }// loop over tracks } }