#include "TClass.h"
#include "TObjArray.h"
#include "TMath.h"
+#include "THashTable.h"
#include "AliDetectorRecoParam.h"
#include "AliLog.h"
}
}
-void AliRecoParam::SetEventSpecie(const AliRunInfo *runInfo, const AliEventInfo &evInfo)
+void AliRecoParam::SetEventSpecie(const AliRunInfo *runInfo, const AliEventInfo &evInfo,
+ const THashTable *cosmicTriggersList)
{
- // To be implemented
- // Here we return always kDefault!!
+ // Implemented according to the discussions
+ // and meetings with physics and trigger coordination
fEventSpecie = kDefault;
continue;
}
- TObjArray* tmp = trClass.Tokenize("-");
- TObjString* bcName = (TObjString*)tmp->At(1);
- if (bcName) {
- if ((bcName->String().CompareTo("ABCE") == 0) ||
- (bcName->String().CompareTo("E") == 0) ||
- (bcName->String().CompareTo("NONE") == 0)) {
- // Cosmic triggers are identified by empty bunch-crossing mask
- // The naming comvention is:
- // A filled bunch from A side, empty from C side
- // B filled bunch from both sides
- // C filled bunch from C side, empty from A side
- // E empty bunch from both sides
+ if (cosmicTriggersList) {
+ if (cosmicTriggersList->FindObject(trClass.Data())) {
+ // Cosmic trigger accorind to the table
+ // provided in OCDB
cosmicTrigger = kTRUE;
- delete tmp;
- continue;
+ AliDebug(1,Form("Trigger %s identified as cosmic according to the list defined in OCDB.",
+ trClass.Data()));
}
}
else {
- AliWarning(Form("Trigger class %s doesn't comply with the naming convention!",trClass.Data()));
+ AliDebug(1,"Cosmic trigger list is not provided, cosmic event specie is effectively disabled!");
}
- delete tmp;
otherTrigger = kTRUE;
}
class AliDetectorRecoParam;
class AliRunInfo;
class AliEventInfo;
+class THashTable;
class AliRecoParam : public TObject
{
virtual void Print(Option_t *option="") const;
const TObjArray *GetDetRecoParamArray(Int_t iDet) const { return fDetRecoParams[iDet]; }
- void SetEventSpecie(const AliRunInfo*runInfo, const AliEventInfo &evInfo);
+ void SetEventSpecie(const AliRunInfo*runInfo, const AliEventInfo &evInfo,
+ const THashTable*cosmicTriggersList);
EventSpecie_t GetEventSpecie() const { return fEventSpecie; }
static const char* GetEventSpecieName(EventSpecie_t es);
static const char* GetEventSpecieName(Int_t esIndex);
#include <TProofOutputFile.h>
#include <TROOT.h>
#include <TSystem.h>
+#include <THashTable.h>
#include "AliAlignObj.h"
#include "AliCDBEntry.h"
fDiamondProfileSPD(NULL),
fDiamondProfile(NULL),
fDiamondProfileTPC(NULL),
+ fListOfCosmicTriggers(NULL),
fGRPData(NULL),
fDiamondProfileSPD(rec.fDiamondProfileSPD),
fDiamondProfile(rec.fDiamondProfile),
fDiamondProfileTPC(rec.fDiamondProfileTPC),
+ fListOfCosmicTriggers(NULL),
fGRPData(NULL),
delete fDiamondProfileTPC; fDiamondProfileTPC = NULL;
if (rec.fDiamondProfileTPC) fDiamondProfileTPC = new AliESDVertex(*rec.fDiamondProfileTPC);
+ delete fListOfCosmicTriggers; fListOfCosmicTriggers = NULL;
+ if (rec.fListOfCosmicTriggers) fListOfCosmicTriggers = (THashTable*)((rec.fListOfCosmicTriggers)->Clone());
+
delete fGRPData; fGRPData = NULL;
// if (rec.fGRPData) fGRPData = (TMap*)((rec.fGRPData)->Clone());
if (rec.fGRPData) fGRPData = (AliGRPObject*)((rec.fGRPData)->Clone());
// clean up
CleanUp();
+ if (fListOfCosmicTriggers) {
+ fListOfCosmicTriggers->Delete();
+ delete fListOfCosmicTriggers;
+ }
delete fGRPData;
fOptions.Delete();
if (fAlignObjArray) {
AliError("No TPC diamond profile found in OCDB!");
}
+ entry = AliCDBManager::Instance()->Get("GRP/Calib/CosmicTriggers");
+ if (entry) {
+ fListOfCosmicTriggers = dynamic_cast<THashTable*>(entry->GetObject());
+ entry->SetOwner(0);
+ AliCDBManager::Instance()->UnloadFromCache("GRP/Calib/CosmicTriggers");
+ }
+
+ if (!fListOfCosmicTriggers) {
+ AliWarning("Can not get list of cosmic triggers from OCDB! Cosmic event specie will be effectively disabled!");
+ }
+
return kTRUE;
}
// Fill Event-info object
GetEventInfo();
- fRecoParam.SetEventSpecie(fRunInfo,fEventInfo);
+ fRecoParam.SetEventSpecie(fRunInfo,fEventInfo,fListOfCosmicTriggers);
AliInfo(Form("Current event specie: %s",fRecoParam.PrintEventSpecie()));
// Set the reco-params
class AliDetectorRecoParam;
class AliRunInfo;
class AliGRPObject;
+class THashTable;
#include "AliQAv1.h"
#include "AliEventInfo.h"
#include "AliRecoParam.h"
AliESDVertex* fDiamondProfileSPD; // (x,y) diamond profile from SPD for AliITSVertexer3D(Z)
AliESDVertex* fDiamondProfile; // (x,y) diamond profile for AliVertexerTracks (ITS+TPC)
AliESDVertex* fDiamondProfileTPC; // (x,y) diamond profile from TPC for AliVertexerTracks
+ THashTable* fListOfCosmicTriggers; // list of cosmic triggers as defined by trigger coordination
AliGRPObject* fGRPData; // Data from the GRP/GRP/Data CDB folder
TTree* fChain; //! The raw-data chain in case of AliRawReaderChain
- ClassDef(AliReconstruction, 32) // class for running the reconstruction
+ ClassDef(AliReconstruction, 33) // class for running the reconstruction
};
#endif