fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), fRatioMaxCut(0.), fRatioMinCut(0.),
fConeSize(0.), fPtThresholdInCone(0.),fUseJetRefTracks(kTRUE),
fMakeCorrelationInHistoMaker(kFALSE), fSelectIsolated(kTRUE),
- fJetConeSize(0.4),fJetMinPt(5),fJetAreaFraction(0.6),
+ fJetConeSize(0.4),fJetMinPt(5),fJetMinPtBkgSub(-100.),fJetAreaFraction(0.6),
//fNonStandardJetFromReader(kTRUE),
fJetBranchName("jets"),
fBackgroundJetFromReader(kTRUE),
fhDeltaEta(0), /*fhDeltaPhi(0),*/fhDeltaPhiCorrect(0),fhDeltaPhi0PiCorrect(0), fhDeltaPt(0), fhPtRatio(0), fhPt(0),
fhFFz(0),fhFFxi(0),fhFFpt(0),fhNTracksInCone(0),
fhJetFFz(0),fhJetFFxi(0),fhJetFFpt(0),fhJetFFzCor(0),fhJetFFxiCor(0),
- fhBkgFFz(),fhBkgFFxi(),fhBkgFFpt(),fhBkgNTracksInCone(),fhBkgSumPtInCone(),fhBkgSumPtnTracksInCone(),//<<---new
+ fhGamPtPerTrig(0),fhPtGamPtJet(0),
+ fhBkgFFz(),fhBkgFFxi(),fhBkgFFpt(),fhBkgNTracksInCone(),fhBkgSumPtInCone(),fhBkgSumPtnTracksInCone(),
fhNjetsNgammas(0),fhCuts(0),
fhDeltaEtaBefore(0),fhDeltaPhiBefore(0),fhDeltaPtBefore(0),fhPtRatioBefore(0),
fhPtBefore(0),fhDeltaPhi0PiCorrectBefore(0),
- fhJetPtBefore(0),fhJetPt(0),fhJetPtMostEne(0),fhJetPhi(0),fhJetEta(0),fhJetEtaVsPt(0),
+ fhJetPtBefore(0),fhJetPtBeforeCut(0),fhJetPt(0),fhJetPtMostEne(0),fhJetPhi(0),fhJetEta(0),fhJetEtaVsPt(0),
fhJetPhiVsEta(0),fhJetEtaVsNpartInJet(0),fhJetEtaVsNpartInJetBkg(0),fhJetChBkgEnergyVsPt(0),fhJetChAreaVsPt(0),/*fhJetNjet(0),*/
fhTrackPhiVsEta(0),fhTrackAveTrackPt(0),fhJetNjetOverPtCut(),
/*fhJetChBkgEnergyVsPtEtaGt05(0),fhJetChBkgEnergyVsPtEtaLe05(0),fhJetChAreaVsPtEtaGt05(0),fhJetChAreaVsPtEtaLe05(0),*/
fhJetFFxiCor->SetXTitle("p_{T jet}");
outputContainer->Add(fhJetFFxiCor) ;
+ fhGamPtPerTrig = new TH1F("GamPtPerTrig","GamPtPerTrig", nptbins,ptmin,ptmax);
+ fhGamPtPerTrig->SetYTitle("Counts");
+ fhGamPtPerTrig->SetXTitle("p_{T, #gamma}");
+ outputContainer->Add(fhGamPtPerTrig) ;
+
+ fhPtGamPtJet = new TH2F("PtGamPtJet","p_{T #gamma} vs p_{T jet}", nptbins,ptmin,ptmax,150,-50.,100.);
+ fhPtGamPtJet->SetXTitle("p_{T #gamma}");
+ fhPtGamPtJet->SetYTitle("p_{T jet}");
+ outputContainer->Add(fhPtGamPtJet) ;
+
//background FF
fhBkgFFz[0] = new TH2F("BkgFFzRC", "z = p_{T i charged}/p_{T trigger} vs p_{T trigger} Bkg RC" ,nptbins,ptmin,ptmax,200,0.,2);
fhJetPtBefore->SetXTitle("p_{T jet}(GeV/c)");
outputContainer->Add(fhJetPtBefore) ;
+ fhJetPtBeforeCut = new TH1F("JetPtBeforeCut","JetPtBeforeCut",150,-50,100);
+ fhJetPtBeforeCut->SetYTitle("Counts");
+ fhJetPtBeforeCut->SetXTitle("p_{T jet}(GeV/c)");
+ outputContainer->Add(fhJetPtBeforeCut) ;
+
fhJetPt = new TH1F("JetPt","JetPt",150,-50,100);
fhJetPt->SetYTitle("Counts");
fhJetPt->SetXTitle("p_{T jet}(GeV/c)");
fSelectIsolated = kTRUE;
fJetConeSize = 0.4 ;
fJetMinPt = 15. ; //GeV/c
+ fJetMinPtBkgSub = -100. ;//GeV/c
fJetAreaFraction = 0.6 ;
fJetBranchName = "jets";
fBkgJetBranchName = "jets";
Double_t particlePt=particle->Pt();
if(fUseBackgroundSubtractionGamma) {
- Int_t clusterIDtmp = particle->GetCaloLabel(0) ;
- Int_t nCells=0;
- AliVCluster *cluster=0;
- if(!(clusterIDtmp<0) ){
- Int_t iclustmp = -1;
- TObjArray* clusters = GetEMCALClusters();
- cluster = FindCluster(clusters,clusterIDtmp,iclustmp);
- nCells = cluster->GetNCells();
- }
- particlePt-=(fGamRho*nCells);
+ particlePt-=(fGamRho*particle->GetNCells());
+
+// Int_t clusterIDtmp = particle->GetCaloLabel(0) ;
+// Int_t nCells=0;
+// AliVCluster *cluster=0;
+// if(!(clusterIDtmp<0) ){
+// Int_t iclustmp = -1;
+// TObjArray* clusters = GetEMCALClusters();
+// cluster = FindCluster(clusters,clusterIDtmp,iclustmp);
+// nCells = cluster->GetNCells();
+// }
+// particlePt-=(fGamRho*nCells);
}
if(particlePt<=0) {
//printf("Particle with negative or 0 pt\n");
Double_t deltaPhi=-10000.;// in the range (0; 2*pi)
Double_t jetPt=0.;
+ Bool_t photonOnlyOnce=kTRUE;
+
for(Int_t ijet = 0; ijet < njets ; ijet++){
jet = dynamic_cast<AliAODJet*>(aodRecJets->At(ijet));
if(!jet)
jetPt=jet->Pt();
if(jetPt<fJetMinPt) continue;
fhCuts2->Fill(3.,1.);
- if(fBackgroundJetFromReader ){
- jetPt-= (fJetRho * jet->EffectiveAreaCharged() );
- }
- if(jetPt<0.) continue;
//put jet eta requirement here |eta_jet|<0.9-jet_cone_size
- fhCuts2->Fill(4.,1.);
if(TMath::Abs(jet->Eta()) > (0.9 - fJetConeSize) ) continue;
- fhCuts2->Fill(5.,1.);
+ fhCuts2->Fill(4.,1.);
if(jet->EffectiveAreaCharged()<fJetAreaFraction*TMath::Pi()*fJetConeSize*fJetConeSize) continue;
+ fhCuts2->Fill(5.,1.);
+ if(fBackgroundJetFromReader ){
+ jetPt-= (fJetRho * jet->EffectiveAreaCharged() );
+ }
+
+ if(jetPt<fJetMinPtBkgSub) continue;
fhCuts2->Fill(6.,1.);
//printf("jet found\n");
Double_t deltaPhi0pi = TMath::Abs(particle->Phi()-jet->Phi());
if ( deltaPhi0pi > TMath::Pi() ) deltaPhi0pi = 2. * TMath::Pi() - deltaPhi0pi ;
if(deltaPhi<0) deltaPhi +=(TMath::Pi()*2.);
+ //new histogram for Leticia x-check
+ //isolated photon + jet(s)
+ if(OnlyIsolated() && !particle->IsIsolated() &&
+ (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) ){
+ //fill 1D photon + 2D photon+jets
+ if(photonOnlyOnce) {
+ fhGamPtPerTrig->Fill(particlePt);
+ photonOnlyOnce=kFALSE;
+ }
+ fhPtGamPtJet->Fill(particlePt,jetPt);
+ }
+
+
fhDeltaPtBefore ->Fill(particlePt, particlePt - jetPt);
fhDeltaPhiBefore->Fill(particlePt, deltaPhi);
fhDeltaEtaBefore->Fill(particlePt, particle->Eta() - jet->Eta());
fhDeltaPhi0PiCorrectBefore->Fill(particlePt, deltaPhi0pi);//good
- if(GetDebug() > 5)
- printf("AliAnaParticleJetFinderCorrelation::SelectJet() - Jet %d, Ratio pT %2.3f, Delta phi %2.3f\n",ijet,ratio,deltaPhi);
+ AliDebug(5,Form("Jet %d, Ratio pT %2.3f, Delta phi %2.3f",ijet,ratio,deltaPhi));
if((deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) &&
(ratio > fRatioMinCut) && (ratio < fRatioMaxCut) &&
}
else
{
- if(GetDebug() > 3) AliInfo("There are no jets available for this analysis");
+ AliDebug(1,"There are no jets available for this analysis");
return;
}
Int_t nJets=-1;
TClonesArray *aodRecJets = 0;
//if(IsNonStandardJetFromReader()){//jet branch from reader
- if(GetDebug() > 3) AliInfo(Form("GetNonStandardJets function (from reader) is called"));
+ AliDebug(3,Form("GetNonStandardJets function (from reader) is called"));
aodRecJets = GetNonStandardJets();
- if(GetDebug() > 3) AliInfo(Form("aodRecJets %p",aodRecJets));
+ AliDebug(3,Form("aodRecJets %p",aodRecJets));
if(aodRecJets==0x0)
{
if(GetDebug() > 3) event->Print();
return;
}
nJets=aodRecJets->GetEntries();
- if(GetDebug() > 3) printf("nJets %d\n",nJets);
+ AliDebug(3,Form("nJets %d",nJets));
//}
//end of new part
//
AliAODJetEventBackground* aodBkgJets = 0;
if(IsBackgroundJetFromReader()){//jet branch from reader
- if(GetDebug() > 3) printf("GetBackgroundJets function is called\n");
+ AliDebug(3,"GetBackgroundJets function is called");
aodBkgJets = GetBackgroundJets();
- if(GetDebug() > 3) printf("aodBkgJets %p\n",aodBkgJets);
+ AliDebug(3,Form("aodBkgJets %p",aodBkgJets));
if(aodBkgJets==0x0){
if(GetDebug() > 3) event->Print();
AliFatal("No jet background found\n");
Int_t ntrig = GetInputAODBranch()->GetEntriesFast() ;
- if(GetDebug() > 3){
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() - Begin jet finder correlation analysis, fill AODs \n");
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", ntrig);
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() - In standard jet branch aod entries %d\n", event->GetNJets());
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() - In non standard jet branch aod entries %d\n", nJets);
- }
+
+ AliDebug(3,"Begin jet finder correlation analysis, fill AODs");
+ AliDebug(3,Form("In particle branch aod entries %d\n", ntrig));
+ AliDebug(3,Form("In standard jet branch aod entries %d\n", event->GetNJets()));
+ AliDebug(3,Form("In non standard jet branch aod entries %d\n", nJets));
//if(nJets==0) return;//to speed up
// cout<<"ntrig po return "<<ntrig<<endl;
//calculate average cell energy without most energetic photon
//
Double_t medianPhotonRho=0.;
- TObjArray* clusters = GetEMCALClusters();
- Int_t clusterIDtmp;
- Int_t iclustmp = -1;
- AliVCluster *cluster=0;
+ //TObjArray* clusters = GetEMCALClusters();
+ //Int_t clusterIDtmp;
+ //Int_t iclustmp = -1;
+ //AliVCluster *cluster=0;
if(IsBackgroundSubtractionGamma()){
//
for(Int_t iaod = 0; iaod < ntrig ; iaod++){
particlecorr = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
if(iaod==maxIndex) continue;
- clusterIDtmp = particlecorr->GetCaloLabel(0) ;
- if(clusterIDtmp < 0) continue;
- cluster = FindCluster(clusters,clusterIDtmp,iclustmp);
- photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells();
- numberOfcells+=cluster->GetNCells();
+// clusterIDtmp = particlecorr->GetCaloLabel(0) ;
+// if(clusterIDtmp < 0) continue;
+// cluster = FindCluster(clusters,clusterIDtmp,iclustmp);
+// photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells();
+// numberOfcells+=cluster->GetNCells();
+ photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ particlecorr->GetNCells();
+ numberOfcells+=particlecorr->GetNCells();
+
photonRhoArrayIndex++;
}
if(photonRhoArrayIndex>0) medianPhotonRho=TMath::Median(photonRhoArrayIndex,photonRhoArr);
Int_t indexMostEnePhoton=-1;
AliAODPWG4ParticleCorrelation* particle =0;
Double_t ptCorrect=0.;
- Int_t nCells=0;
+// Int_t nCells=0;
for(Int_t iaod = 0; iaod < ntrig ; iaod++){
particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
- clusterIDtmp = particle->GetCaloLabel(0) ;
- if(!(clusterIDtmp<0)){
- cluster = FindCluster(clusters,clusterIDtmp,iclustmp);
- nCells = cluster->GetNCells();
- }
- ptCorrect = particle->Pt() - medianPhotonRho * nCells;
+// clusterIDtmp = particle->GetCaloLabel(0) ;
+// if(!(clusterIDtmp<0)){
+// cluster = FindCluster(clusters,clusterIDtmp,iclustmp);
+// nCells = cluster->GetNCells();
+// }
+// ptCorrect = particle->Pt() - medianPhotonRho * nCells;
+ ptCorrect = particle->Pt() - medianPhotonRho * particle->GetNCells();
+
if( ptCorrect > mostEnePhotonPt ){
mostEnePhotonPt = ptCorrect;
indexMostEnePhoton = iaod ;
Int_t ijet = SelectJet(particle,aodRecJets);//input for jets is TClonesArray
if(ijet > -1){
//isJetFound=kTRUE;
- if(GetDebug() > 2) printf ("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() - Jet with index %d selected \n",ijet);
+ AliDebug(2,Form("Jet with index %d selected",ijet));
AliAODJet *jet = dynamic_cast<AliAODJet*>(aodRecJets-> At(ijet));
if(jet)particle->SetRefJet(jet);
//printf("Most opposite found\n");
// if(GetReader()->WriteDeltaAODToFile() && isJetFound) WriteJetsToOutputBranch(aodRecJets);
}//end of take most opposite photon and jet after bkg subtraction
-
- if(GetDebug() > 1 ) printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
+ AliDebug(1," End fill AODs \n");
}
//__________________________________________________________________
void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms()
{
//Particle-Jet Correlation Analysis, fill histograms
- if(GetDebug() > 3 ) {
- printf("I use MakeAnalysisFillHistograms\n");
- printf("ntracks before iso %d\n",GetCTSTracks()->GetEntriesFast() );
- }
+
+ AliDebug(3,"I use MakeAnalysisFillHistograms");
+ AliDebug(3,Form("ntracks before iso %d\n",GetCTSTracks()->GetEntriesFast()));
+
//Get the event, check if there are AODs available, if not, skip this analysis
AliAODEvent * event = NULL;
{
event = dynamic_cast<AliAODEvent*>(GetReader()->GetInputEvent());
}
- else {
- if(GetDebug() > 3) printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() - There are no jets available for this analysis\n");
+ else
+ {
+ AliDebug(3,"There are no jets available for this analysis");
return;
}
- if(!GetInputAODBranch() || !event){
-
- AliFatal(Form("No input particles in AOD with name branch < %s > \n",
+ if(!GetInputAODBranch() || !event)
+ {
+ AliFatal(Form("No input particles in AOD with name branch < %s >",
GetInputAODName().Data()));
return; // Trick coverity
}
Int_t nJets=-1;
TClonesArray *aodRecJets = 0;
//if(IsNonStandardJetFromReader()){//branch read in reader from reader
- if (GetDebug() > 3) printf("GetNonStandardJets function (from reader) is called\n");
+ AliDebug(3,"GetNonStandardJets function (from reader) is called");
aodRecJets = GetNonStandardJets();
- if(aodRecJets==0x0){
+ if(aodRecJets==0x0)
+ {
if(GetDebug() > 3) event->Print();
AliFatal("Jets container not found\n");
return; // trick coverity
}
nJets=aodRecJets->GetEntries();
//}
- if(nJets==0) {
+ if(nJets==0)
+ {
// printf("Why number of jets = 0? Check what type of collision it is. If PbPb -problem.\n");
GetReader()->FillInputNonStandardJets();
aodRecJets = GetNonStandardJets();
//
AliAODJetEventBackground* aodBkgJets = 0;
if(IsBackgroundJetFromReader()){//jet branch from reader
- if(GetDebug() > 3) printf("GetBackgroundJets function is called\n");
+ AliDebug(3,"GetBackgroundJets function is called");
aodBkgJets = GetBackgroundJets();
- if(GetDebug() > 3) printf("aodBkgJets %p\n",aodBkgJets);
- if(aodBkgJets==0x0){
+ AliDebug(3,Form("aodBkgJets %p",aodBkgJets));
+ if(aodBkgJets==0x0)
+ {
if(GetDebug() > 3) event->Print();
AliFatal("No jet background container found");
return; // trick coverity
if(GetDebug() > 3) aodBkgJets->Print("c");
}
-
//
// only background jets informations
//
ptMostEne = jetPttmp;
//indexMostEne=ijet;
}
+ if(jettmp->Pt()>=fJetMinPt)
+ fhJetPtBeforeCut->Fill(jetPttmp);
+
fhJetPt->Fill(jetPttmp);
fhJetChBkgEnergyVsPt->Fill(jetPttmp,effectiveChargedBgEnergy);
fhJetChAreaVsPt->Fill(jetPttmp,jettmp->EffectiveAreaCharged());
- if(GetDebug()>5) printf("ChargedBgEnergy %f EffectiveAreaCharged %f\n", jettmp->ChargedBgEnergy(),jettmp->EffectiveAreaCharged());
- for(iCounter=1;iCounter<10;iCounter++){
+ AliDebug(5,Form("ChargedBgEnergy %f EffectiveAreaCharged %f\n", jettmp->ChargedBgEnergy(),jettmp->EffectiveAreaCharged()));
+ for(iCounter=1;iCounter<10;iCounter++)
+ {
if(jetPttmp>iCounter) nJetsOverThreshold[iCounter]++;
}
// Photons
//
Int_t ntrig = GetInputAODBranch()->GetEntriesFast() ;
- if(GetDebug() > 1){
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() - Begin jet finder correlation analysis, fill histograms \n");
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", ntrig);
- printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() - In jet output branch aod entries %d\n", event->GetNJets());
- }
+
+ AliDebug(1,"Begin jet finder correlation analysis, fill histograms");
+ AliDebug(1,Form("In particle branch aod entries %d\n", ntrig));
+ AliDebug(1,Form("In jet output branch aod entries %d\n", event->GetNJets()));
+
fhNjetsNgammas->Fill(nJets,ntrig);
//if(nJets==0) return;//to speed up
}
fGamAvEne=0;
- TObjArray* clusters = GetEMCALClusters();
+ //TObjArray* clusters = GetEMCALClusters();
//printf("calculate median bkg energy for photons ");
Double_t medianPhotonRho=0.;
- Int_t clusterID;
- Int_t iclustmp = -1;
+ //Int_t clusterID;
+ //Int_t iclustmp = -1;
Int_t numberOfcells=0;
- AliVCluster *cluster = 0;
+ //AliVCluster *cluster = 0;
if(ntrig>1){
Double_t *photonRhoArr=new Double_t[ntrig-1];
fhPhotonPtMostEne->Fill(maxPt);
if( particlecorr->Pt() > (sumPt-maxPt)/(ntrig-1) ) counterGammaMinus1++;
if(iaod==maxIndex) continue;
- clusterID = particlecorr->GetCaloLabel(0) ;
- if(clusterID < 0) continue;
- cluster = FindCluster(clusters,clusterID,iclustmp);
- photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells();
- numberOfcells+=cluster->GetNCells();
+// clusterID = particlecorr->GetCaloLabel(0) ;
+// if(clusterID < 0) continue;
+// cluster = FindCluster(clusters,clusterID,iclustmp);
+// photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells();
+// numberOfcells+=cluster->GetNCells();
+ photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ particlecorr->GetNCells();
+ numberOfcells+=particlecorr->GetNCells();
photonRhoArrayIndex++;
}
if(photonRhoArrayIndex>0) medianPhotonRho=TMath::Median(photonRhoArrayIndex,photonRhoArr);
fhPhotonBkgRhoVsNcells->Fill(numberOfcells,medianPhotonRho);
- AliVCluster *cluster2 = 0;
+ //AliVCluster *cluster2 = 0;
Double_t photon2Corrected=0;
Double_t sumPtTmp=0.;
Double_t sumPtCorrectTmp=0.;
for(Int_t iaod = 0; iaod < ntrig ; iaod++){
AliAODPWG4ParticleCorrelation* particlecorr = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
- clusterID = particlecorr->GetCaloLabel(0) ;
- if(clusterID < 0) continue;
- cluster = FindCluster(clusters,clusterID,iclustmp);
+// clusterID = particlecorr->GetCaloLabel(0) ;
+// if(clusterID < 0) continue;
+// cluster = FindCluster(clusters,clusterID,iclustmp);
+// Int_t ncells = cluster->GetNCells();
+ Int_t ncells = particlecorr->GetNCells();
fhPhotonPt->Fill(particlecorr->Pt());
- fhPhotonPtCorrected->Fill(particlecorr->Pt() - cluster->GetNCells() * medianPhotonRho);
- fhPhotonPtDiff->Fill(cluster->GetNCells() * medianPhotonRho);
- fhPhotonPtDiffVsCentrality->Fill(GetEventCentrality(),cluster->GetNCells() * medianPhotonRho);
- fhPhotonPtDiffVsNcells->Fill(numberOfcells,cluster->GetNCells() * medianPhotonRho);
- fhPhotonPtDiffVsNtracks->Fill(GetCTSTracks()->GetEntriesFast(),cluster->GetNCells() * medianPhotonRho);
- fhPhotonPtDiffVsNclusters->Fill(ntrig,cluster->GetNCells() * medianPhotonRho);
-
- fhPhotonPtCorrectedZoom->Fill(particlecorr->Pt() - cluster->GetNCells() * medianPhotonRho);
+ fhPhotonPtCorrected->Fill(particlecorr->Pt() - ncells * medianPhotonRho);
+ fhPhotonPtDiff->Fill(ncells * medianPhotonRho);
+ fhPhotonPtDiffVsCentrality->Fill(GetEventCentrality(),ncells * medianPhotonRho);
+ fhPhotonPtDiffVsNcells->Fill(numberOfcells,ncells * medianPhotonRho);
+ fhPhotonPtDiffVsNtracks->Fill(GetCTSTracks()->GetEntriesFast(),ncells * medianPhotonRho);
+ fhPhotonPtDiffVsNclusters->Fill(ntrig,ncells * medianPhotonRho);
+ fhPhotonPtCorrectedZoom->Fill(particlecorr->Pt() - ncells * medianPhotonRho);
//test: sum_pt in the cone 0.3 for each photon
//should be: random fake gamma from MB
for(Int_t iaod2 = 0; iaod2 < ntrig ; iaod2++){
if(iaod==iaod2) continue;
AliAODPWG4ParticleCorrelation* particlecorr2 = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod2));
- clusterID = particlecorr2->GetCaloLabel(0) ;
- if(clusterID < 0) continue;
- cluster2 = FindCluster(clusters,clusterID,iclustmp);
- photon2Corrected = particlecorr2->Pt() - cluster2->GetNCells() * medianPhotonRho;
-
+// clusterID = particlecorr2->GetCaloLabel(0) ;
+// if(clusterID < 0) continue;
+// cluster2 = FindCluster(clusters,clusterID,iclustmp);
+// photon2Corrected = particlecorr2->Pt() - cluster2->GetNCells() * medianPhotonRho;
+ photon2Corrected = particlecorr2->Pt() - particlecorr2->GetNCells() * medianPhotonRho;
+
//if(Pt()<0.5) continue; //<<hardcoded here //FIXME
if( TMath::Sqrt((particlecorr->Eta()-particlecorr2->Eta())*(particlecorr->Eta()-particlecorr2->Eta()) +
(particlecorr->Phi()-particlecorr2->Phi())*(particlecorr->Phi()-particlecorr2->Phi()) )<fGammaConeSize ){//if(/*cone is correct*/){
AliAODPWG4ParticleCorrelation* particlecorr = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
fhCuts->Fill(0);
fhCuts2->Fill(0.,(Double_t)nJets);
- if(GetDebug() > 5) printf("OnlyIsolated %d !particlecorr->IsIsolated() %d \n",OnlyIsolated(), !particlecorr->IsIsolated());
+ AliDebug(1,Form("OnlyIsolated %d !particlecorr->IsIsolated() %d \n",OnlyIsolated(), !particlecorr->IsIsolated()));
if(OnlyIsolated() && !particlecorr->IsIsolated()) continue;
fhCuts->Fill(1);
if(fMakeCorrelationInHistoMaker){
//Correlate with jets
Int_t ijet = SelectJet(particlecorr,aodRecJets);//input for jets is TClonesArray
- if(ijet > -1){
- if(GetDebug() > 2) printf ("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() - Jet with index %d selected \n",ijet);
+ if(ijet > -1)
+ {
+ AliDebug(1,Form("Jet with index %d selected \n",ijet));
//jet = event->GetJet(ijet);
jet = dynamic_cast<AliAODJet*>(aodRecJets-> At(ijet));
//
//Fill Correlation Histograms
//
- clusterID = particlecorr->GetCaloLabel(0) ;
- if(!(clusterID<0)){
- cluster = FindCluster(clusters,clusterID,iclustmp);
- //fill tree variables
- fGamNcells = cluster->GetNCells();
- }
+// clusterID = particlecorr->GetCaloLabel(0) ;
+// if(!(clusterID<0)){
+// cluster = FindCluster(clusters,clusterID,iclustmp);
+// //fill tree variables
+// fGamNcells = cluster->GetNCells();
+// }
+
+ fGamNcells = particlecorr->GetNCells();
+
Double_t ptTrig = particlecorr->Pt() - medianPhotonRho * fGamNcells;//<<---changed here
Double_t ptJet = jet->Pt() - rhoEvent * jet->EffectiveAreaCharged();//<<---changed here
Double_t phiTrig = particlecorr->Phi();
fhSelectedNtracks->Fill(GetCTSTracks()->GetEntriesFast());//to be checked
fhSelectedPhotonNLMVsPt->Fill(ptTrig,particlecorr->GetNLM());
-
- if(clusterID < 0 ){
- fhSelectedPhotonLambda0VsPt->Fill(ptTrig,-1);
- //fill tree variables
- fGamLambda0 = -1;
- fGamTime = -1;
- fGamNcells = 0;
- fGamSumPtNeu=0;
- }
- else{
+// if(clusterID < 0 ){
+// fhSelectedPhotonLambda0VsPt->Fill(ptTrig,-1);
+// //fill tree variables
+// fGamLambda0 = -1;
+// fGamTime = -1;
+// fGamNcells = 0;
+// fGamSumPtNeu=0;
+// }
+// else
+// {
//Int_t iclus = -1;
- // TObjArray* clusters = GetEMCALClusters();
+ TObjArray* clusters = GetEMCALClusters();
//cluster = FindCluster(clusters,clusterID,iclustmp);
- Double_t lambda0=cluster->GetM02();
+ Double_t lambda0=particlecorr->GetM02();
fhSelectedPhotonLambda0VsPt->Fill(ptTrig,lambda0);
//fill tree variables
fGamLambda0 = lambda0;
- fGamTime = cluster->GetTOF();
+ fGamTime = particlecorr->GetTime();
//fGamNcells = cluster->GetNCells();
fGamSumPtNeu=0;
//Double_t vectorLength=particlecorr->P();
for(Int_t icalo=0; icalo <clusters->GetEntriesFast(); icalo++){
AliVCluster* calo = (AliVCluster *) clusters->At(icalo);
- if(clusterID==calo->GetID()) continue;//the same cluster as trigger
+ //if(clusterID==calo->GetID()) continue;//the same cluster as trigger
calo->GetMomentum(fMomentum,vertex) ;//Assume that come from vertex in straight line
//printf("min pt %f\n",GetMinPt());
if(fMomentum.Pt()<GetMinPt()) continue; //<<hardcoded here //FIXME 0.5 check if correct
fGamNclusters++;
}
}
- }
+// }
//sum pt of charged tracks in the gamma isolation cone
//starts here
TVector3 p3;
Int_t ntracks = 0;
- if(GetDebug()>3){
- printf ("fUseJetRefTracks %d\n",fUseJetRefTracks );
- printf ("jet->GetRefTracks() %p\n",jet->GetRefTracks());
- printf ("GetCTSTracks() %p\n",GetCTSTracks() );
- }
+
+ AliDebug(1,Form("fUseJetRefTracks %d" ,fUseJetRefTracks ));
+ AliDebug(1,Form("jet->GetRefTracks() %p",jet->GetRefTracks()));
+ AliDebug(1,Form("GetCTSTracks() %p" ,GetCTSTracks() ));
if(!fUseJetRefTracks)
ntracks =GetCTSTracks()->GetEntriesFast();
else //If you want to use jet tracks from JETAN
ntracks = (jet->GetRefTracks())->GetEntriesFast();
- if(GetDebug()>3) printf ("ntracks %d\n",ntracks);
+ AliDebug(3,Form("ntracks %d\n",ntracks));
AliVTrack* track = 0x0 ;
for(Int_t ipr = 0;ipr < ntracks ; ipr ++ ){
if(!fUseJetRefTracks)
if(fSaveGJTree) fTreeGJ->Fill();
}//AOD trigger particle loop
- if(GetDebug() > 1) printf("AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
+ AliDebug(1,"End fill histograms");
}
printf("Isolated Trigger? %d\n", fSelectIsolated) ;
printf("Reconstructed jet cone size = %3.2f\n", fJetConeSize) ;
printf("Reconstructed jet minimum pt before background subtraction = %3.2f\n", fJetMinPt) ;
+ printf("Reconstructed jet minimum pt after background subtraction = %3.2f\n", fJetMinPtBkgSub) ;
printf("Reconstructed jet minimum area fraction = %3.2f\n", fJetAreaFraction) ;
//if(!fNonStandardJetFromReader){
Double_t Yz=jx*Xy-jy*Xx;
//Determinant
Double_t det = Xx*Yy*jz + Xy*Yz*jx + Xz*Yx*jy - Xx*Yz*jy - Xy*Yx*jz - Xz*Yy*jx;
- if(det==0)printf("problem det==0\n");
+ if(det==0)AliWarning("problem det==0\n");
Double_t detX = 0.;
Double_t detY = 0.;
Double_t detZ = 0.;
Double_t Yz=jx*Xy-jy*Xx;
//Determinant
Double_t det = Xx*Yy*jz + Xy*Yz*jx + Xz*Yx*jy - Xx*Yz*jy - Xy*Yx*jz - Xz*Yy*jx;
- if(det==0)printf("problem det==0\n");
+ if(det==0)AliWarning("problem det==0");
Double_t detX = 0.;
Double_t detY = 0.;
Double_t detZ = 0.;
std::vector<Int_t> jetParticleIndex;
if(GetReader()->ReadStack()) {//ESD
- if(GetDebug()>3) printf("I use stack\n");
+ AliDebug(3,"I use stack");
}//end Stack
else if(GetReader()->ReadAODMCParticles()) {//AOD
TClonesArray * mcparticles = GetReader()->GetAODMCParticles();
//index =6 and 7 is hard scattering (jet-quark or photon)
primTmp = (AliAODMCParticle *) mcparticles->At(6);
pdg=primTmp->GetPdgCode();
- if(GetDebug()>3) printf("id 6 pdg %d, pt %f ",pdg,primTmp->Pt() );
+ AliDebug(3,Form("id 6 pdg %d, pt %f ",pdg,primTmp->Pt() ));
if(TMath::Abs(pdg)<=6 ||pdg==21) {
fhMCJetOrigin->Fill(pdg);
fMCPartonType=pdg;
}
primTmp = (AliAODMCParticle *) mcparticles->At(7);
pdg=primTmp->GetPdgCode();
- if(GetDebug()>3) printf("id 7 pdg %d, pt %f\n",pdg,primTmp->Pt() );
+ AliDebug(3,Form("id 7 pdg %d, pt %f",pdg,primTmp->Pt() ));
if(TMath::Abs(pdg)<=6 ||pdg==21) {
fhMCJetOrigin->Fill(pdg);
fMCPartonType=pdg;
fhMCPhotonCuts->Fill(0);
if(prim->GetStatus()!=1) continue;
fhMCPhotonCuts->Fill(1);
- if(GetDebug()>5) printf("id %d, prim %d, physPrim %d, status %d\n",i,prim->IsPrimary(),prim->IsPhysicalPrimary(),prim->GetStatus());
+ AliDebug(5,Form("id %d, prim %d, physPrim %d, status %d\n",i,prim->IsPrimary(),prim->IsPhysicalPrimary(),prim->GetStatus()));
while(mother>7){
primTmp = (AliAODMCParticle *) mcparticles->At(mother);
mother=primTmp->GetMother();
if(GetEMCALGeometry()) {
GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
if(absID >= 0) inacceptance = kTRUE;
- if(GetDebug() > 3) printf("In EMCAL Real acceptance? %d\n",inacceptance);
+ AliDebug(3,Form("In EMCAL Real acceptance? %d",inacceptance));
}
else{
if(GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kEMCAL)) inacceptance = kTRUE ;
- if(GetDebug() > 3) printf("In EMCAL fiducial cut acceptance? %d\n",inacceptance);
+ AliDebug(1,Form("In EMCAL fiducial cut acceptance? %d",inacceptance));
}
}else{//no EMCAL nor EMCALGeoMatrixSet
- printf("not EMCALGeoMatrix set\n");
+ AliWarning("not EMCALGeoMatrix set");
}//end of check if EMCAL
if(inacceptance)fhMCPhotonCuts->Fill(5);
- if(GetDebug() > 5)
- printf("Photon Energy %f, Pt %f\n",prim->E(),prim->Pt());
+ AliDebug(5,Form("Photon Energy %f, Pt %f",prim->E(),prim->Pt()));
fMCGamPt=photonPt;
fMCGamEta=photonEta;
fMCGamPhi=photonPhi;
}//end of check if photon
- else{//not photon
+ else
+ {//not photon
if(prim->GetStatus()!=1) continue;
- if(GetDebug() > 5)
- printf("id %d, prim %d, physPrim %d, status %d, pdg %d, E %f ",i,prim->IsPrimary(),prim->IsPhysicalPrimary(),prim->GetStatus(),prim->GetPdgCode(),prim->E());
- while(mother>7){
+ AliDebug(5,Form("id %d, prim %d, physPrim %d, status %d, pdg %d, E %f",
+ i,prim->IsPrimary(),prim->IsPhysicalPrimary(),prim->GetStatus(),prim->GetPdgCode(),prim->E()));
+
+ while(mother>7)
+ {
primTmp = (AliAODMCParticle *) mcparticles->At(mother);
mother=primTmp->GetMother();
- if(GetDebug() > 5) printf("next mother %d ",mother);
+ AliDebug(5,Form("next mother %d",mother));
}
- if(GetDebug() > 5) printf("\n");
if(mother<6)continue;//soft part
+
primTmp = (AliAODMCParticle *) mcparticles->At(mother);
pdg=primTmp->GetPdgCode();
if( !(TMath::Abs(pdg)<=6 || pdg==21) ) continue;//origin not hard q or g
//printouts
- if(GetDebug() > 3) {
- printf("cone full %f, charged %f, full150 %f, charged150 %f\n",coneJet,coneChargedJet,coneJet150,coneChargedJet150);
- printf("Npart %d, NchPart %d, Npart(pt>150M) %d, NchPart(pt>150M) %d, NchPart(pt>150M)Cone %d\n",nParticlesInJet,nChargedParticlesInJet,nParticlesInJet150,nChargedParticlesInJet150,nChargedParticlesInJet150Cone);
- printf("Etot %f, Ech %f, E(pt>150M) %f, Ech(pt>150M) %f\n",eneParticlesInJet,eneChargedParticlesInJet,eneParticlesInJet150,eneChargedParticlesInJet150);
- printf("pt %f, ptch %f, pt(pt>150M) %f,ptch(pt>150M) %f,ptch(pt>150M)Cone %f\n",ptParticlesInJet,ptChargedParticlesInJet,ptParticlesInJet150,ptChargedParticlesInJet150,ptChargedParticlesInJet150Cone);
- printf("eta/phi tot %f/%f, ch %f/%f, tot150 %f/%f, ch150 %f/%f, ch150cone %f/%f\n",etaParticlesInJet,phiParticlesInJet,etaChargedParticlesInJet,phiChargedParticlesInJet,etaParticlesInJet150,phiParticlesInJet150,etaChargedParticlesInJet150,phiChargedParticlesInJet150,etaChargedParticlesInJet150Cone,phiChargedParticlesInJet150Cone);
- }
+
+ AliDebug(3,Form("cone full %f, charged %f, full150 %f, charged150 %f",coneJet,coneChargedJet,coneJet150,coneChargedJet150));
+ AliDebug(3,Form("Npart %d, NchPart %d, Npart(pt>150M) %d, NchPart(pt>150M) %d, NchPart(pt>150M)Cone %d\n",nParticlesInJet,nChargedParticlesInJet,nParticlesInJet150,nChargedParticlesInJet150,nChargedParticlesInJet150Cone));
+ AliDebug(3,Form("Etot %f, Ech %f, E(pt>150M) %f, Ech(pt>150M) %f\n",eneParticlesInJet,eneChargedParticlesInJet,eneParticlesInJet150,eneChargedParticlesInJet150));
+ AliDebug(3,Form("pt %f, ptch %f, pt(pt>150M) %f,ptch(pt>150M) %f,ptch(pt>150M)Cone %f\n",ptParticlesInJet,ptChargedParticlesInJet,ptParticlesInJet150,ptChargedParticlesInJet150,ptChargedParticlesInJet150Cone));
+ AliDebug(3,Form("eta/phi tot %f/%f, ch %f/%f, tot150 %f/%f, ch150 %f/%f, ch150cone %f/%f\n",etaParticlesInJet,phiParticlesInJet,etaChargedParticlesInJet,phiChargedParticlesInJet,etaParticlesInJet150,phiParticlesInJet150,etaChargedParticlesInJet150,phiChargedParticlesInJet150,etaChargedParticlesInJet150Cone,phiChargedParticlesInJet150Cone));
+
//fill histograms
if(ptParticlesInJet) fhMCJetRatioChFull->Fill(ptChargedParticlesInJet/ptParticlesInJet);
if(ptChargedParticlesInJet) fhMCJetRatioCh150Ch->Fill(ptChargedParticlesInJet150/ptChargedParticlesInJet);