]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Implementing improved PHOS nonlinearity, changing geometry settings to read all 2011...
authorcnattras <christine.nattrass@cern.ch>
Wed, 19 Mar 2014 06:35:40 +0000 (07:35 +0100)
committercnattras <christine.nattrass@cern.ch>
Wed, 19 Mar 2014 06:35:40 +0000 (07:35 +0100)
PWGLF/totEt/AliAnalysisEtCuts.cxx
PWGLF/totEt/AliAnalysisEtReconstructed.cxx
PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx
PWGLF/totEt/AliAnalysisTaskTotEt.cxx

index f5b1a1f14bb4f1b1b659ad56ad54f5e4387f1f69..7172b29cf573c19f9e5066a02a77b22f4d4bb297 100644 (file)
@@ -40,7 +40,7 @@ AliAnalysisEtCuts::AliAnalysisEtCuts() :
                                    //
   ,fGeometryEmcalEtaAccCut(0.6)
   ,fGeometryEmcalPhiAccMinCut(80.0) // rad 1.4
-  ,fGeometryEmcalPhiAccMaxCut(120.0) // rad 2.1
+  ,fGeometryEmcalPhiAccMaxCut(180.0) // rad 3.14
   ,fGeometryEmcalDetectorRadius(440.0)
                                    //
   ,fReconstructedVertexXCut(0.5)
index dbb674eb4aeadb5499bbc40eb2b89f937fb9cc83..de29c97aa41f6abae9e5bd24a11e14d9d62f8c82 100644 (file)
@@ -302,13 +302,13 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
         cluster->GetPosition(pos);
         TVector3 cp(pos);
        fClusterPositionAll->Fill(cp.Phi(), cp.PseudoRapidity());
-       fClusterPositionAllEnergy->Fill(cp.Phi(), cp.PseudoRapidity(),cluster->E());
+       fClusterPositionAllEnergy->Fill(cp.Phi(), cp.PseudoRapidity(),GetCorrectionModification(*cluster,0,0,cent)*cluster->E());
 
        //if(TMath::Abs(cp.Eta())> fCuts->fCuts->GetGeometryEmcalEtaAccCut() || cp.Phi() >  fCuts->GetGeometryEmcalPhiAccMaxCut()*TMath::Pi()/180. ||  cp.Phi() >  fCuts->GetGeometryEmcalPhiAccMinCut()*TMath::Pi()/180.) continue;//Do not accept if cluster is not in the acceptance
-       fTotAllRawEt += TMath::Sin(cp.Theta())*cluster->E();
-       fTotAllRawEtEffCorr += CorrectForReconstructionEfficiency(*cluster,cent);
+       fTotAllRawEt += TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
+       fTotAllRawEtEffCorr +=GetCorrectionModification(*cluster,0,0,cent)* CorrectForReconstructionEfficiency(*cluster,cent);
 
-       fClusterEnergyCent->Fill(cluster->E(),cent);
+       fClusterEnergyCent->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(),cent);
 
         Bool_t matched = kTRUE;//default to no track matched
        Int_t trackMatchedIndex = cluster->GetTrackMatchedIndex();//find the index of the matched track
@@ -334,7 +334,7 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                 }
                 else {
                  totalMatchedPt +=track->Pt();
-                 fClusterEnergyCentMatched->Fill(cluster->E(),cent);
+                 fClusterEnergyCentMatched->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(),cent);
                  fHistMatchedClusterSizeVsCent->Fill(cluster->GetNCells(),cent);
 
                  float eff = fTmCorrections->TrackMatchingEfficiency(track->Pt(),cent);
@@ -342,10 +342,10 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                  //cout<<"pt "<<track->Pt()<<" eff "<<eff<<" total "<<nChargedHadronsTotal<<endl;
                  nChargedHadronsMeasured++;
                  nChargedHadronsTotal += 1/eff;
-                 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent);
-                 nChargedHadronsEtMeasured+= TMath::Sin(cp.Theta())*cluster->E();
+                 Double_t effCorrEt = GetCorrectionModification(*cluster,0,0,cent) * CorrectForReconstructionEfficiency(*cluster,cent);
+                 nChargedHadronsEtMeasured+= TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                  //One efficiency is the gamma efficiency and the other is the track matching efficiency.
-                 nChargedHadronsEtTotal+= 1/eff *TMath::Sin(cp.Theta())*cluster->E();
+                 nChargedHadronsEtTotal+= 1/eff *TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                  //cout<<"nFound "<<1<<" nFoundTotal "<<1/eff<<" etMeas "<<TMath::Sin(cp.Theta())*cluster->E()<<" ET total "<< 1/eff *TMath::Sin(cp.Theta())*cluster->E()<<endl;
 
                  Float_t nSigmaPion = fPIDResponse->NumberOfSigmasTPC(track, AliPID::kPion); 
@@ -353,24 +353,24 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                  bool isProton = (nSigmaPion>3.0 && nSigmaProton<3.0 && track->Pt()<0.9);
                  //cout<<"NSigmaProton "<<nSigmaProton<<endl;
                  etPiKPMatched += effCorrEt;
-                 etPiKPMatchedNoEff  +=TMath::Sin(cp.Theta())*cluster->E();
+                 etPiKPMatchedNoEff  +=TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                  if(isProton){
                    if(track->Charge()>0){
                      etPIDProtons += effCorrEt;
-                     etPIDProtonsNoEff +=TMath::Sin(cp.Theta())*cluster->E();
+                     etPIDProtonsNoEff +=TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                    }
                    else{
-                     etPIDAntiProtonsNoEff +=TMath::Sin(cp.Theta())*cluster->E();
+                     etPIDAntiProtonsNoEff +=TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                      etPIDAntiProtons += effCorrEt;
                    }
                  }
-                 if(TMath::Sin(cp.Theta())*cluster->E()>0.5){
+                 if(TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E()>0.5){
                    nChargedHadronsMeasured500MeV++;
                    nChargedHadronsTotal500MeV += 1/eff;
-                   nChargedHadronsEtMeasured500MeV+= TMath::Sin(cp.Theta())*cluster->E();
-                   nChargedHadronsEtTotal500MeV+= 1/eff *TMath::Sin(cp.Theta())*cluster->E();
+                   nChargedHadronsEtMeasured500MeV+= TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
+                   nChargedHadronsEtTotal500MeV+= 1/eff *TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                  }
-                 fHistMatchedTracksEvspTvsCent->Fill(track->P(),TMath::Sin(cp.Theta())*cluster->E(),cent);
+                 fHistMatchedTracksEvspTvsCent->Fill(track->P(),TMath::Sin(cp.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E(),cent);
                  fHistMatchedTracksEvspTvsCentEffCorr->Fill(track->P(),effCorrEt,cent);
                  //Weighed by the number of tracks we didn't find
                  fHistMatchedTracksEvspTvsCentEffTMCorr->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
@@ -378,13 +378,13 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                    for(int cbtest = 0; cbtest<20; cbtest++){//then we calculate the deposit matched to hadrons with different centrality bins' efficiencies
                      float efftest = fTmCorrections->TrackMatchingEfficiency(track->Pt(),cbtest);
                      if(TMath::Abs(efftest)<1e-5) efftest = 1.0;
-                     Double_t effCorrEttest = CorrectForReconstructionEfficiency(*cluster,cbtest);
+                     Double_t effCorrEttest = GetCorrectionModification(*cluster,0,0,cent)*CorrectForReconstructionEfficiency(*cluster,cbtest);
                      fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr->Fill(track->P(), effCorrEttest,cbtest, (1/efftest-1) );
                    }
                  }
                  cluster->GetPosition(pos);      
                  TVector3 p2(pos);
-                 uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
+                 uncorrEt += TMath::Sin(p2.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
                  if(uncorrEt>=0.5) fHistMatchedTracksEvspTvsCentEffTMCorr500MeV->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
                     const Double_t *pidWeights = track->PID();
 
@@ -403,7 +403,7 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                         }
                         if (fCuts->GetHistMakeTreeDeposit() && fDepositTree)
                         {
-                            fEnergyDeposited = cluster->E();
+                            fEnergyDeposited =GetCorrectionModification(*cluster,0,0,cent)* cluster->E();
                             fMomentumTPC = track->P();
                             fCharge = track->Charge();
                             fParticlePid = maxpid;
@@ -430,24 +430,24 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
 
                                 if (track->Charge() == 1)
                                 {
-                                    fHistProtonEnergyDeposit->Fill(cluster->E(), track->E());
+                                    fHistProtonEnergyDeposit->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(), track->E());
                                 }
                                 else if (track->Charge() == -1)
                                 {
-                                    fHistAntiProtonEnergyDeposit->Fill(cluster->E(), track->E());
+                                    fHistAntiProtonEnergyDeposit->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(), track->E());
                                 }
                             }
                             else if (maxpid == AliPID::kPion)
                             {
-                                fHistChargedPionEnergyDeposit->Fill(cluster->E(), track->E());
+                                fHistChargedPionEnergyDeposit->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(), track->E());
                             }
                             else if (maxpid == AliPID::kKaon)
                             {
-                                fHistChargedKaonEnergyDeposit->Fill(cluster->E(), track->E());
+                                fHistChargedKaonEnergyDeposit->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(), track->E());
                             }
                             else if (maxpid == AliPID::kMuon)
                             {
-                                fHistMuonEnergyDeposit->Fill(cluster->E(), track->E());
+                                fHistMuonEnergyDeposit->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(), track->E());
                             }
                         }
                     }
@@ -466,16 +466,16 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
            TVector3 p2(pos);
            
            fClusterPositionAccepted->Fill(p2.Phi(), p2.PseudoRapidity());
-           fClusterPositionAcceptedEnergy->Fill(p2.Phi(), p2.PseudoRapidity(),cluster->E());
-           fClusterEnergy->Fill(cluster->E());
-           fClusterEnergyCentNotMatched->Fill(cluster->E(),cent);
+           fClusterPositionAcceptedEnergy->Fill(p2.Phi(), p2.PseudoRapidity(),GetCorrectionModification(*cluster,0,0,cent)*cluster->E());
+           fClusterEnergy->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E());
+           fClusterEnergyCentNotMatched->Fill(GetCorrectionModification(*cluster,0,0,cent)*cluster->E(),cent);
            fHistClusterSizeVsCent->Fill(cluster->GetNCells(),cent);
-           fClusterEt->Fill(TMath::Sin(p2.Theta())*cluster->E());
-           uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
-           float myuncorrEt = TMath::Sin(p2.Theta())*cluster->E();
+           fClusterEt->Fill(TMath::Sin(p2.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E());
+           uncorrEt += TMath::Sin(p2.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
+           float myuncorrEt = TMath::Sin(p2.Theta())*GetCorrectionModification(*cluster,0,0,cent)*cluster->E();
            fTotRawEt += myuncorrEt;
 
-           Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent);
+           Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent)*GetCorrectionModification(*cluster,0,0,cent);
            rawSignal += myuncorrEt;
            effCorrSignal +=effCorrEt;
            //cout<<"cluster energy "<<cluster->E()<<" eff corr Et "<<effCorrEt<<endl;
index 33d34967f6d26a9298b8d1b3a8b6bcf36c8172b6..dbec5cad61b1161cdb416fdef785aeb1b70f2196 100644 (file)
@@ -107,18 +107,31 @@ Double_t AliAnalysisEtReconstructedPhos::GetCorrectionModification(const AliESDC
   Double_t factor = 1.0;
   if(nonLinCorr!=0){
     if(nonLinCorr==1){//high bound on nonlinearity
-      factor *=1.05;
+      Double_t a1=0.045-0.010;
+      Double_t a2=0.045+0.010;
+      Double_t b1=1.055-0.450 ;
+      Double_t b2=1.055+0.450 ;
+      Double_t y = (1+a2/(1+cluster.E()*cluster.E()/b2/b2))/(1+a1/(1+cluster.E()*cluster.E()/b1/b1)) ;
+      factor *=y*GetCorrectionModification(cluster,0,0,cent);
     }
     else{//nonLinCorr==-1
-      factor *=0.95;
+      Double_t a1=0.045-0.010;
+      Double_t a2=0.045+0.010;
+      Double_t b1=1.055-0.450 ;
+      Double_t b2=1.055+0.450 ;
+      Double_t y = (1+a1/(1+cluster.E()*cluster.E()/b1/b1))/(1+a2/(1+cluster.E()*cluster.E()/b2/b2)) ;
+      factor *=y*GetCorrectionModification(cluster,0,0,cent);
     }
   }
+  else{//nonlinearity correction
+    factor = 0.9728*(1+0.02/(1+cluster.E()*cluster.E()/1.5));
+  }
   if(effCorr!=0){
     if(effCorr==1){//high bound
-      factor *=1.005;
+      factor *=1.005*GetCorrectionModification(cluster,0,0,cent);
     }
     else{//low bound
-      factor *=0.995;
+      factor *=0.995*GetCorrectionModification(cluster,0,0,cent);
     }
     if(cent<0){//this condition will never be met but it will stop a compiler warning that results in Coverity sending me an email about once every two weeks.
       Double_t E = cluster.E();
index 900277d69aa1b5ce802a76d499814abafdf9b485..8da04c090bc9438b73261793183dff4c2f531c4e 100644 (file)
@@ -178,7 +178,7 @@ void AliAnalysisTaskTotEt::UserCreateOutputObjects()
     fEsdtrackCutsITS =  AliESDtrackCuts::GetStandardITSPureSATrackCuts2010(kTRUE,kFALSE);//we do want primaries but we do not want to require PID info
     fEsdtrackCutsITS->SetName("fEsdTrackCutsITS");
   }
-  if(fRecAnalysis->DataSet()==20100){
+  if(fRecAnalysis->DataSet()==20100 || fRecAnalysis->DataSet()==2011){
     cout<<"Setting track cuts for the 2010 Pb+Pb collisions at 2.76 TeV"<<endl;
     //cout<<"Warning:  Have not set 2010 track cuts yet!!"<<endl;
     fEsdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(selectPrimaries);
@@ -190,6 +190,14 @@ void AliAnalysisTaskTotEt::UserCreateOutputObjects()
     // fEsdtrackCutsITS =  AliESDtrackCuts::GetStandardITSPureSATrackCuts2010(kTRUE,kFALSE);//we do want primaries but we do not want to require PID info
    fEsdtrackCutsITS->SetName("fEsdTrackCutsITS");
   }
+  if(fRecAnalysis->DataSet()==2011){
+    cout<<"Using 2011 acceptance"<<endl;
+    fMCAnalysis->GetCuts()->SetGeometryEmcalPhiAccMinCut(80);
+    fMCAnalysis->GetCuts()->SetGeometryEmcalPhiAccMaxCut(80+100);
+    fRecAnalysis->GetCuts()->SetGeometryEmcalPhiAccMinCut(80);
+    fRecAnalysis->GetCuts()->SetGeometryEmcalPhiAccMaxCut(80+100);
+  }
+
        
        
   fOutputList->Add(fEsdtrackCutsITSTPC);