AliPhysics  5eaf189 (5eaf189)
SPDAcceptance.C
Go to the documentation of this file.
1 void
2 SPDAcceptance(Int_t runNo=118560, Int_t year=2010)
3 {
4  AliCDBManager* cdb = AliCDBManager::Instance();
5  cdb->SetDefaultStorage(Form("alien://Folder=/alice/data/%d/OCDB",year));
6  cdb->SetSpecificStorage("ITS/Calib/CalibSSD",
7  Form("alien://Folder=/alice/data/%d/OCDB",2012));
8  cdb->SetRun(runNo);
9  AliGeomManager::LoadGeometry();
10 
11  AliITSInitGeometry* itsInit = new AliITSInitGeometry();
12  AliITSgeom* itsGeom = itsInit->CreateAliITSgeom();
13  AliITSChannelStatus* itsStatus = new AliITSChannelStatus(cdb);
14 
15  Int_t spdFirst = itsGeom->GetStartSPD();
16  Int_t spdLast = 79; // itsGeom->GetLastSPD();
17 
18  Info("", "SPD range: %d - %d", spdFirst, spdLast);
19  for (Int_t i = spdFirst; i <= spdLast; i++) {
20  Double_t loc[] = { 0, 0, 0 };
21  Double_t glb[] = { 0, 0, 0 };
22  if (!AliITSgeomTGeo::LocalToGlobal(i, loc, glb)) continue;
23  Double_t r = TMath::Sqrt(glb[0]*glb[0] + glb[1]*glb[1]);
24  Double_t p = TMath::ATan2(glb[1], glb[0]) * TMath::RadToDeg();
25  if (p < 0) p += 360;
26  Printf("Module %3d: (x,y,z)=%10.6f,%10.6f,%10.6f, (r,phi)=%10.6f,%10.6f",
27  i, glb[0], glb[1], glb[2], r, p);
28  }
29 }
double Double_t
Definition: External.C:58
void SPDAcceptance(Int_t runNo=118560, Int_t year=2010)
Definition: SPDAcceptance.C:2
int Int_t
Definition: External.C:63