Electron dE/dx distributions added
authorlmilano <lmilano@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jul 2011 10:51:07 +0000 (10:51 +0000)
committerlmilano <lmilano@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jul 2011 10:51:07 +0000 (10:51 +0000)
PWG2/SPECTRA/AliAnalysisTaskSEITSsaSpectra.cxx
PWG2/SPECTRA/AliAnalysisTaskSEITSsaSpectra.h

index 815f8b5..db5a97d 100644 (file)
@@ -396,7 +396,13 @@ void AliAnalysisTaskSEITSsaSpectra::UserCreateOutputObjects(){
     fHistMCSecMatDCANegK[i]  = new TH1F(Form("fHistMCSecMatDCANegK%d",i),Form("fHistMCSecMatDCANegK%d",i),2000,-1,1);  
     fHistMCSecMatDCANegP[i]  = new TH1F(Form("fHistMCSecMatDCANegP%d",i),Form("fHistMCSecMatDCANegP%d",i),2000,-1,1);  
     
-    fHistMCPosPiHypPion[i] = new TH1F(Form("fHistMCPosPiHypPion%d",i),Form("fHistMCPosPiHypPion%d",i),175,-3.5,3.5);   //MC truth
+    fHistMCPosOtherHypPion[i] = new TH1F(Form("fHistMCPosOtherHypPion%d",i),Form("fHistMCPosOtherHypPion%d",i),175,-3.5,3.5);  //MC truth
+    fHistMCPosOtherHypKaon[i] = new TH1F(Form("fHistMCPosOtherHypKaon%d",i),Form("fHistMCPosOtherHypKaon%d",i),175,-3.5,3.5);
+    fHistMCPosOtherHypProton[i] = new TH1F(Form("fHistMCPosOtherHypProton%d",i),Form("fHistMCPosOtherHypProton%d",i),175,-3.5,3.5);
+    fHistMCPosElHypPion[i] = new TH1F(Form("fHistMCPosElHypPion%d",i),Form("fHistMCPosElHypPion%d",i),175,-3.5,3.5);   
+    fHistMCPosElHypKaon[i] = new TH1F(Form("fHistMCPosElHypKaon%d",i),Form("fHistMCPosElHypKaon%d",i),175,-3.5,3.5);
+    fHistMCPosElHypProton[i] = new TH1F(Form("fHistMCPosElHypProton%d",i),Form("fHistMCPosElHypProton%d",i),175,-3.5,3.5);
+    fHistMCPosPiHypPion[i] = new TH1F(Form("fHistMCPosPiHypPion%d",i),Form("fHistMCPosPiHypPion%d",i),175,-3.5,3.5);   
     fHistMCPosPiHypKaon[i] = new TH1F(Form("fHistMCPosPiHypKaon%d",i),Form("fHistMCPosPiHypKaon%d",i),175,-3.5,3.5);
     fHistMCPosPiHypProton[i] = new TH1F(Form("fHistMCPosPiHypProton%d",i),Form("fHistMCPosPiHypProton%d",i),175,-3.5,3.5);
     fHistMCPosKHypPion[i] = new TH1F(Form("fHistMCPosKHypPion%d",i),Form("fHistMCPosKHypPion%d",i),175,-3.5,3.5);      
@@ -406,7 +412,13 @@ void AliAnalysisTaskSEITSsaSpectra::UserCreateOutputObjects(){
     fHistMCPosPHypKaon[i] = new TH1F(Form("fHistMCPosPHypKaon%d",i),Form("fHistMCPosPHypKaon%d",i),175,-3.5,3.5);
     fHistMCPosPHypProton[i]  = new TH1F(Form("fHistMCPosPHypProton%d",i),Form("fHistMCPosPHypProton%d",i),175,-3.5,3.5);       
     
-    fHistMCNegPiHypPion[i] = new TH1F(Form("fHistMCNegPiHypPion%d",i),Form("fHistMCNegPiHypPion%d",i),175,-3.5,3.5);   //MC truth
+    fHistMCNegOtherHypPion[i] = new TH1F(Form("fHistMCNegOtherHypPion%d",i),Form("fHistMCNegOtherHypPion%d",i),175,-3.5,3.5);  //MC truth
+    fHistMCNegOtherHypKaon[i] = new TH1F(Form("fHistMCNegOtherHypKaon%d",i),Form("fHistMCNegOtherHypKaon%d",i),175,-3.5,3.5);
+    fHistMCNegOtherHypProton[i] = new TH1F(Form("fHistMCNegOtherHypProton%d",i),Form("fHistMCNegOtherHypProton%d",i),175,-3.5,3.5);
+    fHistMCNegElHypPion[i] = new TH1F(Form("fHistMCNegElHypPion%d",i),Form("fHistMCNegElHypPion%d",i),175,-3.5,3.5);
+    fHistMCNegElHypKaon[i] = new TH1F(Form("fHistMCNegElHypKaon%d",i),Form("fHistMCNegElHypKaon%d",i),175,-3.5,3.5);
+    fHistMCNegElHypProton[i] = new TH1F(Form("fHistMCNegElHypProton%d",i),Form("fHistMCNegElHypProton%d",i),175,-3.5,3.5);
+    fHistMCNegPiHypPion[i] = new TH1F(Form("fHistMCNegPiHypPion%d",i),Form("fHistMCNegPiHypPion%d",i),175,-3.5,3.5);
     fHistMCNegPiHypKaon[i] = new TH1F(Form("fHistMCNegPiHypKaon%d",i),Form("fHistMCNegPiHypKaon%d",i),175,-3.5,3.5);
     fHistMCNegPiHypProton[i] = new TH1F(Form("fHistMCNegPiHypProton%d",i),Form("fHistMCNegPiHypProton%d",i),175,-3.5,3.5);
     fHistMCNegKHypPion[i] = new TH1F(Form("fHistMCNegKHypPion%d",i),Form("fHistMCNegKHypPion%d",i),175,-3.5,3.5);      
@@ -452,7 +464,13 @@ void AliAnalysisTaskSEITSsaSpectra::UserCreateOutputObjects(){
     fOutput->Add(fHistMCSecMatDCANegK[i]);
     fOutput->Add(fHistMCSecMatDCANegP[i]);
 
-    fOutput->Add(fHistMCPosPiHypPion[i]);//MC truth
+    fOutput->Add(fHistMCPosOtherHypPion[i]);//MC truth
+    fOutput->Add(fHistMCPosOtherHypKaon[i]);
+    fOutput->Add(fHistMCPosOtherHypProton[i]);
+    fOutput->Add(fHistMCPosElHypPion[i]);
+    fOutput->Add(fHistMCPosElHypKaon[i]);
+    fOutput->Add(fHistMCPosElHypProton[i]);
+    fOutput->Add(fHistMCPosPiHypPion[i]);
     fOutput->Add(fHistMCPosPiHypKaon[i]);
     fOutput->Add(fHistMCPosPiHypProton[i]);
     fOutput->Add(fHistMCPosKHypPion[i]);
@@ -462,7 +480,13 @@ void AliAnalysisTaskSEITSsaSpectra::UserCreateOutputObjects(){
     fOutput->Add(fHistMCPosPHypKaon[i]);
     fOutput->Add(fHistMCPosPHypProton[i]);
     
-    fOutput->Add(fHistMCNegPiHypPion[i]);//MC truth
+    fOutput->Add(fHistMCNegOtherHypPion[i]);//MC truth
+    fOutput->Add(fHistMCNegOtherHypKaon[i]);
+    fOutput->Add(fHistMCNegOtherHypProton[i]);
+    fOutput->Add(fHistMCNegElHypPion[i]);
+    fOutput->Add(fHistMCNegElHypKaon[i]);
+    fOutput->Add(fHistMCNegElHypProton[i]);
+    fOutput->Add(fHistMCNegPiHypPion[i]);
     fOutput->Add(fHistMCNegPiHypKaon[i]);
     fOutput->Add(fHistMCNegPiHypProton[i]);
     fOutput->Add(fHistMCNegKHypPion[i]);
@@ -1067,6 +1091,9 @@ void AliAnalysisTaskSEITSsaSpectra::UserExec(Option_t *){
     fHistNTracksPos->GetXaxis()->SetBinLabel(fHistNTracksPos->FindBin(countBinTrk),label.Data());
     fHistNTracksNeg->GetXaxis()->SetBinLabel(fHistNTracksNeg->FindBin(countBinTrk),label.Data());
     countBinTrk++;  
+
+
+    Int_t jpart=-1;
     
     //Filling Histos for Reco Efficiency
     //information from the MC kinematics
@@ -1076,33 +1103,33 @@ void AliAnalysisTaskSEITSsaSpectra::UserExec(Option_t *){
        part = (TParticle*)stack->Particle(track->GetLabel());
        pdgPart = part->GetPDG();
        code = pdgPart->PdgCode();
-       Int_t jpart=-1;
        for(Int_t j=0; j<3; j++){
          if(TMath::Abs(code)==listcode[j]){
            jpart=j;
            break;
          }
        }
-       if(jpart<0) continue;
-       if(pdgPart->Charge()>0) signMC=1;
-       else signMC=-1;
-       ptMC=part->Pt();
-       if(stack->IsPhysicalPrimary(track->GetLabel())){
-         if(signMC>0) fHistPrimMCposReco[jpart]->Fill(TMath::Abs(ptMC));
-         else  fHistPrimMCnegReco[jpart]->Fill(TMath::Abs(ptMC));
-       }else{ 
-         Int_t indexMoth=part->GetFirstMother();
-         if(indexMoth>=0){
-           TParticle* moth = stack->Particle(indexMoth);
-           Float_t codemoth = TMath::Abs(moth->GetPdgCode());
-           mfl = Int_t (codemoth/ TMath::Power(10, Int_t(TMath::Log10(codemoth))));
-         }
-         if(mfl==3){ // strangeness
-           if(signMC>0) fHistSecStrMCposReco[jpart]->Fill(TMath::Abs(ptMC));
-           else  fHistSecStrMCnegReco[jpart]->Fill(TMath::Abs(ptMC));      
-         }else{
-           if(signMC>0) fHistSecMatMCposReco[jpart]->Fill(TMath::Abs(ptMC));
-           else  fHistSecMatMCnegReco[jpart]->Fill(TMath::Abs(ptMC));      
+       if(jpart>=0){
+         if(pdgPart->Charge()>0) signMC=1;
+         else signMC=-1;
+         ptMC=part->Pt();
+         if(stack->IsPhysicalPrimary(track->GetLabel())){
+           if(signMC>0) fHistPrimMCposReco[jpart]->Fill(TMath::Abs(ptMC));
+           else  fHistPrimMCnegReco[jpart]->Fill(TMath::Abs(ptMC));
+         }else{ 
+           Int_t indexMoth=part->GetFirstMother();
+           if(indexMoth>=0){
+             TParticle* moth = stack->Particle(indexMoth);
+             Float_t codemoth = TMath::Abs(moth->GetPdgCode());
+             mfl = Int_t (codemoth/ TMath::Power(10, Int_t(TMath::Log10(codemoth))));
+           }
+           if(mfl==3){ // strangeness
+             if(signMC>0) fHistSecStrMCposReco[jpart]->Fill(TMath::Abs(ptMC));
+             else  fHistSecStrMCnegReco[jpart]->Fill(TMath::Abs(ptMC));            
+           }else{
+             if(signMC>0) fHistSecMatMCposReco[jpart]->Fill(TMath::Abs(ptMC));
+             else  fHistSecMatMCnegReco[jpart]->Fill(TMath::Abs(ptMC));            
+           }
          }
        }
       }
@@ -1149,7 +1176,7 @@ void AliAnalysisTaskSEITSsaSpectra::UserExec(Option_t *){
        if(isph==1){
          if(track->GetSign()>0) fHistPosNSigmaPrim[minPos]->Fill(pt);
          else fHistNegNSigmaPrim[minPos]->Fill(pt);
-          //nsigma histos with MC truth on IsPhysicalPrimary and PID
+         //nsigma histos with MC truth on IsPhysicalPrimary and PID
          if(TMath::Abs(code)==listcode[minPos]){
            if(track->GetSign()>0) fHistPosNSigmaPrimMC[minPos]->Fill(pt);
            else fHistNegNSigmaPrimMC[minPos]->Fill(pt);
@@ -1167,19 +1194,25 @@ void AliAnalysisTaskSEITSsaSpectra::UserExec(Option_t *){
        if(TMath::Abs(y[2]) < fMaxY)fHistPosP[theBin]->Fill(logdiff[2]);
        if(fMC){
          if(TMath::Abs(y[0])<fMaxY){
+           if(TMath::Abs(code)!=11 && jpart<0)fHistMCPosOtherHypPion[theBin]->Fill(logdiff[0]);
+           if(TMath::Abs(code)==11)fHistMCPosElHypPion[theBin]->Fill(logdiff[0]);
            if(TMath::Abs(code)==211)fHistMCPosPiHypPion[theBin]->Fill(logdiff[0]);
            if(TMath::Abs(code)==321)fHistMCPosKHypPion[theBin]->Fill(logdiff[0]);
            if(TMath::Abs(code)==2212)fHistMCPosPHypPion[theBin]->Fill(logdiff[0]);
          }
          if(TMath::Abs(y[1])<fMaxY){
+           if(TMath::Abs(code)!=11 && jpart<0)fHistMCPosOtherHypKaon[theBin]->Fill(logdiff[1]);
+           if(TMath::Abs(code)==11)fHistMCPosElHypKaon[theBin]->Fill(logdiff[1]);
            if(TMath::Abs(code)==211)fHistMCPosPiHypKaon[theBin]->Fill(logdiff[1]);
            if(TMath::Abs(code)==321)fHistMCPosKHypKaon[theBin]->Fill(logdiff[1]);
            if(TMath::Abs(code)==2212)fHistMCPosPHypKaon[theBin]->Fill(logdiff[1]);
          }
          if(TMath::Abs(y[2])<fMaxY){
-           if(TMath::Abs(code)==211)fHistMCPosPiHypProton[theBin]->Fill(logdiff[2]);
-           if(TMath::Abs(code)==321)fHistMCPosKHypProton[theBin]->Fill(logdiff[2]);
-           if(TMath::Abs(code)==2212)fHistMCPosPHypProton[theBin]->Fill(logdiff[2]);
+             if(TMath::Abs(code)!=11 && jpart<0)fHistMCPosOtherHypProton[theBin]->Fill(logdiff[2]);
+             if(TMath::Abs(code)==11)fHistMCPosElHypProton[theBin]->Fill(logdiff[2]);
+             if(TMath::Abs(code)==211)fHistMCPosPiHypProton[theBin]->Fill(logdiff[2]);
+             if(TMath::Abs(code)==321)fHistMCPosKHypProton[theBin]->Fill(logdiff[2]);
+             if(TMath::Abs(code)==2212)fHistMCPosPHypProton[theBin]->Fill(logdiff[2]);
          }
        }
       }else{
@@ -1188,16 +1221,22 @@ void AliAnalysisTaskSEITSsaSpectra::UserExec(Option_t *){
        if(TMath::Abs(y[2]) < fMaxY)fHistNegP[theBin]->Fill(logdiff[2]);
        if(fMC){
          if(TMath::Abs(y[0])<fMaxY){
+           if(TMath::Abs(code)!=11 && jpart<0)fHistMCNegOtherHypPion[theBin]->Fill(logdiff[0]);
+           if(TMath::Abs(code)==11)fHistMCNegElHypPion[theBin]->Fill(logdiff[0]);
            if(TMath::Abs(code)==211)fHistMCNegPiHypPion[theBin]->Fill(logdiff[0]);
            if(TMath::Abs(code)==321)fHistMCNegKHypPion[theBin]->Fill(logdiff[0]);
            if(TMath::Abs(code)==2212)fHistMCNegPHypPion[theBin]->Fill(logdiff[0]);
          }
          if(TMath::Abs(y[1])<fMaxY){
+           if(TMath::Abs(code)!=11 && jpart<0)fHistMCNegOtherHypKaon[theBin]->Fill(logdiff[1]);
+           if(TMath::Abs(code)==11)fHistMCNegElHypKaon[theBin]->Fill(logdiff[1]);
            if(TMath::Abs(code)==211)fHistMCNegPiHypKaon[theBin]->Fill(logdiff[1]);
            if(TMath::Abs(code)==321)fHistMCNegKHypKaon[theBin]->Fill(logdiff[1]);
            if(TMath::Abs(code)==2212)fHistMCNegPHypKaon[theBin]->Fill(logdiff[1]);
          }
          if(TMath::Abs(y[2])<fMaxY){
+           if(TMath::Abs(code)!=11 && jpart<0)fHistMCNegOtherHypProton[theBin]->Fill(logdiff[2]);
+           if(TMath::Abs(code)==11)fHistMCNegElHypProton[theBin]->Fill(logdiff[2]);
            if(TMath::Abs(code)==211)fHistMCNegPiHypProton[theBin]->Fill(logdiff[2]);
            if(TMath::Abs(code)==321)fHistMCNegKHypProton[theBin]->Fill(logdiff[2]);
            if(TMath::Abs(code)==2212)fHistMCNegPHypProton[theBin]->Fill(logdiff[2]);
@@ -1317,6 +1356,12 @@ void AliAnalysisTaskSEITSsaSpectra::Terminate(Option_t *) {
       fHistMCSecMatDCANegK[i]  = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCSecMatDCANegK%d",i)));
       fHistMCSecMatDCANegP[i]  = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCSecMatDCANegP%d",i)));  
       
+      fHistMCPosOtherHypPion[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosOtherHypPion%d",i)));
+      fHistMCPosOtherHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosOtherHypKaon%d",i)));
+      fHistMCPosOtherHypProton[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosOtherHypProton%d",i)));
+      fHistMCPosElHypPion[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosElHypPion%d",i)));
+      fHistMCPosElHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosElHypKaon%d",i)));
+      fHistMCPosElHypProton[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosElHypProton%d",i)));
       fHistMCPosPiHypPion[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosPiHypPion%d",i)));
       fHistMCPosPiHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosPiHypKaon%d",i)));
       fHistMCPosPiHypProton[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosPiHypProton%d",i)));
@@ -1327,6 +1372,12 @@ void AliAnalysisTaskSEITSsaSpectra::Terminate(Option_t *) {
       fHistMCPosPHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosPHypKaon%d",i)));
       fHistMCPosPHypProton[i]  = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCPosPHypProton%d",i)));
       
+      fHistMCNegOtherHypPion[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegOtherHypPion%d",i)));
+      fHistMCNegOtherHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegOtherHypKaon%d",i)));
+      fHistMCNegOtherHypProton[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegOtherHypProton%d",i)));
+      fHistMCNegElHypPion[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegElHypPion%d",i)));
+      fHistMCNegElHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegElHypKaon%d",i)));
+      fHistMCNegElHypProton[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegElHypProton%d",i)));
       fHistMCNegPiHypPion[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegPiHypPion%d",i)));
       fHistMCNegPiHypKaon[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegPiHypKaon%d",i)));
       fHistMCNegPiHypProton[i] = dynamic_cast<TH1F*>(fOutput->FindObject(Form("fHistMCNegPiHypProton%d",i)));
index 4e35aa9..fc31f0f 100644 (file)
@@ -168,6 +168,12 @@ class AliAnalysisTaskSEITSsaSpectra : public AliAnalysisTaskSE {
   TH1F *fHistMCSecMatDCANegK[kNbins]; //! histo with DCA distibution, MC truth 
   TH1F *fHistMCSecMatDCANegP[kNbins]; //! histo with DCA distibution, MC truth
   
+  TH1F *fHistMCPosOtherHypPion[kNbins]; //! histo with dedx using the MC truth 
+  TH1F *fHistMCPosOtherHypKaon[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCPosOtherHypProton[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCPosElHypPion[kNbins]; //! histo with dedx using the MC truth 
+  TH1F *fHistMCPosElHypKaon[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCPosElHypProton[kNbins]; //! histo with dedx using the MC truth
   TH1F *fHistMCPosPiHypPion[kNbins]; //! histo with dedx using the MC truth 
   TH1F *fHistMCPosPiHypKaon[kNbins]; //! histo with dedx using the MC truth
   TH1F *fHistMCPosPiHypProton[kNbins]; //! histo with dedx using the MC truth
@@ -178,6 +184,12 @@ class AliAnalysisTaskSEITSsaSpectra : public AliAnalysisTaskSE {
   TH1F *fHistMCPosPHypKaon[kNbins]; //! histo with dedx using the MC truth
   TH1F *fHistMCPosPHypProton[kNbins]; //! histo with dedx using the MC truth
   
+  TH1F *fHistMCNegOtherHypPion[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCNegOtherHypKaon[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCNegOtherHypProton[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCNegElHypPion[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCNegElHypKaon[kNbins]; //! histo with dedx using the MC truth
+  TH1F *fHistMCNegElHypProton[kNbins]; //! histo with dedx using the MC truth
   TH1F *fHistMCNegPiHypPion[kNbins]; //! histo with dedx using the MC truth
   TH1F *fHistMCNegPiHypKaon[kNbins]; //! histo with dedx using the MC truth
   TH1F *fHistMCNegPiHypProton[kNbins]; //! histo with dedx using the MC truth