25 #include <TClonesArray.h> 
   27 #include <TGeoManager.h> 
   29 #include <TGeoVolume.h> 
   60     LOG(info) << 
"Created PixelFindHits.";
 
   78     LOG(debug) << 
"PixelFindHits::Exec() EVENT " << fTNofEvents;
 
   82     fNDigis = fDigis->GetEntriesFast();
 
   83     fTNofDigis += fNDigis;
 
   85     for (Int_t iDigi = 0; iDigi < fNDigis; iDigi++) {
 
   89         TString nodeName = Form(
"/cave/Pixel%d_%d", detId / 256, detId % 256);
 
   91         gGeoManager->cd(nodeName.Data());
 
   92         TGeoNode* curNode = gGeoManager->GetCurrentNode();
 
   96         TGeoVolume* actVolume = gGeoManager->GetCurrentVolume();
 
   97         TGeoBBox* actBox = 
static_cast<TGeoBBox*
>(actVolume->GetShape());
 
   99         Int_t feId = currentDigi->
GetFeID();
 
  100         Int_t col = currentDigi->
GetCol();
 
  101         Int_t row = currentDigi->
GetRow();
 
  103         Double_t locPosCalc[3];
 
  104         locPosCalc[0] = (((feId - 1) / fMaxFEperCol) * fFeCols + col + 0.5) * fPitchX;
 
  105         locPosCalc[1] = (((feId - 1) % fMaxFEperCol) * fFeRows + row + 0.5) * fPitchY;
 
  108         locPosCalc[0] -= actBox->GetDX();
 
  109         locPosCalc[1] -= actBox->GetDY();
 
  113         curNode->LocalToMaster(locPosCalc, globPos);
 
  115         LOG(debug) << 
"HIT   ON " << detId << 
" POSITION:  " << locPosCalc[0] << 
" / " << locPosCalc[1];
 
  116         LOG(debug) << 
"GLOB HIT " << detId << 
" POSITION:  " << globPos[0] << 
" / " << globPos[1] << 
" / " 
  119         TVector3 pos(globPos[0], globPos[1], globPos[2]);
 
  120         TVector3 posErr(fPitchX / TMath::Sqrt(12.), fPitchY / TMath::Sqrt(12.), actBox->GetDZ());
 
  122         new ((*fHits)[fNHits]) 
PixelHit(detId, currentDigi->
GetIndex(), pos, posErr);
 
  130 void PixelFindHits::SetParContainers()
 
  135         LOG(fatal) << 
"No analysis run";
 
  139         LOG(fatal) << 
"No runtime database";
 
  148     tempList->Add(fDigiPar);
 
  155     LOG(info) << 
"********************************************** PixelFindHits::InitMQ()";
 
  156     fDigiPar = (
PixelDigiPar*)tempList->FindObject(
"PixelDigiParameters");
 
  164     LOG(info) << 
">> fFeCols      = " << fFeCols;
 
  165     LOG(info) << 
">> fFeRows      = " << fFeRows;
 
  166     LOG(info) << 
">> fMaxFEperCol = " << fMaxFEperCol;
 
  167     LOG(info) << 
">> fPitchX      = " << fPitchX;
 
  168     LOG(info) << 
">> fPitchY      = " << fPitchY;
 
  170     fHits = 
new TClonesArray(
"PixelHit", 10000);
 
  181     fDigis = (TClonesArray*)inputList->FindObject(
"PixelDigis");
 
  182     outputList->Add(fHits);
 
  193         LOG(fatal) << 
"No FairRootManager";
 
  194     fDigis = 
static_cast<TClonesArray*
>(ioman->
GetObject(
"PixelDigis"));
 
  197         LOG(warn) << 
"PixelFindHits::Init() No input PixelDigis array!";
 
  200     fHits = 
new TClonesArray(
"PixelHit", 10000);
 
  201     ioman->
Register(
"PixelHits", 
"Pixel", fHits, kTRUE);
 
  203     LOG(info) << 
"-I- " << fName.Data() << 
"::Init(). Initialization succesfull.";
 
  211     LOG(info) << 
"PixelFindHits::SetParContainers() Pixel detector with pitch size " << fPitchX << 
"cm x" << fPitchY
 
  219 void PixelFindHits::Reset()
 
  221     fNDigis = fNHits = 0;
 
  226 void PixelFindHits::Finish()
 
  231     LOG(info) << 
"-------------------- " << fName.Data() << 
" : Summary ------------------------";
 
  232     LOG(info) << 
" Events:        " << fTNofEvents;
 
  233     LOG(info) << 
" Digis:         " << fTNofDigis << 
"    (" 
  234               << 
static_cast<Double_t
>(fTNofDigis) / (static_cast<Double_t>(fTNofEvents)) << 
" per event)";
 
  235     LOG(info) << 
" Hits:          " << fTNofHits << 
"    (" 
  236               << 
static_cast<Double_t
>(fTNofHits) / (static_cast<Double_t>(fTNofEvents)) << 
" per event)";
 
  237     LOG(info) << 
"---------------------------------------------------------------------";
 
list of container factories 
virtual void ExecMQ(TList *inputList, TList *outputList)
Double_t GetYPitch() const 
static FairRun * Instance()
virtual void InitMQ(TList *tempList)
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
Digitization Parameter Class for Pixel detector. 
TObject * GetObject(const char *BrName)
FairParSet * getContainer(const Text_t *)
FairRuntimeDb * GetRuntimeDb(void)
void Register(const char *name, const char *Foldername, TNamed *obj, Bool_t toFile)
virtual void Exec(Option_t *opt)
Double_t GetXPitch() const 
virtual void GetParList(TList *tempList)
Int_t GetMaxFEperCol() const