]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - JETAN/AliJetBkg.cxx
vertex cut added
[u/mrichter/AliRoot.git] / JETAN / AliJetBkg.cxx
index 76638d8773b0a3bba51dcb21bdd4efbd66633e1a..69185cb7158006735b168537778e23f21bb8cd23 100644 (file)
@@ -88,15 +88,17 @@ AliJetBkg& AliJetBkg::operator=(const AliJetBkg& source){
 //___________________________________________________________________
   void AliJetBkg::BkgFastJetb(Double_t& rho,Double_t& sigma, 
 Double_t& meanarea){
-  
-  cout<<"===============  AliJetBkg::BkgFastJetb()  =========== "<<endl;
+
+    AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader; 
+    Bool_t debug  = header->GetDebug();     // debug option 
+    if(debug)cout<<"===============  AliJetBkg::BkgFastJetb()  =========== "<<endl;
   vector<fastjet::PseudoJet> inputParticles=fInputFJ->GetInputParticles();
   
   //cout<<"printing inputParticles for BKG "<<inputParticles.size()<<endl;
   
 
    
-  AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader;
+
   double rParamBkg = header->GetRparamBkg(); //Radius for background calculation
 
   Double_t medianb,sigmab,meanareab;
@@ -110,15 +112,12 @@ Double_t& meanarea){
 
   void AliJetBkg::BkgFastJetWoHardest(Double_t& rho,Double_t& sigma, 
 Double_t& meanarea){
-  
-  cout<<"===============  AliJetBkg::BkgWoHardest()  =========== "<<endl;
+    AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader; 
+    Bool_t debug  = header->GetDebug();     // debug option 
+    if(debug)cout<<"===============  AliJetBkg::BkgWoHardest()  =========== "<<endl;
   vector<fastjet::PseudoJet> inputParticles=fInputFJ->GetInputParticles();
   
-  //cout<<"printing inputParticles for BKG "<<inputParticles.size()<<endl;
-  
-
-   
-  AliFastJetHeaderV1 *header = (AliFastJetHeaderV1*)fHeader;
+  //cout<<"printing inputParticles for BKG "<<inputParticles.size()<<endl;   
   double rParamBkg = header->GetRparamBkg(); //Radius for background calculation  
   Double_t medianb,sigmab,meanareab;
   CalcRhoWoHardest(medianb,sigmab,meanareab,inputParticles,rParamBkg,"All");
@@ -131,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;
@@ -168,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;
@@ -250,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;
@@ -331,7 +332,7 @@ Float_t  AliJetBkg::BkgChargedFastJet(){
 
   Double_t rho=CalcRho(inputParticlesCharged,rParam,"Charg");
 
-  cout<<"-------- rho (from CHARGED part)="<<rho<<endl; 
+  if(debug)cout<<"-------- rho (from CHARGED part)="<<rho<<endl; 
   return rho;
 }
 
@@ -396,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);
@@ -406,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();