1) include NetParticle classes in PWGCFebyeLinkDef.h (was not done in last commit...
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Oct 2012 12:01:33 +0000 (12:01 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Oct 2012 12:01:33 +0000 (12:01 +0000)
PWGCF/CMakelibPWGCFebye.pkg
PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx
PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTask.h
PWGCF/EBYE/macros/AddAliEbyEHigherMomentsTaskCentrality.C
PWGCF/PWGCFebyeLinkDef.h

index c378418..208643a 100644 (file)
@@ -52,6 +52,11 @@ set ( SRCS
     EBYE/MeanPtFluctuations/AliAnalysisTaskPtFluc.cxx 
     EBYE/MeanPtFluctuations/AliAnalysisTaskPtFlucPbPb.cxx
     EBYE/PIDFluctuation/task/AliAnalysisTaskPIDFluctuation.cxx  
+    EBYE/NetParticle/AliAnalysisNetParticleDCA.cxx
+    EBYE/NetParticle/AliAnalysisNetParticleDistribution.cxx
+    EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx
+    EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx
+    EBYE/NetParticle/AliAnalysisTaskNetParticle.cxx
     )
 
 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
@@ -60,4 +65,4 @@ set ( DHDR PWGCFebyeLinkDef.h)
 
 set ( EXPORT )
 
-set ( EINCLUDE ANALYSIS/EventMixing PWGCF/EBYE PWGCF/EBYE/BalanceFunctions PWGCF/EBYE/LRC PWGCF/EBYE/Fluctuations PWGCF/EBYE/PIDFluctuation/task STEER/STEERBase)
+set ( EINCLUDE ANALYSIS/EventMixing PWGCF/EBYE PWGCF/EBYE/BalanceFunctions PWGCF/EBYE/LRC PWGCF/EBYE/Fluctuations PWGCF/EBYE/NetParticle PWGCF/EBYE/PIDFluctuation/task STEER/STEERBase)
index dcc6206..ece3bd1 100644 (file)
@@ -80,6 +80,7 @@ AliEbyEHigherMomentsTask::AliEbyEHigherMomentsTask( const char *name )
   fEtaLowerLimit(-0.8),
   fEtaHigherLimit(0.8),
   fTPCNClus(80),
+  fChi2perNDF(4.),
   nAODtrackCutBit(128),
   fEventCounter(0)
 { 
@@ -89,10 +90,10 @@ AliEbyEHigherMomentsTask::AliEbyEHigherMomentsTask( const char *name )
       fhNplusNminus[i] = NULL;
     }
   
-  for ( Int_t i = 0; i < 11; i++) { 
+  for ( Int_t i = 0; i < 13; i++) { 
     fHistQA[i] = NULL;
   }
-   
+  
   DefineOutput(1, TList::Class()); // Outpput....
 }
 
@@ -119,12 +120,14 @@ void AliEbyEHigherMomentsTask::UserCreateOutputObjects() {
   fHistQA[8] = new TH1D("fHistQAPt","p_{T} distribution",600,0,6);
   fHistQA[9] = new TH1D("fHistQAEta","#eta distribution",240,-1.2,1.2);
   fHistQA[10] = new TH1D("fHistQAPhi","#phi distribution",340,0,6.8);
+  fHistQA[11] = new TH1D("fHistQANCls","Number of TPC cluster",200,0,200);
+  fHistQA[12] = new TH1D("fHistQAChi2","Chi2 per NDF",100,0,10);
   
-  for(Int_t i = 0; i < 11; i++)
+  for(Int_t i = 0; i < 13; i++)
     {
       fListOfHistos->Add(fHistQA[i]);
     }
+  
   
   TString hname;
   TString htitle;
@@ -142,20 +145,21 @@ void AliEbyEHigherMomentsTask::UserCreateOutputObjects() {
     fhNplusNminus[i] = new TH2F(hname.Data(),htitle.Data(),800,0.5,800.5,800,0.5,800.5);
     fListOfHistos->Add(fhNplusNminus[i]);
   }
-       
+  
   for(Int_t i = 50; i < 91; i++) {
     hname  = "hPlusMinusCentBin"; hname+=i;
     htitle = "N+ and N- in Cent Bin "; htitle+=i;
     fhNplusNminus[i] = new TH2F(hname.Data(),htitle.Data(),500,0.5,500.5,500,0.5,500.5);
     fListOfHistos->Add(fhNplusNminus[i]);
   }
-    
+  
   PostData(1, fListOfHistos);
 }
 
 
 //----------------------------------------------------------------------------------
 void AliEbyEHigherMomentsTask::UserExec( Option_t * ){
+  
   fEventCounter->Fill(1);
   Double_t nPlusCharge = 0.;
   Double_t nMinusCharge = 0.;
@@ -173,85 +177,91 @@ void AliEbyEHigherMomentsTask::UserExec( Option_t * ){
     Double_t count = (Int_t)cent + 20;
     fEventCounter->Fill(count);
     
-    if(cent < 0 || cent >= 99.99) return;
-
-      fEventCounter->Fill(2);
-      
-      Int_t nCentrality = (Int_t)cent;
-   
-      const AliAODVertex *vertex = gAOD->GetPrimaryVertex();
-      
-      if(vertex) {
-       Double32_t fCov[6];
-       vertex->GetCovarianceMatrix(fCov);
-       if(vertex->GetNContributors() > 0){
-         if(fCov[5] != 0) {
-           
-           Double_t lvx = vertex->GetX();
-           Double_t lvy = vertex->GetY();
-           Double_t lvz = vertex->GetZ();
-           
-           fEventCounter->Fill(5);
-           
-           fHistQA[3]->Fill(lvx);fHistQA[4]->Fill(lvy);fHistQA[5]->Fill(lvz);
-           
-           if(TMath::Abs(lvx) < fVxMax) {
-             if(TMath::Abs(lvy) < fVyMax) {
-               if(TMath::Abs(lvz) < fVzMax) {
+    if(cent < 0 || cent >= 91) return;
+    
+    fEventCounter->Fill(2);
+    
+    Int_t nCentrality = (Int_t)cent;
+    
+    const AliAODVertex *vertex = gAOD->GetPrimaryVertex();
+    
+    if(vertex) {
+      Double32_t fCov[6];
+      vertex->GetCovarianceMatrix(fCov);
+      if(vertex->GetNContributors() > 0){
+       if(fCov[5] != 0) {
+         
+         Double_t lvx = vertex->GetX();
+         Double_t lvy = vertex->GetY();
+         Double_t lvz = vertex->GetZ();
+         
+         fEventCounter->Fill(5);
+         
+         fHistQA[3]->Fill(lvx);fHistQA[4]->Fill(lvy);fHistQA[5]->Fill(lvz);
+         
+         if(TMath::Abs(lvx) < fVxMax) {
+           if(TMath::Abs(lvy) < fVyMax) {
+             if(TMath::Abs(lvz) < fVzMax) {
+               
+               fEventCounter->Fill(6);
+               fHistQA[0]->Fill(lvx);fHistQA[1]->Fill(lvy);fHistQA[2]->Fill(lvz);
+               
+               Int_t ntracks = gAOD->GetNumberOfTracks();
+               
+               for(Int_t i = 0; i < ntracks; i++) {
+                 AliAODTrack* aodTrack = dynamic_cast<AliAODTrack *>(gAOD->GetTrack(i)); 
+                 if(!aodTrack) {
+                   AliError(Form("ERROR: Could not retrieve AODtrack %d",i));
+                   continue;
+                 }
                  
-                 fEventCounter->Fill(6);
-                 fHistQA[0]->Fill(lvx);fHistQA[1]->Fill(lvy);fHistQA[2]->Fill(lvz);
+                 if(!aodTrack->TestFilterBit(nAODtrackCutBit)) continue;
                  
-                 Int_t ntracks = gAOD->GetNumberOfTracks();
+                 Float_t dxy, dz;
                  
-                 for(Int_t i = 0; i < ntracks; i++) {
-                   AliAODTrack* aodTrack = dynamic_cast<AliAODTrack *>(gAOD->GetTrack(i)); 
-                   if(!aodTrack) {
-                     AliError(Form("ERROR: Could not retrieve AODtrack %d",i));
-                     continue;
-                   }
-                   
-                   if(!aodTrack->TestFilterBit(nAODtrackCutBit)) continue;
-                   
-                   Float_t dxy, dz;
-                   
-                   dxy = aodTrack->DCA();
-                   dz  = aodTrack->ZAtDCA();
-                   
-                   Double_t pt = aodTrack->Pt();
-                   Double_t eta = aodTrack->Eta();
-                   //Double_t nclus = aodTrack->GetTPCNcls();
-                   Double_t nclus = aodTrack->GetTPCClusterInfo(2,1);//important for 2011 data
-
-                   if( dxy > fDCAxy ) continue; 
-                   if( dz > fDCAz ) continue;
-                   if( pt < fPtLowerLimit || pt > fPtHigherLimit ) continue;
-                   if( eta < fEtaLowerLimit || eta > fEtaHigherLimit ) continue;
-                   if( nclus < fTPCNClus ) continue;
-                   
-                   fHistQA[8]->Fill(pt);
-                   fHistQA[9]->Fill(eta);
-                   fHistQA[10]->Fill(aodTrack->Phi());
-                   fHistQA[6]->Fill(dxy);
-                   fHistQA[7]->Fill(dz);
-                   
-                   Short_t gCharge = aodTrack->Charge();
-                   
-                   
-                   if(gCharge > 0) nPlusCharge += 1.;
-                   if(gCharge < 0) nMinusCharge += 1.;
-                   
-                 } //--------- Track Loop
-                 //  cout << "nCentrality "<<nCentrality<<" nPlusCharge "<< nPlusCharge << " nMinusCharge " << nMinusCharge << endl;
-                 fhNplusNminus[nCentrality]->Fill(nPlusCharge,nMinusCharge);
-                 fEventCounter->Fill(7);
-               }
-             }
-           }
-         }
-       }
-      }
-    }//AOD--analysis-----
+                 dxy = aodTrack->DCA();
+                 dz  = aodTrack->ZAtDCA();
+                 
+                 Double_t pt = aodTrack->Pt();
+                 Double_t eta = aodTrack->Eta();
+                 //Double_t nclus = aodTrack->GetTPCNcls();
+                 Double_t nclus = aodTrack->GetTPCClusterInfo(2,1);//important for 2011 data
+                 Double_t chi2ndf = aodTrack->Chi2perNDF(); //
+                 
+                 //Set the track cuts--------------
+                 if( dxy > fDCAxy ) continue; 
+                 if( dz > fDCAz ) continue;
+                 if( pt < fPtLowerLimit || pt > fPtHigherLimit ) continue;
+                 if( eta < fEtaLowerLimit || eta > fEtaHigherLimit ) continue;
+                 if( nclus < fTPCNClus ) continue;
+                 if( chi2ndf > fChi2perNDF ) continue;
+                 
+                 //Fill the Trackwise QA-histograms-----
+                 fHistQA[6]->Fill(dxy);
+                 fHistQA[7]->Fill(dz);
+                 fHistQA[8]->Fill(pt);
+                 fHistQA[9]->Fill(eta);
+                 fHistQA[10]->Fill(aodTrack->Phi());
+                 fHistQA[11]->Fill(nclus);
+                 fHistQA[12]->Fill(chi2ndf);
+                 
+                 //Count the charge particles-----
+                 Short_t gCharge = aodTrack->Charge();
+                 
+                 if(gCharge > 0) nPlusCharge += 1.;
+                 if(gCharge < 0) nMinusCharge += 1.;
+                 
+               }//--------- Track Loo
+               //cout << "nCentrality "<<nCentrality<<" nPlusCharge "<< nPlusCharge << " nMinusCharge " << nMinusCharge << endl;
+               fhNplusNminus[nCentrality]->Fill(nPlusCharge,nMinusCharge);
+               fEventCounter->Fill(7);
+             }//Z-vertex cut-------
+           }//Vetecx-Y cut---
+         }//Vertex-X cut
+       }//Covariant matrix cuts---
+      }//N-Contributors-----------
+    }//Check for vertex--------
+  }//AOD--analysis-----
   
   else if(fAnalysisType == "MCAOD") {
     TClonesArray *arrayMC = (TClonesArray*) gAOD->GetList()->FindObject(AliAODMCParticle::StdBranchName());
@@ -280,16 +290,16 @@ void AliEbyEHigherMomentsTask::UserExec( Option_t * ){
       if(vertex->GetNContributors() > 0) {
        if(fCov[5] != 0) {
          
-           if(TMath::Abs(vertex->GetX()) < fVxMax) {
-             if(TMath::Abs(vertex->GetY()) < fVyMax) {
-               if(TMath::Abs(vertex->GetZ()) < fVzMax) {
-                 ver = kTRUE;
-               }
+         if(TMath::Abs(vertex->GetX()) < fVxMax) {
+           if(TMath::Abs(vertex->GetY()) < fVyMax) {
+             if(TMath::Abs(vertex->GetZ()) < fVzMax) {
+               ver = kTRUE;
              }
            }
-       }
+         }
        }
       }
+    }
     
     if(!ver) return;
     Int_t nMC = arrayMC->GetEntries();
@@ -301,17 +311,17 @@ void AliEbyEHigherMomentsTask::UserExec( Option_t * ){
       
       if(partMC->Charge() > 0) nPlusCharge += 1.;
       if(partMC->Charge() < 0) nMinusCharge += 1.;
-         
+      
     }//MC Track loop-----
     fhNplusNminus[nCentrality]->Fill(nPlusCharge,nMinusCharge);
     //cout << "Cent=" << nCentrality << " MC-PlusChrg=" << nPlusCharge << " MC-MinusChrg=" << nMinusCharge << endl;
-      
-    }//MCAOD--analysis---- 
+    
+  }//MCAOD--analysis---- 
   else return;
   
   
   
-
+  
   fEventCounter->Fill(8);
   PostData(1, fListOfHistos);
   
index 96de019..1f01e3d 100644 (file)
@@ -34,16 +34,15 @@ class AliEbyEHigherMomentsTask: public AliAnalysisTaskSE {
   void SetAnalysisType(const char* analysisType) {fAnalysisType = analysisType;}
   void SetDCA(Double_t xy, Double_t z) { fDCAxy = xy; fDCAz = z; }
   void SetPtRange(Double_t ptl, Double_t pth){fPtLowerLimit = ptl; fPtHigherLimit = pth;}
-  void SetEta(Double_t eta){fEtaLowerLimit=-eta; fEtaHigherLimit=eta;}
+  void SetEta(Double_t eta){fEtaLowerLimit= -1*eta; fEtaHigherLimit=eta;}
   void SetTPCNclus(Int_t nclus) { fTPCNClus = nclus;}
-  void SetAODtrackCutBit(Int_t bit){
-    nAODtrackCutBit = bit;
-  }
+  void SetChi2PerNDF( Double_t chi2ndf ) { fChi2perNDF = chi2ndf;}
+  void SetAODtrackCutBit(Int_t bit){ nAODtrackCutBit = bit;}
   
   void SetKinematicsCutsAOD(Double_t ptl, Double_t pth, Double_t eta){
     fPtLowerLimit = ptl;
     fPtHigherLimit = pth;
-    fEtaLowerLimit = -eta;
+    fEtaLowerLimit = -1*eta;
     fEtaHigherLimit = eta;
     
   }
@@ -66,12 +65,13 @@ class AliEbyEHigherMomentsTask: public AliAnalysisTaskSE {
   Double_t fEtaLowerLimit;
   Double_t fEtaHigherLimit;
   Int_t fTPCNClus;
+  Double_t fChi2perNDF;
   Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs)
   TH1D *fEventCounter;
 
   TH2F *fhNplusNminus[91]; //Data 
   
-  TH1D *fHistQA[11];
+  TH1D *fHistQA[13];
   
   AliEbyEHigherMomentsTask(const AliEbyEHigherMomentsTask&);
   AliEbyEHigherMomentsTask& operator = (const AliEbyEHigherMomentsTask&);//Not implimented..
index 02ff4d5..3849116 100644 (file)
@@ -22,6 +22,7 @@ AliAnalysisTask* AddAliEbyEHigherMomentsTaskCentrality(Double_t vx,
                                                       Double_t pth,
                                                       Double_t eta,
                                                       Int_t    nclus,
+                                                      Double_t chi2ndf,
                                                       Int_t AODfilterBit, 
                                                       const char* centralityEstimator,
                                                       Bool_t trigger = kFALSE,
@@ -55,6 +56,7 @@ AliAnalysisTask* AddAliEbyEHigherMomentsTaskCentrality(Double_t vx,
   taskHM->SetPtRange(ptl,pth);
   taskHM->SetEta(eta);
   taskHM->SetTPCNclus(nclus);
+  taskHM->SetChi2PerNDF(chi2ndf);
   taskHM->SetAODtrackCutBit(AODfilterBit);
   if(trigger) taskHM->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral);
   else taskHM->SelectCollisionCandidates(AliVEvent::kMB);
index 8304168..04b2299 100644 (file)
 
 #pragma link C++ class AliAnalysisTaskPIDFluctuation+;
 
+#pragma link C++ class AliAnalysisNetParticleDCA+;
+#pragma link C++ class AliAnalysisNetParticleDistribution+;
+#pragma link C++ class AliAnalysisNetParticleEffCont+;
+#pragma link C++ class AliAnalysisNetParticleHelper+;
+#pragma link C++ class AliAnalysisTaskNetParticle+;
+
 #endif