void KVFAZIARawDataReconstructor::ExtraProcessing() { KVString label = ""; KVFAZIADetector* det = 0; KVSignal* sig = 0; KVReconstructedNucleus* recnuc = 0; while ((recnuc = recev->GetNextParticle())) { TIter next_d(recnuc->GetDetectorList()); while ((det = (KVFAZIADetector*)next_d())) { TIter next_s(det->GetListOfSignals()); while ((sig = (KVSignal*)next_s())) { if (sig->HasFPGA()) { for (Int_t ii = 0; ii < sig->GetNFPGAValues(); ii += 1) { //SI2-T3-Q1-B003.Q2.RawAmplitude=14 if (ii == 0) label = "FPGAEnergy"; if (ii == 1) label = "FPGAFastEnergy"; //only for CsI Q3 TString ene = GetEvent()->GetFPGAEnergy( det->GetBlockNumber(), det->GetQuartetNumber(), det->GetTelescopeNumber(), sig->GetType(), ii ); recnuc->GetParameters()->SetValue( Form("%s.%s.%s", det->GetName(), sig->GetName(), label.Data()), ene.Data() ); } } if (!sig->PSAHasBeenComputed()) { sig->TreateSignal(); } KVNameValueList* psa = sig->GetPSAResult(); if (psa) { *(recnuc->GetParameters()) += *psa; delete psa; } } } } }
void KVFAZIA::GetDetectorEvent(KVDetectorEvent* detev, TSeqCollection* signals) { // First step in event reconstruction based on current status of detectors in array. // Fills the given KVDetectorEvent with the list of all groups which have fired. // i.e. loop over all groups of the array and test whether KVGroup::Fired() returns true or false. // // If the list of fired acquisition parameters 'signals' is given, KVMultiDetArray::GetDetectorEvent // is called // if (signals) { // list of fired acquisition parameters given TIter next_par(signals); KVSignal* par = 0; KVDetector* det = 0; KVGroup* grp = 0; while ((par = (KVSignal*)next_par())) { if (!(par->GetN() > 0)) Info("GetDetectorEvent", "%s empty", par->GetName()); par->DeduceFromName(); if ((det = GetDetector(par->GetDetectorName()))) { ((KVFAZIADetector*)det)->SetSignal(par, par->GetType()); if ((!(((KVFAZIADetector*)det)->GetSignal(par->GetType())->GetN() > 0))) Warning("Error", "%s %s empty signal is returned", det->GetName(), par->GetType()); if ((grp = det->GetGroup()) && !detev->GetGroups()->FindObject(grp)) { detev->AddGroup(grp); } } else { Error("GetDetectedEvent", "Unknown detector %s !!!", par->GetDetectorName()); } } } else { KVMultiDetArray::GetDetectorEvent(detev, 0); } }
//________________________________________________________________ Bool_t KVFAZIADetector::Fired(Option_t *) { // Returns kTRUE if detector was hit (fired) in an event // // The actual meaning of hit/fired depends on the context and the option string opt. // // If the detector is in "simulation mode", i.e. if SetSimMode(kTRUE) has been called, // this method returns kTRUE if the calculated energy loss in the active layer is > 0. // // In "experimental mode" (i.e. IsSimMode() returns kFALSE), depending on the option: // //Info("Fired","Appel - %s",GetName()); if (!IsDetecting()) return kFALSE; //detector not working, no answer at all if (IsSimMode()) return (GetActiveLayer()->GetEnergyLoss()>0.); // simulation mode: detector fired if energy lost in active layer KVSignal* sig; if (fSignals){ TIter next(fSignals); while ( (sig = (KVSignal* )next()) ) { if (sig->GetN()>0){ if (!strcmp(sig->GetTitle(),"Charge") && sig->GetRawAmplitude()>20){ return kTRUE; } else{ } } else{ Warning("Fired","%s has empty signal %s",GetName(),sig->GetName()); } } } else{ Warning("Fired","%s : No signal attached to this detector ...",GetName()); return kFALSE; } return kFALSE; }