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));
1923 AliMultSelection *MultSelection = (AliMultSelection*)event->FindListObject(
"MultSelection");
1925 AliWarning (
"AliMultSelection object not found !");
1929 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1930 else return MultSelection->GetMultiplicityPercentile(
"V0M");
1931 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1934 AliCentrality *fESDCentrality = (AliCentrality*)esdEvent->GetCentrality();
1936 if(
fIsHeavyIon==2)
return fESDCentrality->GetCentralityPercentile(
"V0A");
1937 else return fESDCentrality->GetCentralityPercentile(
"V0M");
1945 AliMultSelection *MultSelection = (AliMultSelection*)aodEvent->FindListObject(
"MultSelection");
1947 AliWarning (
"AliMultSelection object not found !");
1951 if(
fIsHeavyIon==2)
return MultSelection->GetMultiplicityPercentile(
"V0A");
1952 else return MultSelection->GetMultiplicityPercentile(
"V0M",kTRUE);
1953 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1956 if(aodEvent->GetHeader()){
return ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();}
1971 Int_t primaryTracksPP[9] = { 0, 2, 5, 10, 15,
1986 if(centrality<0 && !mcEvent)
return kFALSE;
1988 Int_t centralityC=0;
1990 centralityC=
Int_t(centrality/10);
1996 centralityC=
Int_t(centrality);
1999 }
else return kFALSE;
2002 centralityC=
Int_t(centrality);
2009 Int_t PrimaryTracks10[11][2] =
2023 Int_t PrimaryTracksLHC11h10[11][2] =
2037 Int_t PrimaryTracksLHC15o10[11][2] =
2051 Int_t PrimaryTracks5a[11][2] =
2065 Int_t PrimaryTracksLHC11h5a[11][2] =
2079 Int_t PrimaryTracksLHC15o5a[11][2] =
2093 Int_t PrimaryTracks5b[11][2] =
2107 Int_t PrimaryTracksLHC11h5b[11][2] =
2121 Int_t PrimaryTracksLHC15o5b[11][2] =
2135 Int_t PrimaryTracksLHC17n10[11][2] =
2151 if(event->IsA()==AliESDEvent::Class()) column = 0;
2152 if(event->IsA()==AliAODEvent::Class()) column = 1;
2179 centralityC=
Int_t(centrality/10);
2205 centralityC=
Int_t(centrality);
2208 }
else return kFALSE;
2231 centralityC=
Int_t(centrality);
2244 Double_t fVertexZ=
event->GetPrimaryVertex()->GetZ();
2248 fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
2252 fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
2255 if(TMath::Abs(fVertexZ)>
fMaxVertexZ)
return kFALSE;
2259 if (TMath::Abs(fVertexZ-fVertexZSPD) > 0.1)
return kFALSE;
2262 if(!
fUtils->IsVertexSelected2013pA(event))
return kFALSE;
2273 TBits fIR1 =
event->GetHeader()->GetIRInt1InteractionMap();
2274 TBits fIR2 =
event->GetHeader()->GetIRInt2InteractionMap();
2275 UShort_t bunchCrossings =
event->GetBunchCrossNumber();
2277 for(
Int_t i = 0; i<180;i++){
2278 if(fIR1.TestBitNumber(i))
2283 Bool_t isOutOfBunchPileup = 0;
2286 if(pf1 < -89) pf1 = -89;
2287 if(pf2 > 89) pf2 = 89;
2288 Int_t pf2maxForT0 = pf2;
2290 for (
Int_t i=pf1;i<=pf2;i++) {
2292 if (i<=pf2maxForT0) isOutOfBunchPileup|=fIR2.TestBitNumber(90+i);
2293 if (i>0 && i<=ir1skip)
continue;
2294 isOutOfBunchPileup|=fIR1.TestBitNumber(90+i);
2296 return isOutOfBunchPileup;
2302 Bool_t isPileUpV0MTPCout=0;
2307 multV0M =
event->GetVZEROData()->GetMTotV0A();
2309 multV0M =
event->GetVZEROData()->GetMTotV0A() +
event->GetVZEROData()->GetMTotV0C() ;
2314 if (multV0M < valFunc ) isPileUpV0MTPCout=1;
2317 return isPileUpV0MTPCout;
2326 if (fESDEvent->GetPrimaryVertex() != NULL){
2327 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2329 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2333 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2334 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2336 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2338 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2347 if (fAODEvent->GetPrimaryVertex() != NULL){
2348 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2349 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2352 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2353 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2354 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2356 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2369 AliGenCocktailEventHeader *cHeader = 0x0;
2370 Bool_t headerFound = kFALSE;
2390 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2391 if(cHeader) headerFound = kTRUE;
2399 TList *genHeaders = 0x0;
2400 if(cHeader) genHeaders = cHeader->GetHeaders();
2401 AliGenEventHeader* gh = 0;
2402 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2403 gh = (AliGenEventHeader*)genHeaders->At(i);
2404 TString GeneratorName = gh->GetName();
2405 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2406 Bool_t eventAccepted = kTRUE;
2407 TParticle * jet = 0;
2408 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2411 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2412 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2413 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2416 eventAccepted= kFALSE;
2420 if (jet)
delete jet;
2422 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2423 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2424 if (!particle)
continue;
2425 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2427 eventAccepted= kFALSE;
2435 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2437 70, 85, 99, 115, 132,
2438 150, 169, 190, 212, 235,
2440 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2441 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2442 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2443 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2445 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2446 if (bin < 20) weight = weightsBins[bin];
2449 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2451 70, 85, 99, 115, 132,
2452 150, 169, 190, 212, 235,
2454 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2455 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2456 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2457 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2460 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2461 if (bin < 20) weight = weightsBins[bin];
2464 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2466 70, 85, 99, 115, 132,
2467 150, 169, 190, 212, 235,
2469 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2470 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2471 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2472 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2474 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2475 if (bin < 20) weight = weightsBins[bin];
2479 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2482 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2483 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2484 1.933238e-05, 1.562895e-05};
2486 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2487 if (bin < 12) weight = weightsBins[bin];
2490 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2491 84, 117, 152, 191, 1000000,
2493 21, 28, 36, 45, 57 };
2494 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2495 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2496 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2497 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2501 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2502 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2503 if (bin < 19) weight = weightsBins[bin];
2506 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2507 84, 117, 152, 191, 1000000,
2509 21, 28, 36, 45, 57 };
2511 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2512 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2513 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2514 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2517 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2518 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2519 if (bin < 19) weight = weightsBins[bin];
2522 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2524 70, 85, 99, 115, 132,
2525 150, 169, 190, 212, 235,
2527 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2528 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2529 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2530 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2532 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2533 if (bin < 20) weight = weightsBins[bin];
2536 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2537 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2539 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2540 if (bin < 5) weight = weightsBins[bin];
2543 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2544 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2546 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2547 if (bin < 6) weight = weightsBins[bin];
2550 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2551 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2553 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2554 if (bin < 7) weight = weightsBins[bin];
2557 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2558 84, 117, 152, 191, 234,
2560 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2561 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2563 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2564 if (bin < 10) weight = weightsBins[bin];
2567 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};
2568 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};
2570 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2571 if (bin < 20) 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.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};
2576 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2577 if (bin < 20) weight = weightsBins[bin];
2583 if (weight == -1)
return kFALSE;
2584 else return eventAccepted;
2589 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2590 TString eventHeaderName = eventHeader->ClassName();
2591 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2592 Bool_t eventAccepted = kTRUE;
2593 TParticle * jet = 0;
2594 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2595 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2597 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2598 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2599 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2602 eventAccepted= kFALSE;
2607 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2608 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2609 if (!particle)
continue;
2610 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2612 eventAccepted= kFALSE;
2620 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2622 70, 85, 99, 115, 132,
2623 150, 169, 190, 212, 235,
2625 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2626 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2627 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2628 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2630 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2631 if (bin < 20) weight = weightsBins[bin];
2634 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2636 70, 85, 99, 115, 132,
2637 150, 169, 190, 212, 235,
2639 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2640 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2641 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2642 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2645 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2646 if (bin < 20) weight = weightsBins[bin];
2649 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2651 70, 85, 99, 115, 132,
2652 150, 169, 190, 212, 235,
2654 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2655 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2656 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2657 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2659 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2660 if (bin < 20) weight = weightsBins[bin];
2664 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2667 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2668 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2669 1.933238e-05, 1.562895e-05};
2671 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2672 if (bin < 12) weight = weightsBins[bin];
2675 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2676 84, 117, 152, 191, 1000000,
2678 21, 28, 36, 45, 57 };
2679 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2680 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2681 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2682 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2686 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2687 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2688 if (bin < 19) weight = weightsBins[bin];
2691 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2692 84, 117, 152, 191, 1000000,
2694 21, 28, 36, 45, 57 };
2696 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2697 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2698 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2699 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2702 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2703 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2704 if (bin < 19) weight = weightsBins[bin];
2707 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2709 70, 85, 99, 115, 132,
2710 150, 169, 190, 212, 235,
2712 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2713 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2714 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2715 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2717 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2718 if (bin < 20) weight = weightsBins[bin];
2721 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2722 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2724 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2725 if (bin < 5) weight = weightsBins[bin];
2728 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2729 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2731 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2732 if (bin < 6) weight = weightsBins[bin];
2735 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2736 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2738 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2739 if (bin < 7) weight = weightsBins[bin];
2742 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2743 84, 117, 152, 191, 234,
2745 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2746 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2748 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2749 if (bin < 10) weight = weightsBins[bin];
2754 if (weight == -1)
return kFALSE;
2755 else return eventAccepted;
2770 AliGenCocktailEventHeader *cHeader = 0x0;
2771 Bool_t headerFound = kFALSE;
2789 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2790 if(cHeader) headerFound = kTRUE;
2799 TList *genHeaders = 0x0;
2800 if(cHeader) genHeaders = cHeader->GetHeaders();
2801 AliGenEventHeader* gh = 0;
2802 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2803 gh = (AliGenEventHeader*)genHeaders->At(i);
2804 TString GeneratorName = gh->GetName();
2805 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2806 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2807 NTrials = gPythia->Trials();
2808 XSection = gPythia->GetXsection();
2813 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2815 TString eventHeaderName = eventHeader->ClassName();
2816 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2817 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2818 NTrials = gPythia->Trials();
2819 XSection = gPythia->GetXsection();
2835 AliGenCocktailEventHeader *cHeader = 0x0;
2836 Bool_t headerFound = kFALSE;
2850 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2851 if(cHeader) headerFound = kTRUE;
2858 TList *genHeaders = 0x0;
2859 if(cHeader) genHeaders = cHeader->GetHeaders();
2860 AliGenEventHeader* gh = 0;
2861 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2862 gh = (AliGenEventHeader*)genHeaders->At(i);
2863 TString GeneratorName = gh->GetName();
2864 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0 || GeneratorName.Contains(
"Pythia8Jets")){
2865 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2869 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2871 TString eventHeaderName = eventHeader->ClassName();
2872 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0 || eventHeaderName.Contains(
"Pythia8Jets")){
2873 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2888 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
2890 150209, 153056, 153911, 153915,
2891 158135, 158136, 158178, 158182, 160683,
2892 160764, 161139, 161256, 161379, 161457,
2893 161525, 161556, 161558, 161609, 161630,
2895 173731, 177144, 177147, 177653, 177724, 178327,
2900 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
2902 1.94, 3.39, 4.01, 5.25, 5.5,
2903 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,
2904 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
2908 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
2911 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
2912 0., 0., 0., 0., 0.2, 0.2,
2917 Int_t runRangesEMCalL1[4] = { 179796,
2922 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
2923 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
2925 Int_t runRangesEMCalL1G2[3] = { 195180,
2929 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
2930 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
2932 Int_t runnumber =
event->GetRunNumber();
2935 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
2937 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
2941 if (binRun==34)
return kFALSE;
2942 Double_t threshold = thresholdEMCalL0[binRun];
2944 if (isMC && spreadEMCalL0[binRun] != 0.){
2945 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2946 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2947 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
2948 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
2949 threshold = triggerSmearing->GetRandom();
2950 delete triggerSmearing;
2956 nclus =
event->GetNumberOfCaloClusters();
2958 if(nclus == 0)
return kFALSE;
2961 Bool_t eventIsAccepted = kFALSE;
2962 for(
Int_t i = 0; i < nclus; i++){
2963 AliVCluster* clus = NULL;
2964 clus =
event->GetCaloCluster(i);
2965 if (!clus)
continue;
2966 if (!clus->IsEMCAL())
continue;
2967 if (clus->GetM02()<0.1)
continue;
2968 if (clus->GetNCells()<2)
continue;
2969 if (clus->E() > threshold ){
2971 eventIsAccepted = kTRUE;
2974 return eventIsAccepted;
2981 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
2983 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
2987 if (binRun==3)
return kFALSE;
2988 Double_t threshold = thresholdEMCalL1[binRun];
2990 if (isMC && spreadEMCalL1[binRun] != 0.){
2991 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2992 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2993 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
2994 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
2995 threshold = triggerSmearing->GetRandom();
2996 delete triggerSmearing;
3002 nclus =
event->GetNumberOfCaloClusters();
3004 if(nclus == 0)
return kFALSE;
3007 Bool_t eventIsAccepted = kFALSE;
3008 for(
Int_t i = 0; i < nclus; i++){
3009 AliVCluster* clus = NULL;
3010 clus =
event->GetCaloCluster(i);
3011 if (!clus)
continue;
3012 if (!clus->IsEMCAL())
continue;
3013 if (clus->GetM02()<0.1)
continue;
3014 if (clus->GetNCells()<2)
continue;
3015 if (clus->E() > threshold ){
3017 eventIsAccepted = kTRUE;
3020 return eventIsAccepted;
3022 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
3024 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
3028 if (binRun==2)
return kFALSE;
3029 Double_t threshold = thresholdEMCalL1G2[binRun];
3030 if (isMC && spreadEMCalL1G2[binRun] != 0.){
3031 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
3032 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
3033 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
3034 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
3035 threshold = triggerSmearing->GetRandom();
3036 delete triggerSmearing;
3041 nclus =
event->GetNumberOfCaloClusters();
3043 if(nclus == 0)
return kFALSE;
3046 Bool_t eventIsAccepted = kFALSE;
3047 for(
Int_t i = 0; i < nclus; i++){
3048 AliVCluster* clus = NULL;
3049 clus =
event->GetCaloCluster(i);
3050 if (!clus)
continue;
3051 if (!clus->IsEMCAL())
continue;
3052 if (clus->GetM02()<0.1)
continue;
3053 if (clus->GetNCells()<2)
continue;
3054 if (clus->E() > threshold ){
3056 eventIsAccepted = kTRUE;
3059 return eventIsAccepted;
3076 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3079 UInt_t isSelected = AliVEvent::kAny;
3081 if (fInputHandler==NULL)
return kFALSE;
3082 if( fInputHandler->GetEventSelection() ||
event->IsA()==AliAODEvent::Class()) {
3084 TString firedTrigClass =
event->GetFiredTriggerClasses();
3125 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3127 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
3129 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3133 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3134 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3136 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3137 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3144 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3146 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3148 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
3151 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3152 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3153 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3156 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3158 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3161 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3162 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3167 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3168 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3169 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3171 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3172 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3173 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3175 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3176 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3178 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3179 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3183 if (isSelected != 0 ){
3215 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3216 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3217 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
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;
3234 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3235 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3236 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3237 else CheckClass+=
"0";
3239 if(CheckClass.Contains(
"0")) isSelected = 0;
3246 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3248 Bool_t mimickedTrigger = kTRUE;
3255 if (mimickedTrigger){
3256 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3257 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3258 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3259 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3260 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3261 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3262 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3264 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3266 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3268 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3270 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3272 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3273 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3274 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3277 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3278 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3279 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3280 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3281 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3282 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3283 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3285 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3286 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3287 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3288 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3289 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3290 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3291 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3292 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3293 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3294 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3295 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3296 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3302 if (mimickedTrigger){
3334 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3335 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3337 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3338 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3348 if(!isSelected)
return kFALSE;
3350 if (!mimickedTrigger )
return kFALSE;
3377 if(rejection == 0)
return;
3379 AliGenCocktailEventHeader *cHeader = 0x0;
3380 AliAODMCHeader *cHeaderAOD = 0x0;
3381 Bool_t headerFound = kFALSE;
3382 AliMCEvent *fMCEvent = 0x0;
3383 TClonesArray *fMCEventAOD = 0x0;
3384 if(event->IsA()==AliMCEvent::Class()){
3385 if(dynamic_cast<AliMCEvent*>(event)){
3386 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(event)->GenEventHeader());
3387 fMCEvent =
dynamic_cast<AliMCEvent*
>(event);
3388 if(cHeader) headerFound = kTRUE;
3391 if(event->IsA()==AliAODEvent::Class()){
3392 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(
event->FindListObject(AliAODMCHeader::StdBranchName()));
3393 fMCEventAOD =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3394 if(cHeaderAOD) headerFound = kTRUE;
3397 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3399 TList *genHeaders = 0x0;
3400 if(cHeader) genHeaders = cHeader->GetHeaders();
3402 genHeaders = cHeaderAOD->GetCocktailHeaders();
3403 if(genHeaders->GetEntries()==1){
3408 AliGenEventHeader* gh = 0;
3410 Int_t firstindexA = 0;
3411 Int_t lastindexA = -1;
3412 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3414 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3415 gh = (AliGenEventHeader*)genHeaders->At(i);
3416 TString GeneratorName = gh->GetName();
3417 lastindexA = lastindexA + gh->NProduced();
3419 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3420 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3422 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3424 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3428 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode ){
3442 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA));
3445 if (gh->NProduced() > 10){
3446 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA+10));
3468 firstindexA = firstindexA + gh->NProduced();
3477 if(rejection == 1 || rejection == 3){
3479 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3480 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3485 Int_t firstindex = 0;
3486 Int_t lastindex = -1;
3489 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3490 gh = (AliGenEventHeader*)genHeaders->At(i);
3491 TString GeneratorName = gh->GetName();
3492 lastindex = lastindex + gh->NProduced();
3493 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3494 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3495 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3496 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3497 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3502 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode){
3521 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex));
3524 if (gh->NProduced() > 10) {
3525 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex+10));
3555 firstindex = firstindex + gh->NProduced();
3558 for (
Int_t i = 0; i < number; i++){
3568 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(event)->GetNumberOfPrimaries()-1;
3585 if(index < 0)
return 0;
3588 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3589 if(!mcEvent)
return 0;
3590 if(index >= mcEvent->GetNumberOfPrimaries()){
3591 if( ((TParticle*)mcEvent->Particle(index))->GetMother(0) < 0)
return 0;
3599 if(i == 0) accepted = 2;
3602 if (debug > 1 && !accepted) cout <<
"rejected:" << index << endl;
3604 else if(InputEvent->IsA()==AliAODEvent::Class()){
3605 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3606 if (AODMCTrackArray){
3607 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3608 if(!aodMCParticle)
return 0;
3609 if(!aodMCParticle->IsPrimary()){
3610 if( aodMCParticle->GetMother() < 0)
return 0;
3613 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3617 if(i == 0) accepted = 2;
3630 if (mcEvent){isMC = kTRUE;}
3658 Int_t runnumber =
event->GetRunNumber();
3659 if ((runnumber>=144871) && (runnumber<=146860)) {
3661 AliVCaloCells *cells =
event->GetEMCALCells();
3662 const Short_t nCells = cells->GetNumberOfCells();
3664 if (event->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3666 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3667 if (!fInputHandler)
return 3;
3670 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3671 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3672 Short_t cellId = cells->GetCellNumber(iCell);
3673 Double_t cellE = cells->GetCellAmplitude(cellId);
3674 Int_t sm = cellId / (24*48);
3675 if (cellE>0.1) ++nCellCount[sm];
3678 Bool_t fIsLedEvent = kFALSE;
3679 if (nCellCount[4] > 100) {
3680 fIsLedEvent = kTRUE;
3682 if ((runnumber>=146858) && (runnumber<=146860)) {
3683 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3684 fIsLedEvent = kTRUE;
3685 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3686 fIsLedEvent = kTRUE;
3696 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
3697 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
3698 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
3703 if(event->IsA()==AliESDEvent::Class()){
3707 for(
Int_t i=0; i<nPileVert;i++){
3708 const AliESDVertex* pv= ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
3709 Int_t nc2 = pv->GetNContributors();
3714 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
3728 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
3732 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3738 if(
fUtils->IsPileUpEvent(event) ){
3742 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3763 AliEventplane *EventPlane =
event->GetEventplane();
3776 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
3779 if(!event || event->IsA()==AliESDEvent::Class()){
3782 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
3784 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
3787 }
else if(event->IsA()==AliAODEvent::Class()){
3790 if(aodEvent->GetHeader()){
3791 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
3797 Float_t GetValueForWeight = 1.;
3800 Bool_t CorrCentrLoop = kFALSE;
3806 CorrCentrLoop = kTRUE;
3807 }
else if (
fDoCentralityFlat == 2 && (centrality >=10. && centrality <= 20.) ){
3810 CorrCentrLoop = kTRUE;
3814 CorrCentrLoop = kTRUE;
3816 CorrCentrLoop = kFALSE;
3819 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
3820 weightCentrality = maximum/GetValueForWeight;
3821 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
3822 if (!isfinite(weightCentrality)) weightCentrality = 1.;
3825 return weightCentrality;
3844 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
3845 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
3846 weightMult = valueMultData/valueMultMC;
3865 if(index < 0)
return 0;
3873 if (kCaseGen == 0)
return 1;
3878 if(!event || event->IsA()==AliESDEvent::Class()){
3879 mesonPt = ((TParticle*)mcEvent->Particle(index))->Pt();
3881 PDGCode = ((TParticle*)mcEvent->Particle(index))->GetPdgCode();
3882 }
else if(event->IsA()==AliAODEvent::Class()){
3883 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3884 if (AODMCTrackArray){
3885 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3886 mesonPt = aodMCParticle->Pt();
3888 PDGCode = aodMCParticle->GetPdgCode();
3894 Float_t functionResultMC = 1.;
3905 Float_t functionResultData = 1;
3917 if (PDGCode == 111 || PDGCode == 221){
3918 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
3919 weight = functionResultData/functionResultMC;
3920 if ( kCaseGen == 3){
3921 if (PDGCode == 111){
3926 if (PDGCode == 221){
3932 if (!isfinite(functionResultData)) weight = 1.;
3933 if (!isfinite(weight)) weight = 1.;
3935 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
3936 weight = functionResultMC;
3952 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
3955 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
3958 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
3970 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
3978 AliEMCALTriggerPatchInfo *patch;
3979 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3981 if (patch->IsMainTrigger()) {
3998 if (event->IsA()==AliESDEvent::Class()){
4008 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
4014 if (event->IsA()==AliESDEvent::Class()){
4046 AliEMCALTriggerPatchInfo *patch;
4048 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
4053 if (patch->IsGammaHigh()){
4057 if (patch->IsGammaLow()){
4061 if (patch->IsJetHigh()){
4065 if (patch->IsJetLow()){
4069 if (patch->IsLevel0()){
4080 AliDebug(2,
"Patch summary: ");
4081 AliDebug(2, Form(
"Number of patches: %d", nPatch));
4082 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
4083 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
4084 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
4096 SETBIT(triggers,
kG1);
4098 SETBIT(triggers,
kG2);
4100 SETBIT(triggers,
kJ1);
4102 SETBIT(triggers,
kJ2);
4104 SETBIT(triggers,
kL0);
4123 TClonesArray *arr = 0;
4125 if (!sname.IsNull()) {
4126 arr =
dynamic_cast<TClonesArray*
>(
event->FindListObject(sname));
4128 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
4138 TString objname(arr->GetClass()->GetName());
4139 TClass cls(objname);
4140 if (!cls.InheritsFrom(clname)) {
4141 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
4142 GetName(), cls.GetName(), name, clname));
4151 if (eventpos < 0)
return kFALSE;
4152 TParticle* particle = (TParticle *)mcEvent->Particle(eventpos);
4153 if (!particle)
return kFALSE;
4154 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4155 if (particle->GetMother(0) != -1){
4156 TParticle* particleMother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4157 if (particleMother){
4158 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4159 particle = particleMother;
4163 if (particle->GetMother(0) != -1){
4164 Double_t deltaX = particle->Vx() - prodVtxX;
4165 Double_t deltaY = particle->Vy() - prodVtxY;
4166 Double_t deltaZ = particle->Vz() - prodVtxZ;
4169 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4172 Bool_t dalitzCand = kFALSE;
4174 TParticle* firstmother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4175 if (!firstmother)
return kFALSE;
4176 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4177 Bool_t intDecay = kFALSE;
4178 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4179 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4184 Long_t source = particle->GetMother(0);
4185 Bool_t foundExcludedPart = kFALSE;
4186 Bool_t foundShower = kFALSE;
4187 Int_t pdgCodeMotherPrev = 0;
4188 Int_t pdgCodeMotherPPrevMother = 0;
4196 TParticle* mother = (TParticle *)mcEvent->Particle(source);
4197 source = mother->GetMother(0);
4199 Int_t pdgCodeMother = mother->GetPdgCode();
4201 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4202 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4203 foundShower = kTRUE;
4206 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4207 foundShower = kTRUE;
4219 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4220 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4221 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4223 foundExcludedPart = kTRUE;
4226 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4227 pdgCodeMotherPrev = pdgCodeMother;
4228 if (source == -1) depth = 20;
4234 if (foundExcludedPart){
4240 }
else if (foundShower){
4255 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4256 if (AODMCTrackArray == NULL)
return kFALSE;
4257 AliAODMCParticle* currentParticle = AODMCParticle;
4258 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4259 if (currentParticle->GetMother() != -1){
4260 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4261 if (particleMother){
4262 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4263 currentParticle = particleMother;
4267 if (currentParticle->GetMother() > -1){
4268 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4269 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4270 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4273 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4275 Bool_t dalitzCand = kFALSE;
4277 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4278 if (!firstmother)
return kFALSE;
4279 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4280 Bool_t intDecay = kFALSE;
4281 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4282 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4287 Long_t source = currentParticle->GetMother();
4288 Bool_t foundExcludedPart = kFALSE;
4289 Bool_t foundShower = kFALSE;
4290 Int_t pdgCodeMotherPrev = 0;
4291 Int_t pdgCodeMotherPPrevMother = 0;
4299 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4300 source = mother->GetMother();
4302 Int_t pdgCodeMother = mother->GetPdgCode();
4304 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4305 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4306 foundShower = kTRUE;
4309 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4310 foundShower = kTRUE;
4322 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4323 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4324 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4326 foundExcludedPart = kTRUE;
4329 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4330 pdgCodeMotherPrev = pdgCodeMother;
4331 if (source == -1) depth = 20;
4337 if (foundExcludedPart){
4343 }
else if (foundShower){
4358 if (particle != NULL && mcEvent != NULL){
4359 Int_t pdgSecondary = 0;
4363 Long_t motherID = particle->GetMother(0);
4364 Long_t grandMotherID = -1;
4368 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4370 if (grandMotherID > -1){
4372 pdgSecondary = mcEvent->Particle(grandMotherID)->GetPdgCode();
4379 Long_t motherID = particle->GetMother(0);
4380 Long_t grandMotherID = -1;
4381 Long_t greatGrandMotherID = -1;
4385 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4387 if (grandMotherID > -1){
4389 greatGrandMotherID = mcEvent->Particle(grandMotherID)->GetMother(0);
4391 if (greatGrandMotherID > -1){
4393 pdgSecondary = mcEvent->Particle(greatGrandMotherID)->GetPdgCode();
4399 if (TMath::Abs(pdgSecondary) == 3122 )
4402 else if ( TMath::Abs(pdgSecondary) == 310 )
4405 else if ( TMath::Abs(pdgSecondary) == 130 )
4408 else if ( TMath::Abs(pdgSecondary) == 221 )
4411 else if ( TMath::Abs(pdgSecondary) != 0 )
4421 if (particle != NULL && aodmcArray != NULL){
4422 Int_t pdgSecondary = 0;
4426 Long_t motherID = particle->GetMother();
4427 Long_t grandMotherID = -1;
4431 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4433 if (grandMotherID > -1){
4435 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4442 Long_t motherID = particle->GetMother();
4443 Long_t grandMotherID = -1;
4444 Long_t greatGrandMotherID = -1;
4448 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4450 if (grandMotherID > -1){
4452 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4454 if (greatGrandMotherID > -1){
4456 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4462 if (TMath::Abs(pdgSecondary) == 3122 )
4465 else if ( TMath::Abs(pdgSecondary) == 310 )
4468 else if ( TMath::Abs(pdgSecondary) == 130 )
4471 else if ( TMath::Abs(pdgSecondary) == 221 )
4474 else if ( TMath::Abs(pdgSecondary) != 0 )
4484 if (periodName.CompareTo(
"") == 0){
4487 if (periodName.CompareTo(
"") == 0) {
4490 AliError(
"No correct period could be set, periodName string empty");
4495 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4496 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0 || periodName.CompareTo(
"LHC10bg") == 0
4500 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4503 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4506 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4509 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4510 periodName.CompareTo(
"LHC11g") == 0
4514 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4517 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4518 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4519 periodName.CompareTo(
"LHC12i") == 0 || periodName.CompareTo(
"LHC12ai") == 0
4523 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 || periodName.CompareTo(
"LHC13bc") == 0){
4526 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 || periodName.CompareTo(
"LHC13de") == 0){
4529 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4532 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4535 }
else if ( periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4536 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0 ||
4537 periodName.CompareTo(
"LHC15fm") == 0
4541 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4544 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4547 }
else if ( periodName.CompareTo(
"LHC16d") == 0 || periodName.CompareTo(
"LHC16e") == 0 || periodName.CompareTo(
"LHC16g") == 0 || periodName.CompareTo(
"LHC16h") == 0 ||
4548 periodName.CompareTo(
"LHC16i") == 0 || periodName.CompareTo(
"LHC16j") == 0 || periodName.CompareTo(
"LHC16k") == 0 || periodName.CompareTo(
"LHC16l") == 0 ||
4549 periodName.CompareTo(
"LHC16m") == 0 || periodName.CompareTo(
"LHC16n") == 0 || periodName.CompareTo(
"LHC16o") == 0 || periodName.CompareTo(
"LHC16p") == 0){
4552 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4555 }
else if (periodName.CompareTo(
"LHC16q") == 0 ){
4558 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4561 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4564 }
else if (periodName.CompareTo(
"LHC16t") == 0 ){
4567 }
else if ( periodName.CompareTo(
"LHC17c") == 0 || periodName.CompareTo(
"LHC17d") == 0 || periodName.CompareTo(
"LHC17e") == 0 || periodName.CompareTo(
"LHC17f") == 0 ||
4568 periodName.CompareTo(
"LHC17h") == 0 || periodName.CompareTo(
"LHC17i") == 0 || periodName.CompareTo(
"LHC17j") == 0 || periodName.CompareTo(
"LHC17k") == 0 ||
4569 periodName.CompareTo(
"LHC17l") == 0 || periodName.CompareTo(
"LHC17m") == 0 || periodName.CompareTo(
"LHC17o") == 0 ){
4572 }
else if ( periodName.CompareTo(
"LHC17g") == 0 ){
4575 }
else if ( periodName.CompareTo(
"LHC17n") == 0 ){
4580 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4583 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4586 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4589 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4592 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4595 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4598 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4601 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4604 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4607 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4610 }
else if (periodName.Contains(
"LHC14j4")){
4613 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4616 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4619 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4622 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4625 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4628 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4631 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4634 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4638 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4641 }
else if (periodName.Contains(
"LHC12f1a") ){
4644 }
else if (periodName.Contains(
"LHC12f1b") ){
4647 }
else if (periodName.Contains(
"LHC12i3") ){
4650 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4653 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4656 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4659 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4662 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4665 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4668 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4671 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4674 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4677 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4680 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4683 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4687 }
else if (periodName.CompareTo(
"LHC14e2a") == 0){
4690 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){
4693 }
else if (periodName.CompareTo(
"LHC14e2c") == 0){
4696 }
else if (periodName.Contains(
"LHC15h1")){
4699 }
else if (periodName.Contains(
"LHC15h2")){
4702 }
else if (periodName.CompareTo(
"LHC16c2") == 0){
4705 }
else if (periodName.CompareTo(
"LHC16c2_plus") == 0){
4709 }
else if (periodName.Contains(
"LHC13b2_efix")){
4712 }
else if (periodName.CompareTo(
"LHC13e7") == 0){
4715 }
else if (periodName.CompareTo(
"LHC14b2") == 0){
4718 }
else if (periodName.CompareTo(
"LHC13b4_fix") == 0){
4721 }
else if (periodName.CompareTo(
"LHC13b4_plus") == 0){
4724 }
else if (periodName.CompareTo(
"LHC16c3a") == 0){
4727 }
else if (periodName.CompareTo(
"LHC16c3b") == 0){
4730 }
else if (periodName.CompareTo(
"LHC16c3c") == 0){
4733 }
else if (periodName.CompareTo(
"LHC15g2") == 0){
4736 }
else if (periodName.CompareTo(
"LHC15a3a") == 0){
4739 }
else if (periodName.CompareTo(
"LHC15a3a_plus") == 0){
4742 }
else if (periodName.CompareTo(
"LHC15a3b") == 0){
4745 }
else if (periodName.CompareTo(
"LHC15d3a") == 0){
4748 }
else if (periodName.CompareTo(
"LHC15d3b") == 0){
4752 }
else if (periodName.CompareTo(
"LHC15g3a3") == 0){
4755 }
else if (periodName.CompareTo(
"LHC15g3a") == 0){
4758 }
else if (periodName.CompareTo(
"LHC15g3c2") == 0){
4761 }
else if (periodName.CompareTo(
"LHC15g3c3") == 0){
4764 }
else if (periodName.CompareTo(
"LHC15g3") == 0){
4767 }
else if (periodName.CompareTo(
"LHC16a2a") == 0){
4770 }
else if (periodName.CompareTo(
"LHC16a2b") == 0){
4773 }
else if (periodName.CompareTo(
"LHC16a2c") == 0){
4776 }
else if (periodName.CompareTo(
"LHC15l1a2") == 0){
4779 }
else if (periodName.CompareTo(
"LHC15l1b2") == 0){
4782 }
else if (periodName.CompareTo(
"LHC16h3") == 0){
4785 }
else if (periodName.CompareTo(
"LHC16h8a") == 0){
4788 }
else if (periodName.CompareTo(
"LHC16h8b") == 0){
4791 }
else if (periodName.CompareTo(
"LHC16k5a") == 0){
4794 }
else if (periodName.CompareTo(
"LHC16k5b") == 0){
4797 }
else if (periodName.CompareTo(
"LHC16k3a") == 0){
4800 }
else if (periodName.CompareTo(
"LHC16k3a2") == 0){
4803 }
else if (periodName.CompareTo(
"LHC17e2") == 0){
4806 }
else if (periodName.Contains(
"LHC15k1a1")){
4809 }
else if (periodName.Contains(
"LHC15k1a2")){
4812 }
else if (periodName.Contains(
"LHC15k1a3")){
4815 }
else if (periodName.Contains(
"LHC16j7")){
4818 }
else if (periodName.Contains(
"LHC16h4")){
4821 }
else if (periodName.Contains(
"LHC16g1")){
4824 }
else if (periodName.Contains(
"LHC16g1a")){
4827 }
else if (periodName.Contains(
"LHC16g1b")){
4830 }
else if (periodName.Contains(
"LHC16g1c")){
4833 }
else if (periodName.Contains(
"LHC16g2")){
4836 }
else if (periodName.Contains(
"LHC16g3")){
4839 }
else if (periodName.Contains(
"LHC16h2a")){
4842 }
else if (periodName.Contains(
"LHC16h2b")){
4845 }
else if (periodName.Contains(
"LHC16h2c")){
4848 }
else if (periodName.CompareTo(
"LHC16k3b") == 0){
4851 }
else if (periodName.CompareTo(
"LHC16k3b2") == 0){
4857 }
else if ( periodName.CompareTo(
"LHC16P1Pyt8") == 0 || periodName.CompareTo(
"LHC17f6") == 0 || periodName.CompareTo(
"LHC17d17") == 0 || periodName.CompareTo(
"LHC17f5") == 0 ||
4858 periodName.CompareTo(
"LHC17d3") == 0 || periodName.CompareTo(
"LHC17e5") == 0 || periodName.CompareTo(
"LHC17d20a1") == 0 || periodName.CompareTo(
"LHC17d20a1_extra") == 0 ||
4859 periodName.CompareTo(
"LHC17d20a2") == 0 || periodName.CompareTo(
"LHC17d20a2_extra") == 0 || periodName.CompareTo(
"LHC17d16") == 0 || periodName.CompareTo(
"LHC17d18") == 0 ||
4860 periodName.CompareTo(
"LHC17f9") == 0 || periodName.CompareTo(
"LHC17f9_test") == 0){
4864 }
else if ( periodName.CompareTo(
"LHC16P1Pyt8LowB") == 0 || periodName.CompareTo(
"LHC17d1") == 0 ){
4868 }
else if ( periodName.CompareTo(
"LHC16P1EPOS") == 0 || periodName.CompareTo(
"LHC17d20b1") == 0 || periodName.CompareTo(
"LHC17d20b2") == 0 ){
4872 }
else if ( periodName.CompareTo(
"LHC16P1JJ") == 0 || periodName.CompareTo(
"LHC17f8a") == 0 || periodName.CompareTo(
"LHC17f8c") == 0 || periodName.CompareTo(
"LHC17f8d") == 0 ||
4873 periodName.CompareTo(
"LHC17f8e") == 0 ){
4877 }
else if ( periodName.CompareTo(
"LHC16P1JJLowB") == 0 || periodName.CompareTo(
"LHC17f8b") == 0 ){
4882 }
else if (periodName.CompareTo(
"LHC17f2a") == 0){
4885 }
else if (periodName.CompareTo(
"LHC17f2a_fast") == 0){
4888 }
else if (periodName.CompareTo(
"LHC17f2a_cent") == 0){
4891 }
else if (periodName.CompareTo(
"LHC17f2a_cent_woSDD") == 0){
4894 }
else if (periodName.CompareTo(
"LHC17f2a_fast_fix") == 0){
4897 }
else if (periodName.CompareTo(
"LHC17f2a_cent_fix") == 0){
4900 }
else if (periodName.CompareTo(
"LHC17f2a_cent_woSDD_fix") == 0){
4903 }
else if (periodName.CompareTo(
"LHC17f2b") == 0){
4906 }
else if (periodName.CompareTo(
"LHC17f2b_fast") == 0){
4909 }
else if (periodName.CompareTo(
"LHC17f2b_cent") == 0){
4912 }
else if (periodName.CompareTo(
"LHC17f2b_cent_woSDD") == 0){
4915 }
else if (periodName.CompareTo(
"LHC17g8a_fast") == 0){