+
+ if (strcmp(runInfo->GetRunType(),"PHYSICS")) {
+ // Not a physics run, the event specie is set to kCalib
+ fEventSpecie = kCalib;
+ return;
+ }
+
+ if (strcmp(runInfo->GetLHCState(),"STABLE_BEAMS") == 0) {
+ // In case of stable beams
+// if ((strcmp(runInfo->GetBeamType(),"A-A") == 0) ||
+// (strcmp(runInfo->GetBeamType(),"A-") == 0) ||
+// (strcmp(runInfo->GetBeamType(),"-A") == 0)) {
+ // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
+ fEventSpecie = kHighMult;
+// }
+// else
+ if ((strcmp(runInfo->GetBeamType(),"p-p") == 0) ||
+ (strcmp(runInfo->GetBeamType(),"p-") == 0) ||
+ (strcmp(runInfo->GetBeamType(),"-p") == 0) ||
+ (strcmp(runInfo->GetBeamType(),"P-P") == 0) ||
+ (strcmp(runInfo->GetBeamType(),"P-") == 0) ||
+ (strcmp(runInfo->GetBeamType(),"-P") == 0)) {
+ // Proton run, the event specie is set to kLowMult
+ fEventSpecie = kLowMult;
+ }
+ else if (strcmp(runInfo->GetBeamType(),"-") == 0) {
+ // No beams, we assume cosmic data
+ fEventSpecie = kCosmic;
+ }
+ else if (strcmp(runInfo->GetBeamType(),"UNKNOWN") == 0) {
+ // No LHC beam information is available, we the default
+ // event specie
+ fEventSpecie = kDefault;
+ }
+
+ // Now we look into the trigger type in order to decide
+ // on the remaining cases (cosmic event within LHC run,
+ // high-mult event based on high-mult SPD trigger
+ // within p-p run, laser triggers within physics run,
+ // special DAQ events considered as calibration etc...)
+ if (evInfo.GetEventType() != 7) {
+ // START_OF_*, END_OF_*, CALIBRATION etc events
+ fEventSpecie = kCalib;
+ }
+
+ TString triggerClasses = evInfo.GetTriggerClasses();
+ TObjArray* trClassArray = triggerClasses.Tokenize(" ");
+ Int_t nTrClasses = trClassArray->GetEntriesFast();
+ Bool_t cosmicTrigger = kFALSE,
+ laserTrigger = kFALSE,
+ highMultTrigger = kFALSE,
+ otherTrigger = kFALSE;
+ for( Int_t i=0; i<nTrClasses; ++i ) {
+ TString trClass = ((TObjString*)trClassArray->At(i))->String();
+ if (trClass.BeginsWith("C0A") ||
+ trClass.BeginsWith("C0SC") ||
+ trClass.BeginsWith("C0OC")) {
+ // ACORDE/SPD/TOF cosmic trigger, so we have cosmic event
+ // not always true, but we don't have a better idea...
+ cosmicTrigger = kTRUE;
+ }
+ else if (trClass.BeginsWith("C0LSR")) {
+ // Laser trigger
+ laserTrigger = kTRUE;
+ }
+ else if (trClass.BeginsWith("C0SH")) {
+ // High-multiplicity SPD trugger
+ // Have to add other high-mult triggers here...
+ highMultTrigger = kTRUE;
+ }
+ else {
+ otherTrigger = kTRUE;
+ }
+ }
+
+ if (laserTrigger) {
+ fEventSpecie = kCalib;
+ return;
+ }
+ if (cosmicTrigger && !highMultTrigger && !otherTrigger) {
+ fEventSpecie = kCosmic;
+ return;
+ }
+ if (highMultTrigger) {
+ fEventSpecie = kHighMult;
+ return;
+ }
+
+ // Here we have to add if we have other cases
+ // and also HLT info if any...
+ }