6 #include "TClonesArray.h"
9 #include "TGeoManager.h"
11 #include "FairRootManager.h"
15 #include "FairRunAna.h"
16 #include "FairRuntimeDb.h"
17 #include "FairGeoNode.h"
19 #include "FairGeoNode.h"
20 #include "FairGeoVector.h"
28 FairTask(
"Hyp Strip Hit Producer")
54 Int_t nrTopFE, Int_t nrBotFE, Int_t nrFECh,
57 FairTask(
"Hyp Strip Hit Producer")
73 SetParamSet(topPitch,botPitch,ori,skew,topAnchor,botAnchor,nrTopFE,nrBotFE,
74 nrFECh,threshold,noise,
"Rect",feType);
76 std::cout <<
"Hyp Strip Hit Producer initiated" << std::endl;
83 Int_t nrTopFE, Int_t nrBotFE, Int_t nrFECh,
87 FairRunAna* ana = FairRunAna::Instance();
125 FairRunAna* ana = FairRunAna::Instance();
126 FairRuntimeDb*
rtdb=ana->GetRuntimeDb();
130 std::cout <<
"fdigi par init" << std::endl;
153 FairRootManager* ioman = FairRootManager::Instance();
159 std::cout <<
"-E- PndHypStripHitProducer::Init: "
160 <<
"RootManager not instantiated!" << std::endl;
167 std::cout <<
"-W- PndHypStripHitProducer::Init: "
168 <<
"No HypPoint array!" << std::endl;
178 ioman->Register(
"HypStripDigis",
"Hyp",
fStripArray, kTRUE);
186 std::cout <<
"-I- PndHypStripHitProducer: Initialisation successfull" << std::endl;
191 std::cout<<
"-E- MvdStripHitProducer: DigiPar Container does not exist!"<<std::endl;
248 std::cout<<
" Nr of Points: "<<nPoints<<std::endl;
277 for (Int_t iPoint = 0; iPoint < nPoints; iPoint++)
289 std::cout<<
"No Point!" << std::endl;
293 std::cout <<
"****Global Point: " << std::endl;
298 TVector3 posIn,posOut;
306 std::cout <<
"Local Hits: " << std::endl;
312 std::cout <<
"Energy: " << point->GetEnergyLoss() << std::endl;
318 if (
fVerbose > 2) std::cout<<
"Sensor Size : x="
319 <<size.x()*2.<<
" , y="
320 <<size.y()*2.<<
" , z ="
321 <<size.z()*2.<<std::endl;
323 TVector2 anchor(-size.x(),size.y());
327 std::cout <<
"Top Side: " << std::endl;
336 Int_t rfetop = Int_t(sttop+0.5);
337 Int_t rtfe = Int_t((rfetop/128)+0.5);
341 std::cout<<
" tof fe "<<Int_t(rfetop/128)<<
" total strips "<<rfetop<<std::endl;
347 std::vector<PndHypStrip> topStrips =
349 posOutL.X(), posOutL.Y(), posOutL.Z(),
350 point->GetEnergyLoss(),nSiL);
352 if (topStrips.size() != 0){
355 std::cout <<
"SensorStrips: top " << topStrips.size()<<std::endl;
366 for(std::vector<PndHypStrip>::const_iterator it=topStrips.begin();
367 it!= topStrips.end();it++)
378 if (
fVerbose > 1)std::cout << *it <<
" "<<topStrips[iStrip] << std::endl;
381 }
else if(
fVerbose>2) std::cout<<
"Top side empty"<<std::endl;
388 std::cout <<
"Bottom Side: " << std::endl;
398 Int_t rfebot = Int_t(stbot);Int_t rbfe = Int_t(rfebot/128);
403 std::cout<<
" bof fe "<<Int_t(rfebot/128)<<
" total strips "<<rfebot<<std::endl;
408 std::vector<PndHypStrip> botStrips =
410 posOutL.X(), posOutL.Y(), posOutL.Z(),
411 point->GetEnergyLoss(),nSiL);
413 if (botStrips.size() != 0){
419 std::cout <<
"SensorStrips: bot " << botStrips.size()<<std::endl;
426 for(std::vector<PndHypStrip>::const_iterator it=botStrips.begin();
427 it!= botStrips.end();++it)
438 std::cout << *it << std::endl;
443 }
else if(
fVerbose>2) std::cout<<
"Bottom side empty"<<std::endl;
448 std::cout <<
"-I- PndHypStripHitProducer: " << nPoints <<
" HypPoints, "
449 <<
" Hits created." <<
" " << iStrip<< std::endl;
528 TGeoVolume* actVolume =
gGeoManager->GetCurrentVolume();
529 TGeoBBox* actBox = (TGeoBBox*)(actVolume->GetShape());
531 result.SetX(actBox->GetDX());
532 result.SetY(actBox->GetDY());
533 result.SetZ(actBox->GetDZ());
virtual InitStatus ReInit()
PndHypStripDigiPar * fCurrentDigiPar
Double_t GetBotPitch() const
Int_t CalcFEfromStrip(Int_t stripNr) const
void SetTopAnchor(TVector2 x)
void SetreStrip(Int_t reStp)
void SetBotPitch(Double_t x)
PndHypCalcStrip * fStripCalcBot
virtual void SetParContainers()
Class to access the naming information of the MVD.
virtual void Print(const Option_t *opt) const
TVector3 GetSensorDimensions(std::string detName) const
Int_t GetVolumeID() const
Int_t CalcChannelfromStrip(Int_t stripNr) const
void SetBotAnchor(TVector2 x)
TGeoManager * gGeoManager
PndHypCalcStrip * fStripCalcTop
TVector2 botAnchor(0., 0.)
void SetNoise(Double_t x)
void SetSensType(TString x)
TClonesArray * fStripArray
void PositionIn(TVector3 &pos)
TString GetPath(TString id)
for a given ID the path is returned
Bool_t fOverrideParams
internal Flag that controls use of Parameter Invocations
void SetAnchor(TVector2 edge)
virtual ~PndHypStripHitProducer()
virtual InitStatus Init()
std::vector< PndHypStrip > GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss, int id)
void SetTopPitch(Double_t x)
void SetVerboseLevel(Int_t level)
void PositionOut(TVector3 &pos)
PndHypGeoHandling * fGeoH
void SetFeType(TString x)
TString GetDetName() const
TVector3 MasterToLocalId(const TVector3 &master, const TString &id)
void SetThreshold(Double_t x)
void SetOrient(Double_t x)
PndHypStripDigiPar * fDigiPar
Hit Producer Task for strip detectors.
Double_t GetTopPitch() const
virtual void Exec(Option_t *opt)
void SetParamSet(Double_t topPitch, Double_t botPitch, Double_t ori, Double_t skew, TVector2 topAnchor, TVector2 botAnchor, Int_t nrTopFE, Int_t nrBotFE, Int_t nrFECh, Double_t threshold, Double_t noise, TString sensorType, TString feType)
TVector2 topAnchor(0., 0.)
TClonesArray * fPointArray