Ejemplo n.º 1
0
EUTelTrack::EUTelTrack(const EUTelTrack& track, bool copyContents){
	if( track.getChi2()== 0 or track.getNdf() == 0){
		streamlog_out(MESSAGE5)<<"Chi: "<<track.getChi2() <<" ndf: "<<track.getNdf() << std::endl;
		throw(lcio::Exception("You are trying to create a track that is empty. With another track that has not chi2 or degrees of freedom.")); 	
	}
	setChi2(track.getChi2());
	setNdf(track.getNdf());
}
Ejemplo n.º 2
0
EUTelTrack::EUTelTrack(const EUTelTrack& track): IMPL::TrackImpl(){
	setChi2(track.getChi2());
	setNdf(track.getNdf());
	for(size_t i=0; i<track.getTracks().size();++i){
		addTrack(track.getTracks().at(i));
	}
}
Ejemplo n.º 3
0
EUTelTrack::EUTelTrack(const EUTelTrack& track, bool copyContents):
_chi2(0),
_nDF(0),
_radPerTotal(0)
{
	setChi2(track.getChi2());
	setNdf(track.getNdf());
    setRadPerTotal(track.getRadPerTotal());
    setQOverP(track.getQOverP()); 

}
Ejemplo n.º 4
0
EUTelTrack::EUTelTrack(const EUTelTrack& track):
_chi2(0),
_nDF(0),
_radPerTotal(0)
{
	setChi2(track.getChi2());
	setNdf(track.getNdf());
    setStates(track.getStatesCopy());
    setRadPerTotal(track.getRadPerTotal());
    setQOverP(track.getQOverP()); 


}
void EUTelProcessorTrackAnalysis::processEvent(LCEvent * evt){
	try{
		EUTelEventImpl * event = static_cast<EUTelEventImpl*> (evt); ///We change the class so we can use EUTelescope functions

		if (event->getEventType() == kEORE) {
			streamlog_out(DEBUG4) << "EORE found: nothing else to do." << std::endl;
			return;
		}else if (event->getEventType() == kUNKNOWN) {
			streamlog_out(WARNING2) << "Event number " << event->getEventNumber() << " in run " << event->getRunNumber() << " is of unknown type. Continue considering it as a normal Data Event." << std::endl;
		}
		LCCollection* eventCollection = NULL;
		try {
			eventCollection = evt->getCollection(_trackInputCollectionName);
			streamlog_out(DEBUG1) << "collection : " << _trackInputCollectionName << " retrieved" << std::endl;
		}catch (DataNotAvailableException e) {
			streamlog_out(MESSAGE0) << _trackInputCollectionName << " collection not available" << std::endl;
			throw marlin::SkipEventException(this);
		}
		if (eventCollection != NULL) {
			streamlog_out(DEBUG2) << "Collection contains data! Continue!" << std::endl;
			for (int iTrack = 0; iTrack < eventCollection->getNumberOfElements(); ++iTrack){
				EUTelTrack track = *(static_cast<EUTelTrack*> (eventCollection->getElementAt(iTrack)));
				_analysis->plotResidualVsPosition(track);	
				_analysis->plotIncidenceAngles(track);
				if(track.getChi2()/track.getNdf() < 5.0){
					_analysis->plotBeamEnergy(track);
					_analysis->plotPValueVsBeamEnergy(track);
				}

				_analysis->plotPValueWithPosition(track);
				_analysis->plotPValueWithIncidenceAngles(track);
			}

		}	
	}catch(...){	
		streamlog_out(MESSAGE9)<<"There is an unknown error in EUTelProcessorTrackAnalysis-processEvent" <<std::endl;
		throw marlin::StopProcessingException( this ) ;
	}
	
	
}