An Example to Use StRoot/StJetFinder
StJetFinder is a STAR software interface to use fastjet package installed on RACF. Users can do their jet finding in a standard STAR macro with the StRoot directory. It gives users the freedom to provide their own input particle list, select jet finding algorithm, call the algorithm and retrieve the found jets.
StJetFinder uses C++ STL std::vector<AbstractFourVec*> as the initial input particle list and std::list<StProtoJet> as the output found jets. AbstractFourVec is an abstract class, so users need to define their own particle vector class which has to be derived from AbstractFourVec to hold yparticle information. The initial setup for the jet find algorithm is supplied by StJetPars class. StFastJetPars that is derived from StJetPars allow users to select for example which algorithm to use, AntiKt or Kt, size of jet parameter R, and so on. StFastJetAreaPars is added as a member of StFastJetPars to tell fast-jet how users want the jet area is calculated. With all the information supplied by users, StFastJetPars creates a StJetFinder object which later takes constant reference to std::vector<AbstractFourVec*> and a reference to std::list<StProtoJet> as input parameters and then calls the jet finding routines. To be more specific StJetFinder is an abstract class, therefore the actual object the StFastJetPar creates is StjFastJet. As written in the code, std::vector<AbstractFourVec*> is type defined as StJetFinder::JetList and std::list<StProtoJet> is type defined as StJetFinder::FourVecList.
To make all the classes and template classes seen by CINT/ROOT, I add file StRoot/StJetTest/StJetTestLinkDef.h as in the attachment. Since fastjet is not compatible with CINT/ROOT, a maker is required as seen in StRoot/StJetTest/StJetMakerTest.h.
To put things together, uses may download the tar file in the attachment. After un-tar the file, you will find StRoot/StJetTest. In this directory I defined StJetVector class that is derived from AbstractFourVec. StJetVector class holds a TLorentzVector object and a real number that is designated as particle charge. The TLorentzVector object will contain the four-vector momentum that is essential to the jet finding routine. Users may add any member and method to the class but be sure to double check all the pure virtual functions defined in AbstractFourVec are overloaded. A test macro is in the macros sub-directory. More details on how the test macro works can be found in comment section in the macro.
To run the test macro, first upload the example.tar on RACF into your directory.
tar -xvf example.tar.gz
cons
root -b -q StRoot/StJetTest/macros/jetTest.C
- zchang's blog
- Login or register to post comments