#include "../AliHLTTriggerDetectorGeomRectangle.h"
#include "../AliHLTTriggerDecisionParameters.h"
void CreateDetectorGeomsPhos()
{
bool mod[5] = {false, false, true, true, true};
TObjArray *geomConf = new TObjArray();
// geomConf->SetName("GeomConfig");
// Make the geometry objects
for(int i = 0; i < 5; i++)
{
if(mod[i])
{
AliHLTTriggerDetectorGeom *tmpDet= new AliHLTTriggerDetectorGeomRectangle();
char tmpName[128];
sprintf(tmpName, "PHOS_%d", i);
TString name = tmpName;
tmpDet->SetDetName(name);
tmpDet->SetEtaMin(-0.12);
tmpDet->SetEtaMax(0.12);
float phiModule = 230 + i*20;
float phiMin = (phiModule - 10)*TMath::DegToRad();
float phiMax = (phiModule + 10)*TMath::DegToRad();
tmpDet->SetPhiMin(phiMin);
tmpDet->SetPhiMax(phiMax);
Double_t nX = TMath::Cos(TMath::DegToRad()*phiModule);
Double_t nY = TMath::Sin(TMath::DegToRad()*phiModule);
Double_t nZ = 0;
Double_t normVector[3] = {nX, nY, nZ};
Double_t pX = TMath::Cos(TMath::DegToRad()*phiModule)*460;
Double_t pY = TMath::Sin(TMath::DegToRad()*phiModule)*460;
Double_t pZ = 0;
Double_t initialPoint[3] = {pX, pY, pZ};
tmpDet->SetNormVector(normVector);
tmpDet->SetInitialPoint(initialPoint);
tmpDet->PrintDetectorGeom(cout);
geomConf->AddLast(tmpDet);
}
}
// Make the decision object
AliHLTTriggerDecisionParameters *pars = new AliHLTTriggerDecisionParameters();
pars->SetTriggerName(TString("PHOSgeomtrigger"));
pars->SetReadoutListParameter(AliHLTReadoutList::kPHOS);
pars->SetDescription(TString("Track in PHOS"));
geomConf->AddLast(pars);
TFile *fin = TFile::Open("PHOSgeomtrigger.root", "RECREATE");
geomConf->Write("GeomConf", TObject::kSingleKey);
}
CreateDetectorGeomsPhos.C:1 CreateDetectorGeomsPhos.C:2 CreateDetectorGeomsPhos.C:3 CreateDetectorGeomsPhos.C:4 CreateDetectorGeomsPhos.C:5 CreateDetectorGeomsPhos.C:6 CreateDetectorGeomsPhos.C:7 CreateDetectorGeomsPhos.C:8 CreateDetectorGeomsPhos.C:9 CreateDetectorGeomsPhos.C:10 CreateDetectorGeomsPhos.C:11 CreateDetectorGeomsPhos.C:12 CreateDetectorGeomsPhos.C:13 CreateDetectorGeomsPhos.C:14 CreateDetectorGeomsPhos.C:15 CreateDetectorGeomsPhos.C:16 CreateDetectorGeomsPhos.C:17 CreateDetectorGeomsPhos.C:18 CreateDetectorGeomsPhos.C:19 CreateDetectorGeomsPhos.C:20 CreateDetectorGeomsPhos.C:21 CreateDetectorGeomsPhos.C:22 CreateDetectorGeomsPhos.C:23 CreateDetectorGeomsPhos.C:24 CreateDetectorGeomsPhos.C:25 CreateDetectorGeomsPhos.C:26 CreateDetectorGeomsPhos.C:27 CreateDetectorGeomsPhos.C:28 CreateDetectorGeomsPhos.C:29 CreateDetectorGeomsPhos.C:30 CreateDetectorGeomsPhos.C:31 CreateDetectorGeomsPhos.C:32 CreateDetectorGeomsPhos.C:33 CreateDetectorGeomsPhos.C:34 CreateDetectorGeomsPhos.C:35 CreateDetectorGeomsPhos.C:36 CreateDetectorGeomsPhos.C:37 CreateDetectorGeomsPhos.C:38 CreateDetectorGeomsPhos.C:39 CreateDetectorGeomsPhos.C:40 CreateDetectorGeomsPhos.C:41 CreateDetectorGeomsPhos.C:42 CreateDetectorGeomsPhos.C:43 CreateDetectorGeomsPhos.C:44 CreateDetectorGeomsPhos.C:45 CreateDetectorGeomsPhos.C:46 CreateDetectorGeomsPhos.C:47 CreateDetectorGeomsPhos.C:48 CreateDetectorGeomsPhos.C:49 CreateDetectorGeomsPhos.C:50 CreateDetectorGeomsPhos.C:51 CreateDetectorGeomsPhos.C:52 CreateDetectorGeomsPhos.C:53 CreateDetectorGeomsPhos.C:54 CreateDetectorGeomsPhos.C:55 CreateDetectorGeomsPhos.C:56 CreateDetectorGeomsPhos.C:57 CreateDetectorGeomsPhos.C:58 CreateDetectorGeomsPhos.C:59 CreateDetectorGeomsPhos.C:60 CreateDetectorGeomsPhos.C:61 CreateDetectorGeomsPhos.C:62 CreateDetectorGeomsPhos.C:63 CreateDetectorGeomsPhos.C:64 CreateDetectorGeomsPhos.C:65