25 #include "AliAODTrack.h" 26 #include "AliESDtrack.h" 27 #include "AliAnalysisManager.h" 28 #include "AliInputEventHandler.h" 29 #include "AliMCEventHandler.h" 30 #include "AliAODHandler.h" 34 #include "TObjString.h" 35 #include "AliMCEvent.h" 36 #include "AliAODEvent.h" 37 #include "AliESDEvent.h" 38 #include "AliCentrality.h" 39 #include "AliMultSelection.h" 43 #include "AliGenCocktailEventHeader.h" 44 #include "AliGenDPMjetEventHeader.h" 45 #include "AliGenPythiaEventHeader.h" 46 #include "AliGenHijingEventHeader.h" 47 #include "AliTriggerAnalysis.h" 49 #include "AliVCaloCells.h" 50 #include "AliAODMCParticle.h" 51 #include "AliAODMCHeader.h" 52 #include "AliEMCALTriggerPatchInfo.h" 67 "SelectSpecialTrigger",
68 "SelectSpecialSubTriggerClass",
77 AliAnalysisCuts(name,title),
80 fDoLightOutput(kFALSE),
83 fDetectorCentrality(0),
84 fModCentralityClass(0),
85 fEnableVertexCut(kTRUE),
89 fMultiplicityMethod(0),
91 fSpecialSubTrigger(0),
92 fRemovePileUp(kFALSE),
93 fPastFutureRejectionLow(0),
94 fPastFutureRejectionHigh(0),
95 fDoPileUpRejectV0MTPCout(0),
96 fFPileUpRejectV0MTPCout(0),
97 fRejectExtraSignals(0),
98 fOfflineTriggerMask(0),
103 fNotRejectedStart(NULL),
104 fNotRejectedEnd(NULL),
105 fGeneratorNames(NULL),
106 fPeriodEnum(kNoPeriod),
113 fDoCentralityFlat(0),
114 fPathWeightsFlatCent(
""),
115 fNameHistoNotFlatCentrality(
""),
116 fDoReweightHistoMCPi0(kFALSE),
117 fDoReweightHistoMCEta(kFALSE),
118 fDoReweightHistoMCK0s(kFALSE),
119 fPathTrFReweighting(
""),
120 fNameHistoReweightingPi0(
""),
121 fNameHistoReweightingEta(
""),
122 fNameHistoReweightingK0s(
""),
126 fHistoEventCuts(NULL),
127 fHistoPastFutureBits(NULL),
129 hCentralityNotFlat(NULL),
132 hNPileupVertices(NULL),
133 hPileupVertexToPrimZ(NULL),
134 hPileupVertexToPrimZSPDPileup(NULL),
135 hPileupVertexToPrimZTrackletvsHits(NULL),
136 hEventPlaneAngle(NULL),
139 hTriggerClassSelected(NULL),
140 hTriggerClassesCorrelated(NULL),
141 hReweightMCHistPi0(NULL),
142 hReweightMCHistEta(NULL),
143 hReweightMCHistK0s(NULL),
147 fAddedSignalPDGCode(0),
149 fTriggerSelectedManually(kFALSE),
150 fSpecialTriggerName(
""),
151 fSpecialSubTriggerName(
""),
152 fNSpecialSubTriggerOptions(0),
153 hSPDClusterTrackletBackgroundBefore(NULL),
154 hSPDClusterTrackletBackground(NULL),
156 fCorrTaskSetting(
""),
158 fTriggerPatchInfo(NULL),
159 fMainTriggerPatchEMCAL(NULL),
160 fCaloTriggersName(
""),
161 fCaloTriggerPatchInfoName(
""),
163 fTriggersEMCALSelected(-1),
164 fEMCALTrigInitialized(kFALSE),
165 fSecProdBoundary(1.0),
168 fMaxFacPtHardSingleParticle(1.5),
169 fMimicTrigger(kFALSE),
170 fRejectTriggerOverlap(kFALSE),
171 fDoMultiplicityWeighting(kFALSE),
172 fPathReweightingMult(
""),
173 fNameHistoReweightingMultData(
""),
174 fNameHistoReweightingMultMC(
""),
175 hReweightMultData(NULL),
176 hReweightMultMC(NULL),
182 fUtils =
new AliAnalysisUtils();
191 AliAnalysisCuts(ref),
296 fUtils =
new AliAnalysisUtils();
336 TH1::AddDirectory(kFALSE);
429 hTriggerClass->GetXaxis()->SetBinLabel( 9,
"kMUL7/kMuonLikePB");
430 hTriggerClass->GetXaxis()->SetBinLabel(10,
"kMUU7/kMuonUnlikePB");
434 hTriggerClass->GetXaxis()->SetBinLabel(14,
"kPHI7/kPHI8/kPHOSPb");
443 hTriggerClass->GetXaxis()->SetBinLabel(23,
"kMuonSingleLowPt8");
444 hTriggerClass->GetXaxis()->SetBinLabel(24,
"kMuonSingleHighPt8");
445 hTriggerClass->GetXaxis()->SetBinLabel(25,
"kMuonLikeLowPt8");
446 hTriggerClass->GetXaxis()->SetBinLabel(26,
"kMuonUnlikeLowPt8");
447 hTriggerClass->GetXaxis()->SetBinLabel(27,
"kMuonUnlikeLowPt0");
455 hTriggerClass->GetXaxis()->SetBinLabel(35,
"failed Physics Selection");
456 hTriggerClass->GetXaxis()->SetBinLabel(36,
"mimickedTrigger");
514 TH1::AddDirectory(kTRUE);
527 if(mcEvent && event->IsA()==AliESDEvent::Class()){
529 AliMCEventHandler* mcHandler =
dynamic_cast<AliMCEventHandler*
> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
534 if (!mcHandler->InitOk() ){
538 if (!mcHandler->TreeK() ){
562 if(event->IsA()==AliESDEvent::Class()){
563 AliTriggerAnalysis fTriggerAnalysis;
564 fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((
AliESDEvent*)event, AliTriggerAnalysis::kV0AND);
591 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
592 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
593 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
598 if(event->IsA()==AliESDEvent::Class()){
602 for(
Int_t i=0; i<nPileVert;i++){
603 const AliESDVertex* pv = ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
604 Int_t nc2 = pv->GetNContributors();
609 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
621 if(
fUtils->IsPileUpMV(event)){
627 if(
fUtils->IsFirstEventInChunk(event)){
633 if(
fUtils->IsPileUpEvent(event)){
639 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
648 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
654 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
687 AliEventplane *EventPlane =
event->GetEventplane();
712 AliInfo(
"Entering loading of weights for centrality flattening");
735 AliInfo(
"Entering loading of weights for multiplicity weighting");
769 AliInfo(
"Entering loading of histograms for weighting");
835 AliInfo(
"Centrality flattening was enabled");
840 AliInfo(
"Multiplicity weighting was enabled");
844 AliInfo(
"Particle Weighting was enabled");
849 AliInfo(Form(
"Set Event Cut Number: %s",analysisCutSelection.Data()));
850 if(analysisCutSelection.Length()!=
kNCuts) {
851 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
854 if(!analysisCutSelection.IsAlnum()){
855 AliError(
"Cut selection is not alphanumeric");
862 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
863 analysisCutSelectionLowerCase.ToLower();
864 const char *cutSelection = analysisCutSelectionLowerCase.Data();
865 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0' 898 }
else return kFALSE;
904 }
else return kFALSE;
910 }
else return kFALSE;
916 }
else return kFALSE;
922 }
else return kFALSE;
928 }
else return kFALSE;
934 }
else return kFALSE;
940 }
else return kFALSE;
943 AliError(
"Cut id out of range");
947 AliError(
"Cut id %d not recognized");
961 printf(
"\nEvent cutnumber \n");
963 printf(
"%d",
fCuts[ic]);
967 printf(
"Running in pp mode \n");
970 printf(
"\t only events triggered by V0OR will be analysed \n");
972 printf(
"\t only events where SDD was present will be analysed \n");
976 printf(
"\t only events triggered by V0AND will be analysed \n");
978 printf(
"\t only events where SDD was present will be analysed and triggered by VOAND\n");
989 printf(
"Running in PbPb mode \n");
991 printf(
"\t centrality selection based on V0M \n");
993 printf(
"\t centrality selection based on Cl1 \n");
1009 printf(
"\t only events triggered by kMB, kCentral, kSemiCentral will be analysed \n");
1017 printf(
"Running in pPb mode \n");
1019 printf(
"\t centrality selection based on V0A \n");
1021 printf(
"\t centrality selection based on Cl1 \n");
1030 printf(
"\t only events triggered by kINT7 will be analysed \n");
1037 else printf(
"\t No vertex cut \n");
1040 printf(
"\t Doing pile up removal \n");
1042 printf(
"\t Doing extra pile up removal V0M vs TPCout \n");
1046 printf(
"MC event cuts: \n");
1050 printf(
"\t maximum factor between jet and pt hard = %2.2f \n",
fMaxFacPtHard);
1129 AliError(Form(
"SetHeavyIon not defined %d",isHeavyIon));
1139 if(minCentrality<0||minCentrality>20){
1140 AliError(Form(
"minCentrality not defined %d",minCentrality));
1152 if(maxCentrality<0||maxCentrality>20){
1153 AliError(Form(
"maxCentrality not defined %d",maxCentrality));
1164 switch(selectSpecialTrigger){
1194 fOfflineTriggerMask=AliVEvent::kPHI7 | AliVEvent::kPHI1 | AliVEvent::kPHI8 | AliVEvent::kPHOSPb;
1221 AliError(
"Warning: Special Trigger Not known");
1232 switch(selectSpecialSubTriggerClass){
1243 AliError(
"Warning: Special Subtrigger Class Not known");
1247 switch(selectSpecialSubTriggerClass){
1272 AliError(
"Warning: Special Subtrigger Class Not known");
1276 switch(selectSpecialSubTriggerClass){
1337 AliError(
"Warning: Special Subtrigger Class Not known");
1341 switch(selectSpecialSubTriggerClass){
1388 AliError(
"Warning: Special Subtrigger Class Not known");
1392 switch(selectSpecialSubTriggerClass){
1441 AliError(
"Warning: Special Subtrigger Class Not known");
1445 switch(selectSpecialSubTriggerClass){
1473 AliError(
"Warning: Special Subtrigger Class Not known");
1477 switch(selectSpecialSubTriggerClass){
1521 AliError(
"Warning: Special Subtrigger Class Not known");
1525 switch(selectSpecialSubTriggerClass){
1617 AliError(
"Warning: Special Subtrigger Class Not known");
1621 switch(selectSpecialSubTriggerClass){
1699 AliError(
"Warning: Special Subtrigger Class Not known");
1723 switch(removePileUp){
1857 AliError(
"RemovePileUpCut not defined");
1866 switch(extraSignal){
1880 AliError(Form(
"Extra Signal Rejection not defined %d",extraSignal));
1915 AliError(Form(
"Vertex Cut not defined %d",vertexCut));
1962 AliMultSelection *MultSelection = (AliMultSelection*)event->FindListObject(
"MultSelection");
1964 AliWarning (
"AliMultSelection object not found !");
1968 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1969 else return MultSelection->GetMultiplicityPercentile(
"V0M");
1970 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1973 AliCentrality *fESDCentrality = (AliCentrality*)esdEvent->GetCentrality();
1975 if(
fIsHeavyIon==2)
return fESDCentrality->GetCentralityPercentile(
"V0A");
1976 else return fESDCentrality->GetCentralityPercentile(
"V0M");
1984 AliMultSelection *MultSelection = (AliMultSelection*)aodEvent->FindListObject(
"MultSelection");
1986 AliWarning (
"AliMultSelection object not found !");
1990 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1991 else return MultSelection->GetMultiplicityPercentile(
"V0M",kTRUE);
1992 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1995 if(aodEvent->GetHeader()){
return ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();}
2010 Int_t primaryTracksPP[9] = { 0, 2, 5, 10, 15,
2025 if(centrality<0 && !mcEvent)
return kFALSE;
2027 Int_t centralityC=0;
2029 centralityC=
Int_t(centrality/10);
2035 centralityC=
Int_t(centrality);
2038 }
else return kFALSE;
2042 Int_t PrimaryTracks10[11][2] =
2056 Int_t PrimaryTracksLHC11h10[11][2] =
2070 Int_t PrimaryTracksLHC15o10[11][2] =
2084 Int_t PrimaryTracksLHC10h5[21][2] =
2108 Int_t PrimaryTracksLHC11h5[21][2] =
2132 Int_t PrimaryTracksLHC15o5[21][2] =
2156 Int_t PrimaryTracksLHC17n10[11][2] =
2172 if(event->IsA()==AliESDEvent::Class()) column = 0;
2173 if(event->IsA()==AliAODEvent::Class()) column = 1;
2189 centralityC=
Int_t(centrality/10);
2191 if(
fCentralityMin==0 && nprimaryTracks >= PrimaryTracksLHC15o10[0][column])
return kFALSE;
2193 }
else return kFALSE;
2202 centralityC=
Int_t(centrality/10);
2217 centralityC =
Int_t(centrality);
2219 if(
fCentralityMin==0 && nprimaryTracks >= PrimaryTracksLHC15o5[0][column])
return kFALSE;
2221 }
else return kFALSE;
2230 centralityC=
Int_t(centrality);
2233 }
else return kFALSE;
2237 Int_t PrimaryTracksLHC11h10AltMin[11][2] =
2251 Int_t PrimaryTracksLHC11h10AltMax[11][2] =
2265 Int_t PrimaryTracksLHC11h5AltMin[21][2] =
2289 Int_t PrimaryTracksLHC11h5AltMax[21][2] =
2318 if(nprimaryTracks > PrimaryTracksLHC11h10AltMin[
fCentralityMax][column] && nprimaryTracks <= PrimaryTracksLHC11h10AltMax[
fCentralityMin][column])
2326 centralityC=
Int_t(centrality/10);
2336 if(nprimaryTracks > PrimaryTracksLHC11h5AltMin[
fCentralityMax][column] && nprimaryTracks <= PrimaryTracksLHC11h5AltMax[
fCentralityMin][column])
2343 centralityC=
Int_t(centrality);
2346 }
else return kFALSE;
2356 Double_t fVertexZ=
event->GetPrimaryVertex()->GetZ();
2360 fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
2364 fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
2367 if(TMath::Abs(fVertexZ)>
fMaxVertexZ)
return kFALSE;
2371 if (TMath::Abs(fVertexZ-fVertexZSPD) > 0.1)
return kFALSE;
2374 if(!
fUtils->IsVertexSelected2013pA(event))
return kFALSE;
2385 TBits fIR1 =
event->GetHeader()->GetIRInt1InteractionMap();
2386 TBits fIR2 =
event->GetHeader()->GetIRInt2InteractionMap();
2387 UShort_t bunchCrossings =
event->GetBunchCrossNumber();
2389 for(
Int_t i = 0; i<180;i++){
2390 if(fIR1.TestBitNumber(i))
2395 Bool_t isOutOfBunchPileup = 0;
2398 if(pf1 < -89) pf1 = -89;
2399 if(pf2 > 89) pf2 = 89;
2400 Int_t pf2maxForT0 = pf2;
2402 for (
Int_t i=pf1;i<=pf2;i++) {
2404 if (i<=pf2maxForT0) isOutOfBunchPileup|=fIR2.TestBitNumber(90+i);
2405 if (i>0 && i<=ir1skip)
continue;
2406 isOutOfBunchPileup|=fIR1.TestBitNumber(90+i);
2408 return isOutOfBunchPileup;
2414 Bool_t isPileUpV0MTPCout=0;
2419 multV0M =
event->GetVZEROData()->GetMTotV0A();
2421 multV0M =
event->GetVZEROData()->GetMTotV0A() +
event->GetVZEROData()->GetMTotV0C() ;
2426 if (multV0M < valFunc ) isPileUpV0MTPCout=1;
2429 return isPileUpV0MTPCout;
2438 if (fESDEvent->GetPrimaryVertex() != NULL){
2439 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2441 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2445 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2446 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2448 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2450 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2459 if (fAODEvent->GetPrimaryVertex() != NULL){
2460 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2461 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2464 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2465 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2466 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2468 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2481 AliGenCocktailEventHeader *cHeader = 0x0;
2482 Bool_t headerFound = kFALSE;
2503 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2504 if(cHeader) headerFound = kTRUE;
2512 TList *genHeaders = 0x0;
2513 if(cHeader) genHeaders = cHeader->GetHeaders();
2514 AliGenEventHeader* gh = 0;
2515 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2516 gh = (AliGenEventHeader*)genHeaders->At(i);
2517 TString GeneratorName = gh->GetName();
2518 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2519 Bool_t eventAccepted = kTRUE;
2520 TParticle * jet = 0;
2521 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2524 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2525 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2526 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2529 eventAccepted= kFALSE;
2533 if (jet)
delete jet;
2535 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2536 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2537 if (!particle)
continue;
2538 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2540 eventAccepted= kFALSE;
2548 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2550 70, 85, 99, 115, 132,
2551 150, 169, 190, 212, 235,
2553 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2554 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2555 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2556 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2558 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2559 if (bin < 20) weight = weightsBins[bin];
2562 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2564 70, 85, 99, 115, 132,
2565 150, 169, 190, 212, 235,
2567 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2568 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2569 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2570 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2573 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2574 if (bin < 20) weight = weightsBins[bin];
2577 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2579 70, 85, 99, 115, 132,
2580 150, 169, 190, 212, 235,
2582 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2583 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2584 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2585 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2587 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2588 if (bin < 20) weight = weightsBins[bin];
2592 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2595 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2596 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2597 1.933238e-05, 1.562895e-05};
2599 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2600 if (bin < 12) weight = weightsBins[bin];
2603 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2604 84, 117, 152, 191, 1000000,
2606 21, 28, 36, 45, 57 };
2607 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2608 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2609 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2610 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2614 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2615 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2616 if (bin < 19) weight = weightsBins[bin];
2619 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2620 84, 117, 152, 191, 1000000,
2622 21, 28, 36, 45, 57 };
2624 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2625 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2626 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2627 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2630 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2631 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2632 if (bin < 19) weight = weightsBins[bin];
2635 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2637 70, 85, 99, 115, 132,
2638 150, 169, 190, 212, 235,
2640 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2641 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2642 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2643 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2645 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2646 if (bin < 20) weight = weightsBins[bin];
2649 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2650 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2652 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2653 if (bin < 5) weight = weightsBins[bin];
2656 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2657 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2659 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2660 if (bin < 6) weight = weightsBins[bin];
2663 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2664 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2666 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2667 if (bin < 7) weight = weightsBins[bin];
2670 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2671 84, 117, 152, 191, 234,
2673 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2674 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2676 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2677 if (bin < 10) weight = weightsBins[bin];
2679 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16, 21, 28, 36, 45, 57, 70, 85, 99, 115, 132, 150, 169, 190, 212, 235, 10000};
2680 Double_t weightsBins[20] = {1.565930E+01, 4.598350E+00, 2.081240E+00, 7.744650E-01, 2.644240E-01, 1.002330E-01, 2.979190E-02, 9.696490E-03, 3.950930E-03, 1.333040E-03, 5.210630E-04, 1.927180E-04, 9.235930E-05, 4.346820E-05, 2.120660E-05, 1.073260E-05, 5.701210E-06, 3.047490E-06, 1.664780E-06, 2.123400E-06};
2682 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2683 if (bin < 20) weight = weightsBins[bin];
2685 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16, 21, 28, 36, 45, 57, 70, 85, 99, 115, 132, 150, 169, 190, 212, 235, 10000};
2686 Double_t weightsBins[20] = {2.723740E+01, 8.127540E+00, 3.934400E+00, 1.492720E+00, 5.268010E-01, 2.033790E-01, 6.361520E-02, 2.256080E-02, 9.638840E-03, 3.372890E-03, 1.381980E-03, 5.121390E-04, 2.613120E-04, 1.260940E-04, 6.393150E-05, 3.386080E-05, 1.926040E-05, 1.046950E-05, 5.895950E-06, 8.658420E-06};
2688 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2689 if (bin < 20) weight = weightsBins[bin];
2691 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16, 21, 28, 36, 45, 57, 70, 85, 99, 115, 132, 150, 169, 190, 212, 235, 10000};
2692 Double_t weightsBins[20] = {2.716550E+01, 8.121430E+00, 3.932100E+00, 1.492830E+00, 5.272190E-01, 2.023090E-01, 6.371860E-02, 2.245360E-02, 9.590340E-03, 3.369300E-03, 1.384470E-03, 5.119390E-04, 2.606910E-04, 1.259110E-04, 6.408650E-05, 3.396290E-05, 1.917340E-05, 1.044610E-05, 5.882680E-06, 8.672390E-06};
2694 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2695 if (bin < 20) weight = weightsBins[bin];
2700 if (weight == -1)
return kFALSE;
2701 else return eventAccepted;
2706 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2707 TString eventHeaderName = eventHeader->ClassName();
2708 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2709 Bool_t eventAccepted = kTRUE;
2710 TParticle * jet = 0;
2711 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2712 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2714 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2715 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2716 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2719 eventAccepted= kFALSE;
2724 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2725 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2726 if (!particle)
continue;
2727 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2729 eventAccepted= kFALSE;
2737 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2739 70, 85, 99, 115, 132,
2740 150, 169, 190, 212, 235,
2742 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2743 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2744 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2745 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2747 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2748 if (bin < 20) weight = weightsBins[bin];
2751 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2753 70, 85, 99, 115, 132,
2754 150, 169, 190, 212, 235,
2756 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2757 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2758 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2759 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2762 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2763 if (bin < 20) weight = weightsBins[bin];
2766 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2768 70, 85, 99, 115, 132,
2769 150, 169, 190, 212, 235,
2771 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2772 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2773 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2774 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2776 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2777 if (bin < 20) weight = weightsBins[bin];
2781 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2784 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2785 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2786 1.933238e-05, 1.562895e-05};
2788 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2789 if (bin < 12) weight = weightsBins[bin];
2792 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2793 84, 117, 152, 191, 1000000,
2795 21, 28, 36, 45, 57 };
2796 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2797 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2798 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2799 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2803 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2804 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2805 if (bin < 19) weight = weightsBins[bin];
2808 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2809 84, 117, 152, 191, 1000000,
2811 21, 28, 36, 45, 57 };
2813 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2814 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2815 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2816 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2819 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2820 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2821 if (bin < 19) weight = weightsBins[bin];
2824 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2826 70, 85, 99, 115, 132,
2827 150, 169, 190, 212, 235,
2829 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2830 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2831 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2832 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2834 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2835 if (bin < 20) weight = weightsBins[bin];
2838 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2839 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2841 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2842 if (bin < 5) weight = weightsBins[bin];
2845 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2846 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2848 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2849 if (bin < 6) weight = weightsBins[bin];
2852 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2853 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2855 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2856 if (bin < 7) weight = weightsBins[bin];
2859 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2860 84, 117, 152, 191, 234,
2862 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2863 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2865 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2866 if (bin < 10) weight = weightsBins[bin];
2868 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16, 21, 28, 36, 45, 57, 70, 85, 99, 115, 132, 150, 169, 190, 212, 235, 10000};
2869 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2870 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2871 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2872 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2875 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2876 if (bin < 20) weight = weightsBins[bin];
2881 if (weight == -1)
return kFALSE;
2882 else return eventAccepted;
2897 AliGenCocktailEventHeader *cHeader = 0x0;
2898 Bool_t headerFound = kFALSE;
2916 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2917 if(cHeader) headerFound = kTRUE;
2926 TList *genHeaders = 0x0;
2927 if(cHeader) genHeaders = cHeader->GetHeaders();
2928 AliGenEventHeader* gh = 0;
2929 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2930 gh = (AliGenEventHeader*)genHeaders->At(i);
2931 TString GeneratorName = gh->GetName();
2932 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2933 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2934 NTrials = gPythia->Trials();
2935 XSection = gPythia->GetXsection();
2940 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2942 TString eventHeaderName = eventHeader->ClassName();
2943 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2944 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2945 NTrials = gPythia->Trials();
2946 XSection = gPythia->GetXsection();
2962 AliGenCocktailEventHeader *cHeader = 0x0;
2963 Bool_t headerFound = kFALSE;
2978 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2979 if(cHeader) headerFound = kTRUE;
2986 TList *genHeaders = 0x0;
2987 if(cHeader) genHeaders = cHeader->GetHeaders();
2988 AliGenEventHeader* gh = 0;
2989 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2990 gh = (AliGenEventHeader*)genHeaders->At(i);
2991 TString GeneratorName = gh->GetName();
2992 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2993 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2997 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2999 TString eventHeaderName = eventHeader->ClassName();
3000 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
3001 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
3016 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
3018 150209, 153056, 153911, 153915,
3019 158135, 158136, 158178, 158182, 160683,
3020 160764, 161139, 161256, 161379, 161457,
3021 161525, 161556, 161558, 161609, 161630,
3023 173731, 177144, 177147, 177653, 177724, 178327,
3028 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
3030 1.94, 3.39, 4.01, 5.25, 5.5,
3031 2.05, 5.50, 2.05, 5.50, 2.05, 1.71, 5.50, 1.71, 5.50, 1.71, 5.50, 1.71, 5.50, 1.71, 5.50, 1.71,
3032 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
3036 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
3039 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
3040 0., 0., 0., 0., 0.2, 0.2,
3045 Int_t runRangesEMCalL1[4] = { 179796,
3050 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
3051 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
3053 Int_t runRangesEMCalL1G2[3] = { 195180,
3057 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
3058 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
3060 Int_t runnumber =
event->GetRunNumber();
3063 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
3065 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
3069 if (binRun==34)
return kFALSE;
3070 Double_t threshold = thresholdEMCalL0[binRun];
3072 if (isMC && spreadEMCalL0[binRun] != 0.){
3073 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3074 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3075 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
3076 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
3077 threshold = triggerSmearing->GetRandom();
3078 delete triggerSmearing;
3083 TClonesArray * arrClustersMimic = NULL;
3085 nclus =
event->GetNumberOfCaloClusters();
3087 arrClustersMimic =
dynamic_cast<TClonesArray*
>(
event->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3088 if(!arrClustersMimic)
3089 AliFatal(Form(
"%sClustersBranch was not found in AliConvEventCuts! Check the correction framework settings!",
fCorrTaskSetting.Data()));
3090 nclus = arrClustersMimic->GetEntries();
3093 if(nclus == 0)
return kFALSE;
3096 Bool_t eventIsAccepted = kFALSE;
3097 for(
Int_t i = 0; i < nclus; i++){
3098 AliVCluster* clus = NULL;
3099 if(event->IsA()==AliESDEvent::Class()){
3100 if(arrClustersMimic)
3101 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMimic->At(i));
3103 clus =
event->GetCaloCluster(i);
3104 }
else if(event->IsA()==AliAODEvent::Class()){
3105 if(arrClustersMimic)
3106 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMimic->At(i));
3108 clus =
event->GetCaloCluster(i);
3112 if(arrClustersMimic)
delete clus;
3115 if (!clus->IsEMCAL()) {
3116 if(arrClustersMimic)
delete clus;
3119 if (clus->GetM02()<0.1) {
3120 if(arrClustersMimic)
delete clus;
3123 if (clus->GetNCells()<2) {
3124 if(arrClustersMimic)
delete clus;
3127 if (clus->E() > threshold ){
3129 eventIsAccepted = kTRUE;
3131 if(arrClustersMimic)
3134 return eventIsAccepted;
3141 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
3143 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
3147 if (binRun==3)
return kFALSE;
3148 Double_t threshold = thresholdEMCalL1[binRun];
3150 if (isMC && spreadEMCalL1[binRun] != 0.){
3151 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3152 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3153 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
3154 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
3155 threshold = triggerSmearing->GetRandom();
3156 delete triggerSmearing;
3161 TClonesArray * arrClustersMimic = NULL;
3164 nclus =
event->GetNumberOfCaloClusters();
3166 arrClustersMimic =
dynamic_cast<TClonesArray*
>(
event->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3167 if(!arrClustersMimic)
3168 AliFatal(Form(
"%sClustersBranch was not found in AliConvEventCuts! Check the correction framework settings!",
fCorrTaskSetting.Data()));
3169 nclus = arrClustersMimic->GetEntries();
3172 if(nclus == 0)
return kFALSE;
3175 Bool_t eventIsAccepted = kFALSE;
3176 for(
Int_t i = 0; i < nclus; i++){
3177 AliVCluster* clus = NULL;
3178 if(event->IsA()==AliESDEvent::Class()){
3179 if(arrClustersMimic)
3180 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMimic->At(i));
3182 clus =
event->GetCaloCluster(i);
3183 }
else if(event->IsA()==AliAODEvent::Class()){
3184 if(arrClustersMimic)
3185 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMimic->At(i));
3187 clus =
event->GetCaloCluster(i);
3190 if(arrClustersMimic)
delete clus;
3193 if (!clus->IsEMCAL()) {
3194 if(arrClustersMimic)
delete clus;
3197 if (clus->GetM02()<0.1) {
3198 if(arrClustersMimic)
delete clus;
3201 if (clus->GetNCells()<2) {
3202 if(arrClustersMimic)
delete clus;
3205 if (clus->E() > threshold ){
3207 eventIsAccepted = kTRUE;
3209 if(arrClustersMimic)
3212 return eventIsAccepted;
3214 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
3216 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
3220 if (binRun==2)
return kFALSE;
3221 Double_t threshold = thresholdEMCalL1G2[binRun];
3222 if (isMC && spreadEMCalL1G2[binRun] != 0.){
3223 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3224 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3225 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
3226 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
3227 threshold = triggerSmearing->GetRandom();
3228 delete triggerSmearing;
3233 TClonesArray * arrClustersMimic = NULL;
3235 nclus =
event->GetNumberOfCaloClusters();
3237 arrClustersMimic =
dynamic_cast<TClonesArray*
>(
event->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3238 if(!arrClustersMimic)
3239 AliFatal(Form(
"%sClustersBranch was not found in AliConvEventCuts! Check the correction framework settings!",
fCorrTaskSetting.Data()));
3240 nclus = arrClustersMimic->GetEntries();
3243 if(nclus == 0)
return kFALSE;
3246 Bool_t eventIsAccepted = kFALSE;
3247 for(
Int_t i = 0; i < nclus; i++){
3248 AliVCluster* clus = NULL;
3249 if(event->IsA()==AliESDEvent::Class()){
3250 if(arrClustersMimic)
3251 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMimic->At(i));
3253 clus =
event->GetCaloCluster(i);
3254 }
else if(event->IsA()==AliAODEvent::Class()){
3255 if(arrClustersMimic)
3256 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMimic->At(i));
3258 clus =
event->GetCaloCluster(i);
3261 if(arrClustersMimic)
delete clus;
3264 if (!clus->IsEMCAL()) {
3265 if(arrClustersMimic)
delete clus;
3268 if (clus->GetM02()<0.1) {
3269 if(arrClustersMimic)
delete clus;
3272 if (clus->GetNCells()<2) {
3273 if(arrClustersMimic)
delete clus;
3276 if (clus->E() > threshold ){
3278 eventIsAccepted = kTRUE;
3280 if(arrClustersMimic)
3283 return eventIsAccepted;
3300 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3303 UInt_t isSelected = AliVEvent::kAny;
3305 if (fInputHandler==NULL)
return kFALSE;
3306 if( fInputHandler->GetEventSelection() ||
event->IsA()==AliAODEvent::Class()) {
3308 TString firedTrigClass =
event->GetFiredTriggerClasses();
3349 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3351 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
3353 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3357 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3358 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3360 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3361 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3368 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3370 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3372 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
3375 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3376 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3377 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3380 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3382 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3385 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3386 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3391 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3392 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3393 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3395 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3396 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3397 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3399 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3400 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3402 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3403 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3407 if (isSelected != 0 ){
3439 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3440 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3441 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3445 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3446 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3447 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3451 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3452 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3453 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3458 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3459 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3460 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3461 else CheckClass+=
"0";
3463 if(CheckClass.Contains(
"0")) isSelected = 0;
3470 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3472 Bool_t mimickedTrigger = kTRUE;
3479 if (mimickedTrigger){
3480 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3481 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3482 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3483 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3484 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3485 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3486 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3488 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3490 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3492 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3494 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3496 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3497 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3498 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3501 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3502 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3503 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3504 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3505 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3506 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3507 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3509 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3510 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3511 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3512 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3513 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3514 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3515 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3516 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3517 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3518 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3519 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3520 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3526 if (mimickedTrigger){
3558 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3559 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3561 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3562 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3572 if(!isSelected)
return kFALSE;
3574 if (!mimickedTrigger )
return kFALSE;
3601 if(rejection == 0)
return;
3603 AliGenCocktailEventHeader *cHeader = 0x0;
3604 AliAODMCHeader *cHeaderAOD = 0x0;
3605 Bool_t headerFound = kFALSE;
3606 AliMCEvent *fMCEvent = 0x0;
3607 TClonesArray *fMCEventAOD = 0x0;
3608 if(event->IsA()==AliMCEvent::Class()){
3609 if(dynamic_cast<AliMCEvent*>(event)){
3610 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(event)->GenEventHeader());
3611 fMCEvent =
dynamic_cast<AliMCEvent*
>(event);
3612 if(cHeader) headerFound = kTRUE;
3615 if(event->IsA()==AliAODEvent::Class()){
3616 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(
event->FindListObject(AliAODMCHeader::StdBranchName()));
3617 fMCEventAOD =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3618 if(cHeaderAOD) headerFound = kTRUE;
3621 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3623 TList *genHeaders = 0x0;
3624 if(cHeader) genHeaders = cHeader->GetHeaders();
3626 genHeaders = cHeaderAOD->GetCocktailHeaders();
3627 if(genHeaders->GetEntries()==1){
3632 AliGenEventHeader* gh = 0;
3634 Int_t firstindexA = 0;
3635 Int_t lastindexA = -1;
3636 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3638 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3639 gh = (AliGenEventHeader*)genHeaders->At(i);
3640 TString GeneratorName = gh->GetName();
3641 lastindexA = lastindexA + gh->NProduced();
3642 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3643 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3644 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3645 if (
fDebugLevel > 0 ) cout << GeneratorInList.Data() << endl;
3646 if(GeneratorInList.Contains(GeneratorName) ){
3648 if (GeneratorInList.BeginsWith(
"PARAM") || GeneratorInList.CompareTo(
"BOX") == 0 ){
3651 if (
fDebugLevel > 2 )cout <<
"number of produced particle: " << gh->NProduced() << endl;
3652 if (
fDebugLevel > 2 )cout <<
"pdg-code of first particle: " << fMCEvent->Particle(firstindexA)->GetPdgCode() << endl;
3654 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode && GeneratorInList.CompareTo(
"BOX") == 0){
3658 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3659 if (
fDebugLevel > 2 ) cout <<
"accepted EMC header "<< endl;
3663 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3664 if (
fDebugLevel > 2 ) cout <<
"accepted PHOS header "<< endl;
3679 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA));
3682 if (gh->NProduced() > 10 && GeneratorInList.CompareTo(
"BOX") == 0){
3683 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA+10));
3689 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3690 if (
fDebugLevel > 2 ) cout <<
"accepted EMC header "<< endl;
3694 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3695 if (
fDebugLevel > 2 ) cout <<
"accepted PHOS header "<< endl;
3711 if(GeneratorName.CompareTo(GeneratorInList) == 0 ){
3718 firstindexA = firstindexA + gh->NProduced();
3727 if(rejection == 1 || rejection == 3){
3729 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3730 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3735 Int_t firstindex = 0;
3736 Int_t lastindex = -1;
3739 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3740 gh = (AliGenEventHeader*)genHeaders->At(i);
3741 TString GeneratorName = gh->GetName();
3742 lastindex = lastindex + gh->NProduced();
3743 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3744 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3745 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3746 if(GeneratorInList.Contains(GeneratorName) ){
3747 if (GeneratorInList.Contains(
"PARAM") || GeneratorInList.CompareTo(
"BOX") == 0 ){
3751 if (
fDebugLevel > 0 ) cout <<
"produced " << gh->NProduced() <<
" with box generator" << endl;
3752 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode && GeneratorInList.CompareTo(
"BOX") == 0){
3753 if (
fDebugLevel > 0 ) cout <<
"one of them was a pi0 or eta" << endl;
3758 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3760 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3765 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3767 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3772 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3786 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex));
3789 if (gh->NProduced() > 10 && GeneratorInList.CompareTo(
"BOX") == 0) {
3790 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex+10));
3798 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3803 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3805 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3810 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3824 }
else if(GeneratorName.CompareTo(GeneratorInList) == 0 ){
3828 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3835 firstindex = firstindex + gh->NProduced();
3838 for (
Int_t i = 0; i < number; i++){
3848 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(event)->GetNumberOfPrimaries()-1;
3865 if(index < 0)
return 0;
3868 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3869 if(!mcEvent)
return 0;
3870 if(index >= mcEvent->GetNumberOfPrimaries()){
3871 if( ((TParticle*)mcEvent->Particle(index))->GetMother(0) < 0)
return 0;
3879 if(i == 0) accepted = 2;
3882 if (debug > 1 && !accepted) cout <<
"rejected:" << index << endl;
3884 else if(InputEvent->IsA()==AliAODEvent::Class()){
3885 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3886 if (AODMCTrackArray){
3887 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3888 if(!aodMCParticle)
return 0;
3889 if(!aodMCParticle->IsPrimary()){
3890 if( aodMCParticle->GetMother() < 0)
return 0;
3893 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3897 if(i == 0) accepted = 2;
3910 if (mcEvent){isMC = kTRUE;}
3938 Int_t runnumber =
event->GetRunNumber();
3939 if ((runnumber>=144871) && (runnumber<=146860)) {
3941 AliVCaloCells *cells =
event->GetEMCALCells();
3942 const Short_t nCells = cells->GetNumberOfCells();
3944 if (event->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3946 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3947 if (!fInputHandler)
return 3;
3950 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3951 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3952 Short_t cellId = cells->GetCellNumber(iCell);
3953 Double_t cellE = cells->GetCellAmplitude(cellId);
3954 Int_t sm = cellId / (24*48);
3955 if (cellE>0.1) ++nCellCount[sm];
3958 Bool_t fIsLedEvent = kFALSE;
3959 if (nCellCount[4] > 100) {
3960 fIsLedEvent = kTRUE;
3962 if ((runnumber>=146858) && (runnumber<=146860)) {
3963 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3964 fIsLedEvent = kTRUE;
3965 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3966 fIsLedEvent = kTRUE;
3976 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
3977 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
3978 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
3983 if(event->IsA()==AliESDEvent::Class()){
3987 for(
Int_t i=0; i<nPileVert;i++){
3988 const AliESDVertex* pv= ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
3989 Int_t nc2 = pv->GetNContributors();
3994 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
4008 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
4012 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
4018 if(
fUtils->IsPileUpEvent(event) ){
4022 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
4043 AliEventplane *EventPlane =
event->GetEventplane();
4056 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
4059 if(!event || event->IsA()==AliESDEvent::Class()){
4062 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
4064 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
4067 }
else if(event->IsA()==AliAODEvent::Class()){
4070 if(aodEvent->GetHeader()){
4071 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
4077 Float_t GetValueForWeight = 1.;
4080 Bool_t CorrCentrLoop = kFALSE;
4086 CorrCentrLoop = kTRUE;
4090 CorrCentrLoop = kTRUE;
4092 CorrCentrLoop = kFALSE;
4095 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
4096 weightCentrality = maximum/GetValueForWeight;
4097 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
4098 if (!isfinite(weightCentrality)) weightCentrality = 1.;
4101 return weightCentrality;
4120 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
4121 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
4122 weightMult = valueMultData/valueMultMC;
4141 if(index < 0)
return 0;
4149 if (kCaseGen == 0)
return 1;
4154 if(!event || event->IsA()==AliESDEvent::Class()){
4155 mesonPt = ((TParticle*)mcEvent->Particle(index))->Pt();
4157 PDGCode = ((TParticle*)mcEvent->Particle(index))->GetPdgCode();
4158 }
else if(event->IsA()==AliAODEvent::Class()){
4159 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4160 if (AODMCTrackArray){
4161 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
4162 mesonPt = aodMCParticle->Pt();
4164 PDGCode = aodMCParticle->GetPdgCode();
4170 Float_t functionResultMC = 1.;
4181 Float_t functionResultData = 1;
4193 if (PDGCode == 111 || PDGCode == 221){
4194 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
4195 weight = functionResultData/functionResultMC;
4196 if ( kCaseGen == 3){
4197 if (PDGCode == 111){
4202 if (PDGCode == 221){
4208 if (!isfinite(functionResultData)) weight = 1.;
4209 if (!isfinite(weight)) weight = 1.;
4211 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
4212 weight = functionResultMC;
4228 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
4231 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
4234 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
4246 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
4254 AliEMCALTriggerPatchInfo *patch;
4255 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
4257 if (patch->IsMainTrigger()) {
4274 if (event->IsA()==AliESDEvent::Class()){
4284 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
4290 if (event->IsA()==AliESDEvent::Class()){
4322 AliEMCALTriggerPatchInfo *patch;
4324 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
4329 if (patch->IsGammaHigh()){
4333 if (patch->IsGammaLow()){
4337 if (patch->IsJetHigh()){
4341 if (patch->IsJetLow()){
4345 if (patch->IsLevel0()){
4356 AliDebug(2,
"Patch summary: ");
4357 AliDebug(2, Form(
"Number of patches: %d", nPatch));
4358 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
4359 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
4360 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
4372 SETBIT(triggers,
kG1);
4374 SETBIT(triggers,
kG2);
4376 SETBIT(triggers,
kJ1);
4378 SETBIT(triggers,
kJ2);
4380 SETBIT(triggers,
kL0);
4399 TClonesArray *arr = 0;
4401 if (!sname.IsNull()) {
4402 arr =
dynamic_cast<TClonesArray*
>(
event->FindListObject(sname));
4404 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
4414 TString objname(arr->GetClass()->GetName());
4415 TClass cls(objname);
4416 if (!cls.InheritsFrom(clname)) {
4417 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
4418 GetName(), cls.GetName(), name, clname));
4427 if (eventpos < 0)
return kFALSE;
4428 TParticle* particle = (TParticle *)mcEvent->Particle(eventpos);
4429 if (!particle)
return kFALSE;
4430 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4431 if (particle->GetMother(0) != -1){
4432 TParticle* particleMother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4433 if (particleMother){
4434 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4435 particle = particleMother;
4439 if (particle->GetMother(0) != -1){
4440 Double_t deltaX = particle->Vx() - prodVtxX;
4441 Double_t deltaY = particle->Vy() - prodVtxY;
4442 Double_t deltaZ = particle->Vz() - prodVtxZ;
4445 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4448 Bool_t dalitzCand = kFALSE;
4450 TParticle* firstmother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4451 if (!firstmother)
return kFALSE;
4452 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4453 Bool_t intDecay = kFALSE;
4454 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4455 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4460 Long_t source = particle->GetMother(0);
4461 Bool_t foundExcludedPart = kFALSE;
4462 Bool_t foundShower = kFALSE;
4463 Int_t pdgCodeMotherPrev = 0;
4464 Int_t pdgCodeMotherPPrevMother = 0;
4472 TParticle* mother = (TParticle *)mcEvent->Particle(source);
4473 source = mother->GetMother(0);
4475 Int_t pdgCodeMother = mother->GetPdgCode();
4477 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4478 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4479 foundShower = kTRUE;
4482 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4483 foundShower = kTRUE;
4495 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4496 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4497 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4499 foundExcludedPart = kTRUE;
4502 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4503 pdgCodeMotherPrev = pdgCodeMother;
4504 if (source == -1) depth = 20;
4510 if (foundExcludedPart){
4516 }
else if (foundShower){
4531 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4532 if (AODMCTrackArray == NULL)
return kFALSE;
4533 AliAODMCParticle* currentParticle = AODMCParticle;
4534 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4535 if (currentParticle->GetMother() != -1){
4536 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4537 if (particleMother){
4538 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4539 currentParticle = particleMother;
4543 if (currentParticle->GetMother() > -1){
4544 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4545 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4546 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4549 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4551 Bool_t dalitzCand = kFALSE;
4553 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4554 if (!firstmother)
return kFALSE;
4555 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4556 Bool_t intDecay = kFALSE;
4557 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4558 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4563 Long_t source = currentParticle->GetMother();
4564 Bool_t foundExcludedPart = kFALSE;
4565 Bool_t foundShower = kFALSE;
4566 Int_t pdgCodeMotherPrev = 0;
4567 Int_t pdgCodeMotherPPrevMother = 0;
4575 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4576 source = mother->GetMother();
4578 Int_t pdgCodeMother = mother->GetPdgCode();
4580 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4581 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4582 foundShower = kTRUE;
4585 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4586 foundShower = kTRUE;
4598 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4599 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4600 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4602 foundExcludedPart = kTRUE;
4605 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4606 pdgCodeMotherPrev = pdgCodeMother;
4607 if (source == -1) depth = 20;
4613 if (foundExcludedPart){
4619 }
else if (foundShower){
4634 if (particle != NULL && mcEvent != NULL){
4635 Int_t pdgSecondary = 0;
4639 Long_t motherID = particle->GetMother(0);
4640 Long_t grandMotherID = -1;
4644 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4646 if (grandMotherID > -1){
4648 pdgSecondary = mcEvent->Particle(grandMotherID)->GetPdgCode();
4655 Long_t motherID = particle->GetMother(0);
4656 Long_t grandMotherID = -1;
4657 Long_t greatGrandMotherID = -1;
4661 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4663 if (grandMotherID > -1){
4665 greatGrandMotherID = mcEvent->Particle(grandMotherID)->GetMother(0);
4667 if (greatGrandMotherID > -1){
4669 pdgSecondary = mcEvent->Particle(greatGrandMotherID)->GetPdgCode();
4675 if (TMath::Abs(pdgSecondary) == 3122 )
4678 else if ( TMath::Abs(pdgSecondary) == 310 )
4681 else if ( TMath::Abs(pdgSecondary) == 130 )
4684 else if ( TMath::Abs(pdgSecondary) == 221 )
4687 else if ( TMath::Abs(pdgSecondary) != 0 )
4697 if (particle != NULL && aodmcArray != NULL){
4698 Int_t pdgSecondary = 0;
4702 Long_t motherID = particle->GetMother();
4703 Long_t grandMotherID = -1;
4707 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4709 if (grandMotherID > -1){
4711 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4718 Long_t motherID = particle->GetMother();
4719 Long_t grandMotherID = -1;
4720 Long_t greatGrandMotherID = -1;
4724 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4726 if (grandMotherID > -1){
4728 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4730 if (greatGrandMotherID > -1){
4732 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4738 if (TMath::Abs(pdgSecondary) == 3122 )
4741 else if ( TMath::Abs(pdgSecondary) == 310 )
4744 else if ( TMath::Abs(pdgSecondary) == 130 )
4747 else if ( TMath::Abs(pdgSecondary) == 221 )
4750 else if ( TMath::Abs(pdgSecondary) != 0 )
4760 if (periodName.CompareTo(
"") == 0){
4763 if (periodName.CompareTo(
"") == 0) {
4766 AliError(
"No correct period could be set, periodName string empty");
4771 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4772 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0 || periodName.CompareTo(
"LHC10bg") == 0
4776 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4779 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4782 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4785 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4786 periodName.CompareTo(
"LHC11g") == 0
4790 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4793 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4794 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4795 periodName.CompareTo(
"LHC12i") == 0 || periodName.CompareTo(
"LHC12ai") == 0
4799 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 || periodName.CompareTo(
"LHC13bc") == 0){
4802 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 || periodName.CompareTo(
"LHC13de") == 0){
4805 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4808 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4811 }
else if ( periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4812 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0 ||
4813 periodName.CompareTo(
"LHC15fm") == 0
4817 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4820 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4823 }
else if ( periodName.CompareTo(
"LHC16dp") == 0 || periodName.CompareTo(
"LHC16d") == 0 || periodName.CompareTo(
"LHC16e") == 0 || periodName.CompareTo(
"LHC16g") == 0 ||
4824 periodName.CompareTo(
"LHC16h") == 0 || periodName.CompareTo(
"LHC16i") == 0 || periodName.CompareTo(
"LHC16j") == 0 || periodName.CompareTo(
"LHC16k") == 0 || periodName.CompareTo(
"LHC16l") == 0 || periodName.CompareTo(
"LHC16m") == 0 || periodName.CompareTo(
"LHC16n") == 0 || periodName.CompareTo(
"LHC16o") == 0 ||
4825 periodName.CompareTo(
"LHC16p") == 0){
4828 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4831 }
else if (periodName.CompareTo(
"LHC16qt") == 0 || periodName.CompareTo(
"LHC16q") == 0 || periodName.CompareTo(
"LHC16t") == 0 ){
4834 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4837 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4840 }
else if (periodName.CompareTo(
"LHC17cr") == 0 || periodName.CompareTo(
"LHC17c") == 0 || periodName.CompareTo(
"LHC17d") == 0 || periodName.CompareTo(
"LHC17e") == 0 ||
4841 periodName.CompareTo(
"LHC17f") == 0 || periodName.CompareTo(
"LHC17h") == 0 || periodName.CompareTo(
"LHC17i") == 0 || periodName.CompareTo(
"LHC17j") == 0 ||
4842 periodName.CompareTo(
"LHC17k") == 0 || periodName.CompareTo(
"LHC17l") == 0 || periodName.CompareTo(
"LHC17m") == 0 || periodName.CompareTo(
"LHC17o") == 0 ||
4843 periodName.CompareTo(
"LHC17r") == 0 ){
4846 }
else if ( periodName.CompareTo(
"LHC17g") == 0 ){
4849 }
else if ( periodName.CompareTo(
"LHC17n") == 0 ){
4852 }
else if ( periodName.CompareTo(
"LHC17pq") == 0 || periodName.CompareTo(
"LHC17p") == 0 || periodName.CompareTo(
"LHC17q") == 0 ){
4857 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4860 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4863 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4866 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4869 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4872 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4875 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4878 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4881 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4884 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4887 }
else if (periodName.Contains(
"LHC14j4")){
4890 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4893 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4896 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4899 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4902 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4905 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4908 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4911 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4915 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4918 }
else if (periodName.Contains(
"LHC12f1a") ){
4921 }
else if (periodName.Contains(
"LHC12f1b") ){
4924 }
else if (periodName.Contains(
"LHC12i3") ){
4927 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4930 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4933 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4936 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4939 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4942 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4945 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4948 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4951 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4954 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4957 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4960 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4964 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){