- fixed handling of added signals for LHC14a1b&c ("BOX" headers)
authorfbock <friederike.bock@cern.ch>
Fri, 11 Apr 2014 17:29:24 +0000 (19:29 +0200)
committercholm <Christian.Holm.Christensen@cern.ch>
Fri, 11 Apr 2014 17:50:02 +0000 (19:50 +0200)
- added cuts for PbPb in AddTask

PWGGA/GammaConv/AliConversionCuts.cxx
PWGGA/GammaConv/AliConversionCuts.h
PWGGA/GammaConv/macros/AddTask_GammaConvV1_PbPb.C
PWGGA/GammaConv/macros/AddTask_GammaConvV1_PbPb2.C

index 728b0d3..a6d5fb3 100644 (file)
@@ -229,6 +229,7 @@ AliConversionCuts::AliConversionCuts(const char *name,const char *title) :
    fFitDataPi0(NULL),
    fFitDataEta(NULL),
    fFitDataK0s(NULL),
+   fAddedSignalPDGCode(0),
    fPreSelCut(kFALSE),
    fTriggerSelectedManually(kFALSE),
    fSpecialTriggerName("")
@@ -385,6 +386,7 @@ AliConversionCuts::AliConversionCuts(const AliConversionCuts &ref) :
    fFitDataPi0(ref.fFitDataPi0),
    fFitDataEta(ref.fFitDataEta),
    fFitDataK0s(ref.fFitDataK0s),
+   fAddedSignalPDGCode(ref.fAddedSignalPDGCode),
    fPreSelCut(ref.fPreSelCut),
    fTriggerSelectedManually(ref.fTriggerSelectedManually),
    fSpecialTriggerName(ref.fSpecialTriggerName)
@@ -3768,45 +3770,57 @@ void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderLi
                                lastindexA = lastindexA + gh->NProduced();
 //                             cout << i << "\t" << GeneratorName.Data() << endl;
                                for(Int_t j = 0; j<HeaderList->GetEntries();j++){
-                               TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
-                               if(GeneratorName.CompareTo(GeneratorInList) == 0){
-                                       if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){
-                                               if(fMCStack){
-                                                       if (fMCStack->Particle(firstindexA)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA)->GetPdgCode() == 221 ) {
-                                                               if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
-                                                                       if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+                                       TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
+                                       if(GeneratorName.CompareTo(GeneratorInList) == 0){
+                                               if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){
+                                                       if(fMCStack){
+                                                               if (fMCStack->Particle(firstindexA)->GetPdgCode() == fAddedSignalPDGCode ) {
+                                                                       if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
+                                                                               if (gh->NProduced() > 10 && fMCStack->Particle(firstindexA+10)->GetPdgCode() == fAddedSignalPDGCode ){
+//                                                                                     cout << "cond 1: "<< fnHeaders << endl;
+                                                                                       fnHeaders++;
+                                                                                       continue;
+                                                                               }       
+                                                                               continue;
+                                                                       } else {
+//                                                                             cout << "cond 2: " << fnHeaders << endl;
                                                                                fnHeaders++;
                                                                                continue;
                                                                        }       
-                                                               } else {        
-                                                                       fnHeaders++;
-                                                                       continue;
-                                                               }       
-                                                       }
-                                               }   
-                                               if ( fMCStackAOD){
-                                                       AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindexA));
-                                                       if (  aodMCParticle->GetPdgCode() == 111 || aodMCParticle->GetPdgCode() == 221 ){
-                                                               if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
-                                                                       if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+                                                               }
+                                                       }   
+                                                       if ( fMCStackAOD){
+                                                               AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindexA));
+                                                               if (  aodMCParticle->GetPdgCode() == fAddedSignalPDGCode ){
+                                                                       if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
+                                                                               if (gh->NProduced() > 10){
+                                                                                       AliAODMCParticle *aodMCParticle2 = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindexA+10));
+                                                                                       if (  aodMCParticle2->GetPdgCode() == fAddedSignalPDGCode ){
+//                                                                                             cout << "cond 1: " << fnHeaders << endl;
+                                                                                               fnHeaders++;
+                                                                                               continue;
+                                                                                       } 
+                                                                               }       
+                                                                               continue;
+                                                                       } else {
+//                                                                             cout << "cond 2: " << fnHeaders << endl;
                                                                                fnHeaders++;
                                                                                continue;
                                                                        }       
-                                                               } else {
-                                                                       fnHeaders++;
-                                                                       continue;
-                                                               }       
-                                                       }   
+                                                               }   
+                                                       }
+                                                       continue;
                                                }
+//                                             cout << "cond 3: "<< fnHeaders << endl;
+                                               fnHeaders++;
+                                               continue;
                                        }
-                                       fnHeaders++;
-                                       continue;
-                               }
                                }
                                firstindexA = firstindexA + gh->NProduced();
                        }
                }
-
+//             cout << "number of headers: " <<fnHeaders << endl;
+               
                fNotRejectedStart = new Int_t[fnHeaders];
                fNotRejectedEnd = new Int_t[fnHeaders];
                fGeneratorNames = new TString[fnHeaders];
@@ -3821,22 +3835,27 @@ void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderLi
                Int_t firstindex = 0;
                Int_t lastindex =  -1;
                Int_t number = 0;
+               
                for(Int_t i = 0; i<genHeaders->GetEntries();i++){
                        gh = (AliGenEventHeader*)genHeaders->At(i);
                        TString GeneratorName = gh->GetName();
                        lastindex = lastindex + gh->NProduced();
                        for(Int_t j = 0; j<HeaderList->GetEntries();j++){
                                TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
+//                             cout << i << "\t" << GeneratorName.Data() << endl;
                                if(GeneratorName.CompareTo(GeneratorInList) == 0){
                                        if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){
                                                if(fMCStack){
-                                                       if (fMCStack->Particle(firstindex)->GetPdgCode() == 111 || fMCStack->Particle(firstindex)->GetPdgCode() == 221 ) {
+                                                       if (fMCStack->Particle(firstindex)->GetPdgCode() == fAddedSignalPDGCode ) {
                                                                if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
-                                                                       if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+//                                                                     cout << "produced " << gh->NProduced() << " with box generator" << endl;
+                                                                       if (gh->NProduced() > 10 && fMCStack->Particle(firstindex+10)->GetPdgCode() == fAddedSignalPDGCode){
+//                                                                             cout << "one of them was a pi0 or eta" <<  endl;
                                                                                fNotRejectedStart[number] = firstindex;
                                                                                fNotRejectedEnd[number] = lastindex;
                                                                                fGeneratorNames[number] = GeneratorName;
                                                                                number++;
+//                                                                             cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl;
                                                                                continue;
                                                                        }       
                                                                } else {
@@ -3850,15 +3869,18 @@ void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderLi
                                                }   
                                                if ( fMCStackAOD){
                                                        AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindex));
-                                                       if (  aodMCParticle->GetPdgCode() == 111 || aodMCParticle->GetPdgCode() == 221 ){
+                                                       if (  aodMCParticle->GetPdgCode() == fAddedSignalPDGCode ){
                                                                if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
-                                                                       if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
-                                                                               fNotRejectedStart[number] = firstindex;
-                                                                               fNotRejectedEnd[number] = lastindex;
-                                                                               fGeneratorNames[number] = GeneratorName;
-                                                                               number++;
-                                                                               continue;
+                                                                       if (gh->NProduced() > 10) {
+                                                                               AliAODMCParticle *aodMCParticle2 = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindex+10));
+                                                                               if ( aodMCParticle2->GetPdgCode() == fAddedSignalPDGCode ){
+                                                                                       fNotRejectedEnd[number] = lastindex;
+                                                                                       fNotRejectedStart[number] = firstindex;
+                                                                                       fGeneratorNames[number] = GeneratorName;
+                                                                                       number++;
                                                                        } 
+                                                                                       continue;
+                                                                               }
                                                                } else {
                                                                        fNotRejectedStart[number] = firstindex;
                                                                        fNotRejectedEnd[number] = lastindex;
@@ -3868,19 +3890,24 @@ void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderLi
                                                                }       
                                                        }   
                                                }
-                                                       
+                                               continue;
                                        } else {
                                                fNotRejectedStart[number] = firstindex;
                                                fNotRejectedEnd[number] = lastindex;
                                                fGeneratorNames[number] = GeneratorName;
-               //                cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl;
+//                                             cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl;
                                                number++;
                                                continue;
                                        }
+                                       
                                }
                        }
                        firstindex = firstindex + gh->NProduced();
                }
+//             for (Int_t i = 0; i < number; i++){
+//                     cout << i << "\t" <<fGeneratorNames[i] << "\t" << fNotRejectedStart[i] << "\t" <<fNotRejectedEnd[i] << endl;
+//             }       
+       
        } else { // No Cocktail Header Found
                fNotRejectedStart = new Int_t[1];
                fNotRejectedEnd = new Int_t[1];
@@ -3900,47 +3927,54 @@ void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderLi
 
                SetRejectExtraSignalsCut(0);
        }
+       
 }
 
 //_________________________________________________________________________
 Int_t AliConversionCuts::IsParticleFromBGEvent(Int_t index, AliStack *MCStack, AliVEvent *InputEvent){
 
-   // Not Accepted == kFALSE == 0
-   //     Accepted ==  kTRUE == 1
-   //  FirstHeader ==  kTRUE == 3
-   if(index < 0) return 0; // No Particle
-
-   Int_t accepted = 0;
-   if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
-      if( index >= MCStack->GetNprimary()){ // Secondary Particle
-         if( ((TParticle*)MCStack->Particle(index))->GetMother(0) < 0) return 1; // Secondary Particle without Mother??
-         return IsParticleFromBGEvent(((TParticle*)MCStack->Particle(index))->GetMother(0),MCStack,InputEvent);
-      }
-      for(Int_t i = 0;i<fnHeaders;i++){
-         if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){
-            accepted = 1;
-            if(i == 0) accepted = 2; // MB Header
-         }
-      }
-   }
-   else if(InputEvent->IsA()==AliAODEvent::Class()){
-      TClonesArray *AODMCTrackArray = dynamic_cast<TClonesArray*>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
-      AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index));
-      if(!aodMCParticle) return 1; // Photon Without a Mother ? --> Accepted
-      if(!aodMCParticle->IsPrimary()){
-         if( aodMCParticle->GetMother() < 0) return 1;// Secondary Particle without Mother??
-         return IsParticleFromBGEvent(aodMCParticle->GetMother(),MCStack,InputEvent);
-      }
-      index = abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
-      for(Int_t i = 0;i<fnHeaders;i++){
-         if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){
-            accepted = 1;
-            if(i == 0) accepted = 2; // MB Header
-         }
-      }
-   }
+       // Not Accepted == kFALSE == 0
+       //     Accepted ==  kTRUE == 1
+       //  FirstHeader ==  kTRUE == 3
+       if(index < 0) return 0; // No Particle
+
+//     if (index == 100){
+//             cout << "possible headers" << endl;
+//             for(Int_t i = 0;i<fnHeaders;i++){
+//                     cout << i << "\t" <<fGeneratorNames[i] << "\t" << fNotRejectedStart[i] << "\t" <<fNotRejectedEnd[i] << endl;
+//             }
+//     }       
+       Int_t accepted = 0;
+       if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
+               if( index >= MCStack->GetNprimary()){ // Secondary Particle
+                       if( ((TParticle*)MCStack->Particle(index))->GetMother(0) < 0) return 1; // Secondary Particle without Mother??
+                       return IsParticleFromBGEvent(((TParticle*)MCStack->Particle(index))->GetMother(0),MCStack,InputEvent);
+               }
+               for(Int_t i = 0;i<fnHeaders;i++){
+                       if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){
+                               accepted = 1;
+                               if(i == 0) accepted = 2; // MB Header
+                       }
+               }
+       }
+       else if(InputEvent->IsA()==AliAODEvent::Class()){
+               TClonesArray *AODMCTrackArray = dynamic_cast<TClonesArray*>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
+               AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index));
+               if(!aodMCParticle) return 1; // Photon Without a Mother ? --> Accepted
+               if(!aodMCParticle->IsPrimary()){
+                       if( aodMCParticle->GetMother() < 0) return 1;// Secondary Particle without Mother??
+                       return IsParticleFromBGEvent(aodMCParticle->GetMother(),MCStack,InputEvent);
+               }
+               index = abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
+               for(Int_t i = 0;i<fnHeaders;i++){
+                       if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){
+                               accepted = 1;
+                               if(i == 0) accepted = 2; // MB Header
+                       }
+               }
+       }
 
-   return accepted;
+       return accepted;
 }
 
 //_________________________________________________________________________
index 6933a1d..3fb7b74 100644 (file)
@@ -262,7 +262,7 @@ class AliConversionCuts : public AliAnalysisCuts {
    Bool_t SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx);
    Bool_t SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx);
    Bool_t SetInPlaneOutOfPlane(Int_t inOutPlane);
-   
+   void SetAddedSignalPDGCode(Int_t addedSignalPDGcode) {fAddedSignalPDGCode = addedSignalPDGcode;}
    // Request Flags
 
    Int_t IsHeavyIon(){return fIsHeavyIon;}
@@ -422,6 +422,7 @@ class AliConversionCuts : public AliAnalysisCuts {
    TF1  *fFitDataPi0; //fit to pi0 spectrum in Data
    TF1  *fFitDataEta; //fit to eta spectrum in Data
    TF1  *fFitDataK0s; //fit to K0s spectrum in Data
+   Int_t fAddedSignalPDGCode;
    Bool_t fPreSelCut; // Flag for preselection cut used in V0Reader
    Bool_t fTriggerSelectedManually; // Flag for manual trigger selection
    TString fSpecialTriggerName; // Name of the Special Triggers
index 3203522..1132976 100644 (file)
@@ -3,10 +3,10 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
                               Int_t enableQAMesonTask = 0, //enable QA in AliAnalysisTaskGammaConvV1
                               Int_t enableQAPhotonTask = 0, // enable additional QA task
                               TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
-                              Int_t doWeightingInt = 0,  //enable Weighting
+                              Int_t headerSelectionInt = 0,  // 1 pi0 header, 2 eta header, 3 both (only for "named" boxes)
                               TString cutnumberAODBranch = "1000000060084000001500000",
-                              TString periodName = "LHC13d2",
-                                                         Bool_t doWeighting = kFALSE
+                              TString periodName = "LHC13d2",  //name of the period for added signals and weighting
+                                                         Bool_t doWeighting = kFALSE  //enable Weighting
                            ) {
 
    // ================= Load Librariers =================================
@@ -716,30 +716,42 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
                cutarray[ 2] = "5010002002092970028250000000"; mesonCutArray[2]= "01525065000000"; // 0-10%
                cutarray[ 3] = "5240002002092970028250000000"; mesonCutArray[3]= "01525065000000"; // 20-40%
                cutarray[ 4] = "5250002002092970028250000000"; mesonCutArray[4]= "01525065000000"; // 20-50%
-       } else if ( trainConfig == 104){ // variation alpha 0.6&0.8
-               cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[0]= "01525085000000"; // 0-5%
-               cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[1]= "01525085000000"; // 5-10%
-               cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[2]= "01525085000000"; // 0-10%
-               cutarray[ 3] = "5240001002092970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
-               cutarray[ 4] = "5250001002092970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
-       } else if ( trainConfig == 105){ // variation alpha 0.6&0.8  added signal
-               cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[0]= "01525085000000"; // 0-5%
-               cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[1]= "01525085000000"; // 5-10%
-               cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[2]= "01525085000000"; // 0-10%
-               cutarray[ 3] = "5240002002092970028250400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
-               cutarray[ 4] = "5250002002092970028250400000"; mesonCutArray[4]= "01525065000000"; // 20-50%    
-       } else if ( trainConfig == 106){ // variation alpha 0.65&0.75
-               cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[0]= "01525045000000"; // 0-5%
-               cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[1]= "01525045000000"; // 5-10%
-               cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[2]= "01525045000000"; // 0-10%
+       } else if ( trainConfig == 104){ // variation alpha 0.75
+               cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[0]= "01525055000000"; // 0-5%
+               cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[1]= "01525055000000"; // 5-10%
+               cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[2]= "01525055000000"; // 0-10%
                cutarray[ 3] = "5240001002092970028250400000"; mesonCutArray[3]= "01525055000000"; // 20-40%
                cutarray[ 4] = "5250001002092970028250400000"; mesonCutArray[4]= "01525055000000"; // 20-50%
-       } else if ( trainConfig == 107){ // variation alpha 0.65&0.75  added signal
-               cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[0]= "01525045000000"; // 0-5%
-               cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[1]= "01525045000000"; // 5-10%
-               cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[2]= "01525045000000"; // 0-10%
+       } else if ( trainConfig == 105){ // variation alpha 0.75  added signal
+               cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[0]= "01525055000000"; // 0-5%
+               cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[1]= "01525055000000"; // 5-10%
+               cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[2]= "01525055000000"; // 0-10%
                cutarray[ 3] = "5240002002092970028250400000"; mesonCutArray[3]= "01525055000000"; // 20-40%
-               cutarray[ 4] = "5250002002092970028250400000"; mesonCutArray[4]= "01525055000000"; // 20-50%
+               cutarray[ 4] = "5250002002092970028250400000"; mesonCutArray[4]= "01525055000000"; // 20-50%    
+       } else if ( trainConfig == 106){ // variation alpha 0.85
+               cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[0]= "01525075000000"; // 0-5%
+               cutarray[ 1] = "6120001002092970028250400000"; mesonCutArray[1]= "01525075000000"; // 5-10%
+               cutarray[ 2] = "5010001002092970028250400000"; mesonCutArray[2]= "01525075000000"; // 0-10%
+               cutarray[ 3] = "5240001002092970028250400000"; mesonCutArray[3]= "01525075000000"; // 20-40%
+               cutarray[ 4] = "5250001002092970028250400000"; mesonCutArray[4]= "01525075000000"; // 20-50%
+       } else if ( trainConfig == 107){ // variation alpha 0.85  added signal
+               cutarray[ 0] = "6010002002092970028250400000"; mesonCutArray[0]= "01525075000000"; // 0-5%
+               cutarray[ 1] = "6120002002092970028250400000"; mesonCutArray[1]= "01525075000000"; // 5-10%
+               cutarray[ 2] = "5010002002092970028250400000"; mesonCutArray[2]= "01525075000000"; // 0-10%
+               cutarray[ 3] = "5240002002092970028250400000"; mesonCutArray[3]= "01525075000000"; // 20-40%
+               cutarray[ 4] = "5250002002092970028250400000"; mesonCutArray[4]= "01525075000000"; // 20-50%
+       } else if ( trainConfig == 108){ // psi pair 0.2
+               cutarray[ 0] = "6010001002092970028280400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
+               cutarray[ 1] = "6120001002092970028280400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
+               cutarray[ 2] = "5010001002092970028280400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
+               cutarray[ 3] = "5240001002092970028280400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
+               cutarray[ 4] = "5250001002092970028280400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
+       } else if ( trainConfig == 109){ // psi pair 0.2  added signal
+               cutarray[ 0] = "6010002002092970028280400000"; mesonCutArray[0]= "01525065000000"; // 0-5%
+               cutarray[ 1] = "6120002002092970028280400000"; mesonCutArray[1]= "01525065000000"; // 5-10%
+               cutarray[ 2] = "5010002002092970028280400000"; mesonCutArray[2]= "01525065000000"; // 0-10%
+               cutarray[ 3] = "5240002002092970028280400000"; mesonCutArray[3]= "01525065000000"; // 20-40%
+               cutarray[ 4] = "5250002002092970028280400000"; mesonCutArray[4]= "01525065000000"; // 20-50%
        } else {
       Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
       return;
@@ -759,18 +771,18 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
                TObjString *Header1 = new TObjString("PARAM");
                HeaderList->Add(Header1);
        } else if (periodName.CompareTo("LHC14a1a")==0){
-//             if (doWeightingInt == 1){ 
-//                     TObjString *Header1 = new TObjString("pi0_1");
-//                     HeaderList->Add(Header1);
-//             } else if (doWeightingInt == 2){
-//                     TObjString *Header1 = new TObjString("eta_2");
-//                     HeaderList->Add(Header1);
-//             } else {
+               if (headerSelectionInt == 1){ 
+                       TObjString *Header1 = new TObjString("pi0_1");
+                       HeaderList->Add(Header1);
+               } else if (headerSelectionInt == 2){
+                       TObjString *Header1 = new TObjString("eta_2");
+                       HeaderList->Add(Header1);
+               } else {
                        TObjString *Header1 = new TObjString("pi0_1");
                        HeaderList->Add(Header1);
                        TObjString *Header2 = new TObjString("eta_2");
                        HeaderList->Add(Header2);
-//             }  
+               }  
        } else if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0){
                TObjString *Header1 = new TObjString("BOX");
                HeaderList->Add(Header1);
@@ -863,7 +875,7 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
                        }       
                }         
                
-               if ( trainConfig == 70 || trainConfig == 72  || trainConfig == 74  || trainConfig == 76  || trainConfig == 78  || trainConfig == 80  || trainConfig == 82  || trainConfig == 84 || trainConfig == 86  || trainConfig == 88  || trainConfig == 90 || trainConfig == 92 || trainConfig == 94 || trainConfig == 96  || trainConfig == 98  || trainConfig == 100 || trainConfig == 102  || trainConfig == 104 || trainConfig == 106 ){
+               if ( trainConfig == 70 || trainConfig == 72  || trainConfig == 74  || trainConfig == 76  || trainConfig == 78  || trainConfig == 80  || trainConfig == 82  || trainConfig == 84 || trainConfig == 86  || trainConfig == 88  || trainConfig == 90 || trainConfig == 92 || trainConfig == 94 || trainConfig == 96  || trainConfig == 98  || trainConfig == 100 || trainConfig == 102  || trainConfig == 104 || trainConfig == 106 || trainConfig == 108){
                        if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
                                if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0005TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0005TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M","Eta_Fit_Data_PbPb_2760GeV_0005V0M");
                                if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_0510TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_0510TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M","Eta_Fit_Data_PbPb_2760GeV_0510V0M");
@@ -872,7 +884,7 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
                                if ( i == 4 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_PbPb_2760GeV_2050TPC",periodName.Data()), Form("Eta_Hijing_%s_PbPb_2760GeV_2050TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_2050V0M","Eta_Fit_Data_PbPb_2760GeV_2050V0M");
                        }       
                } 
-               if ( trainConfig == 71 || trainConfig == 73  || trainConfig == 75  || trainConfig == 77  || trainConfig == 79  || trainConfig == 81  || trainConfig == 83  || trainConfig == 85 || trainConfig == 87  || trainConfig == 89  || trainConfig == 91 || trainConfig == 93 || trainConfig == 95 || trainConfig == 97  || trainConfig == 99  || trainConfig == 101 || trainConfig == 103  || trainConfig == 105 || trainConfig == 107 ){
+               if ( trainConfig == 71 || trainConfig == 73  || trainConfig == 75  || trainConfig == 77  || trainConfig == 79  || trainConfig == 81  || trainConfig == 83  || trainConfig == 85 || trainConfig == 87  || trainConfig == 89  || trainConfig == 91 || trainConfig == 93 || trainConfig == 95 || trainConfig == 97  || trainConfig == 99  || trainConfig == 101 || trainConfig == 103  || trainConfig == 105 || trainConfig == 107 || trainConfig == 109){
                        if (periodName.CompareTo("LHC14a1a") ==0 || periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
                                if ( i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0005TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0005TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M","Eta_Fit_Data_PbPb_2760GeV_0005V0M");
                                if ( i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, Form("Pi0_Hijing_%s_addSig_PbPb_2760GeV_0510TPC",periodName.Data()), Form("Eta_Hijing_%s_addSig_PbPb_2760GeV_0510TPC",periodName.Data()), "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M","Eta_Fit_Data_PbPb_2760GeV_0510V0M");
@@ -883,6 +895,10 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
                } 
                
                analysisCuts[i]->InitializeCutsFromCutString(cutarray[i].Data());
+               if (periodName.CompareTo("LHC14a1b") ==0 || periodName.CompareTo("LHC14a1c") ==0 ){
+                       if (headerSelectionInt == 1) analysisCuts[i]->SetAddedSignalPDGCode(111);
+                       if (headerSelectionInt == 2) analysisCuts[i]->SetAddedSignalPDGCode(221);
+               }
                ConvCutList->Add(analysisCuts[i]);
 
                if (trainConfig == 37 || trainConfig == 38){
index f2cd82a..f7e2f24 100644 (file)
@@ -127,39 +127,37 @@ void AddTask_GammaConvV1_PbPb2(  Int_t trainConfig = 1,  //change different set
    } else if (trainConfig == 15) { 
       cutarray[ 0] = "5890001042092970023220000000"; mesonCutArray[ 0] = "01522065009000";    
    } else  if (trainConfig == 16){ 
-      cutarray[ 0] = "6010002032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; 
+      cutarray[ 0] = "6010001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 17) { 
-      cutarray[ 0] = "6120001032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; 
+      cutarray[ 0] = "6120001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 18) { 
-      cutarray[ 0] = "5010001032092970023220000000"; mesonCutArray[ 0] = "01523045009000"; 
+      cutarray[ 0] = "5010001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 19) { 
-      cutarray[ 0] = "5020001032092970023220000000"; mesonCutArray[ 0] = "01523045009000";    
+      cutarray[ 0] = "5020001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";    
    } else if (trainConfig == 20) { 
-      cutarray[ 0] = "5120001032092970023220000000"; mesonCutArray[ 0] = "01523045009000";    
+      cutarray[ 0] = "5120001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";    
    } else if (trainConfig == 21) { 
-      cutarray[ 0] = "5240001032092970023220000000"; mesonCutArray[ 0] = "01523045009000";       
+      cutarray[ 0] = "5240001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";       
    } else if (trainConfig == 22) {    
-      cutarray[ 0] = "5460001032092970023220000000"; mesonCutArray[ 0] = "01523065009000"; 
+      cutarray[ 0] = "5460001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 23) {    
-      cutarray[ 0] = "5480001032092970023220000000"; mesonCutArray[ 0] = "01523065009000";    
+      cutarray[ 0] = "5480001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";    
    } else if (trainConfig == 24) {    
-      cutarray[ 0] = "5450001032092970023220000000"; mesonCutArray[ 0] = "01523065009000"; 
+      cutarray[ 0] = "5450001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 25) { 
-      cutarray[ 0] = "5560001032092970023220000000"; mesonCutArray[ 0] = "01523065009000";
+      cutarray[ 0] = "5560001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";
    } else if (trainConfig == 26) { 
-      cutarray[ 0] = "5680001032092970023220000000"; mesonCutArray[ 0] = "01523065009000";    
+      cutarray[ 0] = "5680001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";    
    } else if (trainConfig == 27) { 
-      cutarray[ 0] = "5670001032092970023220000000"; mesonCutArray[ 0] = "01523065009000"; 
+      cutarray[ 0] = "5670001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 28) { 
-      cutarray[ 0] = "5780001032092970023220000000"; mesonCutArray[ 0] = "01523065009000"; 
+      cutarray[ 0] = "5780001002092970028250400000"; mesonCutArray[ 0] = "01525065009000"; 
    } else if (trainConfig == 29) { 
-      cutarray[ 0] = "4690001032092970023220000000"; mesonCutArray[ 0] = "01523065009000";
+      cutarray[ 0] = "4690001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";
    } else if (trainConfig == 30) { 
-      cutarray[ 0] = "5890001032092970023220000000"; mesonCutArray[ 0] = "01523065009000";    
+      cutarray[ 0] = "5890001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";    
    } else if (trainConfig == 31) { 
-      cutarray[ 0] = "5080001002092970023220000000"; mesonCutArray[ 0] = "01525065009000";    
-   } else if (trainConfig == 32) { 
-      cutarray[ 0] = "5080002002092970023220000000"; mesonCutArray[ 0] = "01525065009000";    
+      cutarray[ 0] = "5080001002092970028250400000"; mesonCutArray[ 0] = "01525065009000";    
    } else {
       Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
       return;