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 PrimaryTracks5a[11][2] =
2051 Int_t PrimaryTracksLHC11h5a[11][2] =
2065 Int_t PrimaryTracks5b[11][2] =
2079 Int_t PrimaryTracksLHC11h5b[11][2] =
2093 Int_t PrimaryTracksLHC17n10[11][2] =
2109 if(event->IsA()==AliESDEvent::Class()) column = 0;
2110 if(event->IsA()==AliAODEvent::Class()) column = 1;
2132 centralityC=
Int_t(centrality/10);
2153 centralityC=
Int_t(centrality);
2156 }
else return kFALSE;
2174 centralityC=
Int_t(centrality);
2187 Double_t fVertexZ=
event->GetPrimaryVertex()->GetZ();
2191 fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
2195 fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
2198 if(TMath::Abs(fVertexZ)>
fMaxVertexZ)
return kFALSE;
2202 if (TMath::Abs(fVertexZ-fVertexZSPD) > 0.1)
return kFALSE;
2205 if(!
fUtils->IsVertexSelected2013pA(event))
return kFALSE;
2216 TBits fIR1 =
event->GetHeader()->GetIRInt1InteractionMap();
2217 TBits fIR2 =
event->GetHeader()->GetIRInt2InteractionMap();
2218 UShort_t bunchCrossings =
event->GetBunchCrossNumber();
2220 for(
Int_t i = 0; i<180;i++){
2221 if(fIR1.TestBitNumber(i))
2226 Bool_t isOutOfBunchPileup = 0;
2229 if(pf1 < -89) pf1 = -89;
2230 if(pf2 > 89) pf2 = 89;
2231 Int_t pf2maxForT0 = pf2;
2233 for (
Int_t i=pf1;i<=pf2;i++) {
2235 if (i<=pf2maxForT0) isOutOfBunchPileup|=fIR2.TestBitNumber(90+i);
2236 if (i>0 && i<=ir1skip)
continue;
2237 isOutOfBunchPileup|=fIR1.TestBitNumber(90+i);
2239 return isOutOfBunchPileup;
2245 Bool_t isPileUpV0MTPCout=0;
2250 multV0M =
event->GetVZEROData()->GetMTotV0A();
2252 multV0M =
event->GetVZEROData()->GetMTotV0A() +
event->GetVZEROData()->GetMTotV0C() ;
2257 if (multV0M < valFunc ) isPileUpV0MTPCout=1;
2260 return isPileUpV0MTPCout;
2269 if (fESDEvent->GetPrimaryVertex() != NULL){
2270 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2272 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2276 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2277 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2279 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2281 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2290 if (fAODEvent->GetPrimaryVertex() != NULL){
2291 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2292 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2295 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2296 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2297 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2299 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2312 AliGenCocktailEventHeader *cHeader = 0x0;
2313 Bool_t headerFound = kFALSE;
2333 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2334 if(cHeader) headerFound = kTRUE;
2342 TList *genHeaders = 0x0;
2343 if(cHeader) genHeaders = cHeader->GetHeaders();
2344 AliGenEventHeader* gh = 0;
2345 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2346 gh = (AliGenEventHeader*)genHeaders->At(i);
2347 TString GeneratorName = gh->GetName();
2348 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2349 Bool_t eventAccepted = kTRUE;
2350 TParticle * jet = 0;
2351 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2354 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2355 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2356 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2359 eventAccepted= kFALSE;
2363 if (jet)
delete jet;
2365 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2366 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2367 if (!particle)
continue;
2368 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2370 eventAccepted= kFALSE;
2378 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2380 70, 85, 99, 115, 132,
2381 150, 169, 190, 212, 235,
2383 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2384 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2385 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2386 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2388 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2389 if (bin < 20) weight = weightsBins[bin];
2392 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2394 70, 85, 99, 115, 132,
2395 150, 169, 190, 212, 235,
2397 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2398 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2399 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2400 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2403 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2404 if (bin < 20) weight = weightsBins[bin];
2407 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2409 70, 85, 99, 115, 132,
2410 150, 169, 190, 212, 235,
2412 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2413 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2414 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2415 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2417 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2418 if (bin < 20) weight = weightsBins[bin];
2422 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2425 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2426 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2427 1.933238e-05, 1.562895e-05};
2429 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2430 if (bin < 12) weight = weightsBins[bin];
2433 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2434 84, 117, 152, 191, 1000000,
2436 21, 28, 36, 45, 57 };
2437 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2438 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2439 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2440 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2444 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2445 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2446 if (bin < 19) weight = weightsBins[bin];
2449 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2450 84, 117, 152, 191, 1000000,
2452 21, 28, 36, 45, 57 };
2454 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2455 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2456 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2457 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2460 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2461 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2462 if (bin < 19) weight = weightsBins[bin];
2465 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2467 70, 85, 99, 115, 132,
2468 150, 169, 190, 212, 235,
2470 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2471 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2472 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2473 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2475 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2476 if (bin < 20) weight = weightsBins[bin];
2479 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2480 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2482 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2483 if (bin < 5) weight = weightsBins[bin];
2486 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2487 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2489 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2490 if (bin < 6) weight = weightsBins[bin];
2493 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2494 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2496 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2497 if (bin < 7) weight = weightsBins[bin];
2500 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2501 84, 117, 152, 191, 234,
2503 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2504 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2506 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2507 if (bin < 10) weight = weightsBins[bin];
2513 if (weight == -1)
return kFALSE;
2514 else return eventAccepted;
2519 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2520 TString eventHeaderName = eventHeader->ClassName();
2521 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2522 Bool_t eventAccepted = kTRUE;
2523 TParticle * jet = 0;
2524 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2525 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2527 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2528 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2529 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2532 eventAccepted= kFALSE;
2537 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2538 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2539 if (!particle)
continue;
2540 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2542 eventAccepted= kFALSE;
2550 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2552 70, 85, 99, 115, 132,
2553 150, 169, 190, 212, 235,
2555 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2556 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2557 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2558 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2560 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2561 if (bin < 20) weight = weightsBins[bin];
2564 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2566 70, 85, 99, 115, 132,
2567 150, 169, 190, 212, 235,
2569 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2570 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2571 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2572 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2575 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2576 if (bin < 20) weight = weightsBins[bin];
2579 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2581 70, 85, 99, 115, 132,
2582 150, 169, 190, 212, 235,
2584 Double_t weightsBins[20] = { 16.0869, 4.61169, 2.14976, 0.782544, 0.264854,
2585 9.7619E-02, 2.92747E-02, 9.89515E-03, 4.05152E-03, 1.35393E-03,
2586 5.29864E-04, 1.88317E-04, 9.23E-05, 4.29E-05, 2.09E-05,
2587 1.06E-05, 5.76E-06, 3.00E-06, 1.62E-06, 2.10E-06 };
2589 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2590 if (bin < 20) weight = weightsBins[bin];
2594 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2597 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2598 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2599 1.933238e-05, 1.562895e-05};
2601 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2602 if (bin < 12) weight = weightsBins[bin];
2605 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2606 84, 117, 152, 191, 1000000,
2608 21, 28, 36, 45, 57 };
2609 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2610 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2611 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2612 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2616 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2617 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2618 if (bin < 19) weight = weightsBins[bin];
2621 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2622 84, 117, 152, 191, 1000000,
2624 21, 28, 36, 45, 57 };
2626 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2627 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2628 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2629 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2632 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2633 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2634 if (bin < 19) weight = weightsBins[bin];
2637 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2639 70, 85, 99, 115, 132,
2640 150, 169, 190, 212, 235,
2642 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2643 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2644 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2645 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2647 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2648 if (bin < 20) weight = weightsBins[bin];
2651 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2652 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2654 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2655 if (bin < 5) weight = weightsBins[bin];
2658 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2659 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2661 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2662 if (bin < 6) weight = weightsBins[bin];
2665 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2666 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2668 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2669 if (bin < 7) weight = weightsBins[bin];
2672 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2673 84, 117, 152, 191, 234,
2675 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2676 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2678 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2679 if (bin < 10) weight = weightsBins[bin];
2684 if (weight == -1)
return kFALSE;
2685 else return eventAccepted;
2700 AliGenCocktailEventHeader *cHeader = 0x0;
2701 Bool_t headerFound = kFALSE;
2719 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2720 if(cHeader) headerFound = kTRUE;
2729 TList *genHeaders = 0x0;
2730 if(cHeader) genHeaders = cHeader->GetHeaders();
2731 AliGenEventHeader* gh = 0;
2732 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2733 gh = (AliGenEventHeader*)genHeaders->At(i);
2734 TString GeneratorName = gh->GetName();
2735 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2736 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2737 NTrials = gPythia->Trials();
2738 XSection = gPythia->GetXsection();
2743 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2745 TString eventHeaderName = eventHeader->ClassName();
2746 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2747 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2748 NTrials = gPythia->Trials();
2749 XSection = gPythia->GetXsection();
2765 AliGenCocktailEventHeader *cHeader = 0x0;
2766 Bool_t headerFound = kFALSE;
2780 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2781 if(cHeader) headerFound = kTRUE;
2788 TList *genHeaders = 0x0;
2789 if(cHeader) genHeaders = cHeader->GetHeaders();
2790 AliGenEventHeader* gh = 0;
2791 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2792 gh = (AliGenEventHeader*)genHeaders->At(i);
2793 TString GeneratorName = gh->GetName();
2794 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2795 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2799 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2801 TString eventHeaderName = eventHeader->ClassName();
2802 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2803 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2818 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
2820 150209, 153056, 153911, 153915,
2821 158135, 158136, 158178, 158182, 160683,
2822 160764, 161139, 161256, 161379, 161457,
2823 161525, 161556, 161558, 161609, 161630,
2825 173731, 177144, 177147, 177653, 177724, 178327,
2830 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
2832 1.94, 3.39, 4.01, 5.25, 5.5,
2833 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,
2834 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
2838 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
2841 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
2842 0., 0., 0., 0., 0.2, 0.2,
2847 Int_t runRangesEMCalL1[4] = { 179796,
2852 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
2853 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
2855 Int_t runRangesEMCalL1G2[3] = { 195180,
2859 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
2860 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
2862 Int_t runnumber =
event->GetRunNumber();
2865 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
2867 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
2871 if (binRun==34)
return kFALSE;
2872 Double_t threshold = thresholdEMCalL0[binRun];
2874 if (isMC && spreadEMCalL0[binRun] != 0.){
2875 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2876 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2877 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
2878 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
2879 threshold = triggerSmearing->GetRandom();
2880 delete triggerSmearing;
2886 nclus =
event->GetNumberOfCaloClusters();
2888 if(nclus == 0)
return kFALSE;
2891 Bool_t eventIsAccepted = kFALSE;
2892 for(
Int_t i = 0; i < nclus; i++){
2893 AliVCluster* clus = NULL;
2894 clus =
event->GetCaloCluster(i);
2895 if (!clus)
continue;
2896 if (!clus->IsEMCAL())
continue;
2897 if (clus->GetM02()<0.1)
continue;
2898 if (clus->GetNCells()<2)
continue;
2899 if (clus->E() > threshold ){
2901 eventIsAccepted = kTRUE;
2904 return eventIsAccepted;
2911 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
2913 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
2917 if (binRun==3)
return kFALSE;
2918 Double_t threshold = thresholdEMCalL1[binRun];
2920 if (isMC && spreadEMCalL1[binRun] != 0.){
2921 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2922 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2923 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
2924 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
2925 threshold = triggerSmearing->GetRandom();
2926 delete triggerSmearing;
2932 nclus =
event->GetNumberOfCaloClusters();
2934 if(nclus == 0)
return kFALSE;
2937 Bool_t eventIsAccepted = kFALSE;
2938 for(
Int_t i = 0; i < nclus; i++){
2939 AliVCluster* clus = NULL;
2940 clus =
event->GetCaloCluster(i);
2941 if (!clus)
continue;
2942 if (!clus->IsEMCAL())
continue;
2943 if (clus->GetM02()<0.1)
continue;
2944 if (clus->GetNCells()<2)
continue;
2945 if (clus->E() > threshold ){
2947 eventIsAccepted = kTRUE;
2950 return eventIsAccepted;
2952 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
2954 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
2958 if (binRun==2)
return kFALSE;
2959 Double_t threshold = thresholdEMCalL1G2[binRun];
2960 if (isMC && spreadEMCalL1G2[binRun] != 0.){
2961 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2962 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2963 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
2964 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
2965 threshold = triggerSmearing->GetRandom();
2966 delete triggerSmearing;
2971 nclus =
event->GetNumberOfCaloClusters();
2973 if(nclus == 0)
return kFALSE;
2976 Bool_t eventIsAccepted = kFALSE;
2977 for(
Int_t i = 0; i < nclus; i++){
2978 AliVCluster* clus = NULL;
2979 clus =
event->GetCaloCluster(i);
2980 if (!clus)
continue;
2981 if (!clus->IsEMCAL())
continue;
2982 if (clus->GetM02()<0.1)
continue;
2983 if (clus->GetNCells()<2)
continue;
2984 if (clus->E() > threshold ){
2986 eventIsAccepted = kTRUE;
2989 return eventIsAccepted;
3006 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3009 UInt_t isSelected = AliVEvent::kAny;
3011 if (fInputHandler==NULL)
return kFALSE;
3012 if( fInputHandler->GetEventSelection() ||
event->IsA()==AliAODEvent::Class()) {
3014 TString firedTrigClass =
event->GetFiredTriggerClasses();
3055 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3057 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
3059 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3063 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3064 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3066 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3067 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3074 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3076 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3078 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
3081 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3082 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3083 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3086 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3088 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3091 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3092 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3097 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3098 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3099 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3101 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3102 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3103 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3105 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3106 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3108 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3109 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3113 if (isSelected != 0 ){
3145 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3146 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3147 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3151 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3152 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3153 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3157 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3158 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3159 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3164 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3165 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3166 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3167 else CheckClass+=
"0";
3169 if(CheckClass.Contains(
"0")) isSelected = 0;
3176 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3178 Bool_t mimickedTrigger = kTRUE;
3185 if (mimickedTrigger){
3186 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3187 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3188 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3189 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3190 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3191 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3192 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3194 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3196 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3198 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3200 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3202 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3203 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3204 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3207 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3208 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3209 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3210 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3211 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3212 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3213 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3215 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3216 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3217 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3218 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3219 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3220 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3221 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3222 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3223 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3224 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3225 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3226 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3232 if (mimickedTrigger){
3264 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3265 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3267 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3268 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3278 if(!isSelected)
return kFALSE;
3280 if (!mimickedTrigger )
return kFALSE;
3307 if(rejection == 0)
return;
3309 AliGenCocktailEventHeader *cHeader = 0x0;
3310 AliAODMCHeader *cHeaderAOD = 0x0;
3311 Bool_t headerFound = kFALSE;
3312 AliMCEvent *fMCEvent = 0x0;
3313 TClonesArray *fMCEventAOD = 0x0;
3314 if(event->IsA()==AliMCEvent::Class()){
3315 if(dynamic_cast<AliMCEvent*>(event)){
3316 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(event)->GenEventHeader());
3317 fMCEvent =
dynamic_cast<AliMCEvent*
>(event);
3318 if(cHeader) headerFound = kTRUE;
3321 if(event->IsA()==AliAODEvent::Class()){
3322 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(
event->FindListObject(AliAODMCHeader::StdBranchName()));
3323 fMCEventAOD =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3324 if(cHeaderAOD) headerFound = kTRUE;
3327 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3329 TList *genHeaders = 0x0;
3330 if(cHeader) genHeaders = cHeader->GetHeaders();
3332 genHeaders = cHeaderAOD->GetCocktailHeaders();
3333 if(genHeaders->GetEntries()==1){
3338 AliGenEventHeader* gh = 0;
3340 Int_t firstindexA = 0;
3341 Int_t lastindexA = -1;
3342 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3344 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3345 gh = (AliGenEventHeader*)genHeaders->At(i);
3346 TString GeneratorName = gh->GetName();
3347 lastindexA = lastindexA + gh->NProduced();
3348 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3349 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3350 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3351 if (
fDebugLevel > 0 ) cout << GeneratorInList.Data() << endl;
3352 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3354 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3358 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode ){
3373 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA));
3376 if (gh->NProduced() > 10){
3377 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA+10));
3399 firstindexA = firstindexA + gh->NProduced();
3408 if(rejection == 1 || rejection == 3){
3410 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3411 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3416 Int_t firstindex = 0;
3417 Int_t lastindex = -1;
3420 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3421 gh = (AliGenEventHeader*)genHeaders->At(i);
3422 TString GeneratorName = gh->GetName();
3423 lastindex = lastindex + gh->NProduced();
3424 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3425 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3426 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3427 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3428 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3432 if (
fDebugLevel > 0 ) cout <<
"produced " << gh->NProduced() <<
" with box generator" << endl;
3433 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode){
3434 if (
fDebugLevel > 0 ) cout <<
"one of them was a pi0 or eta" << endl;
3439 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3452 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex));
3455 if (gh->NProduced() > 10) {
3456 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex+10));
3479 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3486 firstindex = firstindex + gh->NProduced();
3489 for (
Int_t i = 0; i < number; i++){
3499 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(event)->GetNumberOfPrimaries()-1;
3516 if(index < 0)
return 0;
3519 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3520 if(!mcEvent)
return 0;
3521 if(index >= mcEvent->GetNumberOfPrimaries()){
3522 if( ((TParticle*)mcEvent->Particle(index))->GetMother(0) < 0)
return 0;
3523 return IsParticleFromBGEvent(((TParticle*)mcEvent->Particle(index))->GetMother(0),mcEvent,InputEvent);
3530 if(i == 0) accepted = 2;
3534 else if(InputEvent->IsA()==AliAODEvent::Class()){
3535 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3536 if (AODMCTrackArray){
3537 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3538 if(!aodMCParticle)
return 0;
3539 if(!aodMCParticle->IsPrimary()){
3540 if( aodMCParticle->GetMother() < 0)
return 0;
3543 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3547 if(i == 0) accepted = 2;
3560 if (mcEvent){isMC = kTRUE;}
3588 Int_t runnumber =
event->GetRunNumber();
3589 if ((runnumber>=144871) && (runnumber<=146860)) {
3591 AliVCaloCells *cells =
event->GetEMCALCells();
3592 const Short_t nCells = cells->GetNumberOfCells();
3594 if (event->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3596 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3597 if (!fInputHandler)
return 3;
3600 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3601 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3602 Short_t cellId = cells->GetCellNumber(iCell);
3603 Double_t cellE = cells->GetCellAmplitude(cellId);
3604 Int_t sm = cellId / (24*48);
3605 if (cellE>0.1) ++nCellCount[sm];
3608 Bool_t fIsLedEvent = kFALSE;
3609 if (nCellCount[4] > 100) {
3610 fIsLedEvent = kTRUE;
3612 if ((runnumber>=146858) && (runnumber<=146860)) {
3613 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3614 fIsLedEvent = kTRUE;
3615 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3616 fIsLedEvent = kTRUE;
3626 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
3627 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
3628 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
3633 if(event->IsA()==AliESDEvent::Class()){
3637 for(
Int_t i=0; i<nPileVert;i++){
3638 const AliESDVertex* pv= ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
3639 Int_t nc2 = pv->GetNContributors();
3644 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
3658 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
3662 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3668 if(
fUtils->IsPileUpEvent(event) ){
3672 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3693 AliEventplane *EventPlane =
event->GetEventplane();
3706 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
3709 if(!event || event->IsA()==AliESDEvent::Class()){
3712 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
3714 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
3717 }
else if(event->IsA()==AliAODEvent::Class()){
3720 if(aodEvent->GetHeader()){
3721 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
3727 Float_t GetValueForWeight = 1.;
3730 Bool_t CorrCentrLoop = kFALSE;
3736 CorrCentrLoop = kTRUE;
3737 }
else if (
fDoCentralityFlat == 2 && (centrality >=10. && centrality <= 20.) ){
3740 CorrCentrLoop = kTRUE;
3744 CorrCentrLoop = kTRUE;
3746 CorrCentrLoop = kFALSE;
3749 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
3750 weightCentrality = maximum/GetValueForWeight;
3751 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
3752 if (!isfinite(weightCentrality)) weightCentrality = 1.;
3755 return weightCentrality;
3774 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
3775 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
3776 weightMult = valueMultData/valueMultMC;
3795 if(index < 0)
return 0;
3803 if (kCaseGen == 0)
return 1;
3808 if(!event || event->IsA()==AliESDEvent::Class()){
3809 mesonPt = ((TParticle*)mcEvent->Particle(index))->Pt();
3811 PDGCode = ((TParticle*)mcEvent->Particle(index))->GetPdgCode();
3812 }
else if(event->IsA()==AliAODEvent::Class()){
3813 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3814 if (AODMCTrackArray){
3815 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3816 mesonPt = aodMCParticle->Pt();
3818 PDGCode = aodMCParticle->GetPdgCode();
3824 Float_t functionResultMC = 1.;
3835 Float_t functionResultData = 1;
3847 if (PDGCode == 111 || PDGCode == 221){
3848 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
3849 weight = functionResultData/functionResultMC;
3850 if ( kCaseGen == 3){
3851 if (PDGCode == 111){
3856 if (PDGCode == 221){
3862 if (!isfinite(functionResultData)) weight = 1.;
3863 if (!isfinite(weight)) weight = 1.;
3865 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
3866 weight = functionResultMC;
3882 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
3885 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
3888 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
3900 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
3908 AliEMCALTriggerPatchInfo *patch;
3909 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3911 if (patch->IsMainTrigger()) {
3928 if (event->IsA()==AliESDEvent::Class()){
3938 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
3944 if (event->IsA()==AliESDEvent::Class()){
3976 AliEMCALTriggerPatchInfo *patch;
3978 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3983 if (patch->IsGammaHigh()){
3987 if (patch->IsGammaLow()){
3991 if (patch->IsJetHigh()){
3995 if (patch->IsJetLow()){
3999 if (patch->IsLevel0()){
4010 AliDebug(2,
"Patch summary: ");
4011 AliDebug(2, Form(
"Number of patches: %d", nPatch));
4012 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
4013 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
4014 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
4026 SETBIT(triggers,
kG1);
4028 SETBIT(triggers,
kG2);
4030 SETBIT(triggers,
kJ1);
4032 SETBIT(triggers,
kJ2);
4034 SETBIT(triggers,
kL0);
4053 TClonesArray *arr = 0;
4055 if (!sname.IsNull()) {
4056 arr =
dynamic_cast<TClonesArray*
>(
event->FindListObject(sname));
4058 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
4068 TString objname(arr->GetClass()->GetName());
4069 TClass cls(objname);
4070 if (!cls.InheritsFrom(clname)) {
4071 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
4072 GetName(), cls.GetName(), name, clname));
4081 if (eventpos < 0)
return kFALSE;
4082 TParticle* particle = (TParticle *)mcEvent->Particle(eventpos);
4083 if (!particle)
return kFALSE;
4084 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4085 if (particle->GetMother(0) != -1){
4086 TParticle* particleMother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4087 if (particleMother){
4088 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4089 particle = particleMother;
4093 if (particle->GetMother(0) != -1){
4094 Double_t deltaX = particle->Vx() - prodVtxX;
4095 Double_t deltaY = particle->Vy() - prodVtxY;
4096 Double_t deltaZ = particle->Vz() - prodVtxZ;
4099 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4102 Bool_t dalitzCand = kFALSE;
4104 TParticle* firstmother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4105 if (!firstmother)
return kFALSE;
4106 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4107 Bool_t intDecay = kFALSE;
4108 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4109 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4114 Long_t source = particle->GetMother(0);
4115 Bool_t foundExcludedPart = kFALSE;
4116 Bool_t foundShower = kFALSE;
4117 Int_t pdgCodeMotherPrev = 0;
4118 Int_t pdgCodeMotherPPrevMother = 0;
4126 TParticle* mother = (TParticle *)mcEvent->Particle(source);
4127 source = mother->GetMother(0);
4129 Int_t pdgCodeMother = mother->GetPdgCode();
4131 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4132 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4133 foundShower = kTRUE;
4136 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4137 foundShower = kTRUE;
4149 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4150 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4151 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4153 foundExcludedPart = kTRUE;
4156 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4157 pdgCodeMotherPrev = pdgCodeMother;
4158 if (source == -1) depth = 20;
4164 if (foundExcludedPart){
4170 }
else if (foundShower){
4185 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4186 if (AODMCTrackArray == NULL)
return kFALSE;
4187 AliAODMCParticle* currentParticle = AODMCParticle;
4188 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4189 if (currentParticle->GetMother() != -1){
4190 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4191 if (particleMother){
4192 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4193 currentParticle = particleMother;
4197 if (currentParticle->GetMother() > -1){
4198 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4199 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4200 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4203 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4205 Bool_t dalitzCand = kFALSE;
4207 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4208 if (!firstmother)
return kFALSE;
4209 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4210 Bool_t intDecay = kFALSE;
4211 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4212 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4217 Long_t source = currentParticle->GetMother();
4218 Bool_t foundExcludedPart = kFALSE;
4219 Bool_t foundShower = kFALSE;
4220 Int_t pdgCodeMotherPrev = 0;
4221 Int_t pdgCodeMotherPPrevMother = 0;
4229 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4230 source = mother->GetMother();
4232 Int_t pdgCodeMother = mother->GetPdgCode();
4234 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4235 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4236 foundShower = kTRUE;
4239 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4240 foundShower = kTRUE;
4252 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4253 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4254 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4256 foundExcludedPart = kTRUE;
4259 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4260 pdgCodeMotherPrev = pdgCodeMother;
4261 if (source == -1) depth = 20;
4267 if (foundExcludedPart){
4273 }
else if (foundShower){
4288 if (particle != NULL && mcEvent != NULL){
4289 Int_t pdgSecondary = 0;
4293 Long_t motherID = particle->GetMother(0);
4294 Long_t grandMotherID = -1;
4298 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4300 if (grandMotherID > -1){
4302 pdgSecondary = mcEvent->Particle(grandMotherID)->GetPdgCode();
4309 Long_t motherID = particle->GetMother(0);
4310 Long_t grandMotherID = -1;
4311 Long_t greatGrandMotherID = -1;
4315 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4317 if (grandMotherID > -1){
4319 greatGrandMotherID = mcEvent->Particle(grandMotherID)->GetMother(0);
4321 if (greatGrandMotherID > -1){
4323 pdgSecondary = mcEvent->Particle(greatGrandMotherID)->GetPdgCode();
4329 if (TMath::Abs(pdgSecondary) == 3122 )
4332 else if ( TMath::Abs(pdgSecondary) == 310 )
4335 else if ( TMath::Abs(pdgSecondary) == 130 )
4338 else if ( TMath::Abs(pdgSecondary) == 221 )
4341 else if ( TMath::Abs(pdgSecondary) != 0 )
4351 if (particle != NULL && aodmcArray != NULL){
4352 Int_t pdgSecondary = 0;
4356 Long_t motherID = particle->GetMother();
4357 Long_t grandMotherID = -1;
4361 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4363 if (grandMotherID > -1){
4365 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4372 Long_t motherID = particle->GetMother();
4373 Long_t grandMotherID = -1;
4374 Long_t greatGrandMotherID = -1;
4378 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4380 if (grandMotherID > -1){
4382 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4384 if (greatGrandMotherID > -1){
4386 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4392 if (TMath::Abs(pdgSecondary) == 3122 )
4395 else if ( TMath::Abs(pdgSecondary) == 310 )
4398 else if ( TMath::Abs(pdgSecondary) == 130 )
4401 else if ( TMath::Abs(pdgSecondary) == 221 )
4404 else if ( TMath::Abs(pdgSecondary) != 0 )
4414 if (periodName.CompareTo(
"") == 0){
4418 if (periodName.CompareTo(
"") == 0) {
4421 AliError(
"No correct period could be set, periodName string empty");
4426 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4427 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0 || periodName.CompareTo(
"LHC10bg") == 0
4431 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4434 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4437 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4440 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4441 periodName.CompareTo(
"LHC11g") == 0
4445 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4448 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4449 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4450 periodName.CompareTo(
"LHC12i") == 0 || periodName.CompareTo(
"LHC12ai") == 0
4454 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 || periodName.CompareTo(
"LHC13bc") == 0){
4457 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 || periodName.CompareTo(
"LHC13de") == 0){
4460 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4463 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4466 }
else if ( periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4467 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0 ||
4468 periodName.CompareTo(
"LHC15fm") == 0
4472 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4475 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4478 }
else if ( periodName.CompareTo(
"LHC16d") == 0 || periodName.CompareTo(
"LHC16e") == 0 || periodName.CompareTo(
"LHC16g") == 0 || periodName.CompareTo(
"LHC16h") == 0 ||
4479 periodName.CompareTo(
"LHC16i") == 0 || periodName.CompareTo(
"LHC16j") == 0 || periodName.CompareTo(
"LHC16k") == 0 || periodName.CompareTo(
"LHC16l") == 0 ||
4480 periodName.CompareTo(
"LHC16m") == 0 || periodName.CompareTo(
"LHC16n") == 0 || periodName.CompareTo(
"LHC16o") == 0 || periodName.CompareTo(
"LHC16p") == 0){
4483 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4486 }
else if (periodName.CompareTo(
"LHC16q") == 0 ){
4489 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4492 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4495 }
else if (periodName.CompareTo(
"LHC16t") == 0 ){
4498 }
else if ( periodName.CompareTo(
"LHC17c") == 0 || periodName.CompareTo(
"LHC17d") == 0 || periodName.CompareTo(
"LHC17e") == 0 || periodName.CompareTo(
"LHC17f") == 0 ||
4499 periodName.CompareTo(
"LHC17h") == 0 || periodName.CompareTo(
"LHC17i") == 0 || periodName.CompareTo(
"LHC17j") == 0 || periodName.CompareTo(
"LHC17k") == 0 ||
4500 periodName.CompareTo(
"LHC17l") == 0 || periodName.CompareTo(
"LHC17m") == 0 || periodName.CompareTo(
"LHC17o") == 0 ){
4503 }
else if ( periodName.CompareTo(
"LHC17g") == 0 ){
4506 }
else if ( periodName.CompareTo(
"LHC17n") == 0 ){
4511 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4514 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4517 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4520 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4523 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4526 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4529 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4532 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4535 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4538 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4541 }
else if (periodName.Contains(
"LHC14j4")){
4544 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4547 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4550 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4553 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4556 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4559 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4562 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4565 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4569 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4572 }
else if (periodName.Contains(
"LHC12f1a") ){
4575 }
else if (periodName.Contains(
"LHC12f1b") ){
4578 }
else if (periodName.Contains(
"LHC12i3") ){
4581 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4584 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4587 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4590 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4593 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4596 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4599 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4602 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4605 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4608 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4611 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4614 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4618 }
else if (periodName.CompareTo(
"LHC14e2a") == 0){
4621 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){
4624 }
else if (periodName.CompareTo(
"LHC14e2c") == 0){
4627 }
else if (periodName.Contains(
"LHC15h1")){
4630 }
else if (periodName.Contains(
"LHC15h2")){
4633 }
else if (periodName.CompareTo(
"LHC16c2") == 0){
4636 }
else if (periodName.CompareTo(
"LHC16c2_plus") == 0){
4640 }
else if (periodName.Contains(
"LHC13b2_efix")){
4643 }
else if (periodName.CompareTo(
"LHC13e7") == 0){
4646 }
else if (periodName.CompareTo(
"LHC14b2") == 0){
4649 }
else if (periodName.CompareTo(
"LHC13b4_fix") == 0){
4652 }
else if (periodName.CompareTo(
"LHC13b4_plus") == 0){
4655 }
else if (periodName.CompareTo(
"LHC16c3a") == 0){
4658 }
else if (periodName.CompareTo(
"LHC16c3b") == 0){
4661 }
else if (periodName.CompareTo(
"LHC16c3c") == 0){
4664 }
else if (periodName.CompareTo(
"LHC15g2") == 0){
4667 }
else if (periodName.CompareTo(
"LHC15a3a") == 0){
4670 }
else if (periodName.CompareTo(
"LHC15a3a_plus") == 0){
4673 }
else if (periodName.CompareTo(
"LHC15a3b") == 0){
4676 }
else if (periodName.CompareTo(
"LHC15d3a") == 0){
4679 }
else if (periodName.CompareTo(
"LHC15d3b") == 0){
4683 }
else if (periodName.CompareTo(
"LHC15g3a3") == 0){
4686 }
else if (periodName.CompareTo(
"LHC15g3a") == 0){
4689 }
else if (periodName.CompareTo(
"LHC15g3c2") == 0){
4692 }
else if (periodName.CompareTo(
"LHC15g3c3") == 0){
4695 }
else if (periodName.CompareTo(
"LHC15g3") == 0){
4698 }
else if (periodName.CompareTo(
"LHC16a2a") == 0){
4701 }
else if (periodName.CompareTo(
"LHC16a2b") == 0){
4704 }
else if (periodName.CompareTo(
"LHC16a2c") == 0){
4707 }
else if (periodName.CompareTo(
"LHC15l1a2") == 0){
4710 }
else if (periodName.CompareTo(
"LHC15l1b2") == 0){
4713 }
else if (periodName.CompareTo(
"LHC16h3") == 0){
4716 }
else if (periodName.CompareTo(
"LHC16h8a") == 0){
4719 }
else if (periodName.CompareTo(
"LHC16h8b") == 0){
4722 }
else if (periodName.CompareTo(
"LHC16k5a") == 0){
4725 }
else if (periodName.CompareTo(
"LHC16k5b") == 0){
4728 }
else if (periodName.CompareTo(
"LHC16k3a") == 0){
4731 }
else if (periodName.CompareTo(
"LHC16k3a2") == 0){
4734 }
else if (periodName.CompareTo(
"LHC17e2") == 0){
4737 }
else if (periodName.Contains(
"LHC15k1a1")){
4740 }
else if (periodName.Contains(
"LHC15k1a2")){
4743 }
else if (periodName.Contains(
"LHC15k1a3")){
4746 }
else if (periodName.Contains(
"LHC16j7")){
4749 }
else if (periodName.Contains(
"LHC16h4")){
4752 }
else if (periodName.Contains(
"LHC16g1")){
4755 }
else if (periodName.Contains(
"LHC16g1a")){
4758 }
else if (periodName.Contains(
"LHC16g1b")){
4761 }
else if (periodName.Contains(
"LHC16g1c")){
4764 }
else if (periodName.Contains(
"LHC16g2")){
4767 }
else if (periodName.Contains(
"LHC16g3")){
4770 }
else if (periodName.Contains(
"LHC16h2a")){
4773 }
else if (periodName.Contains(
"LHC16h2b")){
4776 }
else if (periodName.Contains(
"LHC16h2c")){
4779 }
else if (periodName.CompareTo(
"LHC16k3b") == 0){
4782 }
else if (periodName.CompareTo(
"LHC16k3b2") == 0){
4788 }
else if ( periodName.CompareTo(
"LHC16P1Pyt8") == 0 || periodName.CompareTo(
"LHC17f6") == 0 || periodName.CompareTo(
"LHC17d17") == 0 || periodName.CompareTo(
"LHC17f5") == 0 ||
4789 periodName.CompareTo(
"LHC17d3") == 0 || periodName.CompareTo(
"LHC17e5") == 0 || periodName.CompareTo(
"LHC17d20a1") == 0 || periodName.CompareTo(
"LHC17d20a1_extra") == 0 ||
4790 periodName.CompareTo(
"LHC17d20a2") == 0 || periodName.CompareTo(
"LHC17d20a2_extra") == 0 || periodName.CompareTo(
"LHC17d16") == 0 || periodName.CompareTo(
"LHC17d18") == 0 ||
4791 periodName.CompareTo(
"LHC17f9") == 0 || periodName.CompareTo(
"LHC17f9_test") == 0){
4795 }
else if ( periodName.CompareTo(
"LHC16P1Pyt8LowB") == 0 || periodName.CompareTo(
"LHC17d1") == 0 ){
4799 }
else if ( periodName.CompareTo(
"LHC16P1EPOS") == 0 || periodName.CompareTo(
"LHC17d20b1") == 0 || periodName.CompareTo(
"LHC17d20b2") == 0 ){
4803 }
else if ( periodName.CompareTo(
"LHC16P1JJ") == 0 || periodName.CompareTo(
"LHC17f8a") == 0 || periodName.CompareTo(
"LHC17f8c") == 0 || periodName.CompareTo(
"LHC17f8d") == 0 ||
4804 periodName.CompareTo(
"LHC17f8e") == 0 ){
4808 }
else if ( periodName.CompareTo(
"LHC16P1JJLowB") == 0 || periodName.CompareTo(
"LHC17f8b") == 0 ){
4813 }
else if (periodName.CompareTo(
"LHC17f2a") == 0){
4816 }
else if (periodName.CompareTo(
"LHC17f2a_fast") == 0){
4819 }
else if (periodName.CompareTo(
"LHC17f2a_cent") == 0){
4822 }
else if (periodName.CompareTo(
"LHC17f2a_cent_woSDD") == 0){
4825 }
else if (periodName.CompareTo(
"LHC17f2a_fast_fix") == 0){
4828 }
else if (periodName.CompareTo(
"LHC17f2a_cent_fix") == 0){
4831 }
else if (periodName.CompareTo(
"LHC17f2a_cent_woSDD_fix") == 0){
4834 }
else if (periodName.CompareTo(
"LHC17f2b") == 0){
4837 }
else if (periodName.CompareTo(
"LHC17f2b_fast") == 0){
4840 }
else if (periodName.CompareTo(
"LHC17f2b_cent") == 0){
4843 }
else if (periodName.CompareTo(
"LHC17f2b_cent_woSDD") == 0){
4846 }
else if (periodName.CompareTo(
"LHC17g8a_fast") == 0){
4849 }
else if (periodName.CompareTo(
"LHC17g8a_cent_woSDD") == 0){
4853 }
else if (periodName.CompareTo(
"LHC17a3a") == 0){
4856 }
else if (periodName.CompareTo(
"LHC17a3a_fast") == 0){
4859 }
else if (periodName.CompareTo(
"LHC17a3a_cent") == 0){
4862 }
else if (periodName.CompareTo(
"LHC17a3a_cent_woSDD") == 0){
4865 }
else if (periodName.CompareTo(
"LHC17a3b") == 0){
4868 }
else if (periodName.CompareTo(
"LHC17a3b_fast") == 0){
4871 }
else if (periodName.CompareTo(
"LHC17a3b_cent") == 0){
4874 }
else if (periodName.CompareTo(
"LHC17a3b_cent_woSDD") == 0){
4877 }
else if (periodName.CompareTo(
"LHC17f3a") == 0){
4880 }
else if (periodName.CompareTo(
"LHC17f3a_fast") == 0){
4883 }
else if (periodName.CompareTo(
"LHC17f3a_cent") == 0){
4886 }
else if (periodName.CompareTo(
"LHC17f3a_cent_woSDD") == 0){
4889 }
else if (periodName.CompareTo(
"LHC17f3b") == 0){
4892 }
else if (periodName.CompareTo(
"LHC17f3b_fast") == 0){
4895 }
else if (periodName.CompareTo(
"LHC17f3b_cent") == 0){
4898 }
else if (periodName.CompareTo(
"LHC17f3b_cent_woSDD") == 0){