本文整理汇总了C++中KVDetector::SetAnalysed方法的典型用法代码示例。如果您正苦于以下问题:C++ KVDetector::SetAnalysed方法的具体用法?C++ KVDetector::SetAnalysed怎么用?C++ KVDetector::SetAnalysed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVDetector
的用法示例。
在下文中一共展示了KVDetector::SetAnalysed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AnalyseDetectors
Bool_t KVReconstructedEvent::AnalyseDetectors(TList * kvtl)
{
// Loop over detectors in list
// if any detector has fired, start construction of new detected particle
// More precisely: If detector has fired,
// making sure fired detector hasn't already been used to reconstruct
// a particle, then we create and fill a new detected particle.
// In order to avoid creating spurious particles when reading data,
// by default we ask that ALL coder values be non-zero here i.e. data and time-marker.
// This can be changed by calling SetPartSeedCond("any"): in this case,
// particles will be reconstructed starting from detectors with at least 1 fired parameter.
KVDetector *d;
TIter next(kvtl);
while( (d = (KVDetector*)next()) ){
/*
If detector has fired,
making sure fired detector hasn't already been used to reconstruct
a particle, then we create and fill a new detected particle.
*/
if ( (d->Fired( fPartSeedCond.Data() ) && !d->IsAnalysed()) ) {
KVReconstructedNucleus *kvdp = AddParticle();
//add all active detector layers in front of this one
//to the detected particle's list
kvdp->Reconstruct(d);
//set detector state so it will not be used again
d->SetAnalysed(kTRUE);
}
}
return kTRUE;
}
示例2: IdentifyEvent
void KVINDRAReconEvent::IdentifyEvent()
{
// Performs event identification (see KVReconstructedEvent::IdentifyEvent), and then
// particles stopping in first member of a telescope (GetStatus() == KVReconstructedNucleus::kStatusStopFirstStage) are
// labelled with VEDA ID code kIDCode5 (Zmin)
//
// When CsI identification gives a gamma, we unset the 'analysed' state of all detectors
// in front of the CsI and reanalyse the group in order to reconstruct and identify charged particles
// stopping in them.
//
// Unidentified particles receive the general ID code for non-identified particles (kIDCode14)
KVReconstructedEvent::IdentifyEvent();
KVINDRAReconNuc* d = 0;
int mult = GetMult();
KVUniqueNameList gammaGroups;//list of groups with gammas identified in CsI
ResetGetNextParticle();
while ((d = GetNextParticle())) {
if (d->IsIdentified() && d->GetStatus() == KVReconstructedNucleus::kStatusStopFirstStage) {
d->SetIDCode(kIDCode5); // Zmin
} else if (d->IsIdentified() && d->GetCodes().TestIDCode(kIDCode0)) {
// gamma identified in CsI
// reset analysed state of all detectors in front of CsI
if (d->GetCsI()) {
if (d->GetCsI()->GetAlignedDetectors()) {
TIter next(d->GetCsI()->GetAlignedDetectors());
KVDetector* det = (KVDetector*)next(); //first detector = CsI
while ((det = (KVDetector*)next())) det->SetAnalysed(kFALSE);
gammaGroups.Add(d->GetGroup());
} else {
Error("IdentifyEvent", "particule id gamma, no aligned detectors???");
d->Print();
}
} else {
Error("IdentifyEvent", "particule identified as gamma, has no CsI!!");
d->Print();
}
}
}
// perform secondary reconstruction in groups with detected gammas
int ngamG = gammaGroups.GetEntries();
if (ngamG) {
for (int i = 0; i < ngamG; i++) {
gIndra->AnalyseGroupAndReconstructEvent(this, (KVGroup*)gammaGroups.At(i));
}
}
if (GetMult() > mult) {
/*Info("IdentifyEvent", "Event#%d: Secondary reconstruction (gammas) -> %d new particles",
GetNumber(), GetMult()-mult);*/
// identify new particles generated in secondary reconstruction
KVReconstructedEvent::IdentifyEvent();
ResetGetNextParticle();
while ((d = GetNextParticle())) {
if (d->IsIdentified() && d->GetStatus() == KVReconstructedNucleus::kStatusStopFirstStage) {
d->SetIDCode(kIDCode5); // Zmin
} else if (!d->IsIdentified()) {
d->SetIDCode(kIDCode14);
}
}
/*
for(int i=mult+1; i<=GetMult(); i++){
d = GetParticle(i);
if(d->IsIdentified())
printf("\t%2d: Ring %2d Module %2d Z=%2d A=%3d code=%d\n",i,d->GetRingNumber(),
d->GetModuleNumber(),d->GetZ(),d->GetA(),d->GetCodes().GetVedaIDCode());
else
printf("\t%2d: Ring %2d Module %2d UNIDENTIFIED status=%d\n", i,d->GetRingNumber(),
d->GetModuleNumber(), d->GetStatus());
}
*/
}
}