7 #include "TClonesArray.h"
10 #include "TGeoManager.h"
12 #include "FairRootManager.h"
16 #include "FairRuntimeDb.h"
17 #include "FairGeoNode.h"
18 #include "FairRuntimeDb.h"
19 #include "FairGeoNode.h"
20 #include "FairGeoVector.h"
28 PndSdsTask(
"SSD Strip Digi Producer(PndSdsStripHitProducerDif)")
55 Int_t nrTopFE, Int_t nrBotFE, Int_t nrFECh,
62 std::cout <<
" -W- Obsolete constructor for PndSdsStripHitProducer called."
63 <<
"Ssd strip sensors in barrel and disk are set to the SAME."<< std::endl;
67 SetParamSet(topPitch,botPitch,ori,skew,topAnchor,botAnchor,nrTopFE,nrBotFE,
68 nrFECh,threshold,noise,
"Rect",feType);
69 SetParamSet(topPitch,botPitch,ori,skew,topAnchor,botAnchor,nrTopFE,nrBotFE,
70 nrFECh,threshold,noise,
"Trap",feType);
71 std::cout <<
"SSD Strip Digi Producer initiated" << std::endl;
78 Int_t nrTopFE, Int_t nrBotFE, Int_t nrFECh,
82 FairRun* ana = FairRun::Instance();
123 FairRun* ana = FairRun::Instance();
124 FairRuntimeDb*
rtdb=ana->GetRuntimeDb();
140 FairRootManager* ioman = FairRootManager::Instance();
149 std::cout <<
"-E- PndSdsStripHitProducer::Init: "
150 <<
"RootManager not instantiated!" << std::endl;
157 std::cout <<
"-W- PndSdsStripHitProducer::Init: "
158 <<
"No SSDPoint array!" << std::endl;
174 std::cout <<
"-I- PndSdsStripHitProducer: Initialisation successfull" << std::endl;
178 std::cout<<
"-E- PndSdsStripHitProducer: DigiPar Rect Container does not exist!"<<std::endl;
182 std::cout<<
"-E- PndSdsStripHitProducer: DigiPar Trap Container does not exist!"<<std::endl;
221 std::cout<<
" Nr of Points: "<<nPoints<<std::endl;
226 for (Int_t iPoint = 0; iPoint < nPoints; iPoint++)
236 std::cout<<
"No Point!" << std::endl;
240 std::cout <<
"****Global Point: " << std::endl;
249 posInL.Print();posOutL.Print();
250 std::cout <<
"Energy: " << point->GetEnergyLoss() << std::endl;
255 if (
fVerbose > 2) std::cout <<
"Top Side: " << std::endl;
257 std::vector<PndSdsStrip> topStrips =
259 posOutL.X(), posOutL.Y(), posOutL.Z(),
260 point->GetEnergyLoss());
262 if (topStrips.size() != 0)
264 if (
fVerbose > 1) std::cout <<
"SensorStrips: " << std::endl;
265 for(std::vector<PndSdsStrip>::const_iterator kit=topStrips.begin();
266 kit!= topStrips.end(); ++kit)
271 if (
fVerbose > 1) std::cout << *kit << std::endl;
273 }
else if(
fVerbose>2) std::cout<<
"Top side empty"<<std::endl;
276 if (
fVerbose > 2) std::cout <<
"Bottom Side: " << std::endl;
277 std::vector<PndSdsStrip> botStrips =
279 posOutL.X(), posOutL.Y(), posOutL.Z(),
280 point->GetEnergyLoss());
281 if (botStrips.size() != 0)
283 if (
fVerbose > 2) std::cout <<
" SensorStrips: " << std::endl;
284 for(std::vector<PndSdsStrip>::const_iterator kit=botStrips.begin();
285 kit!= botStrips.end();
291 if (
fVerbose > 2) std::cout << *kit << std::endl;
293 }
else if(
fVerbose>2) std::cout<<
"Bottom side empty"<<std::endl;
298 if(
fVerbose > 1) std::cout <<
"-I- PndSdsStripHitProducer: " << nPoints <<
" PndSdsMCPoints, "
299 << iStrip <<
" Digis created."<< std::endl;
307 for(Int_t kstr = 0; kstr < iStrip && found==kFALSE ; kstr++)
312 aDigi->
GetFE() == fe &&
421 if( !(detpath.Contains(
"Strip")) )
433 if (
fVerbose > 1) std::cout<<
"detector name does not contain 'Rect' or 'Trap'"<<std::endl;
434 if (
fVerbose > 2) std::cout<<
" DetName : "<<detpath<<std::endl;
void SetOrient(Double_t x)
virtual void Exec(Option_t *opt)
PndSdsCalcStripDif * fCurrentStripCalcTop
TClonesArray * fPointArray
virtual InitStatus ReInit()
PndSdsStripDigiPar * fDigiParTrap
Int_t GetSensorID() const
virtual void AddIndex(int index)
virtual ~PndSdsStripHitProducerDif()
virtual void SetBranchNames()=0
PndSdsStripHitProducerDif()
const char * GetSensType() const
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)
void AddCharge(double charge)
void SetBotPitch(Double_t x)
Class for calculating strip indices from wafer hits.
virtual void SetParContainers()
void SetVerboseLevel(Int_t level)
Class for digitised strip hits.
void SetTopPitch(Double_t x)
fDetectorType fMCPointType
virtual void SetParContainers()
void AddDigi(Int_t &iStrip, Int_t iPoint, Int_t detID, Int_t sensorID, Int_t fe, Int_t chan, Double_t charge)
TVector3 GetPositionOut() const
PndSdsCalcStripDif * fStripCalcBotRect
PndSdsStripDigiPar * fCurrentDigiPar
Int_t GetSensorID() const
ClassImp(PndSdsStripHitProducerDif)
TString GetPath(Int_t shortID)
for a given shortID the path is returned
PndSdsCalcStripDif * fCurrentStripCalcBot
TVector2 botAnchor(0., 0.)
Int_t CalcChannelfromStrip(Int_t stripNr) const
virtual InitStatus Init()
void SetBotAnchor(TVector2 x)
PndSdsCalcStripDif * fStripCalcBotTrap
void SetNoise(Double_t x)
Int_t CalcFEfromStrip(Int_t stripNr) const
virtual void SetMCPointType()=0
void SetTopAnchor(TVector2 x)
Digitization Parameter Class for MVD-Strip part.
PndSdsStripDigiPar * fDigiParRect
Digitization Parameters.
TClonesArray * fStripArray
Output array of PndSdsHits.
Hit Producer Task for strip detectors with electron diffusion.
static PndGeoHandling * Instance()
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
void SetSensType(TString x)
std::vector< PndSdsStrip > GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss)
TVector3 GetPosition() const
Bool_t SelectSensorParams(Int_t sensorID)
void SetFeType(TString x)
PndSdsCalcStripDif * fStripCalcTopRect
Calculator objects.
void SetThreshold(Double_t x)
PndSdsCalcStripDif * fStripCalcTopTrap
virtual void Print(const Option_t *opt=0) const
TVector2 topAnchor(0., 0.)