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),
157 fTriggerPatchInfo(NULL),
158 fMainTriggerPatchEMCAL(NULL),
159 fCaloTriggersName(
""),
160 fCaloTriggerPatchInfoName(
""),
162 fTriggersEMCALSelected(-1),
163 fEMCALTrigInitialized(kFALSE),
164 fSecProdBoundary(1.0),
167 fMaxFacPtHardSingleParticle(1.5),
168 fMimicTrigger(kFALSE),
169 fRejectTriggerOverlap(kFALSE),
170 fDoMultiplicityWeighting(kFALSE),
171 fPathReweightingMult(
""),
172 fNameHistoReweightingMultData(
""),
173 fNameHistoReweightingMultMC(
""),
174 hReweightMultData(NULL),
175 hReweightMultMC(NULL),
181 fUtils =
new AliAnalysisUtils();
190 AliAnalysisCuts(ref),
192 fHeaderList(ref.fHeaderList),
193 fDoLightOutput(ref.fDoLightOutput),
194 fEventQuality(ref.fEventQuality),
195 fIsHeavyIon(ref.fIsHeavyIon),
196 fDetectorCentrality(ref.fDetectorCentrality),
197 fModCentralityClass(ref.fModCentralityClass),
198 fEnableVertexCut(ref.fEnableVertexCut),
199 fMaxVertexZ(ref.fMaxVertexZ),
200 fCentralityMin(ref.fCentralityMin),
201 fCentralityMax(ref.fCentralityMax),
202 fMultiplicityMethod(ref.fMultiplicityMethod),
203 fSpecialTrigger(ref.fSpecialTrigger),
204 fSpecialSubTrigger(ref.fSpecialSubTrigger),
205 fRemovePileUp(ref.fRemovePileUp),
206 fPastFutureRejectionLow(ref.fPastFutureRejectionLow),
207 fPastFutureRejectionHigh(ref.fPastFutureRejectionHigh),
208 fDoPileUpRejectV0MTPCout(ref.fDoPileUpRejectV0MTPCout),
209 fFPileUpRejectV0MTPCout(ref.fFPileUpRejectV0MTPCout),
210 fRejectExtraSignals(ref.fRejectExtraSignals),
211 fOfflineTriggerMask(ref.fOfflineTriggerMask),
212 fHasV0AND(ref.fHasV0AND),
213 fIsSDDFired(ref.fIsSDDFired),
214 fRandom(ref.fRandom),
215 fnHeaders(ref.fnHeaders),
216 fNotRejectedStart(NULL),
217 fNotRejectedEnd(NULL),
218 fGeneratorNames(ref.fGeneratorNames),
219 fPeriodEnum(ref.fPeriodEnum),
224 fEtaShift(ref.fEtaShift),
225 fDoEtaShift(ref.fDoEtaShift),
226 fDoCentralityFlat(ref.fDoCentralityFlat),
227 fPathWeightsFlatCent(ref.fPathWeightsFlatCent),
228 fNameHistoNotFlatCentrality(ref.fNameHistoNotFlatCentrality),
229 fDoReweightHistoMCPi0(ref.fDoReweightHistoMCPi0),
230 fDoReweightHistoMCEta(ref.fDoReweightHistoMCEta),
231 fDoReweightHistoMCK0s(ref.fDoReweightHistoMCK0s),
232 fPathTrFReweighting(ref.fPathTrFReweighting),
233 fNameHistoReweightingPi0(ref.fNameHistoReweightingPi0),
234 fNameHistoReweightingEta(ref.fNameHistoReweightingEta),
235 fNameHistoReweightingK0s(ref.fNameHistoReweightingK0s),
236 fNameFitDataPi0(ref.fNameFitDataPi0),
237 fNameFitDataEta(ref.fNameFitDataEta),
238 fNameFitDataK0s(ref.fNameFitDataK0s),
239 fHistoEventCuts(NULL),
240 fHistoPastFutureBits(NULL),
241 hCentrality(ref.hCentrality),
242 hCentralityNotFlat(ref.hCentralityNotFlat),
244 hVertexZ(ref.hVertexZ),
245 hNPileupVertices(ref.hNPileupVertices),
246 hPileupVertexToPrimZ(ref.hPileupVertexToPrimZ),
247 hPileupVertexToPrimZSPDPileup(ref.hPileupVertexToPrimZSPDPileup),
248 hPileupVertexToPrimZTrackletvsHits(ref.hPileupVertexToPrimZTrackletvsHits),
249 hEventPlaneAngle(ref.hEventPlaneAngle),
250 fEventPlaneAngle(ref.fEventPlaneAngle),
252 hTriggerClassSelected(NULL),
253 hTriggerClassesCorrelated(NULL),
254 hReweightMCHistPi0(ref.hReweightMCHistPi0),
255 hReweightMCHistEta(ref.hReweightMCHistEta),
256 hReweightMCHistK0s(ref.hReweightMCHistK0s),
257 fFitDataPi0(ref.fFitDataPi0),
258 fFitDataEta(ref.fFitDataEta),
259 fFitDataK0s(ref.fFitDataK0s),
260 fAddedSignalPDGCode(ref.fAddedSignalPDGCode),
261 fPreSelCut(ref.fPreSelCut),
262 fTriggerSelectedManually(ref.fTriggerSelectedManually),
263 fSpecialTriggerName(ref.fSpecialTriggerName),
264 fSpecialSubTriggerName(ref.fSpecialSubTriggerName),
265 fNSpecialSubTriggerOptions(ref.fNSpecialSubTriggerOptions),
266 hSPDClusterTrackletBackgroundBefore(NULL),
267 hSPDClusterTrackletBackground(NULL),
268 fV0ReaderName(ref.fV0ReaderName),
270 fTriggerPatchInfo(NULL),
271 fMainTriggerPatchEMCAL(NULL),
272 fCaloTriggersName(ref.fCaloTriggersName),
273 fCaloTriggerPatchInfoName(ref.fCaloTriggerPatchInfoName),
274 fTriggersEMCAL(ref.fTriggersEMCAL),
275 fTriggersEMCALSelected(ref.fTriggersEMCALSelected),
276 fEMCALTrigInitialized(kFALSE),
277 fSecProdBoundary(ref.fSecProdBoundary),
278 fMaxPtJetMC(ref.fMaxPtJetMC),
279 fMaxFacPtHard(ref.fMaxFacPtHard),
280 fMaxFacPtHardSingleParticle(ref.fMaxFacPtHardSingleParticle),
281 fMimicTrigger(ref.fMimicTrigger),
282 fRejectTriggerOverlap(ref.fRejectTriggerOverlap),
283 fDoMultiplicityWeighting(ref.fDoMultiplicityWeighting),
284 fPathReweightingMult(ref.fPathReweightingMult),
285 fNameHistoReweightingMultData(ref.fNameHistoReweightingMultData),
286 fNameHistoReweightingMultMC(ref.fNameHistoReweightingMultMC),
287 hReweightMultData(ref.hReweightMultData),
288 hReweightMultMC(ref.hReweightMultMC),
294 fUtils =
new AliAnalysisUtils();
334 TH1::AddDirectory(kFALSE);
427 hTriggerClass->GetXaxis()->SetBinLabel( 9,
"kMUL7/kMuonLikePB");
428 hTriggerClass->GetXaxis()->SetBinLabel(10,
"kMUU7/kMuonUnlikePB");
432 hTriggerClass->GetXaxis()->SetBinLabel(14,
"kPHI7/kPHI8/kPHOSPb");
441 hTriggerClass->GetXaxis()->SetBinLabel(23,
"kMuonSingleLowPt8");
442 hTriggerClass->GetXaxis()->SetBinLabel(24,
"kMuonSingleHighPt8");
443 hTriggerClass->GetXaxis()->SetBinLabel(25,
"kMuonLikeLowPt8");
444 hTriggerClass->GetXaxis()->SetBinLabel(26,
"kMuonUnlikeLowPt8");
445 hTriggerClass->GetXaxis()->SetBinLabel(27,
"kMuonUnlikeLowPt0");
453 hTriggerClass->GetXaxis()->SetBinLabel(35,
"failed Physics Selection");
454 hTriggerClass->GetXaxis()->SetBinLabel(36,
"mimickedTrigger");
512 TH1::AddDirectory(kTRUE);
525 if(mcEvent && event->IsA()==AliESDEvent::Class()){
527 AliMCEventHandler* mcHandler =
dynamic_cast<AliMCEventHandler*
> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
532 if (!mcHandler->InitOk() ){
536 if (!mcHandler->TreeK() ){
540 if (!mcHandler->TreeTR() ) {
558 if(event->IsA()==AliESDEvent::Class()){
559 AliTriggerAnalysis fTriggerAnalysis;
560 fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((
AliESDEvent*)event, AliTriggerAnalysis::kV0AND);
587 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
588 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
589 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
594 if(event->IsA()==AliESDEvent::Class()){
598 for(
Int_t i=0; i<nPileVert;i++){
599 const AliESDVertex* pv = ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
600 Int_t nc2 = pv->GetNContributors();
605 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
617 if(
fUtils->IsPileUpMV(event)){
623 if(
fUtils->IsFirstEventInChunk(event)){
629 if(
fUtils->IsPileUpEvent(event)){
635 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
644 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
650 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
683 AliEventplane *EventPlane =
event->GetEventplane();
708 AliInfo(
"Entering loading of weights for centrality flattening");
731 AliInfo(
"Entering loading of weights for multiplicity weighting");
765 AliInfo(
"Entering loading of histograms for weighting");
831 AliInfo(
"Centrality flattening was enabled");
836 AliInfo(
"Multiplicity weighting was enabled");
840 AliInfo(
"Particle Weighting was enabled");
845 AliInfo(Form(
"Set Event Cut Number: %s",analysisCutSelection.Data()));
846 if(analysisCutSelection.Length()!=
kNCuts) {
847 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
850 if(!analysisCutSelection.IsAlnum()){
851 AliError(
"Cut selection is not alphanumeric");
858 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
859 analysisCutSelectionLowerCase.ToLower();
860 const char *cutSelection = analysisCutSelectionLowerCase.Data();
861 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
894 }
else return kFALSE;
900 }
else return kFALSE;
906 }
else return kFALSE;
912 }
else return kFALSE;
918 }
else return kFALSE;
924 }
else return kFALSE;
930 }
else return kFALSE;
936 }
else return kFALSE;
939 AliError(
"Cut id out of range");
943 AliError(
"Cut id %d not recognized");
957 printf(
"\nEvent cutnumber \n");
959 printf(
"%d",
fCuts[ic]);
963 printf(
"Running in pp mode \n");
966 printf(
"\t only events triggered by V0OR will be analysed \n");
968 printf(
"\t only events where SDD was present will be analysed \n");
972 printf(
"\t only events triggered by V0AND will be analysed \n");
974 printf(
"\t only events where SDD was present will be analysed and triggered by VOAND\n");
985 printf(
"Running in PbPb mode \n");
987 printf(
"\t centrality selection based on V0M \n");
989 printf(
"\t centrality selection based on Cl1 \n");
1005 printf(
"\t only events triggered by kMB, kCentral, kSemiCentral will be analysed \n");
1013 printf(
"Running in pPb mode \n");
1015 printf(
"\t centrality selection based on V0A \n");
1017 printf(
"\t centrality selection based on Cl1 \n");
1023 printf(
"\t only events triggered by kINT7 will be analysed \n");
1030 else printf(
"\t No vertex cut \n");
1033 printf(
"\t Doing pile up removal \n");
1035 printf(
"\t Doing extra pile up removal V0M vs TPCout \n");
1039 printf(
"MC event cuts: \n");
1043 printf(
"\t maximum factor between jet and pt hard = %2.2f \n",
fMaxFacPtHard);
1097 AliError(Form(
"SetHeavyIon not defined %d",isHeavyIon));
1107 if(minCentrality<0||minCentrality>9){
1108 AliError(Form(
"minCentrality not defined %d",minCentrality));
1120 if(maxCentrality<0||maxCentrality>9){
1121 AliError(Form(
"maxCentrality not defined %d",maxCentrality));
1132 switch(selectSpecialTrigger){
1162 fOfflineTriggerMask=AliVEvent::kPHI7 | AliVEvent::kPHI1 | AliVEvent::kPHI8 | AliVEvent::kPHOSPb;
1189 AliError(
"Warning: Special Trigger Not known");
1200 switch(selectSpecialSubTriggerClass){
1211 AliError(
"Warning: Special Subtrigger Class Not known");
1215 switch(selectSpecialSubTriggerClass){
1240 AliError(
"Warning: Special Subtrigger Class Not known");
1244 switch(selectSpecialSubTriggerClass){
1305 AliError(
"Warning: Special Subtrigger Class Not known");
1309 switch(selectSpecialSubTriggerClass){
1356 AliError(
"Warning: Special Subtrigger Class Not known");
1360 switch(selectSpecialSubTriggerClass){
1409 AliError(
"Warning: Special Subtrigger Class Not known");
1413 switch(selectSpecialSubTriggerClass){
1441 AliError(
"Warning: Special Subtrigger Class Not known");
1445 switch(selectSpecialSubTriggerClass){
1489 AliError(
"Warning: Special Subtrigger Class Not known");
1493 switch(selectSpecialSubTriggerClass){
1585 AliError(
"Warning: Special Subtrigger Class Not known");
1589 switch(selectSpecialSubTriggerClass){
1667 AliError(
"Warning: Special Subtrigger Class Not known");
1691 switch(removePileUp){
1825 AliError(
"RemovePileUpCut not defined");
1834 switch(extraSignal){
1848 AliError(Form(
"Extra Signal Rejection not defined %d",extraSignal));
1883 AliError(Form(
"Vertex Cut not defined %d",vertexCut));
1929 AliMultSelection *MultSelection = (AliMultSelection*)event->FindListObject(
"MultSelection");
1931 AliWarning (
"AliMultSelection object not found !");
1935 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1936 else return MultSelection->GetMultiplicityPercentile(
"V0M");
1937 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1940 AliCentrality *fESDCentrality = (AliCentrality*)esdEvent->GetCentrality();
1942 if(
fIsHeavyIon==2)
return fESDCentrality->GetCentralityPercentile(
"V0A");
1943 else return fESDCentrality->GetCentralityPercentile(
"V0M");
1951 AliMultSelection *MultSelection = (AliMultSelection*)aodEvent->FindListObject(
"MultSelection");
1953 AliWarning (
"AliMultSelection object not found !");
1957 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1958 else return MultSelection->GetMultiplicityPercentile(
"V0M",kTRUE);
1959 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1962 if(aodEvent->GetHeader()){
return ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();}
1977 Int_t primaryTracksPP[9] = { 0, 2, 5, 10, 15,
1992 if(centrality<0 && !mcEvent)
return kFALSE;
1994 Int_t centralityC=0;
1996 centralityC=
Int_t(centrality/10);
2002 centralityC=
Int_t(centrality);
2005 }
else return kFALSE;
2008 centralityC=
Int_t(centrality);
2015 Int_t PrimaryTracks10[11][2] =
2029 Int_t PrimaryTracksLHC11h10[11][2] =
2043 Int_t PrimaryTracksLHC15o10[11][2] =
2057 Int_t PrimaryTracks5a[11][2] =
2071 Int_t PrimaryTracksLHC11h5a[11][2] =
2085 Int_t PrimaryTracksLHC15o5a[11][2] =
2099 Int_t PrimaryTracks5b[11][2] =
2113 Int_t PrimaryTracksLHC11h5b[11][2] =
2127 Int_t PrimaryTracksLHC15o5b[11][2] =
2141 Int_t PrimaryTracksLHC17n10[11][2] =
2157 if(event->IsA()==AliESDEvent::Class()) column = 0;
2158 if(event->IsA()==AliAODEvent::Class()) column = 1;
2185 centralityC=
Int_t(centrality/10);
2211 centralityC=
Int_t(centrality);
2214 }
else return kFALSE;
2237 centralityC=
Int_t(centrality);
2250 Double_t fVertexZ=
event->GetPrimaryVertex()->GetZ();
2254 fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
2258 fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
2261 if(TMath::Abs(fVertexZ)>
fMaxVertexZ)
return kFALSE;
2265 if (TMath::Abs(fVertexZ-fVertexZSPD) > 0.1)
return kFALSE;
2268 if(!
fUtils->IsVertexSelected2013pA(event))
return kFALSE;
2279 TBits fIR1 =
event->GetHeader()->GetIRInt1InteractionMap();
2280 TBits fIR2 =
event->GetHeader()->GetIRInt2InteractionMap();
2281 UShort_t bunchCrossings =
event->GetBunchCrossNumber();
2283 for(
Int_t i = 0; i<180;i++){
2284 if(fIR1.TestBitNumber(i))
2289 Bool_t isOutOfBunchPileup = 0;
2292 if(pf1 < -89) pf1 = -89;
2293 if(pf2 > 89) pf2 = 89;
2294 Int_t pf2maxForT0 = pf2;
2296 for (
Int_t i=pf1;i<=pf2;i++) {
2298 if (i<=pf2maxForT0) isOutOfBunchPileup|=fIR2.TestBitNumber(90+i);
2299 if (i>0 && i<=ir1skip)
continue;
2300 isOutOfBunchPileup|=fIR1.TestBitNumber(90+i);
2302 return isOutOfBunchPileup;
2308 Bool_t isPileUpV0MTPCout=0;
2313 multV0M =
event->GetVZEROData()->GetMTotV0A();
2315 multV0M =
event->GetVZEROData()->GetMTotV0A() +
event->GetVZEROData()->GetMTotV0C() ;
2320 if (multV0M < valFunc ) isPileUpV0MTPCout=1;
2323 return isPileUpV0MTPCout;
2332 if (fESDEvent->GetPrimaryVertex() != NULL){
2333 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2335 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2339 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2340 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2342 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2344 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2353 if (fAODEvent->GetPrimaryVertex() != NULL){
2354 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2355 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2358 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2359 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2360 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2362 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2375 AliGenCocktailEventHeader *cHeader = 0x0;
2376 Bool_t headerFound = kFALSE;
2396 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2397 if(cHeader) headerFound = kTRUE;
2405 TList *genHeaders = 0x0;
2406 if(cHeader) genHeaders = cHeader->GetHeaders();
2407 AliGenEventHeader* gh = 0;
2408 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2409 gh = (AliGenEventHeader*)genHeaders->At(i);
2410 TString GeneratorName = gh->GetName();
2411 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2412 Bool_t eventAccepted = kTRUE;
2413 TParticle * jet = 0;
2414 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2417 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2418 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2419 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2422 eventAccepted= kFALSE;
2426 if (jet)
delete jet;
2428 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2429 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2430 if (!particle)
continue;
2431 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2433 eventAccepted= kFALSE;
2441 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2443 70, 85, 99, 115, 132,
2444 150, 169, 190, 212, 235,
2446 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2447 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2448 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2449 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2451 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2452 if (bin < 20) weight = weightsBins[bin];
2455 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2457 70, 85, 99, 115, 132,
2458 150, 169, 190, 212, 235,
2460 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2461 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2462 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2463 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2466 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2467 if (bin < 20) weight = weightsBins[bin];
2470 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2472 70, 85, 99, 115, 132,
2473 150, 169, 190, 212, 235,
2475 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2476 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2477 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2478 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2480 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2481 if (bin < 20) weight = weightsBins[bin];
2485 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2488 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2489 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2490 1.933238e-05, 1.562895e-05};
2492 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2493 if (bin < 12) weight = weightsBins[bin];
2496 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2497 84, 117, 152, 191, 1000000,
2499 21, 28, 36, 45, 57 };
2500 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2501 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2502 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2503 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2507 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2508 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2509 if (bin < 19) weight = weightsBins[bin];
2512 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2513 84, 117, 152, 191, 1000000,
2515 21, 28, 36, 45, 57 };
2517 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2518 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2519 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2520 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2523 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2524 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2525 if (bin < 19) weight = weightsBins[bin];
2528 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2530 70, 85, 99, 115, 132,
2531 150, 169, 190, 212, 235,
2533 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2534 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2535 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2536 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2538 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2539 if (bin < 20) weight = weightsBins[bin];
2542 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2543 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2545 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2546 if (bin < 5) weight = weightsBins[bin];
2549 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2550 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2552 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2553 if (bin < 6) weight = weightsBins[bin];
2556 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2557 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2559 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2560 if (bin < 7) weight = weightsBins[bin];
2563 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2564 84, 117, 152, 191, 234,
2566 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2567 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2569 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2570 if (bin < 10) weight = weightsBins[bin];
2573 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};
2574 Double_t weightsBins[20] = {2.648510E+01, 7.963350E+00, 3.926460E+00, 1.535630E+00, 5.125940E-01, 1.982910E-01, 6.705810E-02, 2.214220E-02, 9.872830E-03, 3.460430E-03, 1.426840E-03, 5.212990E-04, 2.534030E-04, 1.157210E-04, 6.609650E-05, 3.424850E-05, 1.833500E-05, 1.022650E-05, 5.878600E-06, 8.550350E-06};
2576 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2577 if (bin < 20) weight = weightsBins[bin];
2579 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};
2580 Double_t weightsBins[20] = {2.638850E+01, 8.160880E+00, 3.937510E+00, 1.485000E+00, 5.382460E-01, 2.034610E-01, 6.293600E-02, 2.206170E-02, 9.319700E-03, 3.354230E-03, 1.392300E-03, 5.023470E-04, 2.645860E-04, 1.299660E-04, 6.415310E-05, 3.469890E-05, 1.816550E-05, 1.047480E-05, 5.728760E-06, 8.547820E-06};
2582 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2583 if (bin < 20) weight = weightsBins[bin];
2589 if (weight == -1)
return kFALSE;
2590 else return eventAccepted;
2595 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2596 TString eventHeaderName = eventHeader->ClassName();
2597 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2598 Bool_t eventAccepted = kTRUE;
2599 TParticle * jet = 0;
2600 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2601 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2603 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2604 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2605 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2608 eventAccepted= kFALSE;
2613 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2614 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2615 if (!particle)
continue;
2616 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2618 eventAccepted= kFALSE;
2626 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2628 70, 85, 99, 115, 132,
2629 150, 169, 190, 212, 235,
2631 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2632 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2633 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2634 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2636 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2637 if (bin < 20) weight = weightsBins[bin];
2640 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2642 70, 85, 99, 115, 132,
2643 150, 169, 190, 212, 235,
2645 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2646 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2647 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2648 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2651 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2652 if (bin < 20) weight = weightsBins[bin];
2655 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2657 70, 85, 99, 115, 132,
2658 150, 169, 190, 212, 235,
2660 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2661 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2662 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2663 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2665 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2666 if (bin < 20) weight = weightsBins[bin];
2670 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2673 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2674 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2675 1.933238e-05, 1.562895e-05};
2677 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2678 if (bin < 12) weight = weightsBins[bin];
2681 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2682 84, 117, 152, 191, 1000000,
2684 21, 28, 36, 45, 57 };
2685 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2686 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2687 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2688 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2692 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2693 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2694 if (bin < 19) weight = weightsBins[bin];
2697 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2698 84, 117, 152, 191, 1000000,
2700 21, 28, 36, 45, 57 };
2702 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2703 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2704 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2705 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2708 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2709 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2710 if (bin < 19) weight = weightsBins[bin];
2713 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2715 70, 85, 99, 115, 132,
2716 150, 169, 190, 212, 235,
2718 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2719 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2720 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2721 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2723 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2724 if (bin < 20) weight = weightsBins[bin];
2727 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2728 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2730 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2731 if (bin < 5) weight = weightsBins[bin];
2734 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2735 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2737 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2738 if (bin < 6) weight = weightsBins[bin];
2741 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2742 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2744 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2745 if (bin < 7) weight = weightsBins[bin];
2748 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2749 84, 117, 152, 191, 234,
2751 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2752 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2754 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2755 if (bin < 10) weight = weightsBins[bin];
2760 if (weight == -1)
return kFALSE;
2761 else return eventAccepted;
2776 AliGenCocktailEventHeader *cHeader = 0x0;
2777 Bool_t headerFound = kFALSE;
2795 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2796 if(cHeader) headerFound = kTRUE;
2805 TList *genHeaders = 0x0;
2806 if(cHeader) genHeaders = cHeader->GetHeaders();
2807 AliGenEventHeader* gh = 0;
2808 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2809 gh = (AliGenEventHeader*)genHeaders->At(i);
2810 TString GeneratorName = gh->GetName();
2811 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2812 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2813 NTrials = gPythia->Trials();
2814 XSection = gPythia->GetXsection();
2819 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2821 TString eventHeaderName = eventHeader->ClassName();
2822 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2823 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2824 NTrials = gPythia->Trials();
2825 XSection = gPythia->GetXsection();
2841 AliGenCocktailEventHeader *cHeader = 0x0;
2842 Bool_t headerFound = kFALSE;
2856 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2857 if(cHeader) headerFound = kTRUE;
2864 TList *genHeaders = 0x0;
2865 if(cHeader) genHeaders = cHeader->GetHeaders();
2866 AliGenEventHeader* gh = 0;
2867 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2868 gh = (AliGenEventHeader*)genHeaders->At(i);
2869 TString GeneratorName = gh->GetName();
2870 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2871 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2875 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2877 TString eventHeaderName = eventHeader->ClassName();
2878 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2879 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2894 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
2896 150209, 153056, 153911, 153915,
2897 158135, 158136, 158178, 158182, 160683,
2898 160764, 161139, 161256, 161379, 161457,
2899 161525, 161556, 161558, 161609, 161630,
2901 173731, 177144, 177147, 177653, 177724, 178327,
2906 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
2908 1.94, 3.39, 4.01, 5.25, 5.5,
2909 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,
2910 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
2914 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
2917 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
2918 0., 0., 0., 0., 0.2, 0.2,
2923 Int_t runRangesEMCalL1[4] = { 179796,
2928 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
2929 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
2931 Int_t runRangesEMCalL1G2[3] = { 195180,
2935 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
2936 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
2938 Int_t runnumber =
event->GetRunNumber();
2941 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
2943 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
2947 if (binRun==34)
return kFALSE;
2948 Double_t threshold = thresholdEMCalL0[binRun];
2950 if (isMC && spreadEMCalL0[binRun] != 0.){
2951 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2952 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2953 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
2954 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
2955 threshold = triggerSmearing->GetRandom();
2956 delete triggerSmearing;
2962 nclus =
event->GetNumberOfCaloClusters();
2964 if(nclus == 0)
return kFALSE;
2967 Bool_t eventIsAccepted = kFALSE;
2968 for(
Int_t i = 0; i < nclus; i++){
2969 AliVCluster* clus = NULL;
2970 clus =
event->GetCaloCluster(i);
2971 if (!clus)
continue;
2972 if (!clus->IsEMCAL())
continue;
2973 if (clus->GetM02()<0.1)
continue;
2974 if (clus->GetNCells()<2)
continue;
2975 if (clus->E() > threshold ){
2977 eventIsAccepted = kTRUE;
2980 return eventIsAccepted;
2987 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
2989 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
2993 if (binRun==3)
return kFALSE;
2994 Double_t threshold = thresholdEMCalL1[binRun];
2996 if (isMC && spreadEMCalL1[binRun] != 0.){
2997 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2998 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2999 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
3000 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
3001 threshold = triggerSmearing->GetRandom();
3002 delete triggerSmearing;
3008 nclus =
event->GetNumberOfCaloClusters();
3010 if(nclus == 0)
return kFALSE;
3013 Bool_t eventIsAccepted = kFALSE;
3014 for(
Int_t i = 0; i < nclus; i++){
3015 AliVCluster* clus = NULL;
3016 clus =
event->GetCaloCluster(i);
3017 if (!clus)
continue;
3018 if (!clus->IsEMCAL())
continue;
3019 if (clus->GetM02()<0.1)
continue;
3020 if (clus->GetNCells()<2)
continue;
3021 if (clus->E() > threshold ){
3023 eventIsAccepted = kTRUE;
3026 return eventIsAccepted;
3028 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
3030 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
3034 if (binRun==2)
return kFALSE;
3035 Double_t threshold = thresholdEMCalL1G2[binRun];
3036 if (isMC && spreadEMCalL1G2[binRun] != 0.){
3037 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3038 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3039 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
3040 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
3041 threshold = triggerSmearing->GetRandom();
3042 delete triggerSmearing;
3047 nclus =
event->GetNumberOfCaloClusters();
3049 if(nclus == 0)
return kFALSE;
3052 Bool_t eventIsAccepted = kFALSE;
3053 for(
Int_t i = 0; i < nclus; i++){
3054 AliVCluster* clus = NULL;
3055 clus =
event->GetCaloCluster(i);
3056 if (!clus)
continue;
3057 if (!clus->IsEMCAL())
continue;
3058 if (clus->GetM02()<0.1)
continue;
3059 if (clus->GetNCells()<2)
continue;
3060 if (clus->E() > threshold ){
3062 eventIsAccepted = kTRUE;
3065 return eventIsAccepted;
3082 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3085 UInt_t isSelected = AliVEvent::kAny;
3087 if (fInputHandler==NULL)
return kFALSE;
3088 if( fInputHandler->GetEventSelection() ||
event->IsA()==AliAODEvent::Class()) {
3090 TString firedTrigClass =
event->GetFiredTriggerClasses();
3131 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3133 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
3135 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3139 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3140 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3142 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3143 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3150 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3152 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3154 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
3157 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3158 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3159 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3162 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3164 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3167 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3168 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3173 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3174 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3175 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3177 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3178 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3179 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3181 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3182 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3184 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3185 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3189 if (isSelected != 0 ){
3221 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3222 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3223 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3227 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3228 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3229 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3233 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3234 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3235 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3240 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3241 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3242 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3243 else CheckClass+=
"0";
3245 if(CheckClass.Contains(
"0")) isSelected = 0;
3252 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3254 Bool_t mimickedTrigger = kTRUE;
3261 if (mimickedTrigger){
3262 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3263 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3264 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3265 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3266 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3267 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3268 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3270 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3272 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3274 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3276 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3278 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3279 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3280 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3283 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3284 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3285 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3286 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3287 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3288 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3289 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3291 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3292 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3293 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3294 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3295 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3296 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3297 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3298 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3299 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3300 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3301 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3302 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3308 if (mimickedTrigger){
3340 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3341 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3343 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3344 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3354 if(!isSelected)
return kFALSE;
3356 if (!mimickedTrigger )
return kFALSE;
3383 if(rejection == 0)
return;
3385 AliGenCocktailEventHeader *cHeader = 0x0;
3386 AliAODMCHeader *cHeaderAOD = 0x0;
3387 Bool_t headerFound = kFALSE;
3388 AliMCEvent *fMCEvent = 0x0;
3389 TClonesArray *fMCEventAOD = 0x0;
3390 if(event->IsA()==AliMCEvent::Class()){
3391 if(dynamic_cast<AliMCEvent*>(event)){
3392 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(event)->GenEventHeader());
3393 fMCEvent =
dynamic_cast<AliMCEvent*
>(event);
3394 if(cHeader) headerFound = kTRUE;
3397 if(event->IsA()==AliAODEvent::Class()){
3398 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(
event->FindListObject(AliAODMCHeader::StdBranchName()));
3399 fMCEventAOD =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3400 if(cHeaderAOD) headerFound = kTRUE;
3403 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3405 TList *genHeaders = 0x0;
3406 if(cHeader) genHeaders = cHeader->GetHeaders();
3408 genHeaders = cHeaderAOD->GetCocktailHeaders();
3409 if(genHeaders->GetEntries()==1){
3414 AliGenEventHeader* gh = 0;
3416 Int_t firstindexA = 0;
3417 Int_t lastindexA = -1;
3418 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3420 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3421 gh = (AliGenEventHeader*)genHeaders->At(i);
3422 TString GeneratorName = gh->GetName();
3423 lastindexA = lastindexA + gh->NProduced();
3425 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3426 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3428 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3430 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3434 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode ){
3448 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA));
3451 if (gh->NProduced() > 10){
3452 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA+10));
3474 firstindexA = firstindexA + gh->NProduced();
3483 if(rejection == 1 || rejection == 3){
3485 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3486 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3491 Int_t firstindex = 0;
3492 Int_t lastindex = -1;
3495 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3496 gh = (AliGenEventHeader*)genHeaders->At(i);
3497 TString GeneratorName = gh->GetName();
3498 lastindex = lastindex + gh->NProduced();
3499 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3500 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3501 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3502 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3503 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3508 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode){
3527 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex));
3530 if (gh->NProduced() > 10) {
3531 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex+10));
3561 firstindex = firstindex + gh->NProduced();
3564 for (
Int_t i = 0; i < number; i++){
3574 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(event)->GetNumberOfPrimaries()-1;
3591 if(index < 0)
return 0;
3594 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3595 if(!mcEvent)
return 0;
3596 if(index >= mcEvent->GetNumberOfPrimaries()){
3597 if( ((TParticle*)mcEvent->Particle(index))->GetMother(0) < 0)
return 0;
3605 if(i == 0) accepted = 2;
3608 if (debug > 1 && !accepted) cout <<
"rejected:" << index << endl;
3610 else if(InputEvent->IsA()==AliAODEvent::Class()){
3611 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3612 if (AODMCTrackArray){
3613 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3614 if(!aodMCParticle)
return 0;
3615 if(!aodMCParticle->IsPrimary()){
3616 if( aodMCParticle->GetMother() < 0)
return 0;
3619 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3623 if(i == 0) accepted = 2;
3636 if (mcEvent){isMC = kTRUE;}
3664 Int_t runnumber =
event->GetRunNumber();
3665 if ((runnumber>=144871) && (runnumber<=146860)) {
3667 AliVCaloCells *cells =
event->GetEMCALCells();
3668 const Short_t nCells = cells->GetNumberOfCells();
3670 if (event->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3672 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3673 if (!fInputHandler)
return 3;
3676 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3677 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3678 Short_t cellId = cells->GetCellNumber(iCell);
3679 Double_t cellE = cells->GetCellAmplitude(cellId);
3680 Int_t sm = cellId / (24*48);
3681 if (cellE>0.1) ++nCellCount[sm];
3684 Bool_t fIsLedEvent = kFALSE;
3685 if (nCellCount[4] > 100) {
3686 fIsLedEvent = kTRUE;
3688 if ((runnumber>=146858) && (runnumber<=146860)) {
3689 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3690 fIsLedEvent = kTRUE;
3691 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3692 fIsLedEvent = kTRUE;
3702 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
3703 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
3704 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
3709 if(event->IsA()==AliESDEvent::Class()){
3713 for(
Int_t i=0; i<nPileVert;i++){
3714 const AliESDVertex* pv= ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
3715 Int_t nc2 = pv->GetNContributors();
3720 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
3734 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
3738 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3744 if(
fUtils->IsPileUpEvent(event) ){
3748 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3769 AliEventplane *EventPlane =
event->GetEventplane();
3782 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
3785 if(!event || event->IsA()==AliESDEvent::Class()){
3788 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
3790 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
3793 }
else if(event->IsA()==AliAODEvent::Class()){
3796 if(aodEvent->GetHeader()){
3797 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
3803 Float_t GetValueForWeight = 1.;
3806 Bool_t CorrCentrLoop = kFALSE;
3812 CorrCentrLoop = kTRUE;
3813 }
else if (
fDoCentralityFlat == 2 && (centrality >=10. && centrality <= 20.) ){
3816 CorrCentrLoop = kTRUE;
3820 CorrCentrLoop = kTRUE;
3822 CorrCentrLoop = kFALSE;
3825 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
3826 weightCentrality = maximum/GetValueForWeight;
3827 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
3828 if (!isfinite(weightCentrality)) weightCentrality = 1.;
3831 return weightCentrality;
3850 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
3851 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
3852 weightMult = valueMultData/valueMultMC;
3871 if(index < 0)
return 0;
3879 if (kCaseGen == 0)
return 1;
3884 if(!event || event->IsA()==AliESDEvent::Class()){
3885 mesonPt = ((TParticle*)mcEvent->Particle(index))->Pt();
3887 PDGCode = ((TParticle*)mcEvent->Particle(index))->GetPdgCode();
3888 }
else if(event->IsA()==AliAODEvent::Class()){
3889 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3890 if (AODMCTrackArray){
3891 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3892 mesonPt = aodMCParticle->Pt();
3894 PDGCode = aodMCParticle->GetPdgCode();
3900 Float_t functionResultMC = 1.;
3911 Float_t functionResultData = 1;
3923 if (PDGCode == 111 || PDGCode == 221){
3924 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
3925 weight = functionResultData/functionResultMC;
3926 if ( kCaseGen == 3){
3927 if (PDGCode == 111){
3932 if (PDGCode == 221){
3938 if (!isfinite(functionResultData)) weight = 1.;
3939 if (!isfinite(weight)) weight = 1.;
3941 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
3942 weight = functionResultMC;
3958 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
3961 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
3964 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
3976 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
3984 AliEMCALTriggerPatchInfo *patch;
3985 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3987 if (patch->IsMainTrigger()) {
4004 if (event->IsA()==AliESDEvent::Class()){
4014 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
4020 if (event->IsA()==AliESDEvent::Class()){
4052 AliEMCALTriggerPatchInfo *patch;
4054 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
4059 if (patch->IsGammaHigh()){
4063 if (patch->IsGammaLow()){
4067 if (patch->IsJetHigh()){
4071 if (patch->IsJetLow()){
4075 if (patch->IsLevel0()){
4086 AliDebug(2,
"Patch summary: ");
4087 AliDebug(2, Form(
"Number of patches: %d", nPatch));
4088 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
4089 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
4090 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
4102 SETBIT(triggers,
kG1);
4104 SETBIT(triggers,
kG2);
4106 SETBIT(triggers,
kJ1);
4108 SETBIT(triggers,
kJ2);
4110 SETBIT(triggers,
kL0);
4129 TClonesArray *arr = 0;
4131 if (!sname.IsNull()) {
4132 arr =
dynamic_cast<TClonesArray*
>(
event->FindListObject(sname));
4134 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
4144 TString objname(arr->GetClass()->GetName());
4145 TClass cls(objname);
4146 if (!cls.InheritsFrom(clname)) {
4147 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
4148 GetName(), cls.GetName(), name, clname));
4157 if (eventpos < 0)
return kFALSE;
4158 TParticle* particle = (TParticle *)mcEvent->Particle(eventpos);
4159 if (!particle)
return kFALSE;
4160 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4161 if (particle->GetMother(0) != -1){
4162 TParticle* particleMother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4163 if (particleMother){
4164 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4165 particle = particleMother;
4169 if (particle->GetMother(0) != -1){
4170 Double_t deltaX = particle->Vx() - prodVtxX;
4171 Double_t deltaY = particle->Vy() - prodVtxY;
4172 Double_t deltaZ = particle->Vz() - prodVtxZ;
4175 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4178 Bool_t dalitzCand = kFALSE;
4180 TParticle* firstmother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4181 if (!firstmother)
return kFALSE;
4182 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4183 Bool_t intDecay = kFALSE;
4184 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4185 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4190 Long_t source = particle->GetMother(0);
4191 Bool_t foundExcludedPart = kFALSE;
4192 Bool_t foundShower = kFALSE;
4193 Int_t pdgCodeMotherPrev = 0;
4194 Int_t pdgCodeMotherPPrevMother = 0;
4202 TParticle* mother = (TParticle *)mcEvent->Particle(source);
4203 source = mother->GetMother(0);
4205 Int_t pdgCodeMother = mother->GetPdgCode();
4207 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4208 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4209 foundShower = kTRUE;
4212 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4213 foundShower = kTRUE;
4225 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4226 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4227 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4229 foundExcludedPart = kTRUE;
4232 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4233 pdgCodeMotherPrev = pdgCodeMother;
4234 if (source == -1) depth = 20;
4240 if (foundExcludedPart){
4246 }
else if (foundShower){
4261 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4262 if (AODMCTrackArray == NULL)
return kFALSE;
4263 AliAODMCParticle* currentParticle = AODMCParticle;
4264 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4265 if (currentParticle->GetMother() != -1){
4266 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4267 if (particleMother){
4268 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4269 currentParticle = particleMother;
4273 if (currentParticle->GetMother() > -1){
4274 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4275 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4276 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4279 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4281 Bool_t dalitzCand = kFALSE;
4283 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4284 if (!firstmother)
return kFALSE;
4285 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4286 Bool_t intDecay = kFALSE;
4287 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4288 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4293 Long_t source = currentParticle->GetMother();
4294 Bool_t foundExcludedPart = kFALSE;
4295 Bool_t foundShower = kFALSE;
4296 Int_t pdgCodeMotherPrev = 0;
4297 Int_t pdgCodeMotherPPrevMother = 0;
4305 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4306 source = mother->GetMother();
4308 Int_t pdgCodeMother = mother->GetPdgCode();
4310 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4311 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4312 foundShower = kTRUE;
4315 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4316 foundShower = kTRUE;
4328 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4329 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4330 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4332 foundExcludedPart = kTRUE;
4335 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4336 pdgCodeMotherPrev = pdgCodeMother;
4337 if (source == -1) depth = 20;
4343 if (foundExcludedPart){
4349 }
else if (foundShower){
4364 if (particle != NULL && mcEvent != NULL){
4365 Int_t pdgSecondary = 0;
4369 Long_t motherID = particle->GetMother(0);
4370 Long_t grandMotherID = -1;
4374 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4376 if (grandMotherID > -1){
4378 pdgSecondary = mcEvent->Particle(grandMotherID)->GetPdgCode();
4385 Long_t motherID = particle->GetMother(0);
4386 Long_t grandMotherID = -1;
4387 Long_t greatGrandMotherID = -1;
4391 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4393 if (grandMotherID > -1){
4395 greatGrandMotherID = mcEvent->Particle(grandMotherID)->GetMother(0);
4397 if (greatGrandMotherID > -1){
4399 pdgSecondary = mcEvent->Particle(greatGrandMotherID)->GetPdgCode();
4405 if (TMath::Abs(pdgSecondary) == 3122 )
4408 else if ( TMath::Abs(pdgSecondary) == 310 )
4411 else if ( TMath::Abs(pdgSecondary) == 130 )
4414 else if ( TMath::Abs(pdgSecondary) == 221 )
4417 else if ( TMath::Abs(pdgSecondary) != 0 )
4427 if (particle != NULL && aodmcArray != NULL){
4428 Int_t pdgSecondary = 0;
4432 Long_t motherID = particle->GetMother();
4433 Long_t grandMotherID = -1;
4437 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4439 if (grandMotherID > -1){
4441 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4448 Long_t motherID = particle->GetMother();
4449 Long_t grandMotherID = -1;
4450 Long_t greatGrandMotherID = -1;
4454 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4456 if (grandMotherID > -1){
4458 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4460 if (greatGrandMotherID > -1){
4462 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4468 if (TMath::Abs(pdgSecondary) == 3122 )
4471 else if ( TMath::Abs(pdgSecondary) == 310 )
4474 else if ( TMath::Abs(pdgSecondary) == 130 )
4477 else if ( TMath::Abs(pdgSecondary) == 221 )
4480 else if ( TMath::Abs(pdgSecondary) != 0 )
4490 if (periodName.CompareTo(
"") == 0){
4493 if (periodName.CompareTo(
"") == 0) {
4496 AliError(
"No correct period could be set, periodName string empty");
4501 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4502 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0 || periodName.CompareTo(
"LHC10bg") == 0
4506 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4509 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4512 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4515 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4516 periodName.CompareTo(
"LHC11g") == 0
4520 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4523 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4524 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4525 periodName.CompareTo(
"LHC12i") == 0 || periodName.CompareTo(
"LHC12ai") == 0
4529 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 || periodName.CompareTo(
"LHC13bc") == 0){
4532 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 || periodName.CompareTo(
"LHC13de") == 0){
4535 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4538 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4541 }
else if ( periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4542 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0 ||
4543 periodName.CompareTo(
"LHC15fm") == 0
4547 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4550 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4553 }
else if ( periodName.CompareTo(
"LHC16d") == 0 || periodName.CompareTo(
"LHC16e") == 0 || periodName.CompareTo(
"LHC16g") == 0 || periodName.CompareTo(
"LHC16h") == 0 ||
4554 periodName.CompareTo(
"LHC16i") == 0 || periodName.CompareTo(
"LHC16j") == 0 || periodName.CompareTo(
"LHC16k") == 0 || periodName.CompareTo(
"LHC16l") == 0 ||
4555 periodName.CompareTo(
"LHC16m") == 0 || periodName.CompareTo(
"LHC16n") == 0 || periodName.CompareTo(
"LHC16o") == 0 || periodName.CompareTo(
"LHC16p") == 0){
4558 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4561 }
else if (periodName.CompareTo(
"LHC16q") == 0 ){
4564 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4567 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4570 }
else if (periodName.CompareTo(
"LHC16t") == 0 ){
4573 }
else if ( periodName.CompareTo(
"LHC17c") == 0 || periodName.CompareTo(
"LHC17d") == 0 || periodName.CompareTo(
"LHC17e") == 0 || periodName.CompareTo(
"LHC17f") == 0 ||
4574 periodName.CompareTo(
"LHC17h") == 0 || periodName.CompareTo(
"LHC17i") == 0 || periodName.CompareTo(
"LHC17j") == 0 || periodName.CompareTo(
"LHC17k") == 0 ||
4575 periodName.CompareTo(
"LHC17l") == 0 || periodName.CompareTo(
"LHC17m") == 0 || periodName.CompareTo(
"LHC17o") == 0 ){
4578 }
else if ( periodName.CompareTo(
"LHC17g") == 0 ){
4581 }
else if ( periodName.CompareTo(
"LHC17n") == 0 ){
4584 }
else if ( periodName.CompareTo(
"LHC17p") == 0 ){
4587 }
else if ( periodName.CompareTo(
"LHC17q") == 0 ){
4592 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4595 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4598 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4601 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4604 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4607 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4610 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4613 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4616 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4619 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4622 }
else if (periodName.Contains(
"LHC14j4")){
4625 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4628 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4631 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4634 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4637 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4640 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4643 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4646 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4650 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4653 }
else if (periodName.Contains(
"LHC12f1a") ){
4656 }
else if (periodName.Contains(
"LHC12f1b") ){
4659 }
else if (periodName.Contains(
"LHC12i3") ){
4662 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4665 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4668 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4671 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4674 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4677 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4680 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4683 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4686 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4689 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4692 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4695 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4699 }
else if (periodName.CompareTo(
"LHC14e2a") == 0){
4702 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){
4705 }
else if (periodName.CompareTo(
"LHC14e2c") == 0){
4708 }
else if (periodName.Contains(
"LHC15h1")){
4711 }
else if (periodName.Contains(
"LHC15h2")){
4714 }
else if (periodName.CompareTo(
"LHC16c2") == 0){
4717 }
else if (periodName.CompareTo(
"LHC16c2_plus") == 0){
4721 }
else if (periodName.Contains(
"LHC13b2_efix")){
4724 }
else if (periodName.CompareTo(
"LHC13e7") == 0){
4727 }
else if (periodName.CompareTo(
"LHC14b2") == 0){
4730 }
else if (periodName.CompareTo(
"LHC13b4_fix") == 0){
4733 }
else if (periodName.CompareTo(
"LHC13b4_plus") == 0){
4736 }
else if (periodName.CompareTo(
"LHC16c3a") == 0){
4739 }
else if (periodName.CompareTo(
"LHC16c3b") == 0){
4742 }
else if (periodName.CompareTo(
"LHC16c3c") == 0){
4745 }
else if (periodName.CompareTo(
"LHC15g2") == 0){
4748 }
else if (periodName.CompareTo(
"LHC15a3a") == 0){
4751 }
else if (periodName.CompareTo(
"LHC15a3a_plus") == 0){
4754 }
else if (periodName.CompareTo(
"LHC15a3b") == 0){
4757 }
else if (periodName.CompareTo(
"LHC15d3a") == 0){
4760 }
else if (periodName.CompareTo(
"LHC15d3b") == 0){
4764 }
else if (periodName.CompareTo(
"LHC15g3a3") == 0){
4767 }
else if (periodName.CompareTo(
"LHC15g3a") == 0){
4770 }
else if (periodName.CompareTo(
"LHC15g3c2") == 0){
4773 }
else if (periodName.CompareTo(
"LHC15g3c3") == 0){
4776 }
else if (periodName.CompareTo(
"LHC15g3") == 0){
4779 }
else if (periodName.CompareTo(
"LHC16a2a") == 0){
4782 }
else if (periodName.CompareTo(
"LHC16a2b") == 0){
4785 }
else if (periodName.CompareTo(
"LHC16a2c") == 0){
4788 }
else if (periodName.CompareTo(
"LHC16d3") == 0){
4791 }
else if (periodName.CompareTo(
"LHC17i4") == 0){
4794 }
else if (periodName.CompareTo(
"LHC17g7") == 0){
4797 }
else if (periodName.CompareTo(
"LHC15l1a2") == 0){
4800 }
else if (periodName.CompareTo(
"LHC15l1b2") == 0){
4803 }
else if (periodName.CompareTo(
"LHC16h3") == 0){
4806 }
else if (periodName.CompareTo(
"LHC16h8a") == 0){
4809 }
else if (periodName.CompareTo(
"LHC16h8b") == 0){
4812 }
else if (periodName.CompareTo(
"LHC16k5a") == 0){
4815 }
else if (periodName.CompareTo(
"LHC16k5b") == 0){
4818 }
else if (periodName.CompareTo(
"LHC16k3a") == 0){
4821 }
else if (periodName.CompareTo(
"LHC16k3a2") == 0){
4824 }
else if (periodName.CompareTo(
"LHC17e2") == 0){
4827 }
else if (periodName.Contains(
"LHC15k1a1")){
4830 }
else if (periodName.Contains(
"LHC15k1a2")){
4833 }
else if (periodName.Contains(
"LHC15k1a3")){
4836 }
else if (periodName.Contains(
"LHC16j7")){
4839 }
else if (periodName.Contains(
"LHC16g1")){
4842 }
else if (periodName.Contains(
"LHC16g1a")){
4845 }
else if (periodName.Contains(
"LHC16g1b")){
4848 }
else if (periodName.Contains(
"LHC16g1c")){
4851 }
else if (periodName.Contains(
"LHC16g2")){
4854 }
else if (periodName.Contains(
"LHC16g3")){
4857 }
else if (periodName.Contains(
"LHC16h4")){
4860 }
else if (periodName.Contains(
"LHC16i1a")){
4863 }
else if (periodName.Contains(
"LHC16i1b")){
4866 }
else if (periodName.Contains(
"LHC16i1c")){
4869 }
else if (periodName.Contains(
"LHC16i2a")){
4872 }
else if (periodName.Contains(
"LHC16i2b")){
4875 }
else if (periodName.Contains(
"LHC16i2c")){
4878 }
else if (periodName.Contains(
"LHC16i3a")){
4881 }
else if (periodName.Contains(
"LHC16i3b")){
4884 }
else if (periodName.Contains(
"LHC16i3c")){
4887 }
else if (periodName.Contains(
"LHC16h2a")){
4890 }
else if (periodName.Contains(
"LHC16h2b")){
4893 }
else if (periodName.Contains(
"LHC16h2c")){
4896 }
else if (periodName.CompareTo(
"LHC16k3b") == 0){
4899 }
else if (periodName.CompareTo(
"LHC16k3b2") == 0){
4902 }
else if ( periodName.CompareTo(
"LHC15k5a") == 0 || periodName.CompareTo(
"LHC15k5a2") == 0){
4905 }
else if ( periodName.CompareTo(
"LHC15k5b") == 0 || periodName.CompareTo(
"LHC15k5b2") == 0){
4908 }
else if ( periodName.CompareTo(
"LHC15k5c") == 0 || periodNam