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));
1961 AliMultSelection *MultSelection = (AliMultSelection*)event->FindListObject(
"MultSelection");
1963 AliWarning (
"AliMultSelection object not found !");
1967 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1968 else return MultSelection->GetMultiplicityPercentile(
"V0M");
1969 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1972 AliCentrality *fESDCentrality = (AliCentrality*)esdEvent->GetCentrality();
1974 if(
fIsHeavyIon==2)
return fESDCentrality->GetCentralityPercentile(
"V0A");
1975 else return fESDCentrality->GetCentralityPercentile(
"V0M");
1983 AliMultSelection *MultSelection = (AliMultSelection*)aodEvent->FindListObject(
"MultSelection");
1985 AliWarning (
"AliMultSelection object not found !");
1989 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1990 else return MultSelection->GetMultiplicityPercentile(
"V0M",kTRUE);
1991 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1994 if(aodEvent->GetHeader()){
return ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();}
2009 Int_t primaryTracksPP[9] = { 0, 2, 5, 10, 15,
2024 if(centrality<0 && !mcEvent)
return kFALSE;
2026 Int_t centralityC=0;
2028 centralityC=
Int_t(centrality/10);
2034 centralityC=
Int_t(centrality);
2037 }
else return kFALSE;
2041 Int_t PrimaryTracks10[11][2] =
2055 Int_t PrimaryTracksLHC11h10[11][2] =
2069 Int_t PrimaryTracksLHC15o10[11][2] =
2083 Int_t PrimaryTracksLHC10h5[21][2] =
2107 Int_t PrimaryTracksLHC11h5[21][2] =
2131 Int_t PrimaryTracksLHC15o5[21][2] =
2155 Int_t PrimaryTracksLHC17n10[11][2] =
2171 if(event->IsA()==AliESDEvent::Class()) column = 0;
2172 if(event->IsA()==AliAODEvent::Class()) column = 1;
2188 centralityC=
Int_t(centrality/10);
2190 if(
fCentralityMin==0 && nprimaryTracks >= PrimaryTracksLHC15o10[0][column])
return kFALSE;
2192 }
else return kFALSE;
2201 centralityC=
Int_t(centrality/10);
2216 centralityC =
Int_t(centrality);
2218 if(
fCentralityMin==0 && nprimaryTracks >= PrimaryTracksLHC15o5[0][column])
return kFALSE;
2220 }
else return kFALSE;
2229 centralityC=
Int_t(centrality);
2232 }
else return kFALSE;
2236 Int_t PrimaryTracksLHC11h10AltMin[11][2] =
2250 Int_t PrimaryTracksLHC11h10AltMax[11][2] =
2264 Int_t PrimaryTracksLHC11h5AltMin[21][2] =
2288 Int_t PrimaryTracksLHC11h5AltMax[21][2] =
2317 if(nprimaryTracks > PrimaryTracksLHC11h10AltMin[
fCentralityMax][column] && nprimaryTracks <= PrimaryTracksLHC11h10AltMax[
fCentralityMin][column])
2325 centralityC=
Int_t(centrality/10);
2335 if(nprimaryTracks > PrimaryTracksLHC11h5AltMin[
fCentralityMax][column] && nprimaryTracks <= PrimaryTracksLHC11h5AltMax[
fCentralityMin][column])
2342 centralityC=
Int_t(centrality);
2345 }
else return kFALSE;
2355 Double_t fVertexZ=
event->GetPrimaryVertex()->GetZ();
2359 fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
2363 fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
2366 if(TMath::Abs(fVertexZ)>
fMaxVertexZ)
return kFALSE;
2370 if (TMath::Abs(fVertexZ-fVertexZSPD) > 0.1)
return kFALSE;
2373 if(!
fUtils->IsVertexSelected2013pA(event))
return kFALSE;
2384 TBits fIR1 =
event->GetHeader()->GetIRInt1InteractionMap();
2385 TBits fIR2 =
event->GetHeader()->GetIRInt2InteractionMap();
2386 UShort_t bunchCrossings =
event->GetBunchCrossNumber();
2388 for(
Int_t i = 0; i<180;i++){
2389 if(fIR1.TestBitNumber(i))
2394 Bool_t isOutOfBunchPileup = 0;
2397 if(pf1 < -89) pf1 = -89;
2398 if(pf2 > 89) pf2 = 89;
2399 Int_t pf2maxForT0 = pf2;
2401 for (
Int_t i=pf1;i<=pf2;i++) {
2403 if (i<=pf2maxForT0) isOutOfBunchPileup|=fIR2.TestBitNumber(90+i);
2404 if (i>0 && i<=ir1skip)
continue;
2405 isOutOfBunchPileup|=fIR1.TestBitNumber(90+i);
2407 return isOutOfBunchPileup;
2413 Bool_t isPileUpV0MTPCout=0;
2418 multV0M =
event->GetVZEROData()->GetMTotV0A();
2420 multV0M =
event->GetVZEROData()->GetMTotV0A() +
event->GetVZEROData()->GetMTotV0C() ;
2425 if (multV0M < valFunc ) isPileUpV0MTPCout=1;
2428 return isPileUpV0MTPCout;
2437 if (fESDEvent->GetPrimaryVertex() != NULL){
2438 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2440 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2444 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2445 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2447 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2449 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2458 if (fAODEvent->GetPrimaryVertex() != NULL){
2459 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2460 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2463 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2464 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2465 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2467 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2480 AliGenCocktailEventHeader *cHeader = 0x0;
2481 Bool_t headerFound = kFALSE;
2501 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2502 if(cHeader) headerFound = kTRUE;
2510 TList *genHeaders = 0x0;
2511 if(cHeader) genHeaders = cHeader->GetHeaders();
2512 AliGenEventHeader* gh = 0;
2513 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2514 gh = (AliGenEventHeader*)genHeaders->At(i);
2515 TString GeneratorName = gh->GetName();
2516 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2517 Bool_t eventAccepted = kTRUE;
2518 TParticle * jet = 0;
2519 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2522 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2523 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2524 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2527 eventAccepted= kFALSE;
2531 if (jet)
delete jet;
2533 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2534 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2535 if (!particle)
continue;
2536 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2538 eventAccepted= kFALSE;
2546 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2548 70, 85, 99, 115, 132,
2549 150, 169, 190, 212, 235,
2551 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2552 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2553 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2554 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2556 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2557 if (bin < 20) weight = weightsBins[bin];
2560 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2562 70, 85, 99, 115, 132,
2563 150, 169, 190, 212, 235,
2565 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2566 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2567 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2568 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2571 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2572 if (bin < 20) weight = weightsBins[bin];
2575 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2577 70, 85, 99, 115, 132,
2578 150, 169, 190, 212, 235,
2580 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2581 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2582 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2583 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2585 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2586 if (bin < 20) weight = weightsBins[bin];
2590 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2593 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2594 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2595 1.933238e-05, 1.562895e-05};
2597 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2598 if (bin < 12) weight = weightsBins[bin];
2601 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2602 84, 117, 152, 191, 1000000,
2604 21, 28, 36, 45, 57 };
2605 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2606 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2607 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2608 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2612 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2613 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2614 if (bin < 19) weight = weightsBins[bin];
2617 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2618 84, 117, 152, 191, 1000000,
2620 21, 28, 36, 45, 57 };
2622 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2623 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2624 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2625 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2628 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2629 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2630 if (bin < 19) weight = weightsBins[bin];
2633 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2635 70, 85, 99, 115, 132,
2636 150, 169, 190, 212, 235,
2638 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2639 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2640 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2641 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2643 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2644 if (bin < 20) weight = weightsBins[bin];
2647 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2648 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2650 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2651 if (bin < 5) weight = weightsBins[bin];
2654 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2655 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2657 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2658 if (bin < 6) weight = weightsBins[bin];
2661 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2662 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2664 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2665 if (bin < 7) weight = weightsBins[bin];
2668 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2669 84, 117, 152, 191, 234,
2671 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2672 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2674 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2675 if (bin < 10) weight = weightsBins[bin];
2677 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};
2678 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};
2680 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2681 if (bin < 20) weight = weightsBins[bin];
2683 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};
2684 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};
2686 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2687 if (bin < 20) weight = weightsBins[bin];
2689 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};
2690 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};
2692 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2693 if (bin < 20) weight = weightsBins[bin];
2699 if (weight == -1)
return kFALSE;
2700 else return eventAccepted;
2705 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2706 TString eventHeaderName = eventHeader->ClassName();
2707 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2708 Bool_t eventAccepted = kTRUE;
2709 TParticle * jet = 0;
2710 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2711 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2713 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2714 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2715 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2718 eventAccepted= kFALSE;
2723 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2724 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2725 if (!particle)
continue;
2726 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2728 eventAccepted= kFALSE;
2736 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2738 70, 85, 99, 115, 132,
2739 150, 169, 190, 212, 235,
2741 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2742 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2743 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2744 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2746 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2747 if (bin < 20) weight = weightsBins[bin];
2750 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2752 70, 85, 99, 115, 132,
2753 150, 169, 190, 212, 235,
2755 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2756 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2757 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2758 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2761 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2762 if (bin < 20) weight = weightsBins[bin];
2765 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2767 70, 85, 99, 115, 132,
2768 150, 169, 190, 212, 235,
2770 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2771 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2772 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2773 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2775 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2776 if (bin < 20) weight = weightsBins[bin];
2780 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2783 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2784 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2785 1.933238e-05, 1.562895e-05};
2787 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2788 if (bin < 12) weight = weightsBins[bin];
2791 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2792 84, 117, 152, 191, 1000000,
2794 21, 28, 36, 45, 57 };
2795 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2796 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2797 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2798 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2802 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2803 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2804 if (bin < 19) weight = weightsBins[bin];
2807 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2808 84, 117, 152, 191, 1000000,
2810 21, 28, 36, 45, 57 };
2812 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2813 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2814 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2815 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2818 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2819 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2820 if (bin < 19) weight = weightsBins[bin];
2823 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2825 70, 85, 99, 115, 132,
2826 150, 169, 190, 212, 235,
2828 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2829 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2830 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2831 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2833 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2834 if (bin < 20) weight = weightsBins[bin];
2837 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2838 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2840 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2841 if (bin < 5) weight = weightsBins[bin];
2844 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2845 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2847 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2848 if (bin < 6) weight = weightsBins[bin];
2851 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2852 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2854 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2855 if (bin < 7) weight = weightsBins[bin];
2858 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2859 84, 117, 152, 191, 234,
2861 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2862 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2864 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2865 if (bin < 10) weight = weightsBins[bin];
2870 if (weight == -1)
return kFALSE;
2871 else return eventAccepted;
2886 AliGenCocktailEventHeader *cHeader = 0x0;
2887 Bool_t headerFound = kFALSE;
2905 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2906 if(cHeader) headerFound = kTRUE;
2915 TList *genHeaders = 0x0;
2916 if(cHeader) genHeaders = cHeader->GetHeaders();
2917 AliGenEventHeader* gh = 0;
2918 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2919 gh = (AliGenEventHeader*)genHeaders->At(i);
2920 TString GeneratorName = gh->GetName();
2921 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2922 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2923 NTrials = gPythia->Trials();
2924 XSection = gPythia->GetXsection();
2929 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2931 TString eventHeaderName = eventHeader->ClassName();
2932 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2933 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2934 NTrials = gPythia->Trials();
2935 XSection = gPythia->GetXsection();
2951 AliGenCocktailEventHeader *cHeader = 0x0;
2952 Bool_t headerFound = kFALSE;
2966 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2967 if(cHeader) headerFound = kTRUE;
2974 TList *genHeaders = 0x0;
2975 if(cHeader) genHeaders = cHeader->GetHeaders();
2976 AliGenEventHeader* gh = 0;
2977 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2978 gh = (AliGenEventHeader*)genHeaders->At(i);
2979 TString GeneratorName = gh->GetName();
2980 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2981 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2985 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2987 TString eventHeaderName = eventHeader->ClassName();
2988 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2989 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
3004 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
3006 150209, 153056, 153911, 153915,
3007 158135, 158136, 158178, 158182, 160683,
3008 160764, 161139, 161256, 161379, 161457,
3009 161525, 161556, 161558, 161609, 161630,
3011 173731, 177144, 177147, 177653, 177724, 178327,
3016 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
3018 1.94, 3.39, 4.01, 5.25, 5.5,
3019 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,
3020 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
3024 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
3027 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
3028 0., 0., 0., 0., 0.2, 0.2,
3033 Int_t runRangesEMCalL1[4] = { 179796,
3038 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
3039 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
3041 Int_t runRangesEMCalL1G2[3] = { 195180,
3045 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
3046 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
3048 Int_t runnumber =
event->GetRunNumber();
3051 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
3053 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
3057 if (binRun==34)
return kFALSE;
3058 Double_t threshold = thresholdEMCalL0[binRun];
3060 if (isMC && spreadEMCalL0[binRun] != 0.){
3061 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3062 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3063 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
3064 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
3065 threshold = triggerSmearing->GetRandom();
3066 delete triggerSmearing;
3071 TClonesArray * arrClustersMimic = NULL;
3073 nclus =
event->GetNumberOfCaloClusters();
3075 arrClustersMimic =
dynamic_cast<TClonesArray*
>(
event->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3076 if(!arrClustersMimic)
3077 AliFatal(Form(
"%sClustersBranch was not found in AliConvEventCuts! Check the correction framework settings!",
fCorrTaskSetting.Data()));
3078 nclus = arrClustersMimic->GetEntries();
3081 if(nclus == 0)
return kFALSE;
3084 Bool_t eventIsAccepted = kFALSE;
3085 for(
Int_t i = 0; i < nclus; i++){
3086 AliVCluster* clus = NULL;
3087 if(event->IsA()==AliESDEvent::Class()){
3088 if(arrClustersMimic)
3089 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMimic->At(i));
3091 clus =
event->GetCaloCluster(i);
3092 }
else if(event->IsA()==AliAODEvent::Class()){
3093 if(arrClustersMimic)
3094 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMimic->At(i));
3096 clus =
event->GetCaloCluster(i);
3100 if(arrClustersMimic)
delete clus;
3103 if (!clus->IsEMCAL()) {
3104 if(arrClustersMimic)
delete clus;
3107 if (clus->GetM02()<0.1) {
3108 if(arrClustersMimic)
delete clus;
3111 if (clus->GetNCells()<2) {
3112 if(arrClustersMimic)
delete clus;
3115 if (clus->E() > threshold ){
3117 eventIsAccepted = kTRUE;
3119 if(arrClustersMimic)
3122 return eventIsAccepted;
3129 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
3131 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
3135 if (binRun==3)
return kFALSE;
3136 Double_t threshold = thresholdEMCalL1[binRun];
3138 if (isMC && spreadEMCalL1[binRun] != 0.){
3139 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3140 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3141 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
3142 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
3143 threshold = triggerSmearing->GetRandom();
3144 delete triggerSmearing;
3149 TClonesArray * arrClustersMimic = NULL;
3152 nclus =
event->GetNumberOfCaloClusters();
3154 arrClustersMimic =
dynamic_cast<TClonesArray*
>(
event->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3155 if(!arrClustersMimic)
3156 AliFatal(Form(
"%sClustersBranch was not found in AliConvEventCuts! Check the correction framework settings!",
fCorrTaskSetting.Data()));
3157 nclus = arrClustersMimic->GetEntries();
3160 if(nclus == 0)
return kFALSE;
3163 Bool_t eventIsAccepted = kFALSE;
3164 for(
Int_t i = 0; i < nclus; i++){
3165 AliVCluster* clus = NULL;
3166 if(event->IsA()==AliESDEvent::Class()){
3167 if(arrClustersMimic)
3168 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMimic->At(i));
3170 clus =
event->GetCaloCluster(i);
3171 }
else if(event->IsA()==AliAODEvent::Class()){
3172 if(arrClustersMimic)
3173 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMimic->At(i));
3175 clus =
event->GetCaloCluster(i);
3178 if(arrClustersMimic)
delete clus;
3181 if (!clus->IsEMCAL()) {
3182 if(arrClustersMimic)
delete clus;
3185 if (clus->GetM02()<0.1) {
3186 if(arrClustersMimic)
delete clus;
3189 if (clus->GetNCells()<2) {
3190 if(arrClustersMimic)
delete clus;
3193 if (clus->E() > threshold ){
3195 eventIsAccepted = kTRUE;
3197 if(arrClustersMimic)
3200 return eventIsAccepted;
3202 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
3204 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
3208 if (binRun==2)
return kFALSE;
3209 Double_t threshold = thresholdEMCalL1G2[binRun];
3210 if (isMC && spreadEMCalL1G2[binRun] != 0.){
3211 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3212 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3213 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
3214 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
3215 threshold = triggerSmearing->GetRandom();
3216 delete triggerSmearing;
3221 TClonesArray * arrClustersMimic = NULL;
3223 nclus =
event->GetNumberOfCaloClusters();
3225 arrClustersMimic =
dynamic_cast<TClonesArray*
>(
event->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3226 if(!arrClustersMimic)
3227 AliFatal(Form(
"%sClustersBranch was not found in AliConvEventCuts! Check the correction framework settings!",
fCorrTaskSetting.Data()));
3228 nclus = arrClustersMimic->GetEntries();
3231 if(nclus == 0)
return kFALSE;
3234 Bool_t eventIsAccepted = kFALSE;
3235 for(
Int_t i = 0; i < nclus; i++){
3236 AliVCluster* clus = NULL;
3237 if(event->IsA()==AliESDEvent::Class()){
3238 if(arrClustersMimic)
3239 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMimic->At(i));
3241 clus =
event->GetCaloCluster(i);
3242 }
else if(event->IsA()==AliAODEvent::Class()){
3243 if(arrClustersMimic)
3244 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMimic->At(i));
3246 clus =
event->GetCaloCluster(i);
3249 if(arrClustersMimic)
delete clus;
3252 if (!clus->IsEMCAL()) {
3253 if(arrClustersMimic)
delete clus;
3256 if (clus->GetM02()<0.1) {
3257 if(arrClustersMimic)
delete clus;
3260 if (clus->GetNCells()<2) {
3261 if(arrClustersMimic)
delete clus;
3264 if (clus->E() > threshold ){
3266 eventIsAccepted = kTRUE;
3268 if(arrClustersMimic)
3271 return eventIsAccepted;
3288 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3291 UInt_t isSelected = AliVEvent::kAny;
3293 if (fInputHandler==NULL)
return kFALSE;
3294 if( fInputHandler->GetEventSelection() ||
event->IsA()==AliAODEvent::Class()) {
3296 TString firedTrigClass =
event->GetFiredTriggerClasses();
3337 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3339 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
3341 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3345 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3346 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3348 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3349 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3356 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3358 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3360 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
3363 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3364 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3365 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3368 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3370 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3373 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3374 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3379 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3380 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3381 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3383 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3384 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3385 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3387 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3388 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3390 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3391 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3395 if (isSelected != 0 ){
3427 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3428 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3429 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3433 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3434 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3435 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
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;
3446 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3447 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3448 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3449 else CheckClass+=
"0";
3451 if(CheckClass.Contains(
"0")) isSelected = 0;
3458 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3460 Bool_t mimickedTrigger = kTRUE;
3467 if (mimickedTrigger){
3468 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3469 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3470 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3471 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3472 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3473 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3474 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3476 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3478 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3480 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3482 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3484 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3485 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3486 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3489 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3490 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3491 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3492 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3493 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3494 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3495 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3497 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3498 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3499 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3500 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3501 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3502 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3503 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3504 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3505 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3506 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3507 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3508 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3514 if (mimickedTrigger){
3546 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3547 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3549 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3550 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3560 if(!isSelected)
return kFALSE;
3562 if (!mimickedTrigger )
return kFALSE;
3589 if(rejection == 0)
return;
3591 AliGenCocktailEventHeader *cHeader = 0x0;
3592 AliAODMCHeader *cHeaderAOD = 0x0;
3593 Bool_t headerFound = kFALSE;
3594 AliMCEvent *fMCEvent = 0x0;
3595 TClonesArray *fMCEventAOD = 0x0;
3596 if(event->IsA()==AliMCEvent::Class()){
3597 if(dynamic_cast<AliMCEvent*>(event)){
3598 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(event)->GenEventHeader());
3599 fMCEvent =
dynamic_cast<AliMCEvent*
>(event);
3600 if(cHeader) headerFound = kTRUE;
3603 if(event->IsA()==AliAODEvent::Class()){
3604 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(
event->FindListObject(AliAODMCHeader::StdBranchName()));
3605 fMCEventAOD =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3606 if(cHeaderAOD) headerFound = kTRUE;
3609 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3611 TList *genHeaders = 0x0;
3612 if(cHeader) genHeaders = cHeader->GetHeaders();
3614 genHeaders = cHeaderAOD->GetCocktailHeaders();
3615 if(genHeaders->GetEntries()==1){
3620 AliGenEventHeader* gh = 0;
3622 Int_t firstindexA = 0;
3623 Int_t lastindexA = -1;
3624 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3626 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3627 gh = (AliGenEventHeader*)genHeaders->At(i);
3628 TString GeneratorName = gh->GetName();
3629 lastindexA = lastindexA + gh->NProduced();
3630 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3631 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3632 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3633 if (
fDebugLevel > 0 ) cout << GeneratorInList.Data() << endl;
3634 if(GeneratorInList.Contains(GeneratorName) ){
3636 if (GeneratorInList.BeginsWith(
"PARAM") || GeneratorInList.CompareTo(
"BOX") == 0 ){
3639 if (
fDebugLevel > 2 )cout <<
"number of produced particle: " << gh->NProduced() << endl;
3640 if (
fDebugLevel > 2 )cout <<
"pdg-code of first particle: " << fMCEvent->Particle(firstindexA)->GetPdgCode() << endl;
3642 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode && GeneratorInList.CompareTo(
"BOX") == 0){
3646 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3647 if (
fDebugLevel > 2 ) cout <<
"accepted EMC header "<< endl;
3651 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3652 if (
fDebugLevel > 2 ) cout <<
"accepted PHOS header "<< endl;
3667 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA));
3670 if (gh->NProduced() > 10 && GeneratorInList.CompareTo(
"BOX") == 0){
3671 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA+10));
3677 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3678 if (
fDebugLevel > 2 ) cout <<
"accepted EMC header "<< endl;
3682 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3683 if (
fDebugLevel > 2 ) cout <<
"accepted PHOS header "<< endl;
3699 if(GeneratorName.CompareTo(GeneratorInList) == 0 ){
3706 firstindexA = firstindexA + gh->NProduced();
3715 if(rejection == 1 || rejection == 3){
3717 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3718 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3723 Int_t firstindex = 0;
3724 Int_t lastindex = -1;
3727 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3728 gh = (AliGenEventHeader*)genHeaders->At(i);
3729 TString GeneratorName = gh->GetName();
3730 lastindex = lastindex + gh->NProduced();
3731 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3732 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3733 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3734 if(GeneratorInList.Contains(GeneratorName) ){
3735 if (GeneratorInList.Contains(
"PARAM") || GeneratorInList.CompareTo(
"BOX") == 0 ){
3739 if (
fDebugLevel > 0 ) cout <<
"produced " << gh->NProduced() <<
" with box generator" << endl;
3740 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode && GeneratorInList.CompareTo(
"BOX") == 0){
3741 if (
fDebugLevel > 0 ) cout <<
"one of them was a pi0 or eta" << endl;
3746 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3748 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3753 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3755 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3760 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3774 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex));
3777 if (gh->NProduced() > 10 && GeneratorInList.CompareTo(
"BOX") == 0) {
3778 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex+10));
3786 }
else if (gh->NProduced() == 3 && GeneratorInList.Contains(
"PARAM_EMC") && (i == 3 || i == 5) ){
3791 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3793 }
else if (gh->NProduced() > 2 && GeneratorInList.Contains(
"PARAM_PHOS") && (i == 4 || i == 6) ){
3798 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3812 }
else if(GeneratorName.CompareTo(GeneratorInList) == 0 ){
3816 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3823 firstindex = firstindex + gh->NProduced();
3826 for (
Int_t i = 0; i < number; i++){
3836 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(event)->GetNumberOfPrimaries()-1;
3853 if(index < 0)
return 0;
3856 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3857 if(!mcEvent)
return 0;
3858 if(index >= mcEvent->GetNumberOfPrimaries()){
3859 if( ((TParticle*)mcEvent->Particle(index))->GetMother(0) < 0)
return 0;
3867 if(i == 0) accepted = 2;
3870 if (debug > 1 && !accepted) cout <<
"rejected:" << index << endl;
3872 else if(InputEvent->IsA()==AliAODEvent::Class()){
3873 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3874 if (AODMCTrackArray){
3875 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3876 if(!aodMCParticle)
return 0;
3877 if(!aodMCParticle->IsPrimary()){
3878 if( aodMCParticle->GetMother() < 0)
return 0;
3881 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3885 if(i == 0) accepted = 2;
3898 if (mcEvent){isMC = kTRUE;}
3926 Int_t runnumber =
event->GetRunNumber();
3927 if ((runnumber>=144871) && (runnumber<=146860)) {
3929 AliVCaloCells *cells =
event->GetEMCALCells();
3930 const Short_t nCells = cells->GetNumberOfCells();
3932 if (event->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3934 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3935 if (!fInputHandler)
return 3;
3938 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3939 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3940 Short_t cellId = cells->GetCellNumber(iCell);
3941 Double_t cellE = cells->GetCellAmplitude(cellId);
3942 Int_t sm = cellId / (24*48);
3943 if (cellE>0.1) ++nCellCount[sm];
3946 Bool_t fIsLedEvent = kFALSE;
3947 if (nCellCount[4] > 100) {
3948 fIsLedEvent = kTRUE;
3950 if ((runnumber>=146858) && (runnumber<=146860)) {
3951 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3952 fIsLedEvent = kTRUE;
3953 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3954 fIsLedEvent = kTRUE;
3964 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
3965 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
3966 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
3971 if(event->IsA()==AliESDEvent::Class()){
3975 for(
Int_t i=0; i<nPileVert;i++){
3976 const AliESDVertex* pv= ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
3977 Int_t nc2 = pv->GetNContributors();
3982 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
3996 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
4000 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
4006 if(
fUtils->IsPileUpEvent(event) ){
4010 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
4031 AliEventplane *EventPlane =
event->GetEventplane();
4044 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
4047 if(!event || event->IsA()==AliESDEvent::Class()){
4050 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
4052 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
4055 }
else if(event->IsA()==AliAODEvent::Class()){
4058 if(aodEvent->GetHeader()){
4059 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
4065 Float_t GetValueForWeight = 1.;
4068 Bool_t CorrCentrLoop = kFALSE;
4074 CorrCentrLoop = kTRUE;
4078 CorrCentrLoop = kTRUE;
4080 CorrCentrLoop = kFALSE;
4083 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
4084 weightCentrality = maximum/GetValueForWeight;
4085 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
4086 if (!isfinite(weightCentrality)) weightCentrality = 1.;
4089 return weightCentrality;
4108 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
4109 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
4110 weightMult = valueMultData/valueMultMC;
4129 if(index < 0)
return 0;
4137 if (kCaseGen == 0)
return 1;
4142 if(!event || event->IsA()==AliESDEvent::Class()){
4143 mesonPt = ((TParticle*)mcEvent->Particle(index))->Pt();
4145 PDGCode = ((TParticle*)mcEvent->Particle(index))->GetPdgCode();
4146 }
else if(event->IsA()==AliAODEvent::Class()){
4147 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4148 if (AODMCTrackArray){
4149 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
4150 mesonPt = aodMCParticle->Pt();
4152 PDGCode = aodMCParticle->GetPdgCode();
4158 Float_t functionResultMC = 1.;
4169 Float_t functionResultData = 1;
4181 if (PDGCode == 111 || PDGCode == 221){
4182 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
4183 weight = functionResultData/functionResultMC;
4184 if ( kCaseGen == 3){
4185 if (PDGCode == 111){
4190 if (PDGCode == 221){
4196 if (!isfinite(functionResultData)) weight = 1.;
4197 if (!isfinite(weight)) weight = 1.;
4199 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
4200 weight = functionResultMC;
4216 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
4219 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
4222 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
4234 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
4242 AliEMCALTriggerPatchInfo *patch;
4243 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
4245 if (patch->IsMainTrigger()) {
4262 if (event->IsA()==AliESDEvent::Class()){
4272 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
4278 if (event->IsA()==AliESDEvent::Class()){
4310 AliEMCALTriggerPatchInfo *patch;
4312 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
4317 if (patch->IsGammaHigh()){
4321 if (patch->IsGammaLow()){
4325 if (patch->IsJetHigh()){
4329 if (patch->IsJetLow()){
4333 if (patch->IsLevel0()){
4344 AliDebug(2,
"Patch summary: ");
4345 AliDebug(2, Form(
"Number of patches: %d", nPatch));
4346 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
4347 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
4348 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
4360 SETBIT(triggers,
kG1);
4362 SETBIT(triggers,
kG2);
4364 SETBIT(triggers,
kJ1);
4366 SETBIT(triggers,
kJ2);
4368 SETBIT(triggers,
kL0);
4387 TClonesArray *arr = 0;
4389 if (!sname.IsNull()) {
4390 arr =
dynamic_cast<TClonesArray*
>(
event->FindListObject(sname));
4392 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
4402 TString objname(arr->GetClass()->GetName());
4403 TClass cls(objname);
4404 if (!cls.InheritsFrom(clname)) {
4405 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
4406 GetName(), cls.GetName(), name, clname));
4415 if (eventpos < 0)
return kFALSE;
4416 TParticle* particle = (TParticle *)mcEvent->Particle(eventpos);
4417 if (!particle)
return kFALSE;
4418 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4419 if (particle->GetMother(0) != -1){
4420 TParticle* particleMother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4421 if (particleMother){
4422 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4423 particle = particleMother;
4427 if (particle->GetMother(0) != -1){
4428 Double_t deltaX = particle->Vx() - prodVtxX;
4429 Double_t deltaY = particle->Vy() - prodVtxY;
4430 Double_t deltaZ = particle->Vz() - prodVtxZ;
4433 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4436 Bool_t dalitzCand = kFALSE;
4438 TParticle* firstmother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4439 if (!firstmother)
return kFALSE;
4440 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4441 Bool_t intDecay = kFALSE;
4442 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4443 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4448 Long_t source = particle->GetMother(0);
4449 Bool_t foundExcludedPart = kFALSE;
4450 Bool_t foundShower = kFALSE;
4451 Int_t pdgCodeMotherPrev = 0;
4452 Int_t pdgCodeMotherPPrevMother = 0;
4460 TParticle* mother = (TParticle *)mcEvent->Particle(source);
4461 source = mother->GetMother(0);
4463 Int_t pdgCodeMother = mother->GetPdgCode();
4465 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4466 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4467 foundShower = kTRUE;
4470 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4471 foundShower = kTRUE;
4483 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4484 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4485 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4487 foundExcludedPart = kTRUE;
4490 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4491 pdgCodeMotherPrev = pdgCodeMother;
4492 if (source == -1) depth = 20;
4498 if (foundExcludedPart){
4504 }
else if (foundShower){
4519 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4520 if (AODMCTrackArray == NULL)
return kFALSE;
4521 AliAODMCParticle* currentParticle = AODMCParticle;
4522 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4523 if (currentParticle->GetMother() != -1){
4524 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4525 if (particleMother){
4526 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4527 currentParticle = particleMother;
4531 if (currentParticle->GetMother() > -1){
4532 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4533 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4534 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4537 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4539 Bool_t dalitzCand = kFALSE;
4541 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4542 if (!firstmother)
return kFALSE;
4543 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4544 Bool_t intDecay = kFALSE;
4545 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4546 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4551 Long_t source = currentParticle->GetMother();
4552 Bool_t foundExcludedPart = kFALSE;
4553 Bool_t foundShower = kFALSE;
4554 Int_t pdgCodeMotherPrev = 0;
4555 Int_t pdgCodeMotherPPrevMother = 0;
4563 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4564 source = mother->GetMother();
4566 Int_t pdgCodeMother = mother->GetPdgCode();
4568 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4569 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4570 foundShower = kTRUE;
4573 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4574 foundShower = kTRUE;
4586 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4587 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4588 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4590 foundExcludedPart = kTRUE;
4593 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4594 pdgCodeMotherPrev = pdgCodeMother;
4595 if (source == -1) depth = 20;
4601 if (foundExcludedPart){
4607 }
else if (foundShower){
4622 if (particle != NULL && mcEvent != NULL){
4623 Int_t pdgSecondary = 0;
4627 Long_t motherID = particle->GetMother(0);
4628 Long_t grandMotherID = -1;
4632 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4634 if (grandMotherID > -1){
4636 pdgSecondary = mcEvent->Particle(grandMotherID)->GetPdgCode();
4643 Long_t motherID = particle->GetMother(0);
4644 Long_t grandMotherID = -1;
4645 Long_t greatGrandMotherID = -1;
4649 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4651 if (grandMotherID > -1){
4653 greatGrandMotherID = mcEvent->Particle(grandMotherID)->GetMother(0);
4655 if (greatGrandMotherID > -1){
4657 pdgSecondary = mcEvent->Particle(greatGrandMotherID)->GetPdgCode();
4663 if (TMath::Abs(pdgSecondary) == 3122 )
4666 else if ( TMath::Abs(pdgSecondary) == 310 )
4669 else if ( TMath::Abs(pdgSecondary) == 130 )
4672 else if ( TMath::Abs(pdgSecondary) == 221 )
4675 else if ( TMath::Abs(pdgSecondary) != 0 )
4685 if (particle != NULL && aodmcArray != NULL){
4686 Int_t pdgSecondary = 0;
4690 Long_t motherID = particle->GetMother();
4691 Long_t grandMotherID = -1;
4695 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4697 if (grandMotherID > -1){
4699 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4706 Long_t motherID = particle->GetMother();
4707 Long_t grandMotherID = -1;
4708 Long_t greatGrandMotherID = -1;
4712 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4714 if (grandMotherID > -1){
4716 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4718 if (greatGrandMotherID > -1){
4720 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4726 if (TMath::Abs(pdgSecondary) == 3122 )
4729 else if ( TMath::Abs(pdgSecondary) == 310 )
4732 else if ( TMath::Abs(pdgSecondary) == 130 )
4735 else if ( TMath::Abs(pdgSecondary) == 221 )
4738 else if ( TMath::Abs(pdgSecondary) != 0 )
4748 if (periodName.CompareTo(
"") == 0){
4751 if (periodName.CompareTo(
"") == 0) {
4754 AliError(
"No correct period could be set, periodName string empty");
4759 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4760 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0 || periodName.CompareTo(
"LHC10bg") == 0
4764 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4767 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4770 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4773 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4774 periodName.CompareTo(
"LHC11g") == 0
4778 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4781 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4782 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4783 periodName.CompareTo(
"LHC12i") == 0 || periodName.CompareTo(
"LHC12ai") == 0
4787 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 || periodName.CompareTo(
"LHC13bc") == 0){
4790 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 || periodName.CompareTo(
"LHC13de") == 0){
4793 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4796 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4799 }
else if ( periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4800 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0 ||
4801 periodName.CompareTo(
"LHC15fm") == 0
4805 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4808 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4811 }
else if ( periodName.CompareTo(
"LHC16dp") == 0 || periodName.CompareTo(
"LHC16d") == 0 || periodName.CompareTo(
"LHC16e") == 0 || periodName.CompareTo(
"LHC16g") == 0 ||
4812 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 ||
4813 periodName.CompareTo(
"LHC16p") == 0){
4816 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4819 }
else if (periodName.CompareTo(
"LHC16qt") == 0 || periodName.CompareTo(
"LHC16q") == 0 || periodName.CompareTo(
"LHC16t") == 0 ){
4822 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4825 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4828 }
else if (periodName.CompareTo(
"LHC17cr") == 0 || periodName.CompareTo(
"LHC17c") == 0 || periodName.CompareTo(
"LHC17d") == 0 || periodName.CompareTo(
"LHC17e") == 0 ||
4829 periodName.CompareTo(
"LHC17f") == 0 || periodName.CompareTo(
"LHC17h") == 0 || periodName.CompareTo(
"LHC17i") == 0 || periodName.CompareTo(
"LHC17j") == 0 ||
4830 periodName.CompareTo(
"LHC17k") == 0 || periodName.CompareTo(
"LHC17l") == 0 || periodName.CompareTo(
"LHC17m") == 0 || periodName.CompareTo(
"LHC17o") == 0 ||
4831 periodName.CompareTo(
"LHC17r") == 0 ){
4834 }
else if ( periodName.CompareTo(
"LHC17g") == 0 ){
4837 }
else if ( periodName.CompareTo(
"LHC17n") == 0 ){
4840 }
else if ( periodName.CompareTo(
"LHC17pq") == 0 || periodName.CompareTo(
"LHC17p") == 0 || periodName.CompareTo(
"LHC17q") == 0 ){
4845 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4848 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4851 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4854 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4857 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4860 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4863 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4866 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4869 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4872 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4875 }
else if (periodName.Contains(
"LHC14j4")){
4878 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4881 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4884 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4887 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4890 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4893 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4896 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4899 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4903 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4906 }
else if (periodName.Contains(
"LHC12f1a") ){
4909 }
else if (periodName.Contains(
"LHC12f1b") ){
4912 }
else if (periodName.Contains(
"LHC12i3") ){
4915 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4918 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4921 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4924 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4927 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4930 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4933 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4936 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4939 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4942 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4945 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4948 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4952 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){
4955 }
else if (periodName.CompareTo(
"LHC12P2Pyt8")==0 || periodName.Contains(
"LHC15h1")){
4958 }
else if (periodName.CompareTo(
"LHC12P2Pho")==0 || periodName.Contains(
"LHC15h2")){
4961 }
else if (periodName.CompareTo(
"LHC12P2JJ") == 0 || periodName.CompareTo(
"LHC16c2") == 0 || periodName.CompareTo(
"LHC16c2_plus") == 0){
4965 }
else if (periodName.Contains(
"LHC13b2_efix")){