Difference between revisions of "Mattione GlueX Analysis Factories"

From GlueXWiki
Jump to: navigation, search
(Tupling)
(User Plugin DEventProcessor)
Line 74: Line 74:
 
jerror_t DEventProcessor_Y2175::evnt(JEventLoop *locEventLoop, int eventnumber)
 
jerror_t DEventProcessor_Y2175::evnt(JEventLoop *locEventLoop, int eventnumber)
 
{
 
{
vector<const DKinFitTrackCombo*> locKinFitTrackCombo;
+
vector<const DKinFitTrackCombo*> locKinFitTrackCombos;
locEventLoop->Get(locKinFitTrackCombo);
+
locEventLoop->Get(locKinFitTrackCombos);
  
 
//DO HISTS/CUTS/TUPLES HERE
 
//DO HISTS/CUTS/TUPLES HERE

Revision as of 02:40, 16 July 2012

Summary

  • In his/her plugin, a user specifies the reactions he/she wants to study (DReaction objects), then just asks JANA for the results (DKinFitTrackCombo objects).
    • Creates all possible track combinations for the desired reaction; user then cuts on the likelihood that those combinations represent the hypothesized reaction.

User Plugin DReaction Factory

  • DReaction.h located in DANA libraries, DReaction.h_factory located in user plugin (along with a factory generator for it).
  • Below shows how to set up DReaction for a Y(2175) analysis.
jerror_t DReaction_factory::init(void)
{
	// Make as many DReaction objects as desired
	DReaction* locReaction = new DReaction();
	{
		//g, p -> Y(2175), (p)
		DReactionStep locReactionStep;
		locReactionStep.dInitialParticleID = Gamma;
		locReactionStep.dTargetParticleID = Proton;
		locReactionStep.dFinalParticleIDs.push_back(Unknown); //Y(2175)
		locReactionStep.dFinalParticleIDs.push_back(Proton);
		locReactionStep.dMissingParticleIndex = 1; //proton missing
		locReactionStep.dDetachedVertexFlag = false;
		locReaction->dReactionSteps.push_back(locReactionStep);
	}
	{
		//Y(2175) -> pi+, pi-, phi
		DReactionStep locReactionStep;
		locReactionStep.dInitialParticleID = Unknown; //Y(2175)
		locReactionStep.dTargetParticleID = Unknown; //no target
		locReactionStep.dFinalParticleIDs.push_back(PiPlus);
		locReactionStep.dFinalParticleIDs.push_back(PiMinus);
		locReactionStep.dFinalParticleIDs.push_back(phiMeson);
		locReactionStep.dMissingParticleIndex = -1; //none missing
		locReactionStep.dDetachedVertexFlag = false;
		locReaction->dReactionSteps.push_back(locReactionStep);
	}
	{
		//phi -> K+, K-
		DReactionStep locReactionStep;
		locReactionStep.dInitialParticleID = phiMeson;
		locReactionStep.dTargetParticleID = Unknown; //no target
		locReactionStep.dFinalParticleIDs.push_back(KPlus);
		locReactionStep.dFinalParticleIDs.push_back(KMinus);
		locReactionStep.dMissingParticleIndex = -1; //none missing
		locReactionStep.dDetachedVertexFlag = true; //I'm not sure, I just assumed from narrow width
		locReaction->dReactionSteps.push_back(locReactionStep);
	}
	_data.push_back(locReaction);
}

DTrackCombo Factory

  • Located in DANA
    • Still finalizing class format, but looks similar to DReaction, except with full particles instead of just PIDs.
  • Generate a DTrackCombo object for each possible combination of detected tracks (DBeamPhotons ignored).
    • For each q = +/-/0 particle in a given DReaction, all detected q = +/-/0 tracks are tested as to whether or not they are that particle (PID is NOT assumed).

DKinFitTrackCombo Factory

  • Located in DANA
    • Still finalizing class format, but looks similar to DReaction, except with full particles instead of just PIDs.
  • Generate a DKinFitTrackCombo object for each possible combination of DTrackCombos and DBeamPhotons (ignore all DBeamPhotons "too far" from RF time).
    • Perform a single, full kinematic fit testing whether the DTrackCombo matches the DReaction: includes all mass, vertex, timing constraints (vertex & timing not yet implemented).

User Plugin DEventProcessor

extern "C" {
	void InitPlugin(JApplication *app){
		InitJANAPlugin(app);
		app->AddProcessor(new DEventProcessor_Y2175());
		app->AddFactoryGenerator(new DFactoryGenerator_DReaction());
	}
} // "C"

jerror_t DEventProcessor_Y2175::evnt(JEventLoop *locEventLoop, int eventnumber)
{
	vector<const DKinFitTrackCombo*> locKinFitTrackCombos;
	locEventLoop->Get(locKinFitTrackCombos);

	//DO HISTS/CUTS/TUPLES HERE

	return NOERROR;
}

Cutting/Histogramming

  • Coming Soon...

Tupling

  • Haven't gotten this far yet...