]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - JETAN/AliJetBkg.cxx
Adding rho's depenence on trigger track (M. Verweij)
[u/mrichter/AliRoot.git] / JETAN / AliJetBkg.cxx
index 12a69df57332a96d99f18a1857f6f1416afaab1c..ad3c944aee10746b3f0ca753b3a151cdbd8e601c 100644 (file)
@@ -130,9 +130,9 @@ Double_t& meanarea){
 //____________________________________________________________________
 
  void AliJetBkg::CalcRhob(Double_t& median,Double_t& 
-sigma,Double_t& 
-meanarea,vector<fastjet::PseudoJet> inputParticles,Double_t 
-rParamBkg,TString method){
+                         sigma,Double_t& 
+                         meanarea,vector<fastjet::PseudoJet> inputParticles,Double_t 
+                         rParamBkg,TString method){
   //calculate rho using the fastjet method
 
   AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader;
@@ -167,6 +167,7 @@ rParamBkg,TString method){
   //comment+= TString(areaDef.description());
   comment+= ". Strategy adopted by FastJet: ";
   comment+= TString(clust_seq.strategy_string());
+  comment+= Form("Method: %s",method.Data());
   header->SetComment(comment);
   if(debug){
     cout << "--------------------------------------------------------" << endl;
@@ -249,6 +250,7 @@ rParamBkg,TString method){
   //comment+= TString(areaDef.description());
   comment+= ". Strategy adopted by FastJet: ";
   comment+= TString(clust_seq.strategy_string());
+  comment+= Form("Method: %s",method.Data());
   header->SetComment(comment);
   if(debug){
     cout << "--------------------------------------------------------" << endl;
@@ -289,7 +291,7 @@ meanareab, false);
 
 //___________________________________________________________________
 Float_t AliJetBkg::BkgFastJet(){
-  
+// Return background  
   AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader;
   Bool_t debug  = header->GetDebug();     // debug option
 
@@ -311,7 +313,7 @@ Float_t AliJetBkg::BkgFastJet(){
 }
 //___________________________________________________________________
 Float_t  AliJetBkg::BkgChargedFastJet(){
-
+// Background for charged jets
   AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader;
   Bool_t debug  = header->GetDebug();     // debug option
 
@@ -395,7 +397,7 @@ Float_t AliJetBkg::BkgFastJetCone(TClonesArray* fAODJets)
   Float_t rCone=0.4;
   
   if(nJ==1) { 
-    AliAODJet *jettmp = dynamic_cast<AliAODJet*>(fAODJets->At(0));
+    AliAODJet *jettmp = (AliAODJet*)(fAODJets->At(0));
     jeteta=jettmp->Eta();
     jetphi=jettmp->Phi();
     acc=EmcalAcceptance(jeteta,jetphi,rCone);
@@ -405,8 +407,8 @@ Float_t AliJetBkg::BkgFastJetCone(TClonesArray* fAODJets)
 
   
   if(nJ>=2) { 
-    AliAODJet *jettmp = dynamic_cast<AliAODJet*>(fAODJets->At(0));
-    AliAODJet *jettmp1 = dynamic_cast<AliAODJet*>(fAODJets->At(1));
+    AliAODJet *jettmp = (AliAODJet*)(fAODJets->At(0));
+    AliAODJet *jettmp1 = (AliAODJet*)(fAODJets->At(1));
     jeteta=jettmp->Eta();
     jetphi=jettmp->Phi();
     jeteta1=jettmp1->Eta();
@@ -591,8 +593,8 @@ Double_t  AliJetBkg::BkgFunction(Double_t */*x*/,Double_t */*par*/){
 }
 
 
-Bool_t AliJetBkg::EmcalAcceptance(const Float_t eta, const Float_t phi, const Float_t radius){
+Bool_t AliJetBkg::EmcalAcceptance(const Float_t eta, const Float_t phi, const Float_t radius) const{
+// Apply emcal acceptance cuts
   Float_t meanPhi=190./180.*TMath::Pi()-110./180.*TMath::Pi()/2;
   Float_t deltaphi=110./180.*TMath::Pi();
   Float_t phicut=deltaphi/2.-radius;