11 #include "FairRootManager.h"
12 #include "FairRuntimeDb.h"
14 #include "TParticle.h"
18 :lDataReader(datareader),lStoreHits(StoreHits),lOnlyPrompt(kFALSE),lOnlyTagged(kFALSE),lDebug(debuglevel),IsInit(kFALSE)
24 FairRootManager* ioman = FairRootManager::Instance();
26 printf(
"-E- PndEmcHitProducer::Init: RootManager not instantiated!\n");
30 lHitArray =
new TClonesArray(
"PndEmcHit");
39 printf(
"Reading info from PndEmcDigiPar\n");
50 printf(
"PndEmcReadProtoData: Init successfull\n");
59 FairRun*
run = FairRun::Instance();
60 if ( ! run ) Fatal(
"SetParContainers",
"No analysis run");
62 FairRuntimeDb* db = run->GetRuntimeDb();
63 if ( ! db ) Fatal(
"SetParContainers",
"No runtime database");
73 lBaseParSet = (FairBaseParSet *)db->getContainer(
"FairBaseParSet");
76 printf(
"Got PndEmcDigiPar from database\n");
79 printf(
"could not get PndEmcDigiPar from database\n");
98 printf(
"Not Initialised! You have to call Init() first.\n");
105 GammaArrayRef.Clear();
107 DigiArrayRef.Clear();
117 Int_t NumberOfPhotons = 0;
118 Int_t NumberOfHits = 0;
119 Int_t NumberOfDigis = 0;
123 for(Int_t
i = 0;
i<16;
i++){
125 NumberOfPhotons = GammaArrayRef.GetEntriesFast();
126 new (GammaArrayRef[NumberOfPhotons]) TParticle(22,0,0,0,0,0,0,0,
lTaggerEnergies[
i]/1000,
lTaggerEnergies[
i]/1000,0,0,0,
lTaggerTimes[
i]);
130 if(!
lOnlyTagged || GammaArrayRef.GetEntriesFast() > 0){
131 for(Int_t
n = 0;
n<60;
n++){
133 NumberOfHits = HitArrayRef.GetEntriesFast();
135 printf(
"more than 60 Hits in this event, aborting");
140 DetectorId = 700010000 + Col + Row * 1000000;
144 NumberOfDigis = DigiArrayRef.GetEntriesFast();
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
TClonesArray * lGammaArray
represents the reconstructed hit of one emc crystal
virtual void GetEnergies(Double_t *energies)=0
void SetMapperVersion(Int_t mapperVersion)
virtual void SetParContainers()
virtual void GetTaggerEnergies(Double_t *taggerEnergies)=0
Double_t lTaggerTimes[16]
Double_t GetEnergyDigiThreshold()
TClonesArray * lDigiArray
Double_t lEnergyDigiThreshold
parameter set of Emc digitisation
virtual void GetTaggerTimes(Double_t *taggertimes)=0
virtual void Exec(Option_t *opt)
Double_t GetEnergyHitThreshold()
PndGeoPassivePar * lGeoPassivePar
FairBaseParSet * lBaseParSet
Bool_t OnlyPrompt(Bool_t onlyPrompt=kTRUE)
Double_t lTaggerEnergies[16]
represents the deposited energy of one emc crystal from simulation
Bool_t OnlyTagged(Bool_t onlyTagged=kTRUE)
ReadMainzProto60 * lDataReader
virtual void GetADCValues(Double_t *ADCs)=0
virtual Long_t ReadNextEvent()=0
Double_t lEnergyHitThreshold
virtual InitStatus Init()
virtual void GetTimes(Double_t *times)=0
PndEmcReadProtoData(ReadMainzProto60 *datareader, Bool_t StoreHits=kTRUE, Int_t debuglevel=0)