void sim(Int_t nev=5) { // Libraries required by the simulation gSystem->Load("liblhapdf"); // Parton density functions gSystem->Load("libEGPythia6"); // TGenerator interface gSystem->Load("libgeant321"); gSystem->Load("libDPMJET"); // DPMJET, PhoJet and Pythia6115 library gSystem->Load("libAliPythia6"); // ALICE specific implementations gSystem->Load("libTDPMjet"); // DPMJET interface AliSimulation simulator; simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO"); simulator.SetMakeDigitsFromHits("ITS TPC"); simulator.SetWriteRawData("ALL","raw.root",kTRUE); simulator.SetDefaultStorage("local://$ALIROOT_OCDB_ROOT/OCDB"); simulator.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); simulator.SetRunHLT("default"); // In case we do not have ancored production TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
void sim(const TString sID, Int_t nev=1000) { gSystem->cd(sID.Data()); //gSystem->Load("liblhapdf"); gSystem->Load("liblhapdf_5_9_1"); gSystem->Load("libEGPythia6"); //gSystem->Load("libpythia6"); gSystem->Load("libpythia6_4_21"); //gSystem->Load("libqpythia"); gSystem->Load("libAliPythia6"); gSystem->Load("libHIJING"); gSystem->Load("libTHijing"); gSystem->Load("libgeant321"); if (gSystem->Getenv("EVENT")) nev = atoi(gSystem->Getenv("EVENT")); AliSimulation simulator; simulator.SetRunGeneration(kTRUE); simulator.SetRunSimulation(kFALSE); simulator.SetMakeSDigits(""); simulator.SetMakeDigitsFromHits(""); simulator.SetWriteRawData(""); simulator.SetRunQA(":") ; TStopwatch timer; timer.Start(); simulator.Run(nev); WriteXsection(); timer.Stop(); timer.Print(); return; }
void sim(Int_t nev=100) { if (gSystem->Getenv("EVENT")) nev = atoi(gSystem->Getenv("EVENT")) ; AliSimulation simulator; simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO"); simulator.SetMakeDigitsFromHits("ITS TPC"); // simulator.SetWriteRawData("ALL","raw.root",kTRUE); simulator.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal"); // simulator.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); simulator.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); simulator.SetRunQA(":") ; // simulator.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; // // for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { // simulator.SetQACycles(det, nev+1) ; // } TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
void sim(Int_t nev=50) { if (gSystem->Getenv("SIM_EVENTS")) nev = atoi(gSystem->Getenv("SIM_EVENTS")); printf("GENERATE << %d >> events \n",nev); gROOT->LoadMacro("IpPion.C++") ; AliSimulation simulator; simulator.SetMakeSDigits("PHOS"); simulator.SetMakeDigits("PHOS"); // // Ideal OCDB // simulator.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); simulator.SetDefaultStorage("local://./OCDB"); // simulator.SetSpecificStorage("GRP/GRP/Data", // Form("local://%s",gSystem->pwd())); // simulator.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); //simulator.SetSpecificStorage("GRP/Calib/MeanVertexSPD", "alien://folder=/alice/data/2010/OCDB"); //PHOS bad map from RAW OCDB simulator.SetSpecificStorage("PHOS/*/*/","local://./OCDB"); // simulator.SetSpecificStorage("PHOS/Calib/EmcBadChannels/","local://./OCDB"); // simulator.SetSpecificStorage("PHOS/Calib/EmcGainPedestals/","local://./OCDB"); simulator.SetRunHLT(""); // simulator.SetSpecificStorage("GRP/GRP/Data", "alien://Folder=/alice/data/2010/OCDB"); AliPHOSSimParam *simParam = AliPHOSSimParam::GetInstance() ; simParam->SetAPDNoise(0.000001) ; simParam->SetCellNonLineairyA(0.001) ; // simParam->SetCellNonLineairyA(0.1) ; //Default simParam->SetCellNonLineairyB(0.2) ; // simParam->SetCellNonLineairyC(0.989) ; //Jan4 // simParam->SetCellNonLineairyC(0.995) ; //Jan5 - 2GeV simParam->SetCellNonLineairyC(1.031) ; //no NL // Vertex and Mag.field from OCDB // simulator.UseVertexFromCDB(); simulator.UseMagFieldFromGRP(); simulator.SetRunQA(":") ; // // The rest TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
void sim(Int_t embrun) { AliSimulation sim; if (embrun == 4) { AliCDBManager *cdbm = AliCDBManager::Instance(); cdbm->SetRun(atoi(gSystem->Getenv("DC_RUN"))); cdbm->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd())); sim.SetMakeSDigits("ITS TPC TRD TOF VZERO"); sim.ConvertRaw2SDigits("raw.root","AliESDs.root"); return; } if (embrun == 2) { sim.SetRunGeneration(kFALSE); sim.SetMakeSDigits(""); sim.SetMakeDigitsFromHits(""); } else { sim.SetRunGeneration(kTRUE); sim.SetMakeSDigits("ITS TPC TRD TOF VZERO"); } sim.SetRunSimulation(kTRUE); sim.SetMakeDigits("ITS TPC TRD TOF VZERO"); sim.SetWriteRawData("ITS TPC TRD TOF VZERO","raw.root",kTRUE); if (embrun == 1) sim.MergeWith("../BackgroundSDigits/galice.root",1); sim.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); sim.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); sim.SetRunQA(":") ; AliQA::SetQARefStorage("local://$ALICE_ROOT/OCDB") ; for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { sim.SetQACycles(det, 1) ; } // sim.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Full/"); // sim.SetRunHLT(""); // sim.SetQA(kFALSE); sim.Run(1); }
void sim(Int_t nev=200) { AliLog::SetGlobalLogLevel(AliLog::kError); AliSimulation simulator; simulator.SetMakeSDigits("TPC TRD TOF FMD T0 VZERO PHOS HMPID EMCAL PMD MUON ZDC"); simulator.SetMakeDigitsFromHits("ITS"); simulator.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
void AliEMCALDecalibrate(Int_t nevents=3) { //Use "decalibration" database to simulate decalibrated EMCAL. AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); AliCDBManager::Instance()->SetSpecificStorage("EMCAL","local://DeCalibDB"); //Make digitization, calibration parameters will be taken from CDB AliSimulation sim ; sim.SetRunGeneration(kFALSE) ; sim.SetMakeSDigits("") ; sim.SetMakeDigits("EMCAL") ; sim.Run(nevents) ; }
void sim(Int_t nev=200) { AliSimulation simulator; simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO"); simulator.SetMakeDigitsFromHits("ITS TPC"); simulator.SetWriteRawData("ALL","raw.root",kTRUE); simulator.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-12-Release/Full/"); simulator.SetRunHLT(""); simulator.SetQA(kFALSE); TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
void makeSDigit(Int_t run=117048, const char *fname="/alice/data/2010/LHC10b/000117048/raw/10000117048041.30.root") { AliSimulation sim; //AliLog::SetGlobalDebugLevel(1); AliLog::SetModuleDebugLevel("STEER",1); AliCDBManager *cdbm = AliCDBManager::Instance(); cdbm->SetRun(run); cdbm->SetDefaultStorage("local://$ALIROOT_OCDB_ROOT/OCDB"); //cdbm->SetDefaultStorage("raw://"); cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s","$ALICE_ROOT/test/rawmerge")); sim.SetMakeSDigits("ITS TPC"); sim.SetNumberOfEvents(10000); sim.ConvertRaw2SDigits(fname); return; }
void sim(Int_t nev=3,Int_t runnumber) { gSystem->Exec(" rm itsSegmentations.root "); AliSimulation simulator; simulator.SetMakeSDigits(""); simulator.SetMakeDigitsFromHits(""); simulator.SetRunNumber(runnumber); // simulator.SetDefaultStorage("raw://"); simulator.SetSpecificStorage("GRP/*/*","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("ITS/Align/Data", "alien://folder=/alice/simulation/LS1_upgrade/Ideal"); simulator.SetSpecificStorage("ITS/Calib/RecoParam", "alien://folder=/alice/simulation/LS1_upgrade/Ideal"); simulator.SetSpecificStorage("ITS/Calib/SimuParam", "alien://folder=/alice/simulation/LS1_upgrade/Ideal"); simulator.SetDefaultStorage("alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Align/Data", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/ClusterParam", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/RecoParam", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/"); simulator.SetSpecificStorage("TPC/Calib/TimeGain", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/AltroConfig", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/TimeDrift", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Correction", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.Print(""); // // Vertex and Mag.field from OCDB // simulator.UseVertexFromCDB(); simulator.UseMagFieldFromGRP(); simulator.SetRunHLT(""); simulator.SetRunQA(":"); // // The rest // printf("Before simulator.Run(nev);\n"); simulator.Run(nev); printf("After simulator.Run(nev);\n"); }
void sim(Int_t nev=50) { AliSimulation simu; simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); simu.SetMakeDigitsFromHits("ITS TPC"); simu.SetWriteRawData("ALL","raw.root",kTRUE); simu.SetDefaultStorage("alien://Folder=/alice/simulation/2007/PDC07_v4-09-Rev-00/Ideal/CDB/"); simu.SetSpecificStorage("EMCAL/*","local://DB"); simu.SetQA(kFALSE) ; TStopwatch timer; timer.Start(); simu.Run(nev); WriteXsection(); timer.Stop(); timer.Print(); }
void sim(Int_t nev=1) { gSystem->Load("liblhapdf"); gSystem->Load("libEGPythia6"); gSystem->Load("libpythia6"); gSystem->Load("libAliPythia6"); gSystem->Load("libhijing"); gSystem->Load("libTHijing"); gSystem->Load("libgeant321"); if (gSystem->Getenv("EVENT")) nev = atoi(gSystem->Getenv("EVENT")) ; AliSimulation simulator; simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL FMD ZDC PMD T0 VZERO"); simulator.SetMakeDigitsFromHits("ITS TPC"); simulator.SetWriteRawData("ALL","raw.root",kTRUE); simulator.SetDefaultStorage("local:///cvmfs/alice-ocdb.cern.ch/calibration/MC/Ideal"); //simulator.SetDefaultStorage(Form("local://%s/OCDB", gSystem->pwd())); simulator.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); simulator.SetRunQA("ALL:ALL") ; simulator.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { simulator.SetQACycles((AliQAv1::DETECTORINDEX_t)det, nev+1) ; } TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
void sim(Int_t nev=1) { AliSimulation simu; simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); simu.SetMakeDigitsFromHits("ITS TPC"); simu.SetWriteRawData("ALL","raw.root",kTRUE); simu.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); simu.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); simu.SetRunQA("ALL:ALL") ; simu.SetQARefDefaultStorage("local://$ALICE_ROOT/OCDB") ; for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { simu.SetQACycles(det, 2) ; } TStopwatch timer; timer.Start(); simu.Run(nev); WriteXsection(); timer.Stop(); timer.Print(); }
void Sim(const Int_t nevents=10, const Int_t debLevel=0) { //make simulation of MC events and merging //with previouly reconstructed Digits from //raw event. We assume they are in dir "Bg" AliPHOSSimParam * phosSimParam = AliPHOSSimParam::GetInstance() ; AliLog::SetGlobalDebugLevel(debLevel); AliSimulation sim; sim.SetMakeSDigits("PHOS") ; sim.SetMakeDigits("PHOS") ; // sim.SetMakeDigitsFromHits("ITS TPC"); // sim.SetMakeTrigger("PHOS"); //Set path to reconstricted raw digits //and set number of simulated events per one raw sim.MergeWith("Bg/galice.root",1) ; phosSimParam->SetStreamDigits(1) ; //Mark this stream as digits and not SDigits sim.Run(nevents); }
void sim(Int_t nev=10) { AliSimulation simulator; simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO"); simulator.SetMakeDigitsFromHits("ITS TPC"); // // Ideal OCDB simulator.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); // // Mean verrtex from RAW OCDB simulator.SetSpecificStorage("GRP/Calib/MeanVertexSPD", "alien://folder=/alice/data/2010/OCDB"); // // SDD from RAW OCDB simulator.SetSpecificStorage("ITS/Calib/CalibSDD","alien://Folder=/alice/data/2010/OCDB"); // // EMCAL from RAW OCDB simulator.SetSpecificStorage("EMCAL/Calib/Data","alien://Folder=/alice/data/2010/OCDB"); // // TRD from RAW OCDB simulator.SetSpecificStorage("TRD/Calib/ChamberStatus","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("TRD/Calib/PadStatus","alien://folder=/alice/data/2010/OCDB"); // // V0 from RAW OCDB simulator.SetSpecificStorage("VZERO/Trigger/Data","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("VZERO/Calib/RecoParam","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("VZERO/Calib/Data","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("VZERO/Calib/TimeSlewing","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("VZERO/Calib/TimeDelays","alien://folder=/alice/data/2010/OCDB"); // // TOF from RAW OCDB simulator.SetSpecificStorage("TOF/Calib/Status","alien://folder=/alice/data/2010/OCDB"); // // FMD from RAW OCDB simulator.SetSpecificStorage("FMD/Calib/Pedestal", "alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("FMD/Calib/PulseGain","alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("FMD/Calib/Dead", "alien://folder=/alice/data/2010/OCDB"); simulator.SetSpecificStorage("FMD/Calib/AltroMap","alien://folder=/alice/data/2010/OCDB"); // // MUON Trigger (LuT & efficiency) simulator.SetSpecificStorage("MUON/Calib/TriggerLut","alien://folder=/alice/data/2010/OCDB"); // // MUON Trigger Chamber efficiency simulator.SetSpecificStorage("MUON/Calib/TriggerEfficiency","alien://folder=/alice/simulation/2008/v4-15-Release/Full"); // // Read GRP Data from RAW simulator.SetSpecificStorage("GRP/GRP/Data", "alien://Folder=/alice/data/2010/OCDB"); // // Vertex and Mag.field from OCDB simulator.UseVertexFromCDB(); simulator.UseMagFieldFromGRP(); // // The rest TStopwatch timer; timer.Start(); simulator.Run(nev); timer.Stop(); timer.Print(); }
/* * @file sim-hlt-tpc.C * @brief HLT Conformal mapping tracker embedded into AliRoot simulation. * * Example macro to run the HLT Conformal mapping tracker embedded into * AliRoot simulation. The reconstruction is done from the TPC digits. * * Usage: aliroot -b -q sim-hlt-tpc.C | tee sim-hlt-tpc.log * * The chain to be run is defined within the macro. The input data is * read from the TPC.Digits. * * The following options can be specified comma separated in a string: * <pre> * aliroot -b -q sim-hlt-tpc.C'("options")' * CA use the cellular automaton tracker and track merger * CM use the conformal mapping tracker and track merger * SORTED use CF pre-sorting and corresponding sequential CF * algorithm, by default the algorithm capable of reading * unsorted data is used * RAW write raw data for all detectors * RAWHLT write raw data only for HLT * MC propagate the MC information * </pre> * * The macro asumes the data to be already simulated. If it should run * within the initial simulation, comment the corresponding functions * below (SetRunGeneration etc.) * * @author [email protected] * @ingroup alihlt_tpc */ sim_hlt_tpc(const char* options="CA") { // this is just a tool to switch the logging systems AliHLTLogging log; //log.SwitchAliLog(0); /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // // scanning the options // bool bUseCA=true; // use the CA tracker and merger bool bCFSort=false; // CF pre-sorting and sequential CF algorithm bool bRawData=false;// raw data for all detectors bool bRawHLTData=false; // raw data only for HLT bool bPropagateMC=false; TString tsOptions=options; TObjArray* pTokens=tsOptions.Tokenize(","); if (pTokens) { for (int n=0; n<pTokens->GetEntries(); n++) { TString arg=((TObjString*)pTokens->At(n))->GetString(); if (arg.CompareTo("ca", TString::kIgnoreCase)==0) { bUseCA=true; } else if (arg.CompareTo("cm", TString::kIgnoreCase)==0) { bUseCA=false; } else if (arg.CompareTo("sorted", TString::kIgnoreCase)==0) { bCFSort=true; } else if (arg.CompareTo("unsorted", TString::kIgnoreCase)==0) { bCFSort=false; } else if (arg.CompareTo("raw", TString::kIgnoreCase)==0) { bRawData=true; } else if (arg.CompareTo("rawhlt", TString::kIgnoreCase)==0) { bRawHLTData=true; } else if (arg.CompareTo("mc", TString::kIgnoreCase)==0) { bPropagateMC=true; } else { cout << "unknown argument: " << arg << endl; return 0; } } delete pTokens; } // summary cout << "using " << bUseCA?"CA":"CM" << " tracker" << endl; /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // // init the HLT system in order to define the analysis chain below // AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance(); /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // // define the analysis chain // // load TPCParam from OCDB const char* cdbEntry="TPC/Calib/Parameters"; AliCDBManager* pMan=AliCDBManager::Instance(); AliTPCParam* pTPCParam=NULL; if (pMan) { if (!pMan->IsDefaultStorageSet()) { pMan->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); pMan->SetRun(0); } AliCDBEntry *pEntry = pMan->Get(cdbEntry); if (pEntry && pEntry->GetObject() && (pTPCParam=dynamic_cast<AliTPCParam*>(pEntry->GetObject()))) { } else { HLTWarning("can not load AliTPCParam from CDB entry %s", cdbEntry); } } int iMinSlice=0; int iMaxSlice=35; int iMinPart=0; int iMaxPart=5; TString mergerInput; TString writerInput; TString sinkClusterInput; for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { TString trackerInput; for (int part=iMinPart; part<=iMaxPart; part++) { TString arg, publisher, cf; // digit publisher components arg.Form("-slice %d -partition %d", slice, part); publisher.Form("DP_%02d_%d", slice, part); AliHLTConfiguration pubconf(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data()); // cluster finder components arg="-timebins "; if (pTPCParam) arg+=pTPCParam->GetMaxTBin()+1; else arg+=446; // old simulated data if (bCFSort) arg+=" -sorted "; if (bPropagateMC) arg+=" -do-mc "; cf.Form("CF_%02d_%d", slice, part); AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), arg.Data()); if (trackerInput.Length()>0) trackerInput+=" "; trackerInput+=cf; if (sinkClusterInput.Length()>0) sinkClusterInput+=" "; sinkClusterInput+=cf; } TString tracker; // tracker finder components tracker.Form("TR_%02d", slice); if (bUseCA) { AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), ""); } else { AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run"); } //add all trackers to writer input. Include if you would like all slice tracks written. //if (writerInput.Length()>0) writerInput+=" "; //writerInput+=tracker; // add all clusterfinders to the writer input if (writerInput.Length()>0) writerInput+=" "; writerInput+=trackerInput; if (mergerInput.Length()>0) mergerInput+=" "; mergerInput+=tracker; } // GlobalMerger component if (bUseCA) { AliHLTConfiguration mergerconf("globalmerger","TPCCAGlobalMerger",mergerInput.Data(),""); } else { AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),""); } TString converterInput="globalmerger"; // collector for the MC information to be propagated from CFs to ESDConverter if (bPropagateMC){ AliHLTConfiguration mcinfo("mcinfo", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLMCINFO' 'TPC '"); AliHLTConfiguration mcTrackMarker("mcTrackMarker","TPCTrackMCMarker","globalmerger mcinfo","" ); converterInput+=" mcTrackMarker"; } if (writerInput.Length()>0) writerInput+=" "; writerInput+="globalmerger"; ////////////////////////////////////////////////////////////////////////////////////////// // // output section // ////////////////////////////////////////////////////////////////////////////////////////// // sink1: id=sink-writeall write all blocks AliHLTConfiguration sink1("sink-writeall", "FileWriter" , writerInput.Data(), "-specfmt -subdir=event_%d -blcknofmt=_0x%x -idfmt=_0x%08x"); ////////////////////////////////////////////////////////////////////////////////////////// // sink2: id=sink-esd-file write ESD using the TPCEsdWriter AliHLTConfiguration sink2("sink-esd-file", "TPCEsdWriter" , converterInput.Data(), "-datafile AliHLTESDs.root"); ////////////////////////////////////////////////////////////////////////////////////////// // sink3: id=sink-esd add ESD to HLTOUT using the TPCEsdConverter // the esd converter configuration AliHLTConfiguration sink3("sink-esd", "TPCEsdConverter" , converterInput.Data(), ""); ////////////////////////////////////////////////////////////////////////////////////////// // sink4: id=sink-clusters add cluster data blocks to HLTOUT AliHLTConfiguration sink4("sink-clusters", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '"); /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // // Init and run the HLT simulation // All but HLT simulation is switched off // AliSimulation sim; // switch of simulation and data generation // comment all that stuff to also simulate the events and data sim.SetRunGeneration(kFALSE); sim.SetMakeDigits(""); sim.SetMakeSDigits(""); sim.SetMakeDigitsFromHits(""); //sim.SetMakeTrigger(""); sim.SetRunQA(":"); // the normal simulation sets the specific storage for the GRP entry if (gSystem->AccessPathName("GRP/GRP/Data")) { cerr << "*********************************************************" << endl; cerr << "error: no GRP entry found in the currect directory, simulation might be incomplete. Skip setting specific storage for GRP entry" << endl; cerr << "*********************************************************" << endl << endl; } else { sim.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); } TString rawDataSelection="HLT"; if (bRawData) rawDataSelection="ALL"; if (bRawHLTData || bRawData) sim.SetWriteRawData(rawDataSelection, "raw.root", kTRUE); // set the options for the HLT simulation sim.SetRunHLT("libAliHLTUtil.so libAliHLTTPC.so loglevel=0x7c " "chains=sink-esd,sink-clusters"); sim.Run(); }
void sim(Int_t nev=10) { AliSimulation simulator; simulator.SetWriteRawData("","raw.root",kTRUE); simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON ZDC PMD T0 VZERO FMD"); simulator.SetMakeDigits("ITS TPC TRD TOF PHOS HMPID EMCAL MUON ZDC PMD T0 VZERO FMD"); simulator.SetMakeDigitsFromHits("ITS TPC"); // // // RAW OCDB simulator.SetDefaultStorage("alien://Folder=/alice/data/2010/OCDB"); // Specific storages = 26 // // ITS (1 Total) // Alignment from Ideal OCDB simulator.SetSpecificStorage("ITS/Align/Data", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal"); // // MUON (1 Total) // MCH simulator.SetSpecificStorage("MUON/Align/Data", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); // // TPC (24 total) simulator.SetSpecificStorage("TPC/Calib/PadGainFactor", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/TimeGain", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/GainFactorDedx", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/PadTime0", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Distortion", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/PadNoise", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/PadNoise", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Pedestals", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Temperature", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Parameters", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/ClusterParam", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/AltroConfig", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Pulser", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Pulser", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/CE", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Mapping", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Correction", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Align/Data", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Goofie", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/TimeDrift", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/Raw", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/QA", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("TPC/Calib/HighVoltage", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); // // Vertex and Mag.field from OCDB // simulator.UseVertexFromCDB(); simulator.UseMagFieldFromGRP(); // // The rest // simulator.SetRunQA(":"); simulator.Run(nev); }
void sim() { Int_t nev = -1; Int_t run = 0; Int_t nskip = 0; const char *fname; // char fnaneopt[1024]; const char *esdname; const char *trgname; const char *embrun; const char *runtype; const char *fnameopt; if (gSystem->Getenv("DC_RUN")) { run = atoi(gSystem->Getenv("DC_RUN")); } if (gSystem->Getenv("DC_RAWFILE")) { fname = gSystem->Getenv("DC_RAWFILE"); } else { printf("DC_RAWFILE is not set and is needed!!!"); return; } if (gSystem->Getenv("DC_ESDFILE")) { esdname = gSystem->Getenv("DC_ESDFILE"); } else { printf("DC_ESDFILE is not set and is needed!!!"); return; } if (gSystem->Getenv("DC_NEVENTS")) { nev = atoi(gSystem->Getenv("DC_NEVENTS")); // gSystem->Exec("echo ${DC_NEVENTS} > ${DC_NEVENTS}_${DC_NEVENTS}_0_${DC_NEVENTS}.stat"); // moved after selection! } if (gSystem->Getenv("DC_EEVENT")) { nskip = atoi(gSystem->Getenv("DC_EEVENT")); } if (gSystem->Getenv("DC_TRGNAME")) { trgname = gSystem->Getenv("DC_TRGNAME"); printf("Looking for %s\n",trgname); } else { printf("DC_TRGNAME not set, will embedd in all events!!!"); return; } if (gSystem->Getenv("CONFIG_EMBEDDING")) { embrun = gSystem->Getenv("CONFIG_EMBEDDING"); } else { printf("CONFIG_EMBEDDING is not set and is needed"); return; } if (gSystem->Getenv("CONFIG_RUN_TYPE")) { runtype = gSystem->Getenv("CONFIG_RUN_TYPE"); } else { printf("CONFIG_RUN_TYPE is not set and is needed"); return; } TString sfname(fname); printf("sim.C: running in %s mode on run %d for %d events and skipping %d esd events\n",embrun,run,nev,nskip); printf("sim.C: rawfile %s and esdfile %s \n",sfname.Data(),esdname); AliSimulation simulator; // BACKGROUND: Convert raw data to SDigits if (!(strcmp(embrun,"kBackground"))){ AliCDBManager *cdbm = AliCDBManager::Instance(); cdbm->SetDefaultStorage("alien://Folder=/alice/data/2011/OCDB"); cdbm->SetRun(run); AliGRPManager grpM; grpM.ReadGRPEntry(); grpM.SetMagField(); printf("Field is locked now. It cannot be changed in Config.C\n"); simulator.SetMakeSDigits("MUON ITS"); // only physics events sfname += "?EventType=7"; // select one trigger ... if (trgname){ AliCDBEntry *grp_ctp = cdbm->Get("GRP/CTP/Config",run); AliTriggerConfiguration *trg_conf = (AliTriggerConfiguration *)grp_ctp->GetObject(); trg_conf->Print(); TObjArray trg_masks = trg_conf->GetClasses(); // Reference!!! std::vector<unsigned char> triggerconfs; for(Int_t iobj = 0; iobj < trg_masks.GetEntriesFast(); iobj++){ AliTriggerClass *trg_class = (AliTriggerClass*)trg_masks.UncheckedAt(iobj); AliTriggerCluster *trg_clust = (AliTriggerCluster *)trg_class->GetCluster(); // printf("%s %s \n",trg_class->GetName(),trgname); if(TString(trg_class->GetName()).Contains(trgname)){ printf("We will embed into events containing this trigger name(mask): %s(%d)\n",trg_class->GetName(),trg_class->GetMask()); char triggerbuf[256]; sprintf(triggerbuf, "?Trigger=%d", trg_class->GetMask()); sfname += triggerbuf; // triggerconfs.push_back(trg_class->GetMask()); } } // Int_t itrg = 0; // printf("Number of Trigger Clusters including MUON: %d\n", (Int_t)triggerconfs.size()); // for(std::vector<unsigned char>::iterator it = triggerconfs.begin(); it < triggerconfs.end(); it++) // printf("Trigger Mask %d for MUON: %d\n", itrg++, *it); // filestring += "?EventType=7"; // char triggerbuf[256]; // Int_t triggerval = 0; // for(std::vector<unsigned char>::iterator it = triggerconfs.begin(); it < triggerconfs.end(); it++) // triggerval += *it; // sprintf(triggerbuf, "?Trigger=%d", triggerval); // filestring += triggerbuf; // This line does the trigger selection. It has to be uncommented if one wants to apply trigger selection } printf("Filename: %s\n", sfname.Data()); Int_t iSelEvents = simulator.ConvertRaw2SDigits(sfname.Data(),esdname,nev,nskip); gSystem->Setenv("DC_NEVENTS",Form("%d",iSelEvents)); gSystem->Exec("echo $DC_NEVENTS > selev.log"); // gSystem->Exec("echo ${DC_NEVENTS} > ${DC_NEVENTS}_${DC_NEVENTS}_0_${DC_NEVENTS}.stat"); // done in simrun.C gSystem->Exec("echo in sim.C $DC_NEVENTS"); return; } // Signal: pure signal if (!(strcmp(embrun,"kSignal"))){ if (!gSystem->Getenv("DC_NEVENTS")) { printf("DC_NEVENTS is not set and is needed at this step!!!"); return; } AliCDBManager *cdbm = AliCDBManager::Instance(); cdbm->SetDefaultStorage("alien://Folder=/alice/data/2011/OCDB"); cdbm->SetRun(run); AliGRPManager grpM; grpM.ReadGRPEntry(); grpM.SetMagField(); printf("Field is locked now. It cannot be changed in Config.C\n"); simulator.SetRunGeneration(kFALSE); simulator.SetMakeSDigits(""); simulator.SetMakeDigitsFromHits(""); } // MERGED: Simulate signal and merge with background if (!(strcmp(embrun,"kMerged"))){ simulator.SetRunGeneration(kTRUE); simulator.SetMakeSDigits("MUON ITS"); simulator.EmbedInto("Background/galice.root",1); // THE OCDB PART simulator.SetDefaultStorage("alien://Folder=/alice/data/2011/OCDB"); // Read GRP Data from RAW simulator.SetSpecificStorage("GRP/GRP/Data","alien://Folder=/alice/data/2011/OCDB"); } simulator.SetRunSimulation(kTRUE); simulator.SetMakeDigits("MUON ITS"); simulator.SetRunHLT(""); // simulator.SetRunHLT("libAliHLTMUON.so chains=dHLT-sim"); simulator.SetRunQA(":"); // simulator.SetRunQA("MUON:ALL"); // Mag.field from OCDB simulator.UseMagFieldFromGRP(); // THE OCDB PART // MUON // simulator.SetSpecificStorage("MUON/Calib/Gains","alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); simulator.SetSpecificStorage("MUON/Align/Data","alien://Folder=/alice/simulation/2008/v4-15-Release/Full/"); // MUON Trigger // simulator.SetSpecificStorage("MUON/Calib/GlobalTriggerCrateConfig","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal"); // simulator.SetSpecificStorage("MUON/Calib/LocalTriggerBoardMasks","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal"); // simulator.SetSpecificStorage("MUON/Calib/RegionalTriggerConfig","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal"); // simulator.SetSpecificStorage("MUON/Calib/TriggerEfficiency","alien://folder=/alice/simulation/2008/v4-15-Release/Full"); // The rest simulator.Run(nev); }