Conversation
| int tofMult = trg->tofMultiplicity(); | ||
| // cout<<"TOF mult="<<tofMult<<endl; | ||
| if (tofMult > 20) return kStOK; | ||
| */ |
There was a problem hiding this comment.
Removed TriggerId part. This should be done outside this analysis maker, for example in macro using StSpinPool/StTriggerFilterMaker.
TOFmult part remains since it is in correct place and should work, just that it is not working currently when reading from Mudst. I would like to add something like following to StFcsRawHitMaker::readMuDst() (or StMuDst::createStEvent() function), but I cannot make it work. In short,
const StTriggerData* StMuEvent::triggerData()
cannot feed
StEvent::setTriggerData(StTriggerata*)
due to StStrArray::TestBit(kBelongs) fails, even after removing const by "const_cast". Please let me know if someones mater than me knows solution (without copying entire TriggerData contents!)
if(mEvent->triggerData()==0){
StMuEvent* muevent = mudst->event();
if(muevent){
StTriggerData* trg = const_cast(muevent->triggerData());
if(trg){
printf("AAA TOF=%d\n",trg->tofMultiplicity());
mEvent->setTriggerData(trg);
// StStrArray::push_back(const TObject*): Assertion `!obj->TestBit(kBelongs)&& obj->TestBit(TObject::kNotDeleted)' failed.
printf("BBB TOF=%d\n",mEvent->triggerData()->tofMultiplicity());
}
}
}
There was a problem hiding this comment.
Can you comment out Line 472: h2_EcalMult_vs_TofMult->Fill(tofMult, n_Ecal_cut); in StFcsPi0FinderForEcal.cxx . This line also use tofMult which is removed out by Akio. So please remove this line as well.
There was a problem hiding this comment.
I think we should keep it for now. When reading StTriggerData from Mudst is there (see above), we can put it back. O the other hand, this was too avoid mid-central events from AA collisions, and we may not need it for pp. Still once we have tofmult, we should study.
There was a problem hiding this comment.
@akioogawa I'm not sure that this is a valid use of const_cast you show here. I would start coding this in a similar way to how it was done in 9e95896, we can see if it can be refactored then.
There was a problem hiding this comment.
Another attempt following StEventMaker example :
if(mEvent->triggerData()==0){
StMuEvent* muevent = mudst->event();
if(muevent){
StTriggerData* trg = const_cast(muevent->triggerData());
if(trg){
printf("AAA TOF=%d\n",trg->tofMultiplicity());
AddData(new TObjectSet("StTriggerData",trg));
TObjectSet *os = (TObjectSet*)GetDataSet("StTriggerData");
printf("BBB\n");
if(os){
printf("CCC os->IsOwner()=%d\n",os->IsOwner());
StTriggerData* pTrg = (StTriggerData*)os->GetObject();
if(os->IsOwner() && pTrg){
printf("DDD TOF=%d\n",pTrg->tofMultiplicity());
os->DoOwner(0);
printf("EEE\n");
mEvent->setTriggerData(trg);
printf("FFF TOF=%d\n",mEvent->triggerData()->tofMultiplicity());
}
}
}
}
}
==>
AAA TOF=17
BBB
CCC os->IsOwner()=1
DDD TOF=17
EEE
root4star: .sl73_gcc485/obj/StRoot/St_base/StArray.cxx:276: void StStrArray::push_back(const TObject*): Assertion `!obj->TestBit(kBelongs) && obj->TestBit(TObject::kNotDeleted)' failed.
…acro using StSpinPool/StTriggerFilterMaker, for example) TOF mult part remains, since this is valid code, not working currently when reading from Mudst.
|
The two modified files are co-owned by @jdbrice Please let us know whether it is worth waiting for a feedback. |
|
I know @jdbrice is very busy right now. I don't know why he is owner of those 2 makers. His feedback and reviews are always welcome. But if you have power to merge without his approval, please do, although I'm the one making the request and don't want to request a short-cut.... |
@jdbrice was added by @starsdong for all files in /StRoot/StFcs*, see #40 Akio, I agree with you that any collaborator should be able to comment without being a maintainer. It is better to not designate an owner rather than creating a situation with unfulfillable expectations. |
| //TOF mult cut | ||
| int tofMult = 0; | ||
| const StTriggerData* trgdata = event->triggerData(); | ||
| if(!trgdata && StMuDst::event()) trgdata = StMuDst::event()->triggerData(); |
There was a problem hiding this comment.
So StMuEvent provides StMuTriggerIdCollection, but not StMuTriggerData (stores a StTriggerData instead).
StFcsWaveformFitMaker default value for mEnergySelect to 10 (for data, default was 0 for MC before)
StFcsDbMaker remove delete mFcsDb from Finish, since it is double delete because of AddData in constructor
StSpinPool/StFcsPi0FinderForEcal remove TriggerId selection and ToFMult selection for FastOffline (not needed).