Commits from Daniil
authorprsnko <Dmitri.Peressounko@cern.ch>
Wed, 25 Jun 2014 16:48:37 +0000 (20:48 +0400)
committerprsnko <Dmitri.Peressounko@cern.ch>
Wed, 25 Jun 2014 16:49:36 +0000 (20:49 +0400)
PWGGA/PHOSTasks/PHOS_Correlation/AddTaskPi0Correlations.C
PWGGA/PHOSTasks/PHOS_Correlation/AliPHOSCorrelations.cxx

index d3b1a38..9aec79a 100644 (file)
@@ -1,7 +1,7 @@
-AliPHOSCorrelations* AddTaskPi0Correlations (          const char* name = "Pi0Corr",
+AliPHOSCorrelationsTest* AddTaskPi0Correlations (      const char* name = "Pi0Corr",
                                                const char* options = "11h",
                                                UInt_t offlineTriggerMask = AliVEvent::kCentral,
-                                               AliPHOSCorrelations::TriggerSelection internalTriggerSelection = AliPHOSCorrelations::kNoSelection,
+                                               AliPHOSCorrelationsTest::TriggerSelection internalTriggerSelection = AliPHOSCorrelationsTest::kNoSelection,
                                                Double_t sigmaWidth = 3.,
                                                Int_t downCentLimit = 0,
                                                Int_t upCentLimit = 90 )
@@ -35,23 +35,24 @@ AliPHOSCorrelations* AddTaskPi0Correlations (       const char* name = "Pi0Corr",
        TString sName = TString (name) + sigmaBorder + centralityBorder ;
 
 
-       AliPHOSCorrelations* task = new AliPHOSCorrelations(Form("%sTask", sName.Data()),internalTriggerSelection);
+       AliPHOSCorrelationsTest* task = new AliPHOSCorrelationsTest(Form("%sTask", sName.Data()),internalTriggerSelection);
 
        if( TString(options).Contains("10h") )  {
-               task->SetPeriod( AliPHOSCorrelations::kLHC10h );
+               task->SetPeriod( AliPHOSCorrelationsTest::kLHC10h );
                task->SetCentralityEstimator("V0M");
        }
        if( TString(options).Contains("11h") )  {
-               task->SetPeriod( AliPHOSCorrelations::kLHC11h );
+               task->SetPeriod( AliPHOSCorrelationsTest::kLHC11h );
                task->SetCentralityEstimator("V0M");
        }
        if( TString(options).Contains("13") )   {
-               task->SetPeriod( AliPHOSCorrelations::kLHC13 );
+               task->SetPeriod( AliPHOSCorrelationsTest::kLHC13 );
                task->SetCentralityEstimator("V0A");
        }
 
 
        // Binning 
+       // TODO: Make other binning for 0-10% and 20-50%
        //Any:
        if( AliVEvent::kAny == offlineTriggerMask ) 
        {
index d418fa3..68cee78 100644 (file)
@@ -279,10 +279,10 @@ void AliPHOSCorrelations::SetHistPtNumTrigger(Int_t  ptMult, Double_t ptMin, Dou
        TString spid[4]={"all","cpv","disp","both"} ;
        for(Int_t ipid=0; ipid<4; ipid++)       
        {
-               fOutputContainer->Add(new TH2F(Form("nTrigger_%s", spid[ipid].Data()), Form("Num of trigger particle %s", spid[ipid].Data()), ptMult+300, ptMin, ptMax, 10000, 0, 1 ) );
-               TH2F *h = static_cast<TH2F*>(fOutputContainer->Last()) ;
+               fOutputContainer->Add(new TH1F(Form("nTrigger_%s", spid[ipid].Data()), Form("Num of trigger particle %s", spid[ipid].Data()), ptMult+300, ptMin, ptMax ) );
+               TH1F *h = static_cast<TH1F*>(fOutputContainer->Last()) ;
                h->GetXaxis()->SetTitle("Pt [GEV]");
-               h->GetYaxis()->SetTitle("#varepsilon"); // 1/efficiensy
+               //h->GetYaxis()->SetTitle("#varepsilon"); // 1/efficiensy
        }
 }
 //_______________________________________________________________________________
@@ -502,7 +502,7 @@ void AliPHOSCorrelations::SetHistPHOSClusterMap()
        for(int i =  0; i<3; i++)
        {
                //  Cluster X/Z/E distribution.
-               fOutputContainer->Add(new TH3F(Form("QA_cluXZE_mod%i", i+1),Form("PHOS Clusters XZE distribution of module %i", i+1), 100, 0, 100, 100, 0, 100, 100, 0, 10 ) );
+               fOutputContainer->Add(new TH3F(Form("QA_cluXZE_mod%i", i+1),Form("PHOS Clusters XZE distribution of module %i", i+1), 70, 0, 70, 60, 0, 60, 200, 0, 20 ) );
                TH3F *h = static_cast<TH3F*>(fOutputContainer->Last()) ;
                h->GetXaxis()->SetTitle("X");
                h->GetYaxis()->SetTitle("Z");
@@ -523,7 +523,7 @@ void AliPHOSCorrelations::UserExec(Option_t *)
                return ;
        }
                
-               ZeroingVariables();
+    ZeroingVariables();
 
        fEventESD = dynamic_cast<AliESDEvent*>(fEvent);
        fEventAOD = dynamic_cast<AliAODEvent*>(fEvent);
@@ -588,16 +588,21 @@ void AliPHOSCorrelations::UserExec(Option_t *)
        LogSelection(kTotalSelected, fInternalRunNumber);
        LogProgress(7);
 
+
+
        // Step 7: Consider pi0 (photon/cluster) pairs.
        //ConsiderPi0s();
        ConsiderPi0sME();
        
        // Step 8; Mixing
        ConsiderPi0sMix();
-       ConsiderTracksMix();
-       //ConsiderTracksMixME();
+
+       //ConsiderTracksMix();
+       ConsiderTracksMixME();
        LogProgress(8);
 
+
+
        // Step 9: Make TPC's mask
        FillTrackEtaPhi();
        LogProgress(9);
@@ -1427,7 +1432,7 @@ void AliPHOSCorrelations::SelectAccosiatedTracks()
 void AliPHOSCorrelations::ConsiderPi0s()
 {
        // Must consider only PHOS events in real distribution.
-       if (fPHOSEvent) 
+       //if (fPHOSEvent)
        {
                const Int_t nPHOS=fCaloPhotonsPHOS->GetEntriesFast() ;
                for(Int_t i1=0; i1 < nPHOS-1; i1++)
@@ -1499,14 +1504,14 @@ void AliPHOSCorrelations::ConsiderPi0s()
 
                                if(!TestMass(m,pt)) continue;
 
-                               FillHistogram("nTrigger_all", pt, 1./eff);
+                               FillHistogram("nTrigger_all", pt, eff);
                                if ( ph1->IsCPVOK() && ph2->IsCPVOK() ) 
-                                       FillHistogram("nTrigger_cpv", pt, 1./eff);
+                                       FillHistogram("nTrigger_cpv", pt, eff);
                                if ( ph1->IsDispOK() && ph2->IsDispOK() )
                                {
-                                       FillHistogram("nTrigger_disp", pt, 1./eff);
+                                       FillHistogram("nTrigger_disp", pt, eff);
                                        if ( ph1->IsCPVOK() && ph2->IsCPVOK() ) 
-                                               FillHistogram("nTrigger_both", pt, 1./eff);
+                                               FillHistogram("nTrigger_both", pt, eff);
                                }
 
                                // Take track's angles and compare with cluster's angles.
@@ -1776,7 +1781,7 @@ void AliPHOSCorrelations::ConsiderPi0sME()
                for (int ipid = 0; ipid < 4; ipid++)
                {
                        if (fMEExists[ipid])
-                               FillHistogram(Form("nTrigger_%s", spid[ipid].Data()), fMEPt[ipid], GetEfficiency(fMEPt[ipid]));
+                               FillHistogram(Form("nTrigger_%s", spid[ipid].Data()), fMEPt[ipid], 1./GetEfficiency(fMEPt[ipid]));
                }
 
                // Take track's angles and compare with cluster's angles.
@@ -2158,6 +2163,7 @@ Double_t AliPHOSCorrelations::GetEfficiency(Double_t x) const {
        }
 
        return e;
+       // return 1.; // For test.
 }
 //_____________________________________________________________________________
 Int_t AliPHOSCorrelations::GetModCase(Int_t &mod1, Int_t &mod2) const {
@@ -2191,12 +2197,24 @@ void AliPHOSCorrelations::TestTrigger(){
        FillHistogram("hTriggerPassedEvents",  0);      // All events
        if (fEvent->GetFiredTriggerClasses().Contains("PHI7") )
                FillHistogram("hTriggerPassedEvents",  1.);     // 13 events
+       else
        if (fEvent->GetFiredTriggerClasses().Contains("PHS") )
                FillHistogram("hTriggerPassedEvents",  2.);     // 11h events
+       else
+       if (fEvent->GetFiredTriggerClasses().Contains("CSEMI") )
+               FillHistogram("hTriggerPassedEvents",  3.);     // 11h events
+       else
+       if (fEvent->GetFiredTriggerClasses().Contains("CCENT") )
+               FillHistogram("hTriggerPassedEvents",  4.);     // 11h events
+       else
+               FillHistogram("hTriggerPassedEvents",  10.); // other events
 
        if (fEvent->GetFiredTriggerClasses().Contains("PHI7") || fEvent->GetFiredTriggerClasses().Contains("PHS"))
                fPHOSEvent = true;
 
+       if (fEvent->GetFiredTriggerClasses().Contains("CSEMI") || fEvent->GetFiredTriggerClasses().Contains("CCENT"))
+               fPHOSEvent = true;
+
        if( fDebug >= 2 )
                AliInfo( Form("Event passed offline phos trigger test: %s ", fEvent->GetFiredTriggerClasses().Data() ) );