Merge branch 'master' of https://git.cern.ch/reps/AliRoot
authorfbock <friederike.bock@cern.ch>
Wed, 29 Oct 2014 14:51:51 +0000 (15:51 +0100)
committerfbock <friederike.bock@cern.ch>
Wed, 29 Oct 2014 14:51:51 +0000 (15:51 +0100)
PWGGA/GammaConv/AliAnalysisTaskConversionQA.cxx
PWGGA/GammaConv/AliAnalysisTaskEtaToPiPlPiMiGamma.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaConvDalitzV1.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaConvV1.cxx
PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx
PWGGA/GammaConv/AliCaloPhotonCuts.h
PWGGA/GammaConv/AliConvEventCuts.cxx
PWGGA/GammaConv/AliConvEventCuts.h
PWGGA/GammaConv/AliConversionMesonCuts.cxx

index 832823092af05d9b63beab61bc548a1c72ef21ed..40f733a07fbd327f0ca322e1eb7393fd3c4bcea6 100644 (file)
@@ -454,7 +454,7 @@ void AliAnalysisTaskConversionQA::UserExec(Option_t *){
        if(fMCEvent && fInputEvent->IsA()==AliESDEvent::Class()){ fMCStack = fMCEvent->Stack(); }
 
        Int_t eventNotAccepted =
-               fEventCuts->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               fEventCuts->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,kFALSE);
        if(eventNotAccepted) return; // Check Centrality, PileUp, SDD and V0AND --> Not Accepted => eventQuality = 1
 
        fConversionGammas=fV0Reader->GetReconstructedGammas();
index 72982199a87c2d8a80db3f3133606ee62bc7af4b..75f3de010d0562bff6b7fda6a5de279867c46741 100644 (file)
@@ -378,7 +378,7 @@ void AliAnalysisTaskEtaToPiPlPiMiGamma::UserCreateOutputObjects()
                fESDList[iCut]->SetName(Form("%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
                fESDList[iCut]->SetOwner(kTRUE);
 
-               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
@@ -388,6 +388,7 @@ void AliAnalysisTaskEtaToPiPlPiMiGamma::UserCreateOutputObjects()
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+               fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problems");
                fESDList[iCut]->Add(fHistoNEvents[iCut]);
 
                if(fIsHeavyIon) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",3000,0,3000);
@@ -656,7 +657,7 @@ void AliAnalysisTaskEtaToPiPlPiMiGamma::UserExec(Option_t *){
 
        for(Int_t iCut = 0; iCut<fnCuts; iCut++){
                fiCut = iCut;
-               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,kFALSE);
                
                if(eventNotAccepted){
                        //                      cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
index eb623a1b8887b5193491086e92adea8fb63c3656..9359c1f6bc5cb6e4389b3022353ff3b571557b39 100644 (file)
@@ -506,7 +506,7 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){
                fESDList[iCut]->SetOwner(kTRUE);
                fCutFolder[iCut]->Add(fESDList[iCut]);
     
-               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
@@ -522,6 +522,7 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+               fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problems");
                fESDList[iCut]->Add(fHistoNEvents[iCut]);
                
                if(fIsHeavyIon == 1) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",4000,0,4000);
@@ -1098,7 +1099,11 @@ void AliAnalysisTaskGammaCalo::UserExec(Option_t *)
        for(Int_t iCut = 0; iCut<fnCuts; iCut++){
                
                fiCut = iCut;
-               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               
+               Bool_t isRunningEMCALrelAna = kFALSE;
+               if (((AliCaloPhotonCuts*)fClusterCutArray->At(fiCut))->GetClusterType() == 1) isRunningEMCALrelAna = kTRUE;
+               
+               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon, isRunningEMCALrelAna);
                
                if(eventNotAccepted){
                // cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
index e24b9cecd72a054ebfc27b5004bd13f132ed4a7c..3662683ffac8cc03e823ba67ed3317a416df93ec 100644 (file)
@@ -661,7 +661,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                fESDList[iCut]->SetOwner(kTRUE);
                fCutFolder[iCut]->Add(fESDList[iCut]);
     
-               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
@@ -677,6 +677,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+               fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problem");
                fESDList[iCut]->Add(fHistoNEvents[iCut]);
                
                if(fIsHeavyIon == 1) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",4000,0,4000);
@@ -1367,7 +1368,11 @@ void AliAnalysisTaskGammaConvCalo::UserExec(Option_t *)
        for(Int_t iCut = 0; iCut<fnCuts; iCut++){
                
                fiCut = iCut;
-               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               
+               Bool_t isRunningEMCALrelAna = kFALSE;
+               if (((AliCaloPhotonCuts*)fClusterCutArray->At(fiCut))->GetClusterType() == 1) isRunningEMCALrelAna = kTRUE;
+
+               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,isRunningEMCALrelAna);
                
                if(eventNotAccepted){
                // cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
index ab547cf722d3aa44a26da0c78f7cb97b9f6f5185..3712bef5165177e48d6c84d97103d8db8d996c51 100644 (file)
@@ -609,7 +609,7 @@ void AliAnalysisTaskGammaConvDalitzV1::UserCreateOutputObjects()
                fESDList[iCut]->SetName(Form("%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data()));
                fESDList[iCut]->SetOwner(kTRUE);
                
-               hNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+               hNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
                hNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
@@ -619,6 +619,7 @@ void AliAnalysisTaskGammaConvDalitzV1::UserCreateOutputObjects()
                hNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+               hNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problem");
                fESDList[iCut]->Add(hNEvents[iCut]);
 
                if(fIsHeavyIon == 1 || fIsHeavyIon == 2) hNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",3000,0,3000);
@@ -1235,10 +1236,10 @@ void AliAnalysisTaskGammaConvDalitzV1::UserExec(Option_t *)
 
                Int_t eventNotAccepted =
                        ((AliConvEventCuts*)fCutEventArray->At(iCut))
-                       ->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+                       ->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,kFALSE);
                
                
-               //Int_t eventNotAccepted = ((AliConvEventCuts*)fCutGammaArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               //Int_t eventNotAccepted = ((AliConvEventCuts*)fCutGammaArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,kFALSE);
                
                if(eventNotAccepted){
                        //                      cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
index b1e58f28985efec9e5382c40144ea67273201c49..9a387cf78afcca987cf7ebe4fcecc1b51c33e6fa 100644 (file)
@@ -505,7 +505,7 @@ void AliAnalysisTaskGammaConvV1::UserCreateOutputObjects(){
                fESDList[iCut]->SetOwner(kTRUE);
                fCutFolder[iCut]->Add(fESDList[iCut]);
 
-               hNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+               hNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
                hNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
@@ -521,6 +521,7 @@ void AliAnalysisTaskGammaConvV1::UserCreateOutputObjects(){
                hNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
                hNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+               hNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problem");
                fESDList[iCut]->Add(hNEvents[iCut]);
                
                if(fIsHeavyIon == 1) hNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",4000,0,4000);
@@ -1027,7 +1028,7 @@ void AliAnalysisTaskGammaConvV1::UserExec(Option_t *)
                fiCut = iCut;
                Int_t eventNotAccepted =
                        ((AliConvEventCuts*)fEventCutArray->At(iCut))
-                       ->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+                       ->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,kFALSE);
                if(eventNotAccepted){
                        // cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
                        hNEvents[iCut]->Fill(eventNotAccepted); // Check Centrality, PileUp, SDD and V0AND --> Not Accepted => eventQuality = 1
index 0e07494e72cce1c295d16b3d7ecc84ae1645a4fb..83a5ed3d0890bd59c697155d18481ecc799d05ef 100644 (file)
@@ -442,7 +442,7 @@ void AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero::UserCreateOutputObjects()
                fESDList[iCut]->SetName(nameESDList.Data());
                fESDList[iCut]->SetOwner(kTRUE);
 
-               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+               fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
@@ -452,6 +452,7 @@ void AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero::UserCreateOutputObjects()
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
                fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+               fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problem");
                fESDList[iCut]->Add(fHistoNEvents[iCut]);
 
                if(fIsHeavyIon>0) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",3000,0,3000);
@@ -779,7 +780,13 @@ void AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero::UserExec(Option_t *){
 
        for(Int_t iCut = 0; iCut<fnCuts; iCut++){
                fiCut = iCut;
-               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               
+               Bool_t isRunningEMCALrelAna = kFALSE;
+               if (fNeutralPionMode > 0){
+                       if (((AliCaloPhotonCuts*)fClusterCutArray->At(fiCut))->GetClusterType() == 1) isRunningEMCALrelAna = kTRUE;
+               }       
+               
+               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon, isRunningEMCALrelAna);
                
                if(eventNotAccepted){
                        //                      cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
index fa785ce8df7459e4baf8cff1b17d200421ba3d97..297af106cc702e0a995491517ef68090528cdb91 100644 (file)
@@ -67,15 +67,16 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
 
                //handeling of CutString
                static const char * fgkCutNames[kNCuts];
-               Bool_t SetCutIds(TString cutString); 
-               Int_t fCuts[kNCuts];
-               Bool_t SetCut(cutIds cutID, Int_t cut);
-               Bool_t UpdateCutString();
-               void PrintCuts();
-               void PrintCutsWithValues();
+               Bool_t                  SetCutIds(TString cutString); 
+               Int_t                   fCuts[kNCuts];
+               Bool_t                  SetCut(cutIds cutID, Int_t cut);
+               Bool_t                  UpdateCutString();
+               void                    PrintCuts();
+               void                    PrintCutsWithValues();
                
-               Bool_t InitializeCutsFromCutString(const TString analysisCutSelection);
-               TString GetCutNumber();
+               Bool_t                  InitializeCutsFromCutString(const TString analysisCutSelection);
+               TString                 GetCutNumber();
+               Int_t                   GetClusterType()                                                                                                {return fClusterType; };
                
                //Constructors
                AliCaloPhotonCuts(const char *name="ClusterCuts", const char * title="Cluster Cuts");
@@ -83,131 +84,131 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
                AliCaloPhotonCuts& operator=(const AliCaloPhotonCuts&);
 
                //virtual destructor
-               virtual ~AliCaloPhotonCuts();                          
+               virtual                 ~AliCaloPhotonCuts();                          
 
-               virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;}
-               virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
+               virtual Bool_t  IsSelected(TObject* /*obj*/)                                                                    {return kTRUE;}
+               virtual Bool_t  IsSelected(TList* /*list*/)                                                                     {return kTRUE;}
 
-               Bool_t ClusterIsSelected(AliVCluster* cluster, AliVEvent *event, Bool_t isMC);
-               Bool_t ClusterIsSelectedMC(TParticle *particle,AliStack *fMCStack);
-               Bool_t ClusterIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray);
+               Bool_t                  ClusterIsSelected(AliVCluster* cluster, AliVEvent *event, Bool_t isMC);
+               Bool_t                  ClusterIsSelectedMC(TParticle *particle,AliStack *fMCStack);
+               Bool_t                  ClusterIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray);
                        
-               void InitCutHistograms(TString name="");
-        void SetFillCutHistograms(TString name=""){if(!fHistograms){InitCutHistograms(name);}}
-               TList *GetCutHistograms(){return fHistograms;}
-               void FillClusterCutIndex(Int_t photoncut){if(fHistCutIndex)fHistCutIndex->Fill(photoncut);}
+               void                    InitCutHistograms(TString name="");
+        void                   SetFillCutHistograms(TString name="")                                                   {if(!fHistograms){InitCutHistograms(name);}}
+               TList*                  GetCutHistograms()                                                                                              {return fHistograms;}
+               void                    FillClusterCutIndex(Int_t photoncut)                                                    {if(fHistCutIndex)fHistCutIndex->Fill(photoncut);}
 
-        void SetExtendedMatching(Bool_t extendedMatching){fExtendedMatching = extendedMatching;}
+        void                   SetExtendedMatching(Bool_t extendedMatching)                                    {fExtendedMatching = extendedMatching;}
                        
                ///Cut functions
-               Bool_t AcceptanceCuts(AliVCluster* cluster, AliVEvent *event);
-               Bool_t ClusterQualityCuts(AliVCluster* cluster,AliVEvent *event, Bool_t isMC);
+               Bool_t                  AcceptanceCuts(AliVCluster* cluster, AliVEvent *event);
+               Bool_t                  ClusterQualityCuts(AliVCluster* cluster,AliVEvent *event, Bool_t isMC);
 
-               Bool_t MatchConvPhotonToCluster(AliAODConversionPhoton* convPhoton, AliVCluster* cluster, AliVEvent* event );
+               Bool_t                  MatchConvPhotonToCluster(AliAODConversionPhoton* convPhoton, AliVCluster* cluster, AliVEvent* event );
 
                // Set Individual Cuts
-               Bool_t SetClusterTypeCut(Int_t);
-               Bool_t SetMinEtaCut(Int_t);
-               Bool_t SetMaxEtaCut(Int_t);
-               Bool_t SetMinPhiCut(Int_t);             
-               Bool_t SetMaxPhiCut(Int_t);             
-               Bool_t SetDistanceToBadChannelCut(Int_t);
-               Bool_t SetTimingCut(Int_t);
-               Bool_t SetTrackMatchingCut(Int_t);
-               Bool_t SetExoticCellCut(Int_t);
-               Bool_t SetMinEnergyCut(Int_t);
-               Bool_t SetMinNCellsCut(Int_t);
-               Bool_t SetMaxM02(Int_t);
-               Bool_t SetMinM02(Int_t);
-               Bool_t SetMaxM20(Int_t);
-               Bool_t SetMinM20(Int_t);
-               Bool_t SetDispersion(Int_t);
-               Bool_t SetNLM(Int_t);
+               Bool_t                  SetClusterTypeCut(Int_t);
+               Bool_t                  SetMinEtaCut(Int_t);
+               Bool_t                  SetMaxEtaCut(Int_t);
+               Bool_t                  SetMinPhiCut(Int_t);            
+               Bool_t                  SetMaxPhiCut(Int_t);            
+               Bool_t                  SetDistanceToBadChannelCut(Int_t);
+               Bool_t                  SetTimingCut(Int_t);
+               Bool_t                  SetTrackMatchingCut(Int_t);
+               Bool_t                  SetExoticCellCut(Int_t);
+               Bool_t                  SetMinEnergyCut(Int_t);
+               Bool_t                  SetMinNCellsCut(Int_t);
+               Bool_t                  SetMaxM02(Int_t);
+               Bool_t                  SetMinM02(Int_t);
+               Bool_t                  SetMaxM20(Int_t);
+               Bool_t                  SetMinM20(Int_t);
+               Bool_t                  SetDispersion(Int_t);
+               Bool_t                  SetNLM(Int_t);
                
        protected:
                TList *fHistograms;
                
                //cuts
-               Int_t   fClusterType;                                           // which cluster do we have
-               Double_t fMinEtaCut;                                            // min eta cut
-               Double_t fMaxEtaCut;                                            // max eta cut
-               Bool_t fUseEtaCut;                                                      // flag for switching on eta cut
-               Double_t fMinPhiCut;                                            // phi cut
-               Double_t fMaxPhiCut;                                            // phi cut
-               Bool_t fUsePhiCut;                                                      // flag for switching on phi cut
-               Double_t fMinDistanceToBadChannel;                      // minimum distance to bad channel
-               Bool_t fUseDistanceToBadChannel;                        // flag for switching on distance to bad channel cut
-               Double_t fMaxTimeDiff;                                          // maximum time difference to triggered collision
-               Bool_t fUseTimeDiff;                                            // flag for switching on time difference cut
-               Double_t fMinDistTrackToCluster;                        // minimum distance between track and cluster
-               Bool_t fUseDistTrackToCluster;                          // flag for switching on distance between track and cluster cut
-        Bool_t fExtendedMatching;                   // flag for switching on extended matching histograms
-               Double_t fExoticCell;                                           // exotic cell cut
-               Bool_t fUseExoticCell;                                          // flag for switching on exotic cell cut
-               Double_t fMinEnergy;                                            // minium energy per cluster
-               Bool_t fUseMinEnergy;                                           // flag for switching on minimum energy cut
-               Int_t fMinNCells;                                                       // minimum number of cells 
-               Bool_t fUseNCells;                                                      // flag for switching on minimum N Cells cut
-               Double_t fMaxM02;                                                       // maximum M02
-               Double_t fMinM02;                                                       // minimum M02
-               Bool_t fUseM02;                                                         // flag for switching on M02 cut
-               Double_t fMaxM20;                                                       // maximum M20
-               Double_t fMinM20;                                                       // minimum M20
-               Bool_t fUseM20;                                                         // flag for switching on M20 cut
-               Double_t fMaxDispersion;                                        // maximum dispersion
-               Bool_t fUseDispersion;                                          // flag for switching on dispersion cut
-               Int_t fMinNLM;                                                          // minimum number of local maxima in cluster
-               Int_t fMaxNLM;                                                          // maximum number of local maxima in cluster
-               Bool_t fUseNLM;                                                         // flag for switching on NLM cut
+               Int_t           fClusterType;                                           // which cluster do we have
+               Double_t        fMinEtaCut;                                             // min eta cut
+               Double_t        fMaxEtaCut;                                             // max eta cut
+               Bool_t          fUseEtaCut;                                                     // flag for switching on eta cut
+               Double_t        fMinPhiCut;                                             // phi cut
+               Double_t        fMaxPhiCut;                                             // phi cut
+               Bool_t          fUsePhiCut;                                                     // flag for switching on phi cut
+               Double_t        fMinDistanceToBadChannel;                       // minimum distance to bad channel
+               Bool_t          fUseDistanceToBadChannel;                       // flag for switching on distance to bad channel cut
+               Double_t        fMaxTimeDiff;                                           // maximum time difference to triggered collision
+               Bool_t          fUseTimeDiff;                                           // flag for switching on time difference cut
+               Double_t        fMinDistTrackToCluster;                         // minimum distance between track and cluster
+               Bool_t          fUseDistTrackToCluster;                         // flag for switching on distance between track and cluster cut
+               Bool_t          fExtendedMatching;                                      // flag for switching on extended matching histograms
+               Double_t        fExoticCell;                                            // exotic cell cut
+               Bool_t          fUseExoticCell;                                         // flag for switching on exotic cell cut
+               Double_t        fMinEnergy;                                                     // minium energy per cluster
+               Bool_t          fUseMinEnergy;                                          // flag for switching on minimum energy cut
+               Int_t           fMinNCells;                                                     // minimum number of cells 
+               Bool_t          fUseNCells;                                                     // flag for switching on minimum N Cells cut
+               Double_t        fMaxM02;                                                        // maximum M02
+               Double_t        fMinM02;                                                        // minimum M02
+               Bool_t          fUseM02;                                                                // flag for switching on M02 cut
+               Double_t        fMaxM20;                                                        // maximum M20
+               Double_t        fMinM20;                                                        // minimum M20
+               Bool_t          fUseM20;                                                                // flag for switching on M20 cut
+               Double_t        fMaxDispersion;                                 // maximum dispersion
+               Bool_t          fUseDispersion;                                         // flag for switching on dispersion cut
+               Int_t           fMinNLM;                                                                // minimum number of local maxima in cluster
+               Int_t           fMaxNLM;                                                                // maximum number of local maxima in cluster
+               Bool_t          fUseNLM;                                                                // flag for switching on NLM cut
                
                // CutString
-               TObjString *fCutString;                                         // cut number used for analysis
+               TObjString* fCutString;                                                         // cut number used for analysis
                
                // Histograms
-               TH1F *fHistCutIndex;                                            // bookkeeping for cuts
-               TH1F *fHistAcceptanceCuts;                                      // bookkeeping for acceptance cuts
-               TH1F *fHistClusterIdentificationCuts;           // bookkeeping for cluster identification cuts
+               TH1F*           fHistCutIndex;                                                  // bookkeeping for cuts
+               TH1F*           fHistAcceptanceCuts;                                    // bookkeeping for acceptance cuts
+               TH1F*           fHistClusterIdentificationCuts;                 // bookkeeping for cluster identification cuts
                
-               TH2F* fHistClusterEtavsPhiBeforeAcc;            // eta-phi-distribution before acceptance cuts
-               TH2F* fHistClusterEtavsPhiAfterAcc;             // eta-phi-distribution of all after acceptance cuts
-               TH2F* fHistClusterEtavsPhiAfterQA;                      // eta-phi-distribution of all after cluster quality cuts
-//             TH1F* fHistDistanceToBadChannelBeforeAcc;   // distance to bad channel before acceptance cuts
-//             TH1F* fHistDistanceToBadChannelAfterAcc;        // distance to bad channel after acceptance cuts
-               TH2F* fHistClusterTimevsEBeforeQA;                      // Cluster time vs E before cluster quality cuts
-               TH2F* fHistClusterTimevsEAfterQA;                       // Cluster time vs E after cluster quality cuts
-//             TH2F* fHistExoticCellBeforeQA;                          // Exotic cell: 1-Ecross/E cell vs Ecluster before acceptance cuts
-//             TH2F* fHistExoticCellAfterQA;                           // Exotic cell: 1-Ecross/E cell vs Ecluster after cluster quality cuts
-//             TH1F* fHistNMatchedTracks;                                      // number of matched tracks
-               TH1F* fHistEnergyOfClusterBeforeQA;                     // enery per cluster before acceptance cuts
-               TH1F* fHistEnergyOfClusterAfterQA;                      // enery per cluster after cluster quality cuts
-               TH1F* fHistNCellsBeforeQA;                                      // number of cells per cluster before acceptance cuts
-               TH1F* fHistNCellsAfterQA;                                       // number of cells per cluster after cluster quality cuts
-               TH1F* fHistM02BeforeQA;                                         // M02 before acceptance cuts
-               TH1F* fHistM02AfterQA;                                          // M02 after cluster quality cuts
-               TH1F* fHistM20BeforeQA;                                         // M20 before acceptance cuts
-               TH1F* fHistM20AfterQA;                                          // M20 after cluster quality cuts
-               TH1F* fHistDispersionBeforeQA;                          // dispersion before acceptance cuts
-               TH1F* fHistDispersionAfterQA;                           // dispersion after cluster quality cuts
-//             TH1F* fHistNLMBeforeQA;                                         // number of local maxima in cluster before acceptance cuts
-//             TH1F* fHistNLMAfterQA;                                          // number of local maxima in cluster after cluster quality cuts
+               TH2F*           fHistClusterEtavsPhiBeforeAcc;                  // eta-phi-distribution before acceptance cuts
+               TH2F*           fHistClusterEtavsPhiAfterAcc;                   // eta-phi-distribution of all after acceptance cuts
+               TH2F*           fHistClusterEtavsPhiAfterQA;                    // eta-phi-distribution of all after cluster quality cuts
+//             TH1F*           fHistDistanceToBadChannelBeforeAcc;             // distance to bad channel before acceptance cuts
+//             TH1F*           fHistDistanceToBadChannelAfterAcc;              // distance to bad channel after acceptance cuts
+               TH2F*           fHistClusterTimevsEBeforeQA;                    // Cluster time vs E before cluster quality cuts
+               TH2F*           fHistClusterTimevsEAfterQA;                             // Cluster time vs E after cluster quality cuts
+//             TH2F*           fHistExoticCellBeforeQA;                                // Exotic cell: 1-Ecross/E cell vs Ecluster before acceptance cuts
+//             TH2F*           fHistExoticCellAfterQA;                                 // Exotic cell: 1-Ecross/E cell vs Ecluster after cluster quality cuts
+//             TH1F*           fHistNMatchedTracks;                                    // number of matched tracks
+               TH1F*           fHistEnergyOfClusterBeforeQA;                   // enery per cluster before acceptance cuts
+               TH1F*           fHistEnergyOfClusterAfterQA;                    // enery per cluster after cluster quality cuts
+               TH1F*           fHistNCellsBeforeQA;                                    // number of cells per cluster before acceptance cuts
+               TH1F*           fHistNCellsAfterQA;                                             // number of cells per cluster after cluster quality cuts
+               TH1F*           fHistM02BeforeQA;                                               // M02 before acceptance cuts
+               TH1F*           fHistM02AfterQA;                                                // M02 after cluster quality cuts
+               TH1F*           fHistM20BeforeQA;                                               // M20 before acceptance cuts
+               TH1F*           fHistM20AfterQA;                                                // M20 after cluster quality cuts
+               TH1F*           fHistDispersionBeforeQA;                                // dispersion before acceptance cuts
+               TH1F*           fHistDispersionAfterQA;                                 // dispersion after cluster quality cuts
+//             TH1F*           fHistNLMBeforeQA;                                               // number of local maxima in cluster before acceptance cuts
+//             TH1F*           fHistNLMAfterQA;                                                // number of local maxima in cluster after cluster quality cuts
 
         //Track matching histograms
-               TH1F* fHistClusterRBeforeQA;                            // cluster position in R=SQRT(x^2+y^2) (before QA)
-               TH1F* fHistClusterRAfterQA;                                     // cluster position in R=SQRT(x^2+y^2) for matched tracks (After QA)
-        TH2F* fHistClusterdEtadPhiBeforeQA;                    // 2-dim plot dEta vs. dPhi
-               TH2F* fHistClusterdEtadPhiAfterQA;                      // 2-dim plot dEta vs. dPhi for matched tracks (after QA)
-               TH1F* fHistDistanceTrackToClusterBeforeQA;      // distance cluster to track before acceptance cuts
-        TH1F* fHistDistanceTrackToClusterAfterQA;      // distance cluster to track after cluster quality cuts
+               TH1F*           fHistClusterRBeforeQA;                                  // cluster position in R=SQRT(x^2+y^2) (before QA)
+               TH1F*           fHistClusterRAfterQA;                                   // cluster position in R=SQRT(x^2+y^2) for matched tracks (After QA)
+        TH2F*          fHistClusterdEtadPhiBeforeQA;                   // 2-dim plot dEta vs. dPhi
+               TH2F*           fHistClusterdEtadPhiAfterQA;                    // 2-dim plot dEta vs. dPhi for matched tracks (after QA)
+               TH1F*           fHistDistanceTrackToClusterBeforeQA;    // distance cluster to track before acceptance cuts
+        TH1F*          fHistDistanceTrackToClusterAfterQA;             // distance cluster to track after cluster quality cuts
 
         //Extended track matching histograms
-        TH2F* fHistClusterdEtadPhiPosTracksBeforeQA;// 2-dim plot dEta vs. dPhi
-        TH2F* fHistClusterdEtadPhiNegTracksBeforeQA;// 2-dim plot dEta vs. dPhi
-        TH2F* fHistClusterdEtadPtBeforeQA;          // 2-dim plot dEta vs. Pt
-        TH2F* fHistClusterdPhidPtBeforeQA;          // 2-dim plot dEta vs. Pt
-        TH2F* fHistClusterM20Pt_dPhiBeforeQA;       // 2-dim plot M20 vs. Pt for given dPhi>0.05
-        TH2F* fHistClusterM02Pt_dPhiBeforeQA;       // 2-dim plot M02 vs. Pt for given dPhi>0.05
-        TH2F* fHistClusterM20M02BeforeQA;           // 2-dim plot M20 vs. M02
-        TH2F* fHistClusterM20M02AfterQA;            // 2-dim plot M20 vs. M20
+        TH2F*          fHistClusterdEtadPhiPosTracksBeforeQA;  // 2-dim plot dEta vs. dPhi
+        TH2F*          fHistClusterdEtadPhiNegTracksBeforeQA;  // 2-dim plot dEta vs. dPhi
+        TH2F*          fHistClusterdEtadPtBeforeQA;                    // 2-dim plot dEta vs. Pt
+        TH2F*          fHistClusterdPhidPtBeforeQA;                    // 2-dim plot dEta vs. Pt
+        TH2F*          fHistClusterM20Pt_dPhiBeforeQA;                 // 2-dim plot M20 vs. Pt for given dPhi>0.05
+        TH2F*          fHistClusterM02Pt_dPhiBeforeQA;                 // 2-dim plot M02 vs. Pt for given dPhi>0.05
+        TH2F*          fHistClusterM20M02BeforeQA;                             // 2-dim plot M20 vs. M02
+        TH2F*          fHistClusterM20M02AfterQA;                              // 2-dim plot M20 vs. M20
 
        private:
 
index 40301699ae82073707e92f7d6848d1730facc56b..f5f8a61344334e638c839fea8bde4509733d4594 100644 (file)
@@ -45,6 +45,7 @@
 #include "AliGenHijingEventHeader.h"
 #include "AliTriggerAnalysis.h"
 #include "AliV0ReaderV1.h"
+#include "AliVCaloCells.h"
 #include "AliAODMCParticle.h"
 #include "AliAODMCHeader.h"
 
@@ -1977,7 +1978,7 @@ Int_t AliConvEventCuts::IsParticleFromBGEvent(Int_t index, AliStack *MCStack, Al
 }
 
 //_________________________________________________________________________
-Int_t AliConvEventCuts::IsEventAcceptedByCut(AliConvEventCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Int_t isHeavyIon){
+Int_t AliConvEventCuts::IsEventAcceptedByCut(AliConvEventCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Int_t isHeavyIon, Bool_t isEMCALAnalysis){
 
        Bool_t isMC = kFALSE;
        if (MCEvent){isMC = kTRUE;}
@@ -2005,7 +2006,6 @@ Int_t AliConvEventCuts::IsEventAcceptedByCut(AliConvEventCuts *ReaderCuts, AliVE
        //if V0AND (only) or V0AND with SDD requested but V0AND requested but no fired
        return 8; // V0AND requested but no fired
 
-
        
        if( (IsSpecialTrigger() == 2 || IsSpecialTrigger() == 3) && !isSDDFired && !MCEvent)
                return 7; // With SDD requested but no fired
@@ -2013,6 +2013,45 @@ Int_t AliConvEventCuts::IsEventAcceptedByCut(AliConvEventCuts *ReaderCuts, AliVE
        if( (IsSpecialTrigger() == 1 || IsSpecialTrigger() == 3) && !hasV0And)
                return 8; // V0AND requested but no fired
 
+       // Special EMCAL checks due to hardware issues in LHC11a        
+       if (isEMCALAnalysis || IsSpecialTrigger() == 5 || IsSpecialTrigger() == 8 || IsSpecialTrigger() == 9 ){
+               Int_t runnumber = InputEvent->GetRunNumber();
+               if ((runnumber>=144871) && (runnumber<=146860)) { 
+
+                       AliVCaloCells *cells   = InputEvent->GetEMCALCells();
+                       const Short_t nCells   = cells->GetNumberOfCells();
+                       
+                       if (InputEvent->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch("EMCALCells.");
+
+                       AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
+                       if (!fInputHandler) return 3;
+                       
+                       // count cells above threshold
+                       Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
+                       for(Int_t iCell=0; iCell<nCells; ++iCell) {
+                               Short_t cellId = cells->GetCellNumber(iCell);
+                               Double_t cellE = cells->GetCellAmplitude(cellId);
+                               Int_t sm       = cellId / (24*48);
+                               if (cellE>0.1) ++nCellCount[sm];
+                       }
+
+                       Bool_t fIsLedEvent = kFALSE;
+                       if (nCellCount[4] > 100) {
+                               fIsLedEvent = kTRUE;
+                       } else {
+                               if ((runnumber>=146858) && (runnumber<=146860)) {
+                                       if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
+                                               fIsLedEvent = kTRUE;
+                                       else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
+                                               fIsLedEvent = kTRUE;
+                               }
+                       }
+                       if (fIsLedEvent) {
+                               return 9;
+                       }
+               }
+       }       
+               
        if(hCentrality)hCentrality->Fill(GetCentrality(InputEvent));
        if(hCentralityVsNumberOfPrimaryTracks)
                hCentralityVsNumberOfPrimaryTracks->Fill(GetCentrality(InputEvent),
index f4b89142d8b020e74e7ce924097377525e64a88a..e715ca32fababafb2962cf8c04d647617b042e05 100644 (file)
@@ -161,7 +161,7 @@ class AliConvEventCuts : public AliAnalysisCuts {
                
                // Cut Selection
                Bool_t          EventIsSelected(AliVEvent *fInputEvent, AliVEvent *fMCEvent);
-               Int_t           IsEventAcceptedByCut(AliConvEventCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Int_t isHeavyIon);
+               Int_t           IsEventAcceptedByCut(AliConvEventCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Int_t isHeavyIon, Bool_t isEMCALAnalysis);
                        
                void            PrintCuts();
                void            PrintCutsWithValues();
index 51bd45941fd23f70c32f96c9592bace83af23168..033e98baa382adbe7a06e8f70780677f1ce5e60f 100644 (file)
@@ -615,7 +615,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
                cutIndex++;
                if(abs(pi0->Rapidity()-fRapidityShift)>fRapidityCutMeson){
                        if(hist)hist->Fill(cutIndex);
-                       if (!IsSignal)   cout << abs(pi0->Rapidity()-fRapidityShift) << ">" << fRapidityCutMeson << endl;
+//                     if (!IsSignal)   cout << abs(pi0->Rapidity()-fRapidityShift) << ">" << fRapidityCutMeson << endl;
                        return kFALSE;
                }
        }
@@ -624,7 +624,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
        // Opening Angle Cut
        //fOpeningAngle=2*TMath::ATan(0.134/pi0->P());// physical minimum opening angle
        if( pi0->GetOpeningAngle() < fOpeningAngle){
-               if (!IsSignal) cout << pi0->GetOpeningAngle() << "<" << fOpeningAngle << endl; 
+//             if (!IsSignal) cout << pi0->GetOpeningAngle() << "<" << fOpeningAngle << endl; 
                if(hist)hist->Fill(cutIndex);
                return kFALSE;
        }
@@ -638,7 +638,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
        
        // Alpha Max Cut
        if(pi0->GetAlpha()>fAlphaCutMeson){
-               if (!IsSignal) cout << pi0->GetAlpha() << ">" << fAlphaCutMeson << endl; 
+//             if (!IsSignal) cout << pi0->GetAlpha() << ">" << fAlphaCutMeson << endl; 
                if(hist)hist->Fill(cutIndex);
                return kFALSE;
        }
@@ -646,7 +646,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
 
        // Alpha Min Cut
        if(pi0->GetAlpha()<fAlphaMinCutMeson){
-               if (!IsSignal)cout << pi0->GetAlpha() << "<" << fAlphaMinCutMeson << endl; 
+//             if (!IsSignal)cout << pi0->GetAlpha() << "<" << fAlphaMinCutMeson << endl; 
                if(hist)hist->Fill(cutIndex);
                return kFALSE;
        }
@@ -657,7 +657,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
 
        if (fDCAGammaGammaCutOn){
                if (pi0->GetDCABetweenPhotons() > fDCAGammaGammaCut){
-                       if (!IsSignal)cout << pi0->GetDCABetweenPhotons() << ">" << fDCAGammaGammaCut << endl; 
+//                     if (!IsSignal)cout << pi0->GetDCABetweenPhotons() << ">" << fDCAGammaGammaCut << endl; 
                        if(hist)hist->Fill(cutIndex);
                        return kFALSE;
                }
@@ -666,7 +666,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
 
        if (fDCARMesonPrimVtxCutOn){
                if (pi0->GetDCARMotherPrimVtx() > fDCARMesonPrimVtxCut){
-                       if (!IsSignal) cout << pi0->GetDCARMotherPrimVtx() << ">" << fDCARMesonPrimVtxCut << endl; 
+//                     if (!IsSignal) cout << pi0->GetDCARMotherPrimVtx() << ">" << fDCARMesonPrimVtxCut << endl; 
                        if(hist)hist->Fill(cutIndex);
                        return kFALSE;
                }
@@ -678,7 +678,7 @@ Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_
 
        if (fDCAZMesonPrimVtxCutOn){
                if (abs(pi0->GetDCAZMotherPrimVtx()) > fDCAZMesonPrimVtxCut){
-                       if (!IsSignal) cout << pi0->GetDCAZMotherPrimVtx() << ">" << fDCAZMesonPrimVtxCut << endl; 
+//                     if (!IsSignal) cout << pi0->GetDCAZMotherPrimVtx() << ">" << fDCAZMesonPrimVtxCut << endl; 
                        if(hist)hist->Fill(cutIndex);
                        return kFALSE;
                }