From d0e92d9abb64fa8cc72c2f5a618f0a3633e173ba Mon Sep 17 00:00:00 2001 From: akisiel Date: Wed, 16 May 2007 10:22:13 +0000 Subject: [PATCH] Making the directory structure of AliFemto flat. All files go into one common directory --- .../{Analysis => }/AliFemtoAnalysis.cxx | 214 ++--- .../{Analysis => }/AliFemtoAnalysis.h | 50 +- .../AliFemtoAnalysisCollection.h | 3 + .../AliFemtoBPLCMS3DCorrFctn.cxx | 215 +++-- .../{CorrFctn => }/AliFemtoBPLCMS3DCorrFctn.h | 123 ++- .../{Base => }/AliFemtoBaseAnalysis.h | 2 +- .../AliFemto/AliFemtoBasicEventCut.cxx | 51 ++ .../AliFemto/AliFemtoBasicEventCut.h | 63 ++ .../{Cut => }/AliFemtoBasicTrackCut.cxx | 23 +- .../{Cut => }/AliFemtoBasicTrackCut.h | 23 +- .../AliFemto/{Base => }/AliFemtoCorrFctn.h | 6 +- .../AliFemtoCorrFctnCollection.h | 3 + .../{Infrastructure => }/AliFemtoCoulomb.cxx | 21 +- .../{Infrastructure => }/AliFemtoCoulomb.h | 9 +- .../AliFemto/{Base => }/AliFemtoCutMonitor.h | 4 +- .../AliFemtoCutMonitorCollection.h | 0 .../AliFemtoCutMonitorHandler.cxx | 96 ++- .../AliFemtoCutMonitorHandler.h | 29 +- .../{Cut => }/AliFemtoDummyPairCut.cxx | 5 +- .../AliFemto/{Cut => }/AliFemtoDummyPairCut.h | 5 +- .../AliFemtoEnumeration.h | 3 + .../{Infrastructure => }/AliFemtoEvent.cxx | 168 +--- PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h | 114 +++ .../AliFemto/{Base => }/AliFemtoEventCut.h | 4 +- .../{Base => }/AliFemtoEventReader.cxx | 14 +- .../AliFemto/{Base => }/AliFemtoEventReader.h | 2 +- .../{Reader => }/AliFemtoEventReaderESD.cxx | 39 +- .../{Reader => }/AliFemtoEventReaderESD.h | 11 +- .../AliFemtoEventReaderESDChain.cxx | 57 +- .../AliFemtoEventReaderESDChain.h | 10 +- .../AliFemto/{Base => }/AliFemtoEventWriter.h | 2 +- .../AliFemtoEventWriterCollection.h | 2 +- .../{Infrastructure => }/AliFemtoHelix.h | 3 + .../AliFemto/{Base => }/AliFemtoHiddenInfo.h | 20 +- .../{Infrastructure => }/AliFemtoKink.cxx | 7 +- .../{Infrastructure => }/AliFemtoKink.h | 7 +- .../AliFemtoKinkCollection.h | 5 +- .../AliFemto/{Base => }/AliFemtoKinkCut.h | 6 +- .../AliFemtoLikeSignAnalysis.cxx | 10 +- .../{Analysis => }/AliFemtoLikeSignAnalysis.h | 21 +- .../{Base => }/AliFemtoLikeSignCorrFctn.h | 2 +- .../{Infrastructure => }/AliFemtoLinkDef.h | 0 .../AliFemtoLorentzVector.h | 3 + .../AliFemtoLorentzVectorD.h | 3 + PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.cxx | 254 ++++++ PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.h | 72 ++ .../{Model => }/AliFemtoModelCorrFctn.cxx | 6 +- .../{Model => }/AliFemtoModelCorrFctn.h | 4 +- .../AliFemtoModelFreezeOutGenerator.cxx | 0 .../AliFemtoModelFreezeOutGenerator.h | 0 ...liFemtoModelGausLCMSFreezeOutGenerator.cxx | 4 +- .../AliFemtoModelGausLCMSFreezeOutGenerator.h | 2 +- .../{Model => }/AliFemtoModelHiddenInfo.cxx | 20 +- .../{Model => }/AliFemtoModelHiddenInfo.h | 25 +- .../{Model => }/AliFemtoModelManager.cxx | 12 +- .../{Model => }/AliFemtoModelManager.h | 2 +- .../AliFemto/AliFemtoModelWeightGenerator.cxx | 107 +++ .../AliFemto/AliFemtoModelWeightGenerator.h | 82 ++ .../AliFemtoModelWeightGeneratorBasic.cxx | 8 +- .../AliFemtoModelWeightGeneratorBasic.h | 0 .../{Infrastructure => }/AliFemtoPair.cxx | 551 ++++++------- PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h | 408 ++++++++++ .../AliFemto/{Base => }/AliFemtoPairCut.h | 8 +- .../{Infrastructure => }/AliFemtoParticle.cxx | 242 ++---- PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.h | 160 ++++ .../AliFemtoParticleCollection.h | 5 +- .../AliFemto/{Base => }/AliFemtoParticleCut.h | 4 +- .../AliFemtoPicoEvent.cxx | 5 +- .../{Infrastructure => }/AliFemtoPicoEvent.h | 5 +- .../AliFemtoPicoEventCollection.h | 5 +- .../AliFemtoPicoEventCollectionVector.h | 5 +- ...FemtoPicoEventCollectionVectorHideAway.cxx | 5 +- ...liFemtoPicoEventCollectionVectorHideAway.h | 9 +- .../{CorrFctn => }/AliFemtoQinvCorrFctn.cxx | 15 +- .../{CorrFctn => }/AliFemtoQinvCorrFctn.h | 9 +- .../{Infrastructure => }/AliFemtoString.h | 0 .../AliFemtoThreeVector.h | 3 + .../AliFemtoThreeVectorD.h | 3 + .../{Infrastructure => }/AliFemtoTrack.cxx | 113 +-- .../{Infrastructure => }/AliFemtoTrack.h | 112 ++- .../AliFemtoTrackCollection.h | 5 +- .../AliFemto/{Base => }/AliFemtoTrackCut.h | 6 +- .../{Infrastructure => }/AliFemtoTypes.h | 13 +- .../{Infrastructure => }/AliFemtoV0.cxx | 34 +- PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.h | 397 ++++++++++ .../AliFemtoV0Collection.h | 2 +- .../AliFemto/{Base => }/AliFemtoV0Cut.h | 6 +- .../{Infrastructure => }/AliFemtoVector.h | 3 + .../{Analysis => }/AliFemtoVertexAnalysis.cxx | 17 +- .../{Analysis => }/AliFemtoVertexAnalysis.h | 2 +- .../AliFemtoVertexMultAnalysis.cxx | 17 +- .../AliFemtoVertexMultAnalysis.h | 2 +- .../{Infrastructure => }/AliFemtoXi.cxx | 40 +- PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.h | 274 +++++++ .../AliFemtoXiCollection.h | 2 +- .../AliFemto/{Base => }/AliFemtoXiCut.h | 6 +- PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.cxx | 650 ++++++++++++++++ PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.h | 184 +++++ .../{Infrastructure => }/AliFmHelixD.h | 3 + .../{Infrastructure => }/AliFmLorentzVector.h | 3 + .../AliFmLorentzVectorD.h | 3 + .../AliFemto/AliFmPhysicalHelix.cxx | 136 ++++ PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.h | 45 ++ .../AliFmPhysicalHelixD.h | 3 + .../{Infrastructure => }/AliFmThreeVector.h | 3 + .../{Infrastructure => }/AliFmThreeVectorD.h | 3 + .../{Infrastructure => }/AliFmThreeVectorF.h | 3 + .../AliFemto/Cut/AliFemtoBasicEventCut.cxx | 111 --- .../AliFemto/Cut/AliFemtoBasicEventCut.h | 116 --- .../AliFemto/Infrastructure/AliFemtoEvent.h | 202 ----- .../Infrastructure/AliFemtoManager.cxx | 360 --------- .../AliFemto/Infrastructure/AliFemtoManager.h | 131 ---- .../AliFemto/Infrastructure/AliFemtoPair.h | 516 ------------ .../Infrastructure/AliFemtoParticle.h | 252 ------ .../AliFemto/Infrastructure/AliFemtoV0.h | 468 ----------- .../AliFemto/Infrastructure/AliFemtoXi.h | 276 ------- .../AliFemto/Infrastructure/AliFmHelix.cxx | 734 ------------------ .../AliFemto/Infrastructure/AliFmHelix.h | 225 ------ .../Infrastructure/AliFmPhysicalHelix.cxx | 168 ---- .../Infrastructure/AliFmPhysicalHelix.h | 72 -- .../Model/AliFemtoModelWeightGenerator.cxx | 107 --- .../Model/AliFemtoModelWeightGenerator.h | 82 -- .../AliFemto/{Base => }/PhysicalConstants.h | 3 + .../AliFemto/{Base => }/SystemOfUnits.h | 3 + .../TpcLocalTransform.cxx | 0 .../{Infrastructure => }/TpcLocalTransform.h | 0 .../{Infrastructure => }/phys_constants.h | 2 +- 127 files changed, 4164 insertions(+), 5249 deletions(-) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoAnalysis.cxx (72%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoAnalysis.h (75%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoAnalysisCollection.h (95%) rename PWG2/FEMTOSCOPY/AliFemto/{CorrFctn => }/AliFemtoBPLCMS3DCorrFctn.cxx (63%) rename PWG2/FEMTOSCOPY/AliFemto/{CorrFctn => }/AliFemtoBPLCMS3DCorrFctn.h (53%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoBaseAnalysis.h (95%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h rename PWG2/FEMTOSCOPY/AliFemto/{Cut => }/AliFemtoBasicTrackCut.cxx (88%) rename PWG2/FEMTOSCOPY/AliFemto/{Cut => }/AliFemtoBasicTrackCut.h (77%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoCorrFctn.h (93%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoCorrFctnCollection.h (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoCoulomb.cxx (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoCoulomb.h (95%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoCutMonitor.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoCutMonitorCollection.h (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoCutMonitorHandler.cxx (77%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoCutMonitorHandler.h (63%) rename PWG2/FEMTOSCOPY/AliFemto/{Cut => }/AliFemtoDummyPairCut.cxx (95%) rename PWG2/FEMTOSCOPY/AliFemto/{Cut => }/AliFemtoDummyPairCut.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoEnumeration.h (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoEvent.cxx (61%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoEventCut.h (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoEventReader.cxx (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoEventReader.h (98%) rename PWG2/FEMTOSCOPY/AliFemto/{Reader => }/AliFemtoEventReaderESD.cxx (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Reader => }/AliFemtoEventReaderESD.h (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Reader => }/AliFemtoEventReaderESDChain.cxx (86%) rename PWG2/FEMTOSCOPY/AliFemto/{Reader => }/AliFemtoEventReaderESDChain.h (88%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoEventWriter.h (91%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoEventWriterCollection.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoHelix.h (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoHiddenInfo.h (63%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoKink.cxx (97%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoKink.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoKinkCollection.h (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoKinkCut.h (90%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoLikeSignAnalysis.cxx (97%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoLikeSignAnalysis.h (75%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoLikeSignCorrFctn.h (97%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoLinkDef.h (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoLorentzVector.h (99%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoLorentzVectorD.h (89%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.cxx create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.h rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelCorrFctn.cxx (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelCorrFctn.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelFreezeOutGenerator.cxx (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelFreezeOutGenerator.h (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelGausLCMSFreezeOutGenerator.cxx (98%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelGausLCMSFreezeOutGenerator.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelHiddenInfo.cxx (82%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelHiddenInfo.h (80%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelManager.cxx (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelManager.h (97%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.cxx create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.h rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelWeightGeneratorBasic.cxx (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Model => }/AliFemtoModelWeightGeneratorBasic.h (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPair.cxx (73%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoPairCut.h (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoParticle.cxx (74%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.h rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoParticleCollection.h (93%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoParticleCut.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPicoEvent.cxx (98%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPicoEvent.h (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPicoEventCollection.h (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPicoEventCollectionVector.h (91%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPicoEventCollectionVectorHideAway.cxx (97%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoPicoEventCollectionVectorHideAway.h (91%) rename PWG2/FEMTOSCOPY/AliFemto/{CorrFctn => }/AliFemtoQinvCorrFctn.cxx (92%) rename PWG2/FEMTOSCOPY/AliFemto/{CorrFctn => }/AliFemtoQinvCorrFctn.h (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoString.h (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoThreeVector.h (99%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoThreeVectorD.h (88%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoTrack.cxx (63%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoTrack.h (60%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoTrackCollection.h (92%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoTrackCut.h (90%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoTypes.h (85%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoV0.cxx (88%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.h rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoV0Collection.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoV0Cut.h (89%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoVector.h (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoVertexAnalysis.cxx (94%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoVertexAnalysis.h (95%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoVertexMultAnalysis.cxx (95%) rename PWG2/FEMTOSCOPY/AliFemto/{Analysis => }/AliFemtoVertexMultAnalysis.h (96%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoXi.cxx (63%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.h rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFemtoXiCollection.h (95%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/AliFemtoXiCut.h (89%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.cxx create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.h rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmHelixD.h (89%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmLorentzVector.h (99%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmLorentzVectorD.h (89%) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.cxx create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.h rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmPhysicalHelixD.h (89%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmThreeVector.h (99%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmThreeVectorD.h (88%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/AliFmThreeVectorF.h (92%) delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.cxx delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.cxx delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelix.cxx delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelix.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.cxx delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.h delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.cxx delete mode 100644 PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.h rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/PhysicalConstants.h (98%) rename PWG2/FEMTOSCOPY/AliFemto/{Base => }/SystemOfUnits.h (99%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/TpcLocalTransform.cxx (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/TpcLocalTransform.h (100%) rename PWG2/FEMTOSCOPY/AliFemto/{Infrastructure => }/phys_constants.h (92%) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoAnalysis.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysis.cxx similarity index 72% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoAnalysis.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysis.cxx index 0de85ab3488..5c9a579b1cf 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoAnalysis.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysis.cxx @@ -1,119 +1,37 @@ -/*************************************************************************** - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * This is the Class for Analysis objects. Each of the simultaneous - * Analyses running should have one of these instantiated. They link - * into the Manager in an Analysis Collection. - * - *************************************************************************** - * - * - * Revision 1.23 2002/11/20 00:09:26 renault - * fill a new monitor with (hbtEvent,partCollection) - * - * Revision 1.22 2002/11/03 16:40:31 magestro - * Modified ProcessEvent(), added MakePairs() method, and implemented immediate event mixing - * - * Revision 1.21 2002/06/26 17:27:09 lisa - * fixed small bug in AliFemtoAnalysis associated with the new feature to require ParticleCollections to have some minimum number of particles - * - * Revision 1.20 2002/06/22 17:53:31 lisa - * implemented switch to allow user to require minimum number of particles in First and Second ParticleCollections - default value is zero so if user does not Set this value then behaviour is like before - * - * Revision 1.19 2001/11/06 20:20:53 laue - * Order of event-mixing fixed. - * - * Revision 1.18 2001/05/25 23:23:59 lisa - * Added in AliFemtoKink stuff - * - * Revision 1.17 2001/04/05 21:57:45 laue - * current pico-event becomes a member of the analysis (fPicoEvent) and gets - * an access-function (CurrentPicoEvent) - * - * Revision 1.15 2000/09/13 18:09:09 laue - * Bux fix: Delete track cut only once for identical particle hbt - * - * Revision 1.14 2000/08/31 22:31:30 laue - * AliFemtoAnalysis: output changed (a little bit less) - * AliFemtoEvent: new version, members for reference mult added - * AliFemtoIOBinary: new IO for new AliFemtoEvent version - * AliFemtoTypes: TTree typedef to AliFemtoTTree added - * AliFemtoVertexAnalysis: overflow and underflow added - * - * Revision 1.13 2000/08/11 16:35:40 rcwells - * Added number of events processed to each HBT analysis - * - * Revision 1.12 2000/07/16 22:23:17 laue - * I forgot that we moved memberfunctions out of AliFemtoBaseAnalysis. - * So my previous check-ins didn't compile with the library. - * Now they do. - * - * Revision 1.11 2000/07/16 21:38:22 laue - * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version - * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings - * AliFemtoParticle.cc AliFemtoParticle.h : pointers mTrack,mV0 initialized to 0 - * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG - * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better - * solution - * - * Revision 1.10 2000/07/06 18:45:51 laue - * Copy constructor fixed. It couldn't handle identicle particles. - * - * Revision 1.9 2000/04/13 20:20:22 laue - * Event mixing corrected. Now the first collection of the current event is - * mixed with the second collection from the mixing buffer _AND_ vice verse - * - * Revision 1.8 2000/03/23 23:00:01 laue - * AliFemtoAnalysis copy constructor now uses Clone() function of cuts - * AliFemtoTypes now has AliFemtoTF1 for fitting purposes - * - * Revision 1.7 2000/03/17 17:23:05 laue - * Roberts new three particle correlations implemented. - * - * Revision 1.6 2000/03/16 02:07:04 laue - * Copy constructor added to AliFemtoAnalysis (only known cuts, corrfctn). - * - * AliFemtoBinaryReader can now derive filename from StIOMaker and read a list - * of files. - * - * AliFemtoManager now holds a collection of AliFemtoEventWriters (multiple writes - * possible now) - * - * Revision 1.5 2000/02/13 17:17:12 laue - * Calls to the EventBegin() and EventEnd() functions implemented - * The actual analysis is moved from AliFemtoManager to AliFemtoAnalysis - * - * Revision 1.4 2000/01/25 17:35:16 laue - * I. In order to run the stand alone version of the AliFemtoMaker the following - * changes have been done: - * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements - * b) unnecessary includes of StMaker.h have been removed - * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything - * needed for the stand alone version - * - * II. To reduce the amount of compiler warning - * a) some variables have been type casted - * b) some destructors have been declared as virtual - * - * Revision 1.3 1999/10/04 15:38:53 lisa - * include Franks new accessor methods AliFemtoAnalysis::CorrFctn and AliFemtoManager::Analysis as well as McEvent example macro - * - * Revision 1.2 1999/07/06 22:33:22 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#include "Analysis/AliFemtoAnalysis.h" -#include "Base/AliFemtoTrackCut.h" -#include "Base/AliFemtoV0Cut.h" -#include "Base/AliFemtoKinkCut.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoAnalysis - the most basic analysis there is. All other // +// inherit from this one. Provides basic functionality for the analysis. // +// To properly set up the analysis the following steps should be taken: // +// // +// - create particle cuts and add them via SetFirstParticleCut and // +// SetSecondParticleCut. If one analyzes identical particle // +// correlations, the first particle cut must be also the second // +// particle cut. // +// // +// - create pair cuts and add them via SetPairCut // +// // +// - create one or many correlation functions and add them via // +// AddCorrFctn method. // +// // +// - specify how many events are to be strored in the mixing buffer for // +// background construction // +// // +// Then, when the analysis is run, for each event, the EventBegin is // +// called before any processing is done, then the ProcessEvent is called // +// which takes care of creating real and mixed pairs and sending them // +// to all the registered correlation functions. At the end of each event,// +// after all pairs are processed, EventEnd is called. After the whole // +// analysis finishes (there is no more events to process) Finish() is // +// called. // +// // +/////////////////////////////////////////////////////////////////////////// +#include "AliFemtoAnalysis.h" +#include "AliFemtoTrackCut.h" +#include "AliFemtoV0Cut.h" +#include "AliFemtoKinkCut.h" #include - +#include #ifdef __ROOT__ ClassImp(AliFemtoAnalysis) @@ -130,6 +48,8 @@ void FillHbtParticleCollection(AliFemtoParticleCut* partCut, AliFemtoEvent* hbtEvent, AliFemtoParticleCollection* partCollection) { + // Fill particle collections from the event + // by the particles that pass all the cuts switch (partCut->Type()) { case hbtTrack: // cut is cutting on Tracks { @@ -206,6 +126,7 @@ AliFemtoAnalysis::AliFemtoAnalysis() : fNeventsProcessed(0), fMinSizePartCollection(0) { + // Default constructor // mControlSwitch = 0; fCorrFctnCollection = new AliFemtoCorrFctnCollection; fMixingBuffer = new AliFemtoPicoEventCollection; @@ -226,6 +147,7 @@ AliFemtoAnalysis::AliFemtoAnalysis(const AliFemtoAnalysis& a) : fNeventsProcessed(0), fMinSizePartCollection(0) { + // Copy constructor //AliFemtoAnalysis(); fCorrFctnCollection = new AliFemtoCorrFctnCollection; fMixingBuffer = new AliFemtoPicoEventCollection; @@ -275,6 +197,7 @@ AliFemtoAnalysis::AliFemtoAnalysis(const AliFemtoAnalysis& a) : } //____________________________ AliFemtoAnalysis::~AliFemtoAnalysis(){ + // destructor cout << " AliFemtoAnalysis::~AliFemtoAnalysis()" << endl; if (fEventCut) delete fEventCut; fEventCut=0; if (fFirstParticleCut == fSecondParticleCut) fSecondParticleCut=0; @@ -299,6 +222,7 @@ AliFemtoAnalysis::~AliFemtoAnalysis(){ //______________________ AliFemtoAnalysis& AliFemtoAnalysis::operator=(const AliFemtoAnalysis& aAna) { + // Assignment operator if (this == &aAna) return *this; @@ -350,7 +274,8 @@ AliFemtoAnalysis& AliFemtoAnalysis::operator=(const AliFemtoAnalysis& aAna) return *this; } //______________________ -AliFemtoCorrFctn* AliFemtoAnalysis::CorrFctn(int n){ // return pointer to n-th correlation function +AliFemtoCorrFctn* AliFemtoAnalysis::CorrFctn(int n){ + // return pointer to n-th correlation function if ( n<0 || n > (int)fCorrFctnCollection->size() ) return NULL; AliFemtoCorrFctnIterator iter=fCorrFctnCollection->begin(); @@ -362,6 +287,7 @@ AliFemtoCorrFctn* AliFemtoAnalysis::CorrFctn(int n){ // return pointer to n-th //____________________________ AliFemtoString AliFemtoAnalysis::Report() { + // Create a simple report from the analysis execution cout << "AliFemtoAnalysis - constructing Report..."<begin(); // always - AliFemtoParticleIterator EndOuterLoop = partCollection1->end(); // will be one less if identical - AliFemtoParticleIterator StartInnerLoop; - AliFemtoParticleIterator EndInnerLoop; + AliFemtoParticleIterator tStartOuterLoop = partCollection1->begin(); // always + AliFemtoParticleIterator tEndOuterLoop = partCollection1->end(); // will be one less if identical + AliFemtoParticleIterator tStartInnerLoop; + AliFemtoParticleIterator tEndInnerLoop; if (partCollection2) { // Two collections: - StartInnerLoop = partCollection2->begin(); // Full inner & outer loops - EndInnerLoop = partCollection2->end(); // + tStartInnerLoop = partCollection2->begin(); // Full inner & outer loops + tEndInnerLoop = partCollection2->end(); // } else { // One collection: - EndOuterLoop--; // Outer loop goes to next-to-last particle - EndInnerLoop = partCollection1->end() ; // Inner loop goes to last particle + tEndOuterLoop--; // Outer loop goes to next-to-last particle + tEndInnerLoop = partCollection1->end() ; // Inner loop goes to last particle } - for (PartIter1=StartOuterLoop;PartIter1!=EndOuterLoop;PartIter1++) { + for (tPartIter1=tStartOuterLoop;tPartIter1!=tEndOuterLoop;tPartIter1++) { if (!partCollection2){ - StartInnerLoop = PartIter1; - StartInnerLoop++; + tStartInnerLoop = tPartIter1; + tStartInnerLoop++; } - ThePair->SetTrack1(*PartIter1); - for (PartIter2 = StartInnerLoop; PartIter2!=EndInnerLoop;PartIter2++) { - ThePair->SetTrack2(*PartIter2); + tPair->SetTrack1(*tPartIter1); + for (tPartIter2 = tStartInnerLoop; tPartIter2!=tEndInnerLoop;tPartIter2++) { + tPair->SetTrack2(*tPartIter2); // The following lines have to be uncommented if you want pairCutMonitors // they are not in for speed reasons - // bool tmpPassPair = fPairCut->Pass(ThePair); - // fPairCut->FillCutMonitor(ThePair, tmpPassPair); + // bool tmpPassPair = fPairCut->Pass(tPair); + // fPairCut->FillCutMonitor(tPair, tmpPassPair); // if ( tmpPassPair ) //---- If pair passes cut, loop over CF's and add pair to real/mixed ----// - if (fPairCut->Pass(ThePair)){ - for (CorrFctnIter=fCorrFctnCollection->begin(); - CorrFctnIter!=fCorrFctnCollection->end();CorrFctnIter++){ - AliFemtoCorrFctn* CorrFctn = *CorrFctnIter; + if (fPairCut->Pass(tPair)){ + for (tCorrFctnIter=fCorrFctnCollection->begin(); + tCorrFctnIter!=fCorrFctnCollection->end();tCorrFctnIter++){ + AliFemtoCorrFctn* tCorrFctn = *tCorrFctnIter; if(type == "real") - CorrFctn->AddRealPair(ThePair); + tCorrFctn->AddRealPair(tPair); else if(type == "mixed") - CorrFctn->AddMixedPair(ThePair); + tCorrFctn->AddMixedPair(tPair); else cout << "Problem with pair type, type = " << type.c_str() << endl; } @@ -538,11 +464,12 @@ void AliFemtoAnalysis::MakePairs(const char* typeIn, AliFemtoParticleCollection } // loop over first particle - delete ThePair; + delete tPair; } //_________________________ void AliFemtoAnalysis::EventBegin(const AliFemtoEvent* ev){ + // Perform initialization operations at the beginning of the event processing //cout << " AliFemtoAnalysis::EventBegin(const AliFemtoEvent* ev) " << endl; fFirstParticleCut->EventBegin(ev); fSecondParticleCut->EventBegin(ev); @@ -553,6 +480,7 @@ void AliFemtoAnalysis::EventBegin(const AliFemtoEvent* ev){ } //_________________________ void AliFemtoAnalysis::EventEnd(const AliFemtoEvent* ev){ + // Fiinsh operations at the end of event processing fFirstParticleCut->EventEnd(ev); fSecondParticleCut->EventEnd(ev); fPairCut->EventEnd(ev); @@ -562,6 +490,7 @@ void AliFemtoAnalysis::EventEnd(const AliFemtoEvent* ev){ } //_________________________ void AliFemtoAnalysis::Finish(){ + // Perform finishing operations after all events are processed AliFemtoCorrFctnIterator iter; for (iter=fCorrFctnCollection->begin(); iter!=fCorrFctnCollection->end();iter++){ (*iter)->Finish(); @@ -569,5 +498,6 @@ void AliFemtoAnalysis::Finish(){ } //_________________________ void AliFemtoAnalysis::AddEventProcessed() { + // Increase count of processed events fNeventsProcessed++; } diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoAnalysis.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysis.h similarity index 75% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoAnalysis.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysis.h index 9fdde6a690d..17517b04abf 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoAnalysis.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysis.h @@ -3,28 +3,27 @@ Most others (e.g. AliFemtoVertexAnalysis) wrap this one. **************************************************************************/ -#ifndef AliFemtoAnalysis_hh -#define AliFemtoAnalysis_hh +#ifndef ALIFEMTOANALYSIS_H +#define ALIFEMTOANALYSIS_H //#ifndef StMaker_H //#include "StMaker.h" //#endif -#include "Base/AliFemtoBaseAnalysis.h" // base analysis class -#include "Base/AliFemtoPairCut.h" -#include "Base/AliFemtoEventCut.h" -#include "Base/AliFemtoParticleCut.h" -#include "Base/AliFemtoCorrFctn.h" -#include "Infrastructure/AliFemtoCorrFctnCollection.h" -#include "Infrastructure/AliFemtoPicoEventCollection.h" -#include "Infrastructure/AliFemtoParticleCollection.h" -#include "Infrastructure/AliFemtoPicoEvent.h" +#include "AliFemtoBaseAnalysis.h" // base analysis class +#include "AliFemtoPairCut.h" +#include "AliFemtoEventCut.h" +#include "AliFemtoParticleCut.h" +#include "AliFemtoCorrFctn.h" +#include "AliFemtoCorrFctnCollection.h" +#include "AliFemtoPicoEventCollection.h" +#include "AliFemtoParticleCollection.h" +#include "AliFemtoPicoEvent.h" class AliFemtoPicoEventCollectionVectorHideAway; - class AliFemtoAnalysis : public AliFemtoBaseAnalysis { - friend class AliFemtoLikeSignAnalysis; + // friend class AliFemtoLikeSignAnalysis; public: AliFemtoAnalysis(); @@ -51,19 +50,19 @@ class AliFemtoAnalysis : public AliFemtoBaseAnalysis { void SetMinSizePartCollection(unsigned int minSize); - unsigned int NumEventsToMix(); + unsigned int NumEventsToMix() const; void SetNumEventsToMix(const unsigned int& NumberOfEventsToMix); AliFemtoPicoEvent* CurrentPicoEvent(); AliFemtoPicoEventCollection* MixingBuffer(); bool MixingBufferFull(); - bool AnalyzeIdenticalParticles(); + bool AnalyzeIdenticalParticles() const; virtual AliFemtoString Report(); //! returns reports of all cuts applied and correlation functions being done virtual void EventBegin(const AliFemtoEvent* TheEventToBegin); // startup for EbyE virtual void ProcessEvent(const AliFemtoEvent* EventToProcess); virtual void EventEnd(const AliFemtoEvent* TheEventToWrapUp); // cleanup for EbyE - int GetNeventsProcessed(); + int GetNeventsProcessed() const; virtual void Finish(); @@ -95,18 +94,19 @@ class AliFemtoAnalysis : public AliFemtoBaseAnalysis { }; // Get's -inline AliFemtoPairCut* AliFemtoAnalysis::PairCut() {return fPairCut;} -inline AliFemtoEventCut* AliFemtoAnalysis::EventCut() {return fEventCut;} -inline AliFemtoParticleCut* AliFemtoAnalysis::FirstParticleCut() {return fFirstParticleCut;} -inline AliFemtoParticleCut* AliFemtoAnalysis::SecondParticleCut() {return fSecondParticleCut;} -inline AliFemtoCorrFctnCollection* AliFemtoAnalysis::CorrFctnCollection() {return fCorrFctnCollection;} -inline unsigned int AliFemtoAnalysis::NumEventsToMix(){return fNumEventsToMix;} -inline AliFemtoPicoEvent* AliFemtoAnalysis::CurrentPicoEvent() {return fPicoEvent;} +inline AliFemtoPairCut* AliFemtoAnalysis::PairCut() {return fPairCut;} +inline AliFemtoEventCut* AliFemtoAnalysis::EventCut() {return fEventCut;} +inline AliFemtoParticleCut* AliFemtoAnalysis::FirstParticleCut() {return fFirstParticleCut;} +inline AliFemtoParticleCut* AliFemtoAnalysis::SecondParticleCut() {return fSecondParticleCut;} +inline AliFemtoCorrFctnCollection* AliFemtoAnalysis::CorrFctnCollection() {return fCorrFctnCollection;} +inline unsigned int AliFemtoAnalysis::NumEventsToMix() const {return fNumEventsToMix;} +inline AliFemtoPicoEvent* AliFemtoAnalysis::CurrentPicoEvent() {return fPicoEvent;} inline AliFemtoPicoEventCollection* AliFemtoAnalysis::MixingBuffer() {return fMixingBuffer;} +inline bool AliFemtoAnalysis::AnalyzeIdenticalParticles() const { return (fFirstParticleCut==fSecondParticleCut); } + // Set's -inline bool AliFemtoAnalysis::AnalyzeIdenticalParticles(){return (fFirstParticleCut==fSecondParticleCut);} inline void AliFemtoAnalysis::SetPairCut(AliFemtoPairCut* x) { fPairCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);} inline void AliFemtoAnalysis::AddCorrFctn(AliFemtoCorrFctn* cf) {fCorrFctnCollection->push_back(cf); cf->SetAnalysis((AliFemtoBaseAnalysis*)this);} inline void AliFemtoAnalysis::SetEventCut(AliFemtoEventCut* x) {fEventCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);} @@ -115,7 +115,7 @@ inline void AliFemtoAnalysis::SetSecondParticleCut(AliFemtoParticleCut* x) {fSec inline void AliFemtoAnalysis::SetNumEventsToMix(const unsigned int& nmix){ fNumEventsToMix = nmix;} inline bool AliFemtoAnalysis::MixingBufferFull(){return (fMixingBuffer->size() >= fNumEventsToMix);} -inline int AliFemtoAnalysis::GetNeventsProcessed() {return fNeventsProcessed;} +inline int AliFemtoAnalysis::GetNeventsProcessed() const {return fNeventsProcessed;} inline void AliFemtoAnalysis::SetMinSizePartCollection(unsigned int minSize){fMinSizePartCollection = minSize;} diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoAnalysisCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisCollection.h similarity index 95% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoAnalysisCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisCollection.h index f12e44eec97..5b7074821f4 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoAnalysisCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisCollection.h @@ -12,6 +12,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoBPLCMS3DCorrFctn.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.cxx similarity index 63% rename from PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoBPLCMS3DCorrFctn.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.cxx index 9d1f85dcd22..04e498a5bfa 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoBPLCMS3DCorrFctn.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.cxx @@ -1,48 +1,17 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * 3D Bertsch-Pratt decomposition in the LCMS frame - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.7 2003/01/31 19:20:54 magestro - * Cleared up simple compiler warnings on i386_linux24 - * - * Revision 1.6 2002/06/07 22:51:38 lisa - * Widely used AliFemtoBPLCMS3DCorrFctn class now accumulates UNcorrected denominator and has a WriteOutHistos method - * - * Revision 1.5 2001/05/23 00:19:04 lisa - * Add in Smearing classes and methods needed for momentum resolution studies and correction - * - * Revision 1.4 2000/10/26 19:48:49 rcwells - * Added functionality for Coulomb correction of in 3D correltions - * - * Revision 1.3 2000/09/14 18:36:53 lisa - * Added Qinv and ExitSep pair cuts and AliFemtoBPLCMS3DCorrFctn_SIM CorrFctn - * - * Revision 1.2 2000/08/23 19:43:43 lisa - * added alternate normalization algorithm to 3d CorrFctns in case normal one fails - * - * Revision 1.1 2000/08/17 20:48:39 lisa - * Adding correlationfunction in LCMS frame - * - * - **************************************************************************/ - -#include "CorrFctn/AliFemtoBPLCMS3DCorrFctn.h" -//#include "Infrastructure/AliFemtoHisto.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoBPLCMS3DCorrFctn: a class to calculate 3D correlation // +// for pairs of identical particles. // +// It also stored the weighted qinv per bin histogram for the coulomb // +// correction. // +// In analysis the function should be first created in a macro, then // +// added to the analysis, and at the end of the macro the procedure to // +// write out histograms should be called. // +// // +/////////////////////////////////////////////////////////////////////////// + +#include "AliFemtoBPLCMS3DCorrFctn.h" +//#include "AliFemtoHisto.h" #include #ifdef __ROOT__ @@ -74,7 +43,7 @@ AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(char* title, const int& nbins fNumRealsNorm(0), fNumMixedNorm(0) { - + // Basic constructor // set some stuff... fQinvNormLo = 0.15; fQinvNormHi = 0.18; @@ -87,25 +56,25 @@ AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(char* title, const int& nbins // fSmearPair = 0; // no resolution correction unless user sets SmearPair // set up numerator - char TitNum[100] = "Num"; - strcat(TitNum,title); - fNumerator = new TH3D(TitNum,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitNum[100] = "Num"; + strcat(tTitNum,title); + fNumerator = new TH3D(tTitNum,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); // set up denominator - char TitDen[100] = "Den"; - strcat(TitDen,title); - fDenominator = new TH3D(TitDen,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitDen[100] = "Den"; + strcat(tTitDen,title); + fDenominator = new TH3D(tTitDen,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); // set up uncorrected denominator - char TitDenUncoul[100] = "DenNoCoul"; - strcat(TitDenUncoul,title); - // fUncorrectedDenominator = new TH3D(TitDenUncoul,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitDenUncoul[100] = "DenNoCoul"; + strcat(tTitDenUncoul,title); + // fUncorrectedDenominator = new TH3D(tTitDenUncoul,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); // set up ratio - char TitRat[100] = "Rat"; - strcat(TitRat,title); - fRatio = new TH3D(TitRat,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitRat[100] = "Rat"; + strcat(tTitRat,title); + fRatio = new TH3D(tTitRat,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); // set up ave qInv - char TitQinv[100] = "Qinv"; - strcat(TitQinv,title); - fQinvHisto = new TH3D(TitQinv,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitQinv[100] = "Qinv"; + strcat(tTitQinv,title); + fQinvHisto = new TH3D(tTitQinv,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); // to enable error bar calculation... fNumerator->Sumw2(); @@ -116,15 +85,15 @@ AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(char* title, const int& nbins // Following histos are for the momentum resolution correction // they are filled only if a AliFemtoSmear object is plugged in // here comes the "idea" numerator and denominator and ratio... - char TitNumID[100] = "IDNum"; - strcat(TitNumID,title); - fIDNumHisto = new TH3D(TitNumID,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); - char TitDenID[100] = "IDDen"; - strcat(TitDenID,title); - fIDDenHisto = new TH3D(TitDenID,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); - char TitRatID[100] = "IDRat"; - strcat(TitRatID,title); - fIDRatHisto = new TH3D(TitRatID,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitNumID[100] = "IDNum"; + strcat(tTitNumID,title); + fIDNumHisto = new TH3D(tTitNumID,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitDenID[100] = "IDDen"; + strcat(tTitDenID,title); + fIDDenHisto = new TH3D(tTitDenID,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitRatID[100] = "IDRat"; + strcat(tTitRatID,title); + fIDRatHisto = new TH3D(tTitRatID,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); fIDNumHisto->Sumw2(); fIDDenHisto->Sumw2(); @@ -132,29 +101,29 @@ AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(char* title, const int& nbins // // here comes the "smeared" numerator and denominator... - char TitNumSM[100] = "SMNum"; - strcat(TitNumSM,title); - fSMNumHisto = new TH3D(TitNumSM,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); - char TitDenSM[100] = "SMDen"; - strcat(TitDenSM,title); - fSMDenHisto = new TH3D(TitDenSM,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); - char TitRatSM[100] = "SMRat"; - strcat(TitRatSM,title); - fSMRatHisto = new TH3D(TitRatSM,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitNumSM[100] = "SMNum"; + strcat(tTitNumSM,title); + fSMNumHisto = new TH3D(tTitNumSM,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitDenSM[100] = "SMDen"; + strcat(tTitDenSM,title); + fSMDenHisto = new TH3D(tTitDenSM,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitRatSM[100] = "SMRat"; + strcat(tTitRatSM,title); + fSMRatHisto = new TH3D(tTitRatSM,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); // fSMNumHisto->Sumw2(); fSMDenHisto->Sumw2(); fSMRatHisto->Sumw2(); // // here comes the correction factor (which is just ratio of ideal ratio to smeared ratio) - char TitCorrection[100] = "CorrectionFactor"; - strcat(TitCorrection,title); - fCorrectionHisto = new TH3D(TitCorrection,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitCorrection[100] = "CorrectionFactor"; + strcat(tTitCorrection,title); + fCorrectionHisto = new TH3D(tTitCorrection,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); fCorrectionHisto->Sumw2(); // here comes the fully corrected correlation function - char TitCorrCF[100] = "CorrectedCF"; - strcat(TitCorrCF,title); - fCorrCFHisto = new TH3D(TitCorrCF,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); + char tTitCorrCF[100] = "CorrectedCF"; + strcat(tTitCorrCF,title); + fCorrCFHisto = new TH3D(tTitCorrCF,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi); fCorrCFHisto->Sumw2(); // user can (and should) override these defaults... @@ -188,18 +157,19 @@ AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(const AliFemtoBPLCMS3DCorrFct fNumRealsNorm(0), fNumMixedNorm(0) { - fIDNumHisto = aCorrFctn.fIDNumHisto; - fIDDenHisto = aCorrFctn.fIDDenHisto; - fIDRatHisto = aCorrFctn.fIDRatHisto; - fSMNumHisto = aCorrFctn.fSMNumHisto; - fSMDenHisto = aCorrFctn.fSMDenHisto; - fSMRatHisto = aCorrFctn.fSMRatHisto; - fCorrectionHisto = aCorrFctn.fCorrectionHisto; - fCorrCFHisto = aCorrFctn.fCorrCFHisto; - fNumerator = aCorrFctn.fNumerator; - fDenominator = aCorrFctn.fDenominator; - fRatio = aCorrFctn.fRatio; - fQinvHisto = aCorrFctn.fQinvHisto; + // Copy constructor + fIDNumHisto = new TH3D(*aCorrFctn.fIDNumHisto); + fIDDenHisto = new TH3D(*aCorrFctn.fIDDenHisto); + fIDRatHisto = new TH3D(*aCorrFctn.fIDRatHisto); + fSMNumHisto = new TH3D(*aCorrFctn.fSMNumHisto); + fSMDenHisto = new TH3D(*aCorrFctn.fSMDenHisto); + fSMRatHisto = new TH3D(*aCorrFctn.fSMRatHisto); + fCorrectionHisto = new TH3D(*aCorrFctn.fCorrectionHisto); + fCorrCFHisto = new TH3D(*aCorrFctn.fCorrCFHisto); + fNumerator = new TH3D(*aCorrFctn.fNumerator); + fDenominator = new TH3D(*aCorrFctn.fDenominator); + fRatio = new TH3D(*aCorrFctn.fRatio); + fQinvHisto = new TH3D(*aCorrFctn.fQinvHisto); fLambda = aCorrFctn.fLambda; fRout2 = aCorrFctn.fRout2; fRside2 = aCorrFctn.fRside2; @@ -212,6 +182,7 @@ AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(const AliFemtoBPLCMS3DCorrFct } //____________________________ AliFemtoBPLCMS3DCorrFctn::~AliFemtoBPLCMS3DCorrFctn(){ + // Destructor delete fNumerator; delete fDenominator; delete fRatio; @@ -228,6 +199,7 @@ AliFemtoBPLCMS3DCorrFctn::~AliFemtoBPLCMS3DCorrFctn(){ //_________________________ AliFemtoBPLCMS3DCorrFctn& AliFemtoBPLCMS3DCorrFctn::operator=(const AliFemtoBPLCMS3DCorrFctn& aCorrFctn) { + // assignment operator if (this == &aCorrFctn) return *this; if (fIDNumHisto) delete fIDNumHisto; @@ -271,7 +243,7 @@ AliFemtoBPLCMS3DCorrFctn& AliFemtoBPLCMS3DCorrFctn::operator=(const AliFemtoBPLC //_________________________ void AliFemtoBPLCMS3DCorrFctn::WriteOutHistos(){ - + // Write out all histograms to file fNumerator->Write(); fDenominator->Write(); // fUncorrectedDenominator->Write(); @@ -297,10 +269,10 @@ void AliFemtoBPLCMS3DCorrFctn::WriteOutHistos(){ //_________________________ void AliFemtoBPLCMS3DCorrFctn::Finish(){ // here is where we should normalize, fit, etc... - double NumFact,DenFact; + double tNumFact,tDenFact; if ((fNumRealsNorm !=0) && (fNumMixedNorm !=0)){ - NumFact = double(fNumRealsNorm); - DenFact = double(fNumMixedNorm); + tNumFact = double(fNumRealsNorm); + tDenFact = double(fNumMixedNorm); } // can happen that the fNumRealsNorm and fNumMixedNorm = 0 if you do non-standard // things like making a new CorrFctn and just setting the Numerator and Denominator @@ -309,11 +281,11 @@ void AliFemtoBPLCMS3DCorrFctn::Finish(){ cout << "Warning! - no normalization constants defined - I do the best I can..." << endl; int nbins = fNumerator->GetNbinsX(); int half_way = nbins/2; - NumFact = fNumerator->Integral(half_way,nbins,half_way,nbins,half_way,nbins); - DenFact = fDenominator->Integral(half_way,nbins,half_way,nbins,half_way,nbins); + tNumFact = fNumerator->Integral(half_way,nbins,half_way,nbins,half_way,nbins); + tDenFact = fDenominator->Integral(half_way,nbins,half_way,nbins,half_way,nbins); } - fRatio->Divide(fNumerator,fDenominator,DenFact,NumFact); + fRatio->Divide(fNumerator,fDenominator,tDenFact,tNumFact); // fQinvHisto->Divide(fUncorrectedDenominator); fQinvHisto->Divide(fDenominator); @@ -331,6 +303,7 @@ void AliFemtoBPLCMS3DCorrFctn::Finish(){ //____________________________ AliFemtoString AliFemtoBPLCMS3DCorrFctn::Report(){ + // Construct the report string stemp = "LCMS Frame Bertsch-Pratt 3D Correlation Function Report:\n"; char ctemp[100]; sprintf(ctemp,"Number of entries in numerator:\t%E\n",fNumerator->GetEntries()); @@ -372,39 +345,39 @@ AliFemtoString AliFemtoBPLCMS3DCorrFctn::Report(){ return returnThis; } //____________________________ -void AliFemtoBPLCMS3DCorrFctn::AddRealPair(const AliFemtoPair* pair){ - +void AliFemtoBPLCMS3DCorrFctn::AddRealPair( AliFemtoPair* pair){ + // perform operations on real pairs if (fPairCut){ if (!(fPairCut->Pass(pair))) return; } - double Qinv = fabs(pair->qInv()); // note - qInv() will be negative for identical pairs... - if ((Qinv < fQinvNormHi) && (Qinv > fQinvNormLo)) fNumRealsNorm++; - double qOut = fabs(pair->qOutCMS()); - double qSide = fabs(pair->qSideCMS()); - double qLong = fabs(pair->qLongCMS()); + double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs... + if ((tQinv < fQinvNormHi) && (tQinv > fQinvNormLo)) fNumRealsNorm++; + double qOut = fabs(pair->QOutCMS()); + double qSide = fabs(pair->QSideCMS()); + double qLong = fabs(pair->QLongCMS()); fNumerator->Fill(qOut,qSide,qLong); } //____________________________ -void AliFemtoBPLCMS3DCorrFctn::AddMixedPair(const AliFemtoPair* pair){ - +void AliFemtoBPLCMS3DCorrFctn::AddMixedPair( AliFemtoPair* pair){ + // perform operations on mixed pairs if (fPairCut){ if (!(fPairCut->Pass(pair))) return; } // double CoulombWeight = (fCorrection ? fCorrection->CoulombCorrect(pair) : 1.0); - double CoulombWeight = 1.0; + double tCoulombWeight = 1.0; - double Qinv = fabs(pair->qInv()); // note - qInv() will be negative for identical pairs... - if ((Qinv < fQinvNormHi) && (Qinv > fQinvNormLo)) fNumMixedNorm++; - double qOut = fabs(pair->qOutCMS()); - double qSide = fabs(pair->qSideCMS()); - double qLong = fabs(pair->qLongCMS()); + double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs... + if ((tQinv < fQinvNormHi) && (tQinv > fQinvNormLo)) fNumMixedNorm++; + double qOut = fabs(pair->QOutCMS()); + double qSide = fabs(pair->QSideCMS()); + double qLong = fabs(pair->QLongCMS()); - fDenominator->Fill(qOut,qSide,qLong,CoulombWeight); + fDenominator->Fill(qOut,qSide,qLong,tCoulombWeight); // fUncorrectedDenominator->Fill(qOut,qSide,qLong,1.0); - fQinvHisto->Fill(qOut,qSide,qLong,Qinv); + fQinvHisto->Fill(qOut,qSide,qLong,tQinv); /* // now for the momentum resolution stuff... diff --git a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoBPLCMS3DCorrFctn.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.h similarity index 53% rename from PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoBPLCMS3DCorrFctn.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.h index 1e274332632..226546d2d57 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoBPLCMS3DCorrFctn.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.h @@ -1,50 +1,19 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * This one does 3D Bertsch-Pratt decomposition in the LCMS frame - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.5 2002/06/07 22:51:39 lisa - * Widely used AliFemtoBPLCMS3DCorrFctn class now accumulates UNcorrected denominator and has a WriteOutHistos method - * - * Revision 1.4 2001/05/23 00:19:04 lisa - * Add in Smearing classes and methods needed for momentum resolution studies and correction - * - * Revision 1.3 2000/10/26 19:48:50 rcwells - * Added functionality for Coulomb correction of in 3D correltions - * - * Revision 1.2 2000/09/14 18:36:53 lisa - * Added Qinv and ExitSep pair cuts and AliFemtoBPLCMS3DCorrFctn_SIM CorrFctn - * - * Revision 1.1 2000/08/17 20:48:39 lisa - * Adding correlationfunction in LCMS frame - * - * - * - **************************************************************************/ - -#ifndef AliFemtoBPLCMS3DCorrFctn_hh -#define AliFemtoBPLCMS3DCorrFctn_hh - -#include "Base/AliFemtoCorrFctn.h" -//#include "Infrastructure/AliFemtoCoulomb.h" -#include "Base/AliFemtoPairCut.h" -//#include "Infrastructure/AliFemtoHisto.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoBPLCMS3DCorrFctn: a class to calculate 3D correlation // +// for pairs of identical particles. // +// // +/////////////////////////////////////////////////////////////////////////// + +#ifndef ALIFEMTOBPLCMS3DCORRFCTN_H +#define ALIFEMTOBPLCMS3DCORRFCTN_H + +#include "AliFemtoCorrFctn.h" +//#include "AliFemtoCoulomb.h" +#include "AliFemtoPairCut.h" +//#include "AliFemtoHisto.h" #include "TH3D.h" -//#include "Infrastructure/AliFemtoSmearPair.h" +//#include "AliFemtoSmearPair.h" class AliFemtoBPLCMS3DCorrFctn : public AliFemtoCorrFctn { public: @@ -55,8 +24,8 @@ public: AliFemtoBPLCMS3DCorrFctn& operator=(const AliFemtoBPLCMS3DCorrFctn& aCorrFctn); virtual AliFemtoString Report(); - virtual void AddRealPair(const AliFemtoPair*); - virtual void AddMixedPair(const AliFemtoPair*); + virtual void AddRealPair( AliFemtoPair* aPair); + virtual void AddMixedPair( AliFemtoPair* aPair); virtual void Finish(); @@ -70,14 +39,14 @@ public: // by default, but the Set's below override this void SetNormRangeLo(float qLo); void SetNormRangeHi(float qHi); - float GetNormRangeLo(); - float GetNormRangeHi(); + float GetNormRangeLo() const; + float GetNormRangeHi() const; void WriteOutHistos(); // void SetCoulombCorrection(AliFemtoCoulomb* Correction); - void SetSpecificPairCut(AliFemtoPairCut*); + void SetSpecificPairCut(AliFemtoPairCut* aCut); // void SetSmearPair(AliFemtoSmearPair*); void SetRout(double guess); @@ -85,45 +54,41 @@ public: void SetRlong(double guess); void SetLambda(double guess); - +private: // here are a whole bunch of histos that get filled if we do resolution correction - TH3D* fIDNumHisto; - TH3D* fIDDenHisto; - TH3D* fIDRatHisto; + TH3D* fIDNumHisto; // true pairs numerator + TH3D* fIDDenHisto; // true pairs denominator + TH3D* fIDRatHisto; // true pairs ratio + // + TH3D* fSMNumHisto; // mixed pairs numerator + TH3D* fSMDenHisto; // mixed pairs denominator + TH3D* fSMRatHisto; // mixed pairs ratio // - TH3D* fSMNumHisto; - TH3D* fSMDenHisto; - TH3D* fSMRatHisto; - // - TH3D* fCorrectionHisto; - TH3D* fCorrCFHisto; - + TH3D* fCorrectionHisto; // correction histogram + TH3D* fCorrCFHisto; // Corrected CF - - -private: - TH3D* fNumerator; - TH3D* fDenominator; + TH3D* fNumerator; // numerator + TH3D* fDenominator; // denominator // TH3D* fUncorrectedDenominator; - TH3D* fRatio; - TH3D* fQinvHisto; + TH3D* fRatio; // ratio - the correlation function + TH3D* fQinvHisto; // Qinv weights // for resolution correction // AliFemtoSmearPair* fSmearPair; //! - double fLambda; - double fRout2; - double fRside2; - double fRlong2; + double fLambda; // lambda for smearing correction + double fRout2; // Rout for smearing correction + double fRside2; // Rside for smearing correction + double fRlong2; // Rlong for smearing correction AliFemtoPairCut* fPairCut; //! this is a PairCut specific to THIS CorrFctn, not the Analysis // upper and lower bounds of Qinv region where to do normalization - float fQinvNormLo; - float fQinvNormHi; + float fQinvNormLo; // Lower bound of Qinv normalization range + float fQinvNormHi; // Upper bound of Qinv normalization range // and here are the number of pairs in that region... - unsigned long int fNumRealsNorm; - unsigned long int fNumMixedNorm; + unsigned long int fNumRealsNorm; // pairs in numerator in Qinv normalization range + unsigned long int fNumMixedNorm; // pairs in denominator in Qinv normalization range // AliFemtoCoulomb* fCorrection; //! @@ -140,8 +105,8 @@ inline TH3D* AliFemtoBPLCMS3DCorrFctn::Ratio(){return fRatio;} inline TH3D* AliFemtoBPLCMS3DCorrFctn::QinvHisto(){return fQinvHisto;} inline void AliFemtoBPLCMS3DCorrFctn::SetNormRangeLo(float qLo){fQinvNormLo = qLo;} inline void AliFemtoBPLCMS3DCorrFctn::SetNormRangeHi(float qHi){fQinvNormHi = qHi;} -inline float AliFemtoBPLCMS3DCorrFctn::GetNormRangeLo(){return fQinvNormLo;} -inline float AliFemtoBPLCMS3DCorrFctn::GetNormRangeHi(){return fQinvNormHi;} +inline float AliFemtoBPLCMS3DCorrFctn::GetNormRangeLo() const{return fQinvNormLo;} +inline float AliFemtoBPLCMS3DCorrFctn::GetNormRangeHi() const{return fQinvNormHi;} //inline void AliFemtoBPLCMS3DCorrFctn::SetCoulombCorrection(AliFemtoCoulomb* Correction){fCorrection = Correction;} inline void AliFemtoBPLCMS3DCorrFctn::SetSpecificPairCut(AliFemtoPairCut* pc){fPairCut=pc;} //inline void AliFemtoBPLCMS3DCorrFctn::SetSmearPair(AliFemtoSmearPair* sp){fSmearPair = sp;} diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoBaseAnalysis.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBaseAnalysis.h similarity index 95% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoBaseAnalysis.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoBaseAnalysis.h index 5b0c7ee0cd6..8cb6a693a09 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoBaseAnalysis.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBaseAnalysis.h @@ -5,7 +5,7 @@ #ifndef AliFemtoBaseAnalysis_hh #define AliFemtoBaseAnalysis_hh -#include "Infrastructure/AliFemtoTypes.h" +#include "AliFemtoTypes.h" class AliFemtoEvent; diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx new file mode 100644 index 00000000000..0dd854797dd --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx @@ -0,0 +1,51 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoBasicEventCut - the basic cut for events. // +// Only cuts on event multiplicity and z-vertex position // +// // +//////////////////////////////////////////////////////////////////////////////// + +#include "AliFemtoBasicEventCut.h" +#include + +#ifdef __ROOT__ +ClassImp(AliFemtoBasicEventCut) +#endif + +AliFemtoBasicEventCut::AliFemtoBasicEventCut() : + fNEventsPassed(0), fNEventsFailed(0) +{ + /* no-op */ +} +//------------------------------ +//AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){ +// /* noop */ +//} +//------------------------------ +bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){ + int mult = event->NumberOfTracks(); + double VertexZPos = event->PrimVertPos().z(); + cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl; + cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << VertexZPos << " < " << fVertZPos[1] << endl; + bool goodEvent = + ((mult > fEventMult[0]) && + (mult < fEventMult[1]) && + (VertexZPos > fVertZPos[0]) && + (VertexZPos < fVertZPos[1])); + goodEvent ? fNEventsPassed++ : fNEventsFailed++ ; + cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl; + return (goodEvent); +} +//------------------------------ +AliFemtoString AliFemtoBasicEventCut::Report(){ + string Stemp; + char Ctemp[100]; + sprintf(Ctemp,"\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]); + Stemp = Ctemp; + sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]); + Stemp += Ctemp; + sprintf(Ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed); + Stemp += Ctemp; + AliFemtoString returnThis = Stemp; + return returnThis; +} diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h new file mode 100644 index 00000000000..2835283a7f5 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h @@ -0,0 +1,63 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoBasicEventCut - the basic cut for events. // +// Only cuts on event multiplicity and z-vertex position // +// // +//////////////////////////////////////////////////////////////////////////////// + +#ifndef AliFemtoBasicEventCut_hh +#define AliFemtoBasicEventCut_hh + +// do I need these lines ? +//#ifndef StMaker_H +//#include "StMaker.h" +//#endif + +#include "AliFemtoEventCut.h" + +class AliFemtoBasicEventCut : public AliFemtoEventCut { + +public: + + AliFemtoBasicEventCut(); + AliFemtoBasicEventCut(AliFemtoBasicEventCut&); + //~AliFemtoBasicEventCut(); + + void SetEventMult(const int& lo,const int& hi); + void SetVertZPos(const float& lo, const float& hi); + int NEventsPassed(); + int NEventsFailed(); + + virtual AliFemtoString Report(); + virtual bool Pass(const AliFemtoEvent*); + + AliFemtoBasicEventCut* Clone(); + +private: // here are the quantities I want to cut on... + + int fEventMult[2]; // range of multiplicity + float fVertZPos[2]; // range of z-position of vertex + + long fNEventsPassed; + long fNEventsFailed; + +#ifdef __ROOT__ + ClassDef(AliFemtoBasicEventCut, 1) +#endif + +}; + +inline void AliFemtoBasicEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;} +inline void AliFemtoBasicEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;} +inline int AliFemtoBasicEventCut::NEventsPassed() {return fNEventsPassed;} +inline int AliFemtoBasicEventCut::NEventsFailed() {return fNEventsFailed;} +inline AliFemtoBasicEventCut* AliFemtoBasicEventCut::Clone() { AliFemtoBasicEventCut* c = new AliFemtoBasicEventCut(*this); return c;} +inline AliFemtoBasicEventCut::AliFemtoBasicEventCut(AliFemtoBasicEventCut& c) : AliFemtoEventCut(c), fNEventsPassed(0), fNEventsFailed(0) { + fEventMult[0] = c.fEventMult[0]; + fEventMult[1] = c.fEventMult[1]; + fVertZPos[0] = c.fVertZPos[0]; + fVertZPos[1] = c.fVertZPos[1]; +} + + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicTrackCut.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.cxx similarity index 88% rename from PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicTrackCut.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.cxx index b50a58b0dba..65084344a5b 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicTrackCut.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.cxx @@ -1,19 +1,12 @@ -/*************************************************************************** - * - * $Id: - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * a simple particle cut that selects on phasespace, #hits, DCA, and PID - * - *************************************************************************** - * - * $Log: - **************************************************************************/ +//////////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoBasicTrackCut - the basic cut for tracks. // +// Cuts on particle identification, transverse momentum, rapidity, distance // +// of closest approach to primary vertex and charge // +// // +//////////////////////////////////////////////////////////////////////////////// -#include "Cut/AliFemtoBasicTrackCut.h" +#include "AliFemtoBasicTrackCut.h" #include #ifdef __ROOT__ diff --git a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicTrackCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.h similarity index 77% rename from PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicTrackCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.h index a1666266a8e..9d9a3de47da 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicTrackCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.h @@ -1,17 +1,10 @@ -/*************************************************************************** - * - * $Id: - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * a simple particle cut that selects on phasespace, #hits, DCA, and PID - * - *************************************************************************** - * - * $Log: - **************************************************************************/ +//////////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoBasicTrackCut - the basic cut for tracks. // +// Cuts on particle identification, transverse momentum, rapidity, distance // +// of closest approach to primary vertex and charge // +// // +//////////////////////////////////////////////////////////////////////////////// #ifndef AliFemtoBasicTrackCut_hh #define AliFemtoBasicTrackCut_hh @@ -20,7 +13,7 @@ //#include "StMaker.h" //#endif -#include "Base/AliFemtoTrackCut.h" +#include "AliFemtoTrackCut.h" class AliFemtoBasicTrackCut : public AliFemtoTrackCut { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoCorrFctn.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCorrFctn.h similarity index 93% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoCorrFctn.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCorrFctn.h index 277d2d2e2bd..7658b256912 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoCorrFctn.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCorrFctn.h @@ -5,9 +5,9 @@ #ifndef AliFemtoCorrFctn_hh #define AliFemtoCorrFctn_hh -#include "Base/AliFemtoBaseAnalysis.h" -#include "Infrastructure/AliFemtoEvent.h" -#include "Infrastructure/AliFemtoPair.h" +#include "AliFemtoBaseAnalysis.h" +#include "AliFemtoEvent.h" +#include "AliFemtoPair.h" class AliFemtoCorrFctn{ diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCorrFctnCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCorrFctnCollection.h similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCorrFctnCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCorrFctnCollection.h index fa0a1e2e87c..0f3ce92465d 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCorrFctnCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCorrFctnCollection.h @@ -12,6 +12,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCoulomb.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.cxx similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCoulomb.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.cxx index 4758180b918..4cb9c850afc 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCoulomb.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.cxx @@ -14,6 +14,9 @@ *************************************************************************** * * $Log$ + * Revision 1.4 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.3 2007/04/27 07:24:34 akisiel * Make revisions needed for compilation from the main AliRoot tree * @@ -53,7 +56,7 @@ //#include "Stiostream.h" #include #include -#include "Base/PhysicalConstants.h" +#include "PhysicalConstants.h" #ifdef __ROOT__ ClassImp(AliFemtoCoulomb) @@ -351,14 +354,14 @@ double AliFemtoCoulomb::Eta(const AliFemtoPair* pair) { static double beta,gamma; static double VcmsXnew; - px1 = pair->track1()->FourMomentum().px(); - py1 = pair->track1()->FourMomentum().py(); - pz1 = pair->track1()->FourMomentum().pz(); - e1 = pair->track1()->FourMomentum().e(); - px2 = pair->track2()->FourMomentum().px(); - py2 = pair->track2()->FourMomentum().py(); - pz2 = pair->track2()->FourMomentum().pz(); - e2 = pair->track2()->FourMomentum().e(); + px1 = pair->Track1()->FourMomentum().px(); + py1 = pair->Track1()->FourMomentum().py(); + pz1 = pair->Track1()->FourMomentum().pz(); + e1 = pair->Track1()->FourMomentum().e(); + px2 = pair->Track2()->FourMomentum().px(); + py2 = pair->Track2()->FourMomentum().py(); + pz2 = pair->Track2()->FourMomentum().pz(); + e2 = pair->Track2()->FourMomentum().e(); VcmsX = ( px1+px2 )/( e1+e2 ); VcmsY = ( py1+py2 )/( e1+e2 ); diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCoulomb.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.h similarity index 95% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCoulomb.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.h index aa1a3b29d09..986980e9e1c 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCoulomb.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.h @@ -14,6 +14,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -44,9 +47,9 @@ #define AliFemtoCoulomb_HH #include -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoPair.h" -#include "Infrastructure/AliFemtoParticle.h" +#include "AliFemtoTypes.h" +#include "AliFemtoPair.h" +#include "AliFemtoParticle.h" #include "TH1D.h" #include "TH3D.h" diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoCutMonitor.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitor.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoCutMonitor.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitor.h index 09b98e4954c..7a20ef3aaa7 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoCutMonitor.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitor.h @@ -10,8 +10,8 @@ class AliFemtoTrack; class AliFemtoV0; class AliFemtoKink; class AliFemtoPair; // Gael 12/04/02 -#include "Infrastructure/AliFemtoString.h" -#include "Infrastructure/AliFemtoParticleCollection.h" // Gael 19/06/02 +#include "AliFemtoString.h" +#include "AliFemtoParticleCollection.h" // Gael 19/06/02 class AliFemtoCutMonitor{ diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCutMonitorCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollection.h similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCutMonitorCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollection.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCutMonitorHandler.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorHandler.cxx similarity index 77% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCutMonitorHandler.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorHandler.cxx index e819703b7de..0d9ab9c70e2 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoCutMonitorHandler.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorHandler.cxx @@ -1,6 +1,15 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoCutMonitorHandler: a handler for cut monitors // +// You add cut monitors to the collection which are stored in two // +// separate collections - one which stores characteristics of the // +// entities (tracks, particles, pairs, events) that pass the respective // +// cuts and the other for the ones that fail the cut. // +// // +/////////////////////////////////////////////////////////////////////////// -#include "Infrastructure/AliFemtoCutMonitorHandler.h" -#include "Infrastructure/AliFemtoTypes.h" +#include "AliFemtoCutMonitorHandler.h" +#include "AliFemtoTypes.h" #ifdef __ROOT__ ClassImp(AliFemtoCutMonitorHandler) @@ -8,7 +17,8 @@ ClassImp(AliFemtoCutMonitorHandler) // --------------------------------------------------------------------------- AliFemtoCutMonitorHandler::AliFemtoCutMonitorHandler(): fCollectionsEmpty(0), fPassColl(0), fFailColl(0) - { +{ + // Default constructor cout << " *** AliFemtoCutMonitorHandler::AliFemtoCutMonitorHandler() " << endl; fCollectionsEmpty = 0; fPassColl = new AliFemtoCutMonitorCollection(); @@ -18,6 +28,7 @@ AliFemtoCutMonitorHandler::AliFemtoCutMonitorHandler(): AliFemtoCutMonitorHandler::AliFemtoCutMonitorHandler(const AliFemtoCutMonitorHandler& aHan): fCollectionsEmpty(0), fPassColl(0), fFailColl(0) { + // Copy constructor fCollectionsEmpty = aHan.fCollectionsEmpty; fPassColl = new AliFemtoCutMonitorCollection(); AliFemtoCutMonitorIterator iter; @@ -32,12 +43,14 @@ AliFemtoCutMonitorHandler::AliFemtoCutMonitorHandler(const AliFemtoCutMonitorHan // --------------------------------------------------------------------------- AliFemtoCutMonitorHandler::~AliFemtoCutMonitorHandler() { + // Default destructor delete fPassColl; delete fFailColl; } //__________________________ AliFemtoCutMonitorHandler& AliFemtoCutMonitorHandler::operator=(const AliFemtoCutMonitorHandler& aHan) { + // assignment operator if (this == &aHan) return *this; @@ -63,115 +76,122 @@ AliFemtoCutMonitorHandler& AliFemtoCutMonitorHandler::operator=(const AliFemtoCu // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event, bool pass) { + // fill event cut monitors if (fCollectionsEmpty) return; AliFemtoCutMonitorIterator iter; - AliFemtoCutMonitor* CM; + AliFemtoCutMonitor* tCM; if ( pass) { for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(event); + tCM = *iter; + tCM->Fill(event); } } else { for (iter=fFailColl->begin(); iter!=fFailColl->end(); iter++){ - CM = *iter; - CM->Fill(event); + tCM = *iter; + tCM->Fill(event); } } } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoTrack* track, bool pass) { + // Fill track cut monitors if (fCollectionsEmpty) return; AliFemtoCutMonitorIterator iter; - AliFemtoCutMonitor* CM; + AliFemtoCutMonitor* tCM; if ( pass) { for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(track); + tCM = *iter; + tCM->Fill(track); } } else { for (iter=fFailColl->begin(); iter!=fFailColl->end(); iter++){ - CM = *iter; - CM->Fill(track); + tCM = *iter; + tCM->Fill(track); } } } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoV0* v0, bool pass) { + // fill V0 cut monitors if (fCollectionsEmpty) return; AliFemtoCutMonitorIterator iter; - AliFemtoCutMonitor* CM; + AliFemtoCutMonitor* tCM; if ( pass) { for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(v0); + tCM = *iter; + tCM->Fill(v0); } } else { for (iter=fFailColl->begin(); iter!=fFailColl->end(); iter++){ - CM = *iter; - CM->Fill(v0); + tCM = *iter; + tCM->Fill(v0); } } } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoKink* kink, bool pass) { + // fill kink cut monitors if (fCollectionsEmpty) return; AliFemtoCutMonitorIterator iter; - AliFemtoCutMonitor* CM; + AliFemtoCutMonitor* tCM; if ( pass) { for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(kink); + tCM = *iter; + tCM->Fill(kink); } } else { for (iter=fFailColl->begin(); iter!=fFailColl->end(); iter++){ - CM = *iter; - CM->Fill(kink); + tCM = *iter; + tCM->Fill(kink); } } } // ---------------------------------Gael/12/04/02----------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoPair* pair, bool pass) { + // fill pair cut monitors if (fCollectionsEmpty) return; AliFemtoCutMonitorIterator iter; - AliFemtoCutMonitor* CM; + AliFemtoCutMonitor* tCM; if ( pass) { for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(pair); + tCM = *iter; + tCM->Fill(pair); } } else { for (iter=fFailColl->begin(); iter!=fFailColl->end(); iter++){ - CM = *iter; - CM->Fill(pair); + tCM = *iter; + tCM->Fill(pair); } } } // ---------------------------------Gael/19/06/02----------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoParticleCollection* partColl) { + // fill particle collection cut monitor if (fCollectionsEmpty) return; AliFemtoCutMonitorIterator iter; - AliFemtoCutMonitor* CM; + AliFemtoCutMonitor* tCM; for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(partColl); + tCM = *iter; + tCM->Fill(partColl); } } // ------------------------------------Gael/19/06/02------------------------- void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event,const AliFemtoParticleCollection* partColl) { - + // Fill event particle collection cout<<"In AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event, AliFemtoPicoEvent* picoEvent)"<begin(); iter!=fPassColl->end(); iter++){ - CM = *iter; - CM->Fill(event,partColl); + tCM = *iter; + tCM->Fill(event,partColl); } } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::Finish() { + // Perform finish operations on cut monitors AliFemtoCutMonitorIterator iter; for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){ (*iter)->Finish(); @@ -182,12 +202,14 @@ void AliFemtoCutMonitorHandler::Finish() { } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::AddCutMonitor(AliFemtoCutMonitor* cutMoni1, AliFemtoCutMonitor* cutMoni2) { + // Add cut monitors to collections fPassColl->push_back(cutMoni1); fFailColl->push_back(cutMoni2); fCollectionsEmpty=false; } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::AddCutMonitor(AliFemtoCutMonitor* cutMoni) { + // make a copy of the cut monitor cout << " make a copy of the cutmonitor and push both into the collections " << endl; cout << " not yet implemented" << endl; fPassColl->push_back(cutMoni); @@ -196,16 +218,19 @@ void AliFemtoCutMonitorHandler::AddCutMonitor(AliFemtoCutMonitor* cutMoni) { } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::AddCutMonitorPass(AliFemtoCutMonitor* cutMoni) { + // add monitors to pass fPassColl->push_back(cutMoni); fCollectionsEmpty=false; } // --------------------------------------------------------------------------- void AliFemtoCutMonitorHandler::AddCutMonitorFail(AliFemtoCutMonitor* cutMoni) { + // add monitors to fail fFailColl->push_back(cutMoni); fCollectionsEmpty=false; } // --------------------------------------------------------------------------- AliFemtoCutMonitor* AliFemtoCutMonitorHandler::PassMonitor(int n) { + // return pass monitor number n AliFemtoCutMonitorIterator iter = fPassColl->begin(); if ( (int)fPassColl->size() <= n ) return NULL; for ( int i=0; ibegin(); if ( (int)fFailColl->size() <= n ) return NULL; for ( int i=0; i #include diff --git a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoDummyPairCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoDummyPairCut.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoDummyPairCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoDummyPairCut.h index 81ded7edfc0..2a0871c7858 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoDummyPairCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoDummyPairCut.h @@ -11,6 +11,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:41:06 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -66,7 +69,7 @@ //#include "StMaker.h" //#endif -#include "Base/AliFemtoPairCut.h" +#include "AliFemtoPairCut.h" class AliFemtoDummyPairCut : public AliFemtoPairCut{ public: diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEnumeration.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEnumeration.h similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEnumeration.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEnumeration.h index 1464df75df0..5c88e5008f1 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEnumeration.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEnumeration.h @@ -8,6 +8,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx similarity index 61% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx index 7e549239324..09e7c69a1d9 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx @@ -1,140 +1,23 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * HbtEvent is the "transient microDST" Objects of this class are - * generated from the input data by a Reader, and then presented to - * the Cuts of the various active Analyses. - * - *************************************************************************** - * - * $Log$ - * Revision 1.3 2007/04/27 07:24:34 akisiel - * Make revisions needed for compilation from the main AliRoot tree - * - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.2 2007-04-03 16:00:08 mchojnacki - * Changes to iprove memory managing - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.23 2005/08/19 21:19:11 chajecki - * line 326: the same change as in line 235 - * - * Revision 1.22 2005/08/19 11:33:31 chajecki - * fix due to the last changes in MuDst - * line 235: TClonesArray* tracks=0; to TObjArray* tracks=0; - * see for more details: - * http://www.star.bnl.gov/HyperNews-star/protected/get/starsoft/5949.html - * - * Revision 1.21 2003/09/02 17:58:32 perev - * gcc 3.2 updates + WarnOff - * - * Revision 1.20 2003/01/31 19:43:20 magestro - * several casts added to remove compiler warnings - * - * Revision 1.19 2003/01/17 16:46:58 mercedes - * StMuEvent::refMult() added - * - * Revision 1.18 2002/11/19 23:27:37 renault - * New event constructor to find V0 daughters informations(helix for average - * separation calculation) - * - * Revision 1.17 2002/03/21 18:49:31 laue - * updated for new MuDst reader - * - * Revision 1.16 2001/12/06 16:47:13 laue - * l3 trigger algorithm added - * - * Revision 1.15 2001/11/14 21:07:21 lisa - * Fixed several small things (mostly discarded const) that caused fatal errors with gcc2.95.3 - * - * Revision 1.14 2001/09/05 20:41:42 laue - * Updates of the hbtMuDstTree microDSTs - * - * Revision 1.13 2001/07/20 20:03:53 rcwells - * Added pT weighting and moved event angle cal. to event cut - * - * Revision 1.12 2001/06/23 21:55:17 laue - * AliFemtoCheckPdgIdList can take can not check for mother,particle,daughter - * Some output turned off - * - * Revision 1.11 2001/06/21 19:15:45 laue - * Modified fiels: - * CTH.h : new constructor added - * AliFemtoEvent, AliFemtoKink, AliFemtoTrack : constructors from the persistent - * (TTree) classes added - * AliFemtoLikeSignAnalysis : minor changes, for debugging - * AliFemtoTypes: split into different files - * Added files: for the new TTree muDst's - * StExceptions.cxx StExceptions.h AliFemtoEnumeration.h - * AliFemtoHelix.h AliFemtoHisto.h AliFemtoString.h AliFemtoTFile.h - * AliFemtoTTreeEvent.cxx AliFemtoTTreeEvent.h AliFemtoTTreeKink.cxx - * AliFemtoTTreeKink.h AliFemtoTTreeTrack.cxx AliFemtoTTreeTrack.h - * AliFemtoTTreeV0.cxx AliFemtoTTreeV0.h AliFemtoVector.h - * - * Revision 1.10 2001/05/15 15:30:16 rcwells - * Added magnetic field to AliFemtoEvent - * - * Revision 1.9 2000/08/31 22:31:31 laue - * AliFemtoAnalysis: output changed (a little bit less) - * AliFemtoEvent: new version, members for reference mult added - * AliFemtoIOBinary: new IO for new AliFemtoEvent version - * AliFemtoTypes: TTree typedef to AliFemtoTTree added - * AliFemtoVertexAnalysis: overflow and underflow added - * - * Revision 1.8 2000/07/16 21:38:22 laue - * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version - * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings - * AliFemtoParticle.cc AliFemtoParticle.h : pointers mTrack,mV0 initialized to 0 - * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG - * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better - * solution - * - * Revision 1.7 2000/05/25 21:54:16 laue - * RotateZ implemented. Rotates momentum and helix around the z axis - * - * Revision 1.5 2000/02/18 21:32:23 laue - * franksTrackCut changed. If mCharge is set to '0' there will be no cut - * on charge. This is important for front-loaded cuts. - * - * copy constructor implemented for AliFemtoEvent, AliFemtoTrack and AliFemtoV0. - * - * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h - * removed. We can now (CC5 on Solaris) use the versions (no D) - * - * Revision 1.4 1999/09/16 18:47:59 lisa - * replace placeholder HbtV0Track stuff with Helens AliFemtoV0 classes - * - * Revision 1.3 1999/07/27 10:47:04 lisa - * now works in dev on linux and solaris - mistake in deleting picoEvents fixed - * - * Revision 1.2 1999/07/19 14:24:05 hardtke - * modifications to implement uDST - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#include "Infrastructure/AliFemtoEvent.h" -#include "Infrastructure/AliFemtoTrack.h" -#include "Infrastructure/AliFemtoV0.h" -#include "Infrastructure/AliFemtoXi.h" -#include "Infrastructure/AliFemtoKink.h" -#include "Base/AliFemtoTrackCut.h" -#include "Base/AliFemtoV0Cut.h" -#include "Base/AliFemtoXiCut.h" -#include "Base/AliFemtoKinkCut.h" -#include "Base/PhysicalConstants.h" -#include "Base/SystemOfUnits.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoEvent: hold the information specific to the event and a // +// track list // +// AliFemtoEvent is the "transient microDST" Objects of this class are // +// generated from the input data by a Reader, and then presented to // +// the Cuts of the various active Analyses. // +// // +/////////////////////////////////////////////////////////////////////////// +#include "AliFemtoEvent.h" +#include "AliFemtoTrack.h" +#include "AliFemtoV0.h" +#include "AliFemtoXi.h" +#include "AliFemtoKink.h" +#include "AliFemtoTrackCut.h" +#include "AliFemtoV0Cut.h" +#include "AliFemtoXiCut.h" +#include "AliFemtoKinkCut.h" +#include "PhysicalConstants.h" +#include "SystemOfUnits.h" // Mike removed all of the AliFemtoTTree stuff here 21apr2006 - it was not used for a long time. @@ -160,6 +43,7 @@ AliFemtoEvent::AliFemtoEvent(): fTriggerMask(0), fTriggerCluster(0) { + // Default constructor fPrimVertPos[0]=-999.0; fPrimVertPos[1]=-999.0; fPrimVertPos[2]=-999.0; @@ -242,6 +126,7 @@ AliFemtoEvent::AliFemtoEvent(const AliFemtoEvent& ev, AliFemtoTrackCut* tCut, Al //______________________________ AliFemtoEvent& AliFemtoEvent::operator=(const AliFemtoEvent& aEvent) { + // assignment operator if (this == &aEvent) return *this; @@ -290,6 +175,7 @@ AliFemtoEvent& AliFemtoEvent::operator=(const AliFemtoEvent& aEvent) //___________________ AliFemtoEvent::~AliFemtoEvent(){ + // destructor #ifdef STHBTDEBUG cout << " AliFemtoEvent::~AliFemtoEvent() " << endl; #endif @@ -299,14 +185,14 @@ AliFemtoEvent::~AliFemtoEvent(){ fTrackCollection->clear(); delete fTrackCollection; //must do the same for the V0 collection - for (AliFemtoV0Iterator V0iter=fV0Collection->begin();V0iter!=fV0Collection->end();V0iter++){ - delete *V0iter; + for (AliFemtoV0Iterator tV0iter=fV0Collection->begin();tV0iter!=fV0Collection->end();tV0iter++){ + delete *tV0iter; }//added by M Chojnacki To avodid memory leak fV0Collection->clear(); delete fV0Collection; //must do the same for the Xi collection - for (AliFemtoXiIterator XiIter=fXiCollection->begin();XiIter!=fXiCollection->end();XiIter++){ - delete *XiIter; + for (AliFemtoXiIterator tXiIter=fXiCollection->begin();tXiIter!=fXiCollection->end();tXiIter++){ + delete *tXiIter; } fXiCollection->clear(); delete fXiCollection; diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h new file mode 100644 index 00000000000..d36ed3a25cf --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEvent.h @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoEvent: hold the information specific to the event and a // +// track list // +// AliFemtoEvent is the "transient microDST" Objects of this class are // +// generated from the input data by a Reader, and then presented to // +// the Cuts of the various active Analyses. // +// // +/////////////////////////////////////////////////////////////////////////// + +#ifndef ALIFEMTOEVENT_H +#define ALIFEMTOEVENT_H + +#include "AliFemtoTypes.h" +#include "AliFemtoTrackCollection.h" +#include "AliFemtoV0Collection.h" +#include "AliFemtoXiCollection.h" +#include "AliFemtoKinkCollection.h" + +class AliFemtoTrackCut; +class AliFemtoV0Cut; +class AliFemtoXiCut; +class AliFemtoKinkCut; + + +#ifdef __ROOT__ + +// the following encapsulation by malisa 21apr2006 +#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ +class StMuDst; +#endif + +#endif + +class AliFemtoEvent{ +public: + AliFemtoEvent(); +#ifdef __ROOT__ +#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ +// +#endif +#endif + AliFemtoEvent(const AliFemtoEvent&, AliFemtoTrackCut* =0, AliFemtoV0Cut* =0, AliFemtoXiCut* =0, AliFemtoKinkCut* =0); // copy constructor with track and v0 cuts + ~AliFemtoEvent(); + AliFemtoEvent& operator=(const AliFemtoEvent& aEvent); + + unsigned short EventNumber() const; + int RunNumber() const; + unsigned short NumberOfTracks() const; + AliFemtoThreeVector PrimVertPos() const; + AliFemtoV0Collection* V0Collection() const; + AliFemtoXiCollection* XiCollection() const; + AliFemtoKinkCollection* KinkCollection() const; + AliFemtoTrackCollection* TrackCollection() const; + double MagneticField() const; + + //functions for alice variables + float ZDCN1Energy() const; + float ZDCP1Energy() const; + float ZDCN2Energy() const; + float ZDCP2Energy() const; + float ZDCEMEnergy() const; + unsigned int ZDCParticipants() const; + + unsigned long int TriggerMask() const; + unsigned char TriggerCluster() const; + + void SetEventNumber(const unsigned short& s); + void SetRunNumber(const int& i); + void SetNumberOfTracks(const unsigned short& s); + void SetPrimVertPos(const AliFemtoThreeVector& v); + void SetMagneticField(const double& x); + + //functions for alice variables + void SetZDCN1Energy(const float& x); + void SetZDCP1Energy(const float& x); + void SetZDCN2Energy(const float& x); + void SetZDCP2Energy(const float& x); + void SetZDCEMEnergy(const float& x); + void SetZDCParticipants(const unsigned int& i); + + void SetTriggerMask(const unsigned long int& i); + void SetTriggerCluster(const unsigned char& c); + + double UncorrectedNumberOfNegativePrimaries() const; + double UncorrectedNumberOfPrimaries() const; + +private: + unsigned short fEventNumber; // Event number in file + unsigned short fRunNumber; // run number the event belong to + unsigned short fNumberOfTracks; // total number of TPC tracks + double fMagneticField; // magnetic field in Z direction + + AliFemtoThreeVector fPrimVertPos; // primary vertex position + AliFemtoTrackCollection* fTrackCollection; // collection of tracks + AliFemtoV0Collection* fV0Collection; // collection of V0s + AliFemtoXiCollection* fXiCollection; // collection of Xis + AliFemtoKinkCollection* fKinkCollection; // collection of kinks + + //for alice changed by Marek Chojnacki + float fZDCN1Energy; // reconstructed energy in the neutron ZDC + float fZDCP1Energy; // reconstructed energy in the proton ZDC + float fZDCN2Energy; // reconstructed energy in the neutron ZDC + float fZDCP2Energy; // reconstructed energy in the proton ZDC + float fZDCEMEnergy; // reconstructed energy in the electromagnetic ZDC + unsigned int fZDCParticipants; // number of participants estimated by the ZDC + + unsigned long int fTriggerMask; // Trigger Type (mask) + unsigned char fTriggerCluster; // Trigger cluster (mask) +}; + + + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventCut.h similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventCut.h index f3b50e49eef..a54f776eced 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventCut.h @@ -8,8 +8,8 @@ class AliFemtoEvent; class AliFemtoBaseAnalysis; -#include "Infrastructure/AliFemtoCutMonitorHandler.h" -#include "Infrastructure/AliFemtoString.h" +#include "AliFemtoCutMonitorHandler.h" +#include "AliFemtoString.h" class AliFemtoEventCut : public AliFemtoCutMonitorHandler { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventReader.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReader.cxx similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventReader.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReader.cxx index 16beb41f95b..92f0876b4ed 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventReader.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReader.cxx @@ -2,13 +2,13 @@ /// AliFemtoEventReader - the pure virtual base class for the event reader /// /// All event readers must inherit from this one /// //////////////////////////////////////////////////////////////////////////////// -#include "Infrastructure/AliFemtoEvent.h" -#include "Base/AliFemtoEventCut.h" -#include "Base/AliFemtoTrackCut.h" -#include "Base/AliFemtoV0Cut.h" -#include "Base/AliFemtoXiCut.h" -#include "Base/AliFemtoKinkCut.h" -#include "Base/AliFemtoEventReader.h" +#include "AliFemtoEvent.h" +#include "AliFemtoEventCut.h" +#include "AliFemtoTrackCut.h" +#include "AliFemtoV0Cut.h" +#include "AliFemtoXiCut.h" +#include "AliFemtoKinkCut.h" +#include "AliFemtoEventReader.h" #ifdef __ROOT__ ClassImp(AliFemtoEventReader) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventReader.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReader.h similarity index 98% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventReader.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReader.h index 414ca95a608..585fe4cd818 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventReader.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReader.h @@ -16,7 +16,7 @@ class AliFemtoKinkCut; #include using namespace std; -#include "Infrastructure/AliFemtoString.h" +#include "AliFemtoString.h" class AliFemtoEventReader { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESD.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.cxx similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESD.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.cxx index 969b12252f3..6ff311c1179 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESD.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.cxx @@ -34,12 +34,12 @@ //#include "TSystem.h" -#include "Infrastructure/AliFmPhysicalHelixD.h" -#include "Infrastructure/AliFmThreeVectorF.h" +#include "AliFmPhysicalHelixD.h" +#include "AliFmThreeVectorF.h" -#include "Base/SystemOfUnits.h" +#include "SystemOfUnits.h" -#include "Infrastructure/AliFemtoEvent.h" +#include "AliFemtoEvent.h" ClassImp(AliFemtoEventReaderESD) @@ -65,6 +65,7 @@ AliFemtoEventReaderESD::AliFemtoEventReaderESD(): fSharedList(0x0), fClusterPerPadrow(0x0) { + // default constructor fClusterPerPadrow = (list **) malloc(sizeof(list *) * AliESDfriendTrack::kMaxTPCcluster); for (int tPad=0; tPad(); @@ -90,6 +91,7 @@ AliFemtoEventReaderESD::AliFemtoEventReaderESD(const AliFemtoEventReaderESD &aRe fSharedList(0x0), fClusterPerPadrow(0x0) { + // copy constructor fInputFile = aReader.fInputFile; fFileName = aReader.fFileName; fConstrained = aReader.fConstrained; @@ -97,7 +99,7 @@ AliFemtoEventReaderESD::AliFemtoEventReaderESD(const AliFemtoEventReaderESD &aRe fCurEvent = aReader.fCurEvent; fCurFile = aReader.fCurFile; fTree = aReader.fTree->CloneTree(); - //fEvent = new AliESD(*aReader.fEvent); + // fEvent = new AliESD(*aReader.fEvent); fEvent = new AliESD(); fEsdFile = new TFile(aReader.fEsdFile->GetName()); fEventFriend = aReader.fEventFriend; @@ -124,6 +126,7 @@ AliFemtoEventReaderESD::AliFemtoEventReaderESD(const AliFemtoEventReaderESD &aRe //Destructor AliFemtoEventReaderESD::~AliFemtoEventReaderESD() { + // destructor //delete fListOfFiles; delete fTree; delete fEvent; @@ -144,6 +147,7 @@ AliFemtoEventReaderESD::~AliFemtoEventReaderESD() //__________________ AliFemtoEventReaderESD& AliFemtoEventReaderESD::operator=(const AliFemtoEventReaderESD& aReader) { + // assignment operator if (this == &aReader) return *this; @@ -156,7 +160,6 @@ AliFemtoEventReaderESD& AliFemtoEventReaderESD::operator=(const AliFemtoEventRea if (fTree) delete fTree; fTree = aReader.fTree->CloneTree(); if (fEvent) delete fEvent; - //fEvent = new AliESD(*aReader.fEvent); fEvent = new AliESD(); if (fEsdFile) delete fEsdFile; fEsdFile = new TFile(aReader.fEsdFile->GetName()); @@ -203,15 +206,16 @@ AliFemtoEventReaderESD& AliFemtoEventReaderESD::operator=(const AliFemtoEventRea //__________________ AliFemtoString AliFemtoEventReaderESD::Report() { + // create reader report AliFemtoString temp = "\n This is the AliFemtoEventReaderESD\n"; return temp; } //__________________ -//setting the name of file where names of ESD file are written -//it takes only this files which have good trees void AliFemtoEventReaderESD::SetInputFile(const char* inputFile) { + //setting the name of file where names of ESD file are written + //it takes only this files which have good trees char buffer[256]; fInputFile=string(inputFile); cout<<"Input File set on "<GetEvent(fCurEvent);//getting next event fEvent->SetESDfriend(fEventFriend); - vector label_table;//to check labels + // vector tLabelTable;//to check labels hbtEvent = new AliFemtoEvent; //setting basic things @@ -375,7 +382,7 @@ AliFemtoEvent* AliFemtoEventReaderESD::ReturnHbtEvent() for (int i=0;iGetTrack(i);//getting next track @@ -396,20 +403,20 @@ AliFemtoEvent* AliFemtoEventReaderESD::ReturnHbtEvent() double pxyz[3]; if (fConstrained==true) - good_momentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum + tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum else - good_momentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum + tGoodMomentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]); trackCopy->SetP(v);//setting momentum trackCopy->SetPt(sqrt(pxyz[0]*pxyz[0]+pxyz[1]*pxyz[1])); - const AliFmThreeVectorD p(pxyz[0],pxyz[1],pxyz[2]); - if (p.mag() == 0) { + const AliFmThreeVectorD ktP(pxyz[0],pxyz[1],pxyz[2]); + if (ktP.mag() == 0) { delete trackCopy; continue; } const AliFmThreeVectorD origin(fV1[0],fV1[1],fV1[2]); //setting helix I do not if it is ok - AliFmPhysicalHelixD helix(p,origin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge())); + AliFmPhysicalHelixD helix(ktP,origin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge())); trackCopy->SetHelix(helix); trackCopy->SetTrackId(esdtrack->GetID()); @@ -464,7 +471,7 @@ AliFemtoEvent* AliFemtoEventReaderESD::ReturnHbtEvent() //decision if we want this track //if we using diffrent labels we want that this label was use for first time //if we use hidden info we want to have match between sim data and ESD - if (good_momentum==true) + if (tGoodMomentum==true) { hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis realnofTracks++;//real number of tracks diff --git a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.h index 0bb3ce33eff..ad920146f9e 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESD.h @@ -11,6 +11,9 @@ /* *$Id$ *$Log$ + *Revision 1.4 2007/05/03 09:45:20 akisiel + *Fixing Effective C++ warnings + * *Revision 1.3 2007/04/27 07:25:16 akisiel *Make revisions needed for compilation from the main AliRoot tree * @@ -20,10 +23,10 @@ */ -#ifndef AliFemtoEventReaderESD_hh -#define AliFemtoEventReaderESD_hh -#include "Base/AliFemtoEventReader.h" -#include "Infrastructure/AliFemtoEnumeration.h" +#ifndef ALIFEMTOEVENTREADERESD_H +#define ALIFEMTOEVENTREADERESD_H +#include "AliFemtoEventReader.h" +#include "AliFemtoEnumeration.h" #include #include diff --git a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESDChain.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx similarity index 86% rename from PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESDChain.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx index 903bfc615b4..807740257a2 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESDChain.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx @@ -1,3 +1,11 @@ +//////////////////////////////////////////////////////////////////////////////// +/// /// +/// AliFemtoEventReaderESDChain - the reader class for the Alice ESD /// +/// tailored for the Task framework /// +/// Reads in AliESDfriend to create shared hit/quality information /// +/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// +/// /// +//////////////////////////////////////////////////////////////////////////////// #include "AliFemtoEventReaderESDChain.h" #include "TFile.h" @@ -5,12 +13,12 @@ #include "AliESD.h" #include "AliESDtrack.h" -#include "Infrastructure/AliFmPhysicalHelixD.h" -#include "Infrastructure/AliFmThreeVectorF.h" +#include "AliFmPhysicalHelixD.h" +#include "AliFmThreeVectorF.h" -#include "Base/SystemOfUnits.h" +#include "SystemOfUnits.h" -#include "Infrastructure/AliFemtoEvent.h" +#include "AliFemtoEvent.h" ClassImp(AliFemtoEventReaderESDChain) @@ -20,7 +28,6 @@ ClassImp(AliFemtoEventReaderESDChain) using namespace std; //____________________________ -//constructor with 0 parameters , look at default settings AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(): fFileName(" "), fConstrained(true), @@ -32,6 +39,7 @@ AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(): fSharedList(0x0), fClusterPerPadrow(0x0) { + //constructor with 0 parameters , look at default settings fClusterPerPadrow = (list **) malloc(sizeof(list *) * AliESDfriendTrack::kMaxTPCcluster); for (int tPad=0; tPad(); @@ -43,7 +51,6 @@ AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(): } //__________________ -// Copy constructor AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(const AliFemtoEventReaderESDChain& aReader): fFileName(" "), fConstrained(true), @@ -55,11 +62,12 @@ AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(const AliFemtoEventRead fSharedList(0x0), fClusterPerPadrow(0x0) { + // Copy constructor fConstrained = aReader.fConstrained; fNumberofEvent = aReader.fNumberofEvent; fCurEvent = aReader.fCurEvent; fCurFile = aReader.fCurFile; - //fEvent = new AliESD(*aReader.fEvent); + // fEvent = new AliESD(*aReader.fEvent); fEvent = new AliESD(); fEventFriend = aReader.fEventFriend; fClusterPerPadrow = (list **) malloc(sizeof(list *) * AliESDfriendTrack::kMaxTPCcluster); @@ -80,9 +88,9 @@ AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(const AliFemtoEventRead } } //__________________ -//Destructor AliFemtoEventReaderESDChain::~AliFemtoEventReaderESDChain() { + //Destructor delete fEvent; for (int tPad=0; tPadSetESDfriend(fEventFriend); - vector label_table;//to check labels + vector tLabelTable;//to check labels hbtEvent = new AliFemtoEvent; //setting basic things @@ -242,7 +249,7 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() for (int i=0;iGetTrack(i);//getting next track @@ -263,9 +270,9 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() double pxyz[3]; if (fConstrained==true) - good_momentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum + tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum else - good_momentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum + tGoodMomentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]); if (v.mag() == 0) { @@ -275,10 +282,10 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() } trackCopy->SetP(v);//setting momentum trackCopy->SetPt(sqrt(pxyz[0]*pxyz[0]+pxyz[1]*pxyz[1])); - const AliFmThreeVectorD p(pxyz[0],pxyz[1],pxyz[2]); - const AliFmThreeVectorD origin(fV1[0],fV1[1],fV1[2]); + const AliFmThreeVectorD kP(pxyz[0],pxyz[1],pxyz[2]); + const AliFmThreeVectorD kOrigin(fV1[0],fV1[1],fV1[2]); //setting helix I do not if it is ok - AliFmPhysicalHelixD helix(p,origin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge())); + AliFmPhysicalHelixD helix(kP,kOrigin,(double)(fEvent->GetMagneticField())*kilogauss,(double)(trackCopy->Charge())); trackCopy->SetHelix(helix); trackCopy->SetTrackId(esdtrack->GetID()); @@ -330,7 +337,7 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() } } - if (good_momentum==true) + if (tGoodMomentum==true) { hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis realnofTracks++;//real number of tracks @@ -349,17 +356,17 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent() return hbtEvent; } //___________________ -// The chain loads the ESD for us -// You must provide the address where it can be found void AliFemtoEventReaderESDChain::SetESDSource(AliESD *aESD) { + // The chain loads the ESD for us + // You must provide the address where it can be found fEvent = aESD; } //___________________ -// We need the ESD tree to obtain -// information about the friend file location void AliFemtoEventReaderESDChain::SetESDfriendSource(AliESDfriend *aFriend) { + // We need the ESD tree to obtain + // information about the friend file location fEventFriend = aFriend; } diff --git a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESDChain.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.h similarity index 88% rename from PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESDChain.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.h index add8e747738..f6fc326a76c 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Reader/AliFemtoEventReaderESDChain.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.h @@ -1,15 +1,15 @@ //////////////////////////////////////////////////////////////////////////////// /// /// /// AliFemtoEventReaderESDChain - the reader class for the Alice ESD /// -/// tailored for the Analysis/Task framework /// +/// tailored for the Task framework /// /// Reads in AliESDfriend to create shared hit/quality information /// /// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// /// /// //////////////////////////////////////////////////////////////////////////////// #ifndef AliFemtoEventReaderESDChain_hh #define AliFemtoEventReaderESDChain_hh -#include "Base/AliFemtoEventReader.h" -#include "Infrastructure/AliFemtoEnumeration.h" +#include "AliFemtoEventReader.h" +#include "AliFemtoEnumeration.h" #include #include @@ -34,8 +34,8 @@ class AliFemtoEventReaderESDChain : public AliFemtoEventReader void SetConstrained(const bool constrained); bool GetConstrained() const; - void SetESDSource(AliESD *); - void SetESDfriendSource(AliESDfriend *); + void SetESDSource(AliESD *aESD); + void SetESDfriendSource(AliESDfriend *aFriend); protected: diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventWriter.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventWriter.h similarity index 91% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventWriter.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventWriter.h index 11b9371fac8..ddd796ec63e 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoEventWriter.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventWriter.h @@ -4,7 +4,7 @@ #ifndef AliFemtoEventWriter_hh #define AliFemtoEventWriter_hh -#include "Base/AliFemtoEventReader.h" +#include "AliFemtoEventReader.h" typedef AliFemtoEventReader AliFemtoEventWriter;//! // yes, because our writer are reader-writers diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEventWriterCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventWriterCollection.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEventWriterCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventWriterCollection.h index 0089c2f060c..a486d1ae613 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEventWriterCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventWriterCollection.h @@ -16,7 +16,7 @@ #ifndef AliFemtoEventWriterCollection_hh #define AliFemtoEventWriterCollection_hh -#include "Base/AliFemtoEventWriter.h" +#include "AliFemtoEventWriter.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoHelix.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoHelix.h similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoHelix.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoHelix.h index 0715659a408..c63bfb0a5d4 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoHelix.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoHelix.h @@ -8,6 +8,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoHiddenInfo.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoHiddenInfo.h similarity index 63% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoHiddenInfo.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoHiddenInfo.h index bc47de94d25..f6256b23b4e 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoHiddenInfo.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoHiddenInfo.h @@ -7,24 +7,26 @@ #ifndef AliFemtoHiddenInfo_hh #define AliFemtoHiddenInfo_hh -#include "Infrastructure/AliFemtoTypes.h" +#include "AliFemtoTypes.h" class AliFemtoHiddenInfo{ -public: + public: AliFemtoHiddenInfo(){/* no-op */}; virtual ~AliFemtoHiddenInfo(){/* no-op */}; - -// !!! MANDATORY !!! -// --- Copy the hidden info from AliFemtoTrack to AliFemtoParticle - virtual AliFemtoHiddenInfo* getParticleHiddenInfo() const =0; - virtual AliFemtoHiddenInfo* clone() const; + + // !!! MANDATORY !!! + // --- Copy the hidden info from AliFemtoTrack to AliFemtoParticle + virtual AliFemtoHiddenInfo* Clone() const; + + protected: + virtual AliFemtoHiddenInfo* GetParticleHiddenInfo() const =0; }; //_______________________________________ -inline AliFemtoHiddenInfo* AliFemtoHiddenInfo::clone() const{ +inline AliFemtoHiddenInfo* AliFemtoHiddenInfo::Clone() const{ // return exact copy of this hidden info - return getParticleHiddenInfo(); + return GetParticleHiddenInfo(); } #endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKink.cxx similarity index 97% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoKink.cxx index 1d62c03070e..7c87a57e15c 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKink.cxx @@ -12,6 +12,9 @@ *********************************************************************** * * $Log$ + * Revision 1.4 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.3 2007/04/27 07:24:34 akisiel * Make revisions needed for compilation from the main AliRoot tree * @@ -49,8 +52,8 @@ ***********************************************************************/ #include "AliFemtoKink.h" -#include "Infrastructure/phys_constants.h" -#include "Infrastructure/AliFemtoTrack.h" +#include "phys_constants.h" +#include "AliFemtoTrack.h" // ----------------------------------------------------------------------- AliFemtoKink::AliFemtoKink(): fDcaParentDaughter(0), fDcaDaughterPrimaryVertex(0), diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKink.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoKink.h index 244742ca4e0..64d5cd52d4f 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKink.h @@ -12,6 +12,9 @@ *********************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -49,9 +52,9 @@ class StKinkVertex; //#include "StEvent/StKinkVertex.h" // from StEvent -#include "Infrastructure/AliFemtoTrack.h" +#include "AliFemtoTrack.h" -#include "Infrastructure/AliFemtoTypes.h" //same as in AliFemtoTrack.h +#include "AliFemtoTypes.h" //same as in AliFemtoTrack.h class AliFemtoKink { public: diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKinkCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKinkCollection.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKinkCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoKinkCollection.h index 135b2489afc..c578748bf59 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKinkCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKinkCollection.h @@ -12,6 +12,9 @@ **************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * @@ -24,7 +27,7 @@ #ifndef AliFemtoKinkCollection_hh #define AliFemtoKinkCollection_hh -#include "Infrastructure/AliFemtoKink.h" +#include "AliFemtoKink.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoKinkCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKinkCut.h similarity index 90% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoKinkCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoKinkCut.h index c310b3d0c9b..f5ab7b23bab 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoKinkCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKinkCut.h @@ -6,9 +6,9 @@ #ifndef AliFemtoKinkCut_hh #define AliFemtoKinkCut_hh -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoKink.h" -#include "Base/AliFemtoParticleCut.h" +#include "AliFemtoTypes.h" +#include "AliFemtoKink.h" +#include "AliFemtoParticleCut.h" class AliFemtoKinkCut : public AliFemtoParticleCut { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoLikeSignAnalysis.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.cxx similarity index 97% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoLikeSignAnalysis.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.cxx index 1b3c197238b..56359ccc28d 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoLikeSignAnalysis.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.cxx @@ -12,12 +12,10 @@ * ***************************************************************************/ -#include "Analysis/AliFemtoLikeSignAnalysis.h" -#include "Infrastructure/AliFemtoParticleCollection.h" -#include "Base/AliFemtoTrackCut.h" -#include "Base/AliFemtoV0Cut.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVector.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h" +#include "AliFemtoLikeSignAnalysis.h" +#include "AliFemtoParticleCollection.h" +#include "AliFemtoPicoEventCollectionVector.h" +#include "AliFemtoPicoEventCollectionVectorHideAway.h" #ifdef __ROOT__ ClassImp(AliFemtoLikeSignAnalysis) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoLikeSignAnalysis.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.h similarity index 75% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoLikeSignAnalysis.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.h index 34c366c4da4..54249ee7405 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoLikeSignAnalysis.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.h @@ -11,15 +11,18 @@ //#include "StMaker.h" //#endif -#include "Base/AliFemtoBaseAnalysis.h" // base analysis class -#include "Infrastructure/AliFemtoTypes.h" -#include "Base/AliFemtoEventCut.h" // base class -#include "Base/AliFemtoParticleCut.h" // base class -#include "Base/AliFemtoPairCut.h" // base class -#include "Base/AliFemtoLikeSignCorrFctn.h" // base class -#include "Analysis/AliFemtoAnalysis.h" -#include "Infrastructure/AliFemtoCorrFctnCollection.h" - +#include "AliFemtoBaseAnalysis.h" // base analysis class +#include "AliFemtoTypes.h" +//#include "AliFemtoEventCut.h" // base class +//#include "AliFemtoParticleCut.h" // base class +//#include "AliFemtoPairCut.h" // base class +#include "AliFemtoLikeSignCorrFctn.h" // base class +#include "AliFemtoAnalysis.h" +#include "AliFemtoCorrFctnCollection.h" + +class AliFemtoEventCut; +class AliFemtoParticleCut; +class AliFemtoPairCut; class AliFemtoLikeSignAnalysis : public AliFemtoAnalysis { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoLikeSignCorrFctn.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignCorrFctn.h similarity index 97% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoLikeSignCorrFctn.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignCorrFctn.h index ccf8e571f6b..4fd9e6d8c16 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoLikeSignCorrFctn.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignCorrFctn.h @@ -7,7 +7,7 @@ #define AliFemtoLikeSignCorrFctn_hh class AliFemtoPair; -#include "Base/AliFemtoCorrFctn.h" +#include "AliFemtoCorrFctn.h" class AliFemtoLikeSignCorrFctn : public AliFemtoCorrFctn { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLinkDef.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLinkDef.h similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLinkDef.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoLinkDef.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLorentzVector.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLorentzVector.h similarity index 99% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLorentzVector.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoLorentzVector.h index a574e384f75..f4392ca013d 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLorentzVector.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLorentzVector.h @@ -20,6 +20,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLorentzVectorD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLorentzVectorD.h similarity index 89% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLorentzVectorD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoLorentzVectorD.h index 3fad3d4de9c..bbfab85567f 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoLorentzVectorD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoLorentzVectorD.h @@ -2,6 +2,9 @@ * * $Id$ * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.cxx new file mode 100644 index 00000000000..5a127739bfd --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.cxx @@ -0,0 +1,254 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoManager: main class managing femtoscopic analysis // +// The Manager is the top-level object that coordinates activities // +// and performs event, particle, and pair loops, and checks the // +// various Cuts of the Analyses in its AnalysisCollection // +// // +/////////////////////////////////////////////////////////////////////////// + +#include "AliFemtoManager.h" +//#include "AliFemtoParticleCollection.h" +//#include "AliFemtoTrackCut.h" +//#include "AliFemtoV0Cut.h" +#include + +#ifdef __ROOT__ +ClassImp(AliFemtoManager) +#endif + + + +//____________________________ +AliFemtoManager::AliFemtoManager(): + fAnalysisCollection(0), + fEventReader(0), + fEventWriterCollection(0) +{ + // default constructor + fAnalysisCollection = new AliFemtoAnalysisCollection; + fEventWriterCollection = new AliFemtoEventWriterCollection; + fEventReader = 0; +} +//____________________________ +AliFemtoManager::AliFemtoManager(const AliFemtoManager& aManager) : + fAnalysisCollection(0), + fEventReader(0), + fEventWriterCollection(0) +{ + // copy constructor + fEventReader = aManager.fEventReader; + AliFemtoAnalysisIterator tAnalysisIter; + fAnalysisCollection = new AliFemtoAnalysisCollection; + for (tAnalysisIter=aManager.fAnalysisCollection->begin();tAnalysisIter!=aManager.fAnalysisCollection->end();tAnalysisIter++){ + fAnalysisCollection->push_back(*tAnalysisIter); + } + AliFemtoEventWriterIterator tEventWriterIter; + fEventWriterCollection = new AliFemtoEventWriterCollection; + for (tEventWriterIter=aManager.fEventWriterCollection->begin();tEventWriterIter!=aManager.fEventWriterCollection->end();tEventWriterIter++){ + fEventWriterCollection->push_back(*tEventWriterIter); + } +} + +//____________________________ +AliFemtoManager::~AliFemtoManager(){ + // destructor + delete fEventReader; + // now delete each Analysis in the Collection, and then the Collection itself + AliFemtoAnalysisIterator tAnalysisIter; + for (tAnalysisIter=fAnalysisCollection->begin();tAnalysisIter!=fAnalysisCollection->end();tAnalysisIter++){ + delete *tAnalysisIter; + *tAnalysisIter = 0; + } + delete fAnalysisCollection; + // now delete each EventWriter in the Collection, and then the Collection itself + AliFemtoEventWriterIterator tEventWriterIter; + for (tEventWriterIter=fEventWriterCollection->begin();tEventWriterIter!=fEventWriterCollection->end();tEventWriterIter++){ + delete *tEventWriterIter; + *tEventWriterIter = 0; + } + delete fEventWriterCollection; +} +//____________________________ +AliFemtoManager& AliFemtoManager::operator=(const AliFemtoManager& aManager) +{ + // assignment operator + if (this == &aManager) + return *this; + + fEventReader = aManager.fEventReader; + AliFemtoAnalysisIterator tAnalysisIter; + if (fAnalysisCollection) { + for (tAnalysisIter=fAnalysisCollection->begin();tAnalysisIter!=fAnalysisCollection->end();tAnalysisIter++){ + delete *tAnalysisIter; + *tAnalysisIter = 0; + } + delete fAnalysisCollection; + } + // now delete each EventWriter in the Collection, and then the Collection itself + AliFemtoEventWriterIterator tEventWriterIter; + if (fEventWriterCollection) { + for (tEventWriterIter=fEventWriterCollection->begin();tEventWriterIter!=fEventWriterCollection->end();tEventWriterIter++){ + delete *tEventWriterIter; + *tEventWriterIter = 0; + } + delete fEventWriterCollection; + } + + fAnalysisCollection = new AliFemtoAnalysisCollection; + for (tAnalysisIter=aManager.fAnalysisCollection->begin();tAnalysisIter!=aManager.fAnalysisCollection->end();tAnalysisIter++){ + fAnalysisCollection->push_back(*tAnalysisIter); + } + + fEventWriterCollection = new AliFemtoEventWriterCollection; + for (tEventWriterIter=aManager.fEventWriterCollection->begin();tEventWriterIter!=aManager.fEventWriterCollection->end();tEventWriterIter++){ + fEventWriterCollection->push_back(*tEventWriterIter); + } + return *this; +} + +//____________________________ +int AliFemtoManager::Init(){ + // Execute initialization procedures + AliFemtoString readerMessage; + readerMessage += "*** *** *** *** *** *** *** *** *** *** *** *** \n"; + // EventReader + if (fEventReader) { + if (fEventReader->Init("r",readerMessage)){ + cout << " AliFemtoManager::Init() - Reader initialization failed " << endl; + return (1); + } + readerMessage += fEventReader->Report(); + } + // EventWriters + AliFemtoEventWriterIterator tEventWriterIter; + for (tEventWriterIter=fEventWriterCollection->begin();tEventWriterIter!=fEventWriterCollection->end();tEventWriterIter++){ + //cout << "*EventWriterIter " << *EventWriterIter << endl; + // The message (AliFemtoString) passed into Init will be at the file header. + // for that reason take the readerReport, add my own report and pass as message + AliFemtoString writerMessage = readerMessage; + writerMessage += "*** *** *** *** *** *** *** *** *** *** *** *** \n"; + writerMessage += (*tEventWriterIter)->Report(); + if (*tEventWriterIter) { + if ( (*tEventWriterIter)->Init("w",writerMessage)){ // yes, the message from the reader is passed into the writer + cout << " AliFemtoManager::Init() - Writer initialization failed " << endl; + return (1); + } + } + } + + + return (0); +} +//____________________________ +void AliFemtoManager::Finish(){ + // Initialize finish procedures + // EventReader + if (fEventReader) fEventReader->Finish(); + // EventWriters + AliFemtoEventWriterIterator tEventWriterIter; + AliFemtoEventWriter* currentEventWriter; + for (tEventWriterIter=fEventWriterCollection->begin();tEventWriterIter!=fEventWriterCollection->end();tEventWriterIter++){ + currentEventWriter = *tEventWriterIter; + currentEventWriter->Finish(); + } + // Analyses + AliFemtoAnalysisIterator tAnalysisIter; + AliFemtoBaseAnalysis* currentAnalysis; + for (tAnalysisIter=fAnalysisCollection->begin();tAnalysisIter!=fAnalysisCollection->end();tAnalysisIter++){ + currentAnalysis = *tAnalysisIter; + currentAnalysis->Finish(); + } +} +//____________________________ +AliFemtoString AliFemtoManager::Report(){ + // Construct a report from all the classes + string stemp; + char ctemp[100]; + // EventReader + stemp = fEventReader->Report(); + // EventWriters + sprintf(ctemp,"\nAliFemtoManager Reporting %u EventWriters\n",(unsigned int) fEventWriterCollection->size()); + stemp += ctemp; + AliFemtoEventWriterIterator tEventWriterIter; + AliFemtoEventWriter* currentEventWriter; + for (tEventWriterIter=fEventWriterCollection->begin();tEventWriterIter!=fEventWriterCollection->end();tEventWriterIter++){ + cout << "AliFemtoManager - asking for EventWriter Report" << endl; + currentEventWriter = *tEventWriterIter; + stemp+=currentEventWriter->Report(); + } + // Analyses + sprintf(ctemp,"\nAliFemtoManager Reporting %u Analyses\n",(unsigned int) fAnalysisCollection->size()); + stemp += ctemp; + AliFemtoAnalysisIterator tAnalysisIter; + AliFemtoBaseAnalysis* currentAnalysis; + for (tAnalysisIter=fAnalysisCollection->begin();tAnalysisIter!=fAnalysisCollection->end();tAnalysisIter++){ + cout << "AliFemtoManager - asking for Analysis Report" << endl; + currentAnalysis = *tAnalysisIter; + stemp+=currentAnalysis->Report(); + } + + AliFemtoString returnThis = stemp; + return returnThis; +} +//____________________________ +AliFemtoBaseAnalysis* AliFemtoManager::Analysis( int n ){ // return pointer to n-th analysis + // return analysis number n + if ( n<0 || n > (int) fAnalysisCollection->size() ) + return NULL; + AliFemtoAnalysisIterator iter = fAnalysisCollection->begin(); + for (int i=0; i (int) fEventWriterCollection->size() ) + return NULL; + AliFemtoEventWriterIterator iter = fEventWriterCollection->begin(); + for (int i=0; iReturnHbtEvent(); + cout << "Event reader has returned control to manager" << endl; + + // if no HbtEvent is returned, then we abort processing. + // the question is now: do we try again next time (i.e. there may be an HbtEvent next time) + // or are we at EOF or something? If Reader says Status=0, then that means try again later. + // so, we just return the Reader's Status. + if (!currentHbtEvent){ + cout << "AliFemtoManager::ProcessEvent() - Reader::ReturnHbtEvent() has returned null pointer\n"; + return fEventReader->Status(); + } + + // loop over all the EventWriters + AliFemtoEventWriterIterator tEventWriterIter; + for (tEventWriterIter=fEventWriterCollection->begin();tEventWriterIter!=fEventWriterCollection->end();tEventWriterIter++){ +#ifdef STHBRDEBUG + cout << " *tEventWriterIter " << *tEventWriterIter << endl; +#endif + (*tEventWriterIter)->WriteHbtEvent(currentHbtEvent); + } + + // loop over all the Analysis + AliFemtoAnalysisIterator tAnalysisIter; + for (tAnalysisIter=fAnalysisCollection->begin();tAnalysisIter!=fAnalysisCollection->end();tAnalysisIter++){ + (*tAnalysisIter)->ProcessEvent(currentHbtEvent); + } + + if (currentHbtEvent) delete currentHbtEvent; +#ifdef STHBRDEBUG + cout << "AliFemtoManager::ProcessEvent() - return to caller ... " << endl; +#endif + return 0; // 0 = "good return" +} // ProcessEvent diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.h new file mode 100644 index 00000000000..27ded4be894 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoManager.h @@ -0,0 +1,72 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoManager: main class managing femtoscopic analysis // +// The Manager is the top-level object that coordinates activities // +// and performs event, particle, and pair loops, and checks the // +// various Cuts of the Analyses in its AnalysisCollection // +// // +/////////////////////////////////////////////////////////////////////////// + +#ifndef ALIFEMTOMANAGER_H +#define ALIFEMTOMANAGER_H + + +#include "AliFemtoTypes.h" +#include "AliFemtoAnalysisCollection.h" +#include "AliFemtoEventWriterCollection.h" +#include "AliFemtoEvent.h" +#include "AliFemtoBaseAnalysis.h" +#include "AliFemtoEventReader.h" +#include "AliFemtoEventWriter.h" + +class AliFemtoManager{ + +private: + AliFemtoAnalysisCollection* fAnalysisCollection; // Collection of analyzes + AliFemtoEventReader* fEventReader; // Event reader + AliFemtoEventWriterCollection* fEventWriterCollection; // Event writer collection + +public: + AliFemtoManager(); + AliFemtoManager(const AliFemtoManager& aManager); + virtual ~AliFemtoManager(); + + AliFemtoManager& operator=(const AliFemtoManager& aManager); + + // Gets and Sets... + AliFemtoAnalysisCollection* AnalysisCollection(); + AliFemtoBaseAnalysis* Analysis(int n); // Access to Analysis within Collection + void AddAnalysis(AliFemtoBaseAnalysis* a); + + AliFemtoEventWriterCollection* EventWriterCollection(); + AliFemtoEventWriter* EventWriter(int n);// Access to EventWriter within Collection + void SetEventWriter(AliFemtoEventWriter* w); // just for historic reasons + void AddEventWriter(AliFemtoEventWriter* w); + + AliFemtoEventReader* EventReader(); + void SetEventReader(AliFemtoEventReader* r); + + + int Init(); + int ProcessEvent(); // a "0" return value means success - otherwise quit + void Finish(); + + AliFemtoString Report(); //! +#ifdef __ROOT__ + ClassDef(AliFemtoManager, 0) +#endif +}; + +inline AliFemtoAnalysisCollection* AliFemtoManager::AnalysisCollection(){return fAnalysisCollection;} +inline void AliFemtoManager::AddAnalysis(AliFemtoBaseAnalysis* anal){fAnalysisCollection->push_back(anal);} + +inline AliFemtoEventWriterCollection* AliFemtoManager::EventWriterCollection(){return fEventWriterCollection;} +inline void AliFemtoManager::AddEventWriter(AliFemtoEventWriter* writer){fEventWriterCollection->push_back(writer);} +inline void AliFemtoManager::SetEventWriter(AliFemtoEventWriter* writer){fEventWriterCollection->push_back(writer);} + +inline AliFemtoEventReader* AliFemtoManager::EventReader(){return fEventReader;} +inline void AliFemtoManager::SetEventReader(AliFemtoEventReader* reader){fEventReader = reader;} + + +#endif + diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelCorrFctn.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.cxx similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelCorrFctn.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.cxx index 56fb33a729c..819c72b7792 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelCorrFctn.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.cxx @@ -108,14 +108,14 @@ AliFemtoString AliFemtoModelCorrFctn::Report() void AliFemtoModelCorrFctn::AddRealPair(AliFemtoPair* aPair) { Double_t weight = fManager->GetWeight(aPair); - fNumeratorTrue->Fill(aPair->qInv(), weight); + fNumeratorTrue->Fill(aPair->QInv(), weight); } //_______________________ void AliFemtoModelCorrFctn::AddMixedPair(AliFemtoPair* aPair) { Double_t weight = fManager->GetWeight(aPair); - fNumeratorFake->Fill(aPair->qInv(), weight); - fDenominator->Fill(aPair->qInv(), 1.0); + fNumeratorFake->Fill(aPair->QInv(), weight); + fDenominator->Fill(aPair->QInv(), 1.0); } //_______________________ void AliFemtoModelCorrFctn::EventBegin(const AliFemtoEvent* aEvent) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelCorrFctn.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelCorrFctn.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.h index 5dc6c9ae3fb..0a37ab9e43f 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelCorrFctn.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelCorrFctn.h @@ -7,8 +7,8 @@ #ifndef AliFemtoModelCorrFctn_hh #define AliFemtoModelCorrFctn_hh -#include "Base/AliFemtoCorrFctn.h" -#include "Infrastructure/AliFemtoPair.h" +#include "AliFemtoCorrFctn.h" +#include "AliFemtoPair.h" #include "AliFemtoModelManager.h" class AliFemtoModelCorrFctn: public AliFemtoCorrFctn { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelFreezeOutGenerator.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelFreezeOutGenerator.cxx similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelFreezeOutGenerator.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelFreezeOutGenerator.cxx diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelFreezeOutGenerator.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelFreezeOutGenerator.h similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelFreezeOutGenerator.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelFreezeOutGenerator.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelGausLCMSFreezeOutGenerator.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.cxx similarity index 98% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelGausLCMSFreezeOutGenerator.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.cxx index 83db74d7406..bcfbcec6104 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelGausLCMSFreezeOutGenerator.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.cxx @@ -43,8 +43,8 @@ void AliFemtoModelGausLCMSFreezeOutGenerator::GenerateFreezeOut(AliFemtoPair *aP // Generate two particle emission points with respect // to their pair momentum // The source is the 3D Gaussian ellipsoid in the LCMS frame - AliFemtoModelHiddenInfo *inf1 = (AliFemtoModelHiddenInfo *) aPair->track1()->HiddenInfo(); - AliFemtoModelHiddenInfo *inf2 = (AliFemtoModelHiddenInfo *) aPair->track2()->HiddenInfo(); + AliFemtoModelHiddenInfo *inf1 = (AliFemtoModelHiddenInfo *) aPair->Track1()->HiddenInfo(); + AliFemtoModelHiddenInfo *inf2 = (AliFemtoModelHiddenInfo *) aPair->Track2()->HiddenInfo(); if ((!inf1) || (!inf2)) { cout << "Hidden info not created! " << endl; exit(kFALSE); } diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelGausLCMSFreezeOutGenerator.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelGausLCMSFreezeOutGenerator.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.h index 198a9c5a427..28b1af1bd94 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelGausLCMSFreezeOutGenerator.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelGausLCMSFreezeOutGenerator.h @@ -8,7 +8,7 @@ #ifndef AliFemtoModelGausLCMSFreezeOutGenerator_hh #define AliFemtoModelGausLCMSFreezeOutGenerator_hh -#include "Model/AliFemtoModelFreezeOutGenerator.h" +#include "AliFemtoModelFreezeOutGenerator.h" #include "TRandom.h" diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelHiddenInfo.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.cxx similarity index 82% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelHiddenInfo.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.cxx index a5136f258ff..da48ab257e4 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelHiddenInfo.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.cxx @@ -1,3 +1,10 @@ +//////////////////////////////////////////////////////////////////////////////// +/// /// +/// AliFemtoModelHiddenInfo - the hidden info for model calculations /// +/// Stores information needed for the weight generation - the true /// +/// simulated momenta, freeze-out coordinates from model and particle PID /// +/// /// +//////////////////////////////////////////////////////////////////////////////// #include "AliFemtoModelHiddenInfo.h" //_____________________________________________ @@ -7,6 +14,7 @@ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo() : fPDGPid(0), fMass(0) { + // Default constructor }; //_____________________________________________ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo &aInfo) : @@ -15,6 +23,7 @@ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo & fPDGPid(0), fMass(0) { + // Copy constructor if (aInfo.GetTrueMomentum()) SetTrueMomentum(aInfo.GetTrueMomentum()); if (aInfo.GetEmissionPoint()) @@ -25,12 +34,14 @@ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo & //_____________________________________________ AliFemtoModelHiddenInfo::~AliFemtoModelHiddenInfo() { + // Destructor if (fTrueMomentum) delete fTrueMomentum; if (fEmissionPoint) delete fEmissionPoint; } //_____________________________________________ AliFemtoModelHiddenInfo& AliFemtoModelHiddenInfo::operator=(const AliFemtoModelHiddenInfo& aInfo) { + // assignment operator if (this == &aInfo) return *this; @@ -68,6 +79,7 @@ Double_t AliFemtoModelHiddenInfo::GetMass() const //_____________________________________________ void AliFemtoModelHiddenInfo::SetTrueMomentum(AliFemtoThreeVector *aMom) { + // set momentum from vector if (fTrueMomentum) { fTrueMomentum->setX(aMom->x()); fTrueMomentum->setY(aMom->y()); @@ -80,6 +92,7 @@ void AliFemtoModelHiddenInfo::SetTrueMomentum(AliFemtoThreeVec //_____________________________________________ void AliFemtoModelHiddenInfo::SetTrueMomentum(const AliFemtoThreeVector& aMom) { + // set momentum from vector if (fTrueMomentum) { fTrueMomentum->setX(aMom.x()); fTrueMomentum->setY(aMom.y()); @@ -93,6 +106,7 @@ void AliFemtoModelHiddenInfo::SetTrueMomentum(const AliFemtoTh //_____________________________________________ void AliFemtoModelHiddenInfo::SetTrueMomentum(Double_t aPx, Double_t aPy, Double_t aPz) { + // set momentum from components if (!fTrueMomentum) fTrueMomentum = new AliFemtoThreeVector(); fTrueMomentum->setX(aPx); fTrueMomentum->setY(aPy); @@ -101,6 +115,7 @@ void AliFemtoModelHiddenInfo::SetTrueMomentum(Double_t aPx, Do //_____________________________________________ void AliFemtoModelHiddenInfo::SetEmissionPoint(AliFemtoLorentzVector *aPos) { + // set position from vector if (fEmissionPoint) { fEmissionPoint->setX(aPos->px()); fEmissionPoint->setY(aPos->py()); @@ -114,6 +129,7 @@ void AliFemtoModelHiddenInfo::SetEmissionPoint(AliFemtoLorentz //_____________________________________________ void AliFemtoModelHiddenInfo::SetEmissionPoint(const AliFemtoLorentzVector& aPos) { + // set position from vector if (fEmissionPoint) { fEmissionPoint->setX(aPos.px()); fEmissionPoint->setY(aPos.py()); @@ -138,14 +154,16 @@ void AliFemtoModelHiddenInfo::SetMass(Double_t aMass) //_____________________________________________ void AliFemtoModelHiddenInfo::SetEmissionPoint(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT) { + // set position from components fEmissionPoint->setX(aRx); fEmissionPoint->setY(aRy); fEmissionPoint->setZ(aRz); fEmissionPoint->setT(aT); } //_____________________________________________ - AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::getParticleHiddenInfo() const + AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::GetParticleHiddenInfo() const { + // return copy of this hidden info AliFemtoModelHiddenInfo* tBuf = new AliFemtoModelHiddenInfo(*this); return tBuf; } diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelHiddenInfo.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.h similarity index 80% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelHiddenInfo.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.h index d707373efe4..2fb03614aa6 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelHiddenInfo.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.h @@ -6,14 +6,14 @@ /// /// //////////////////////////////////////////////////////////////////////////////// -#ifndef AliFemtoModelHiddenInfo_hh -#define AliFemtoModelHiddenInfo_hh +#ifndef ALIFEMTOMODELHIDDENINFO_H +#define ALIFEMTOMODELHIDDENINFO_H #include -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoThreeVector.h" -#include "Infrastructure/AliFemtoLorentzVector.h" -#include "Base/AliFemtoHiddenInfo.h" +#include "AliFemtoTypes.h" +#include "AliFemtoThreeVector.h" +#include "AliFemtoLorentzVector.h" +#include "AliFemtoHiddenInfo.h" class AliFemtoModelHiddenInfo : public AliFemtoHiddenInfo{ @@ -39,19 +39,20 @@ public: // !!! MANDATORY !!! // --- Copy the hidden info from AliFemtoTrack to AliFemtoParticle - virtual AliFemtoHiddenInfo* getParticleHiddenInfo() const; - virtual AliFemtoHiddenInfo* clone() const; - + virtual AliFemtoHiddenInfo* Clone() const; + protected: + virtual AliFemtoHiddenInfo* GetParticleHiddenInfo() const; + AliFemtoThreeVector *fTrueMomentum; // True (simulated) momentum AliFemtoLorentzVector *fEmissionPoint; // Emission point coordinates Int_t fPDGPid; // True PID of the particle - Double_t fMass; + Double_t fMass; // True particle mass }; //_______________________________________ -inline AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::clone() const{ +inline AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::Clone() const{ // return exact copy of this hidden info - return getParticleHiddenInfo(); + return GetParticleHiddenInfo(); } #endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelManager.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelManager.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx index 541a4633396..4ec080572b3 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelManager.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx @@ -70,18 +70,18 @@ Double_t AliFemtoModelManager::GetWeight(AliFemtoPair *aPair) { // Return femtoscopic weight for a fiven pair if (fCreateCopyHiddenInfo) { - if (!(aPair->track1()->HiddenInfo())) { + if (!(aPair->Track1()->HiddenInfo())) { AliFemtoModelHiddenInfo *inf1 = new AliFemtoModelHiddenInfo(); - inf1->SetTrueMomentum(aPair->track1()->Track()->P()); + inf1->SetTrueMomentum(aPair->Track1()->Track()->P()); inf1->SetMass(0.13957); - aPair->track1()->SetHiddenInfo(inf1); + aPair->Track1()->SetHiddenInfo(inf1); delete inf1; } - if (!(aPair->track2()->HiddenInfo())) { + if (!(aPair->Track2()->HiddenInfo())) { AliFemtoModelHiddenInfo *inf2 = new AliFemtoModelHiddenInfo(); - inf2->SetTrueMomentum(aPair->track2()->Track()->P()); + inf2->SetTrueMomentum(aPair->Track2()->Track()->P()); inf2->SetMass(0.13957); - aPair->track2()->SetHiddenInfo(inf2); + aPair->Track2()->SetHiddenInfo(inf2); delete inf2; } } diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelManager.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.h similarity index 97% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelManager.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.h index dcd5efd77fb..9e4722567a3 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelManager.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.h @@ -8,7 +8,7 @@ #ifndef AliFemtoModelManager_hh #define AliFemtoModelManager_hh -#include "Infrastructure/AliFemtoEnumeration.h" +#include "AliFemtoEnumeration.h" #include "AliFemtoModelWeightGenerator.h" #include "AliFemtoModelFreezeOutGenerator.h" diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.cxx new file mode 100644 index 00000000000..f92119c0896 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.cxx @@ -0,0 +1,107 @@ +//////////////////////////////////////////////////////////////////////////////// +/// /// +/// AliFemtoModelWeightGenerator - abstract base class for femtoscopic /// +/// weight generator /// +/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// +/// /// +//////////////////////////////////////////////////////////////////////////////// +#ifdef __ROOT__ + ClassImp(AliFemtoModelGausLCMSFreezeOutGenerator, 1) +#endif + +#include "AliFemtoModelWeightGenerator.h" +#include "AliFemtoModelHiddenInfo.h" + +const Int_t AliFemtoModelWeightGenerator::fgkPionPlusPionPlus = 1; +const Int_t AliFemtoModelWeightGenerator::fgkPionPlusPionMinus = 2; +const Int_t AliFemtoModelWeightGenerator::fgkKaonPlusKaonPlus = 3; +const Int_t AliFemtoModelWeightGenerator::fgkKaonPlusKaonMinus = 4; +const Int_t AliFemtoModelWeightGenerator::fgkProtonProton = 5; +const Int_t AliFemtoModelWeightGenerator::fgkProtonAntiproton = 6; +const Int_t AliFemtoModelWeightGenerator::fgkPionPlusKaonPlus = 7; +const Int_t AliFemtoModelWeightGenerator::fgkPionPlusKaonMinus = 8; +const Int_t AliFemtoModelWeightGenerator::fgkPionPlusProton = 9; +const Int_t AliFemtoModelWeightGenerator::fgkPionPlusAntiproton = 10; +const Int_t AliFemtoModelWeightGenerator::fgkKaonPlusProton = 11; +const Int_t AliFemtoModelWeightGenerator::fgkKaonPlusAntiproton = 12; + +//_____________________________________________ +AliFemtoModelWeightGenerator::AliFemtoModelWeightGenerator() : + fPairType(0), + fKStarOut(0), fKStarSide(0), fKStarLong(0), fKStar(0), + fRStarOut(0), fRStarSide(0), fRStarLong(0), fRStar(0) +{} +//_____________________________________________ +AliFemtoModelWeightGenerator::AliFemtoModelWeightGenerator(const AliFemtoModelWeightGenerator &aModel) : + fPairType(0), + fKStarOut(0), fKStarSide(0), fKStarLong(0), fKStar(0), + fRStarOut(0), fRStarSide(0), fRStarLong(0), fRStar(0) +{ + fPairType = aModel.fPairType; +} +//_____________________________________________ +AliFemtoModelWeightGenerator::~AliFemtoModelWeightGenerator(){/* no-op */} +//_____________________________________________ +void AliFemtoModelWeightGenerator::SetPairType(Int_t aPairType) +{ + fPairType = aPairType; +} + +//_____________________________________________ +Int_t AliFemtoModelWeightGenerator::GetPairType() const +{ + return fPairType; +} + +//_____________________________________________ +void AliFemtoModelWeightGenerator::SetPairTypeFromPair(AliFemtoPair *aPair) +{ + AliFemtoModelHiddenInfo *inf1 = ( AliFemtoModelHiddenInfo *) aPair->Track1()->HiddenInfo(); + AliFemtoModelHiddenInfo *inf2 = ( AliFemtoModelHiddenInfo *) aPair->Track2()->HiddenInfo(); + + const Int_t ktPid1 = inf1->GetPDGPid(); + const Int_t ktPid2 = inf2->GetPDGPid(); + + if (((ktPid1 == 211) && (ktPid2 == 211)) || + ((ktPid1 == -211) && (ktPid2 == -211))) + fPairType = fgkPionPlusPionPlus; + else if (((ktPid1 == -211) && (ktPid2 == 211)) || + ((ktPid1 == 211) && (ktPid2 == -211))) + fPairType = fgkPionPlusPionMinus; + else if (((ktPid1 == 321) && (ktPid2 == 321)) || + ((ktPid1 == -321) && (ktPid2 == -321))) + fPairType = fgkKaonPlusKaonPlus; + else if (((ktPid1 == -321) && (ktPid2 == 321)) || + ((ktPid1 == 321) && (ktPid2 == -321))) + fPairType = fgkKaonPlusKaonMinus; + else if (((ktPid1 == 2212) && (ktPid2 == 2212)) || + ((ktPid1 == -2212) && (ktPid2 == -2212))) + fPairType = fgkProtonProton; + else if (((ktPid1 == -2212) && (ktPid2 == 2212)) || + ((ktPid1 == 2212) && (ktPid2 == -2212))) + fPairType = fgkProtonAntiproton; + else if (((ktPid1 == 211) && (ktPid2 == 321)) || + ((ktPid1 == -211) && (ktPid2 == -321))) + fPairType = fgkPionPlusKaonPlus; + else if (((ktPid1 == -211) && (ktPid2 == 321)) || + ((ktPid1 == 211) && (ktPid2 == -321))) + fPairType = fgkPionPlusKaonMinus; + else if (((ktPid1 == 211) && (ktPid2 == 2212)) || + ((ktPid1 == -211) && (ktPid2 == -2212))) + fPairType = fgkPionPlusProton; + else if (((ktPid1 == -211) && (ktPid2 == 2212)) || + ((ktPid1 == 211) && (ktPid2 == -2212))) + fPairType = fgkPionPlusAntiproton; + else if (((ktPid1 == 321) && (ktPid2 == 2212)) || + ((ktPid1 == -321) && (ktPid2 == -2212))) + fPairType = fgkKaonPlusProton; + else if (((ktPid1 == -321) && (ktPid2 == 2212)) || + ((ktPid1 == 321) && (ktPid2 == -2212))) + fPairType = fgkKaonPlusAntiproton; +} + +//_____________________________________________ +AliFemtoModelWeightGenerator* AliFemtoModelWeightGenerator::Clone() const +{ + return 0; +} diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.h new file mode 100644 index 00000000000..ae9eb441783 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGenerator.h @@ -0,0 +1,82 @@ +//////////////////////////////////////////////////////////////////////////////// +/// /// +/// AliFemtoModelWeightGenerator - abstract base class for femtoscopic /// +/// weight generator /// +/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// +/// /// +//////////////////////////////////////////////////////////////////////////////// +#ifndef AliFemtoModelWeightGenerator_hh +#define AliFemtoModelWeightGenerator_hh + +#include "TRandom2.h" +#include "AliFemtoPair.h" + +class AliFemtoModelWeightGenerator +{ + public: + AliFemtoModelWeightGenerator(); + AliFemtoModelWeightGenerator(const AliFemtoModelWeightGenerator &aModel); + virtual ~AliFemtoModelWeightGenerator(); + virtual Double_t GenerateWeight(AliFemtoPair *aPair) = 0; + + virtual void SetPairType(Int_t aPairType); + virtual void SetPairTypeFromPair(AliFemtoPair *aPair); + virtual Int_t GetPairType() const; + + virtual Double_t GetKStar() const; + virtual Double_t GetKStarOut() const; + virtual Double_t GetKStarSide() const; + virtual Double_t GetKStarLong() const; + virtual Double_t GetRStar() const; + virtual Double_t GetRStarOut() const; + virtual Double_t GetRStarSide() const; + virtual Double_t GetRStarLong() const; + + virtual AliFemtoModelWeightGenerator* Clone() const; + + static const Int_t fgkPionPlusPionPlus; // identical pion pair + static const Int_t fgkPionPlusPionMinus; // non-identical pion pair + static const Int_t fgkKaonPlusKaonPlus; // identical kaon pair + static const Int_t fgkKaonPlusKaonMinus; // non-identical kaon pair + static const Int_t fgkProtonProton; // identical proton pair + static const Int_t fgkProtonAntiproton; // non-identical proton pair + static const Int_t fgkPionPlusKaonPlus; // same-charge pion kaon pair + static const Int_t fgkPionPlusKaonMinus; // opposite-charge pion kaon pair + static const Int_t fgkPionPlusProton; // same-charge pion proton pair + static const Int_t fgkPionPlusAntiproton;// opposite-chare pion proton pair + static const Int_t fgkKaonPlusProton; // same-charge kaon proton pair + static const Int_t fgkKaonPlusAntiproton;// opposite-charge kaon proton pair + + protected: + Int_t fPairType; + + Double_t fKStarOut; // relative momentum out component in PRF + Double_t fKStarSide; // relative momentum side component in PRF + Double_t fKStarLong; // relative momentum long component in PRF + Double_t fKStar; // relative momentum magnitude + + Double_t fRStarOut; // relative separation out component in PRF + Double_t fRStarSide; // relative separation side component in PRF + Double_t fRStarLong; // relative separation long component in PRF + Double_t fRStar; // relative separation magnitude + private: + +#ifdef __ROOT__ + ClassDef(AliFemtoModelWeightGenerator, 1) +#endif + + }; + +inline Double_t AliFemtoModelWeightGenerator::GetKStar() const { return fKStar; } +inline Double_t AliFemtoModelWeightGenerator::GetKStarOut() const { return fKStarOut; } +inline Double_t AliFemtoModelWeightGenerator::GetKStarSide() const { return fKStarSide; } +inline Double_t AliFemtoModelWeightGenerator::GetKStarLong() const { return fKStarLong; } +inline Double_t AliFemtoModelWeightGenerator::GetRStar() const { return fRStar; } +inline Double_t AliFemtoModelWeightGenerator::GetRStarOut() const { return fRStarOut; } +inline Double_t AliFemtoModelWeightGenerator::GetRStarSide() const { return fRStarSide; } +inline Double_t AliFemtoModelWeightGenerator::GetRStarLong() const { return fRStarLong; } + + +#endif + + diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGeneratorBasic.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorBasic.cxx similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGeneratorBasic.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorBasic.cxx index 70e03aeca9f..49fcf2b7607 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGeneratorBasic.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorBasic.cxx @@ -39,8 +39,8 @@ Double_t AliFemtoModelWeightGeneratorBasic::GenerateWeight(AliFemtoPair *aPair) // of the pair wave function // Get hidden information pointers - AliFemtoModelHiddenInfo *inf1 = (AliFemtoModelHiddenInfo *) aPair->track1()->HiddenInfo(); - AliFemtoModelHiddenInfo *inf2 = (AliFemtoModelHiddenInfo *) aPair->track2()->HiddenInfo(); + AliFemtoModelHiddenInfo *inf1 = (AliFemtoModelHiddenInfo *) aPair->Track1()->HiddenInfo(); + AliFemtoModelHiddenInfo *inf2 = (AliFemtoModelHiddenInfo *) aPair->Track2()->HiddenInfo(); // Calculate pair variables Double_t tPx = inf1->GetTrueMomentum()->x()+inf2->GetTrueMomentum()->x(); @@ -143,9 +143,9 @@ Double_t AliFemtoModelWeightGeneratorBasic::GenerateWeight(AliFemtoPair *aPair) fKStar = ::sqrt(fKStarOut*fKStarOut + fKStarSide*fKStarSide + fKStarLong*fKStarLong); // Double_t tRSt = fRStar/0.197327; - if ((fPairType == kPionPlusPionPlus) || (fPairType == kKaonPlusKaonPlus)) + if ((fPairType == AliFemtoModelWeightGenerator::fgkPionPlusPionPlus) || (fPairType == AliFemtoModelWeightGenerator::fgkKaonPlusKaonPlus)) return 1.0 + cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS)); - else if (fPairType == kProtonProton) + else if (fPairType == AliFemtoModelWeightGenerator::fgkProtonProton) return 1.0 - 0.5 * cos (2*(fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS)); else return 1.0; diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGeneratorBasic.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorBasic.h similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGeneratorBasic.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelWeightGeneratorBasic.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx similarity index 73% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx index 6deb4f3cfce..a7bf76dd6cb 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx @@ -1,121 +1,18 @@ -/*************************************************************************** - * - * $Id: AliFemtoPair.cc,v 1.23 - * - * Author: Brian Laziuk, Yale University - * slightly modified by Mike Lisa - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * the Pair object is passed to the PairCuts for verification, and - * then to the AddRealPair and AddMixedPair methods of the - * Correlation Functions - * - *************************************************************************** - * Revision 1.23 2002/09/25 19:23:25 rcwells - * Added const to emissionAngle() - * - * Revision 1.22 2002/04/22 22:48:11 laue - * corrected calculation of opening angle - ** - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.27 2003/09/02 17:58:32 perev - * gcc 3.2 updates + WarnOff - * - * Revision 1.26 2003/01/31 19:57:15 magestro - * Cleared up simple compiler warnings on i386_linux24 - * - * Revision 1.25 2003/01/14 09:44:08 renault - * corrections on average separation calculation for tracks which doesn't cross - * all 45 padrows. - * - * Revision 1.24 2002/11/19 23:33:10 renault - * Enable average separation calculation for all combinaisons of - * V0 daughters and tracks - * - * Revision 1.21 2002/02/28 14:18:36 rcwells - * Added emissionAngle function to AliFemtoPair - * - * Revision 1.20 2001/12/14 23:11:30 fretiere - * Add class HitMergingCut. Add class fabricesPairCut = HitMerginCut + pair purity cuts. Add TpcLocalTransform function which convert to local tpc coord (not pretty). Modify AliFemtoTrack, AliFemtoParticle, AliFemtoHiddenInfo, AliFemtoPair to handle the hit information and cope with my code - * - * Revision 1.19 2001/04/25 18:05:09 perev - * HPcorrs - * - * Revision 1.18 2001/04/03 21:04:36 kisiel - * - * - * Changes needed to make the Theoretical code - * work. The main code is the ThCorrFctn directory. - * The most visible change is the addition of the - * HiddenInfo to AliFemtoPair. - * - * Revision 1.17 2001/03/28 22:35:20 flierl - * changes and bugfixes in qYKP* - * add pairrapidity - * - * Revision 1.16 2001/02/15 19:23:00 rcwells - * Fixed sign in qSideCMS - * - * Revision 1.15 2001/01/22 22:56:41 laue - * Yano-Koonin-Podgoretskii Parametrisation added - * - * Revision 1.14 2000/12/11 21:44:30 rcwells - * Corrected qSideCMS function - * - * Revision 1.13 2000/10/26 16:09:16 lisa - * Added OpeningAngle PairCut class and method to AliFemtoPair - * - * Revision 1.12 2000/10/05 23:09:05 lisa - * Added kT-dependent radii to mixed-event simulator AND implemented AverageSeparation Cut and CorrFctn - * - * Revision 1.11 2000/07/17 20:03:16 lisa - * Implemented tools for addressing and assessing trackmerging - * - * Revision 1.10 2000/04/04 16:27:03 rcwells - * Removed an errant cout in AliFemtoPair.cc - * - * Revision 1.9 2000/04/04 16:13:09 lisa - * AliFemtoPair:quality() now returns normalized value (and so is double) and add a CorrFctn which looks at quality() - * - * Revision 1.8 2000/04/03 22:09:12 rcwells - * Add member function ... quality(). - * - * Revision 1.7 2000/02/13 21:13:33 lisa - * changed ambiguous AliFemtoPair::fourMomentum() to fourMomentumSum() and fourMomentumDiff() and fixed related bug in QvecCorrFctn - * - * Revision 1.6 1999/07/29 16:16:34 lisa - * Selemons upgrade of AliFemtoPair class - * - * Revision 1.5 1999/07/22 18:49:10 lisa - * Implement idea of Fabrice to not create and delete AliFemtoPair all the time - * - * Revision 1.4 1999/07/12 18:57:05 lisa - * fixed small bug in fourMomentum method of AliFemtoPair - * - * Revision 1.3 1999/07/06 22:33:22 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.2 1999/06/29 17:50:27 fisyak - * formal changes to account new StEvent, does not complie yet - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#include "Infrastructure/AliFemtoPair.h" - -double AliFemtoPair::fMaxDuInner = .8; -double AliFemtoPair::fMaxDzInner = 3.; -double AliFemtoPair::fMaxDuOuter = 1.4; -double AliFemtoPair::fMaxDzOuter = 3.2; +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoPair: the Pair object is passed to the PairCuts for // +// verification, and then to the AddRealPair and AddMixedPair methods of // +// the Correlation Functions. It holds pair-specific variables like // +// relative momenta and has links to the particles and tracks that form // +// the pair. // +// // +/////////////////////////////////////////////////////////////////////////// +#include "AliFemtoPair.h" + +double AliFemtoPair::fgMaxDuInner = .8; +double AliFemtoPair::fgMaxDzInner = 3.; +double AliFemtoPair::fgMaxDuOuter = 1.4; +double AliFemtoPair::fgMaxDzOuter = 3.2; AliFemtoPair::AliFemtoPair() : @@ -125,7 +22,7 @@ AliFemtoPair::AliFemtoPair() : fDKOut(0), fDKLong(0), fCVK(0), - kStarCalc(0), + fKStarCalc(0), fNonIdParNotCalculatedGlobal(0), fMergingParNotCalculated(0), fWeightedAvSep(0), @@ -150,9 +47,10 @@ AliFemtoPair::AliFemtoPair() : fFracOfMergedRowV0NegV0Neg(0), fClosestRowAtDCAV0NegV0Neg(0) { + // Default constructor fTrack1 = 0; fTrack2 = 0; - setDefaultHalfFieldMergingPar(); + SetDefaultHalfFieldMergingPar(); } AliFemtoPair::AliFemtoPair(AliFemtoParticle* a, AliFemtoParticle* b) @@ -162,7 +60,7 @@ AliFemtoPair::AliFemtoPair(AliFemtoParticle* a, AliFemtoParticle* b) fDKOut(0), fDKLong(0), fCVK(0), - kStarCalc(0), + fKStarCalc(0), fNonIdParNotCalculatedGlobal(0), fMergingParNotCalculated(0), fWeightedAvSep(0), @@ -187,30 +85,37 @@ AliFemtoPair::AliFemtoPair(AliFemtoParticle* a, AliFemtoParticle* b) fFracOfMergedRowV0NegV0Neg(0), fClosestRowAtDCAV0NegV0Neg(0) { - setDefaultHalfFieldMergingPar(); + // Construct a pair from two particles + SetDefaultHalfFieldMergingPar(); } -void AliFemtoPair::setDefaultHalfFieldMergingPar(){ - fMaxDuInner = 3; - fMaxDzInner = 4.; - fMaxDuOuter = 4.; - fMaxDzOuter = 6.; +void AliFemtoPair::SetDefaultHalfFieldMergingPar(){ + fgMaxDuInner = 3; + fgMaxDzInner = 4.; + fgMaxDuOuter = 4.; + fgMaxDzOuter = 6.; } -void AliFemtoPair::setDefaultFullFieldMergingPar(){ - fMaxDuInner = 0.8; - fMaxDzInner = 3.; - fMaxDuOuter = 1.4; - fMaxDzOuter = 3.2; +void AliFemtoPair::SetDefaultFullFieldMergingPar(){ + // Set default TPC merging parameters for STAR TPC + fgMaxDuInner = 0.8; + fgMaxDzInner = 3.; + fgMaxDuOuter = 1.4; + fgMaxDzOuter = 3.2; } -void AliFemtoPair::setMergingPar(double aMaxDuInner, double aMaxDzInner, - double aMaxDuOuter, double aMaxDzOuter){ - fMaxDuInner = aMaxDuInner; - fMaxDzInner = aMaxDzInner; - fMaxDuOuter = aMaxDuOuter; - fMaxDzOuter = aMaxDzOuter; +void AliFemtoPair::SetMergingPar(double aMaxDuInner, double aMaxDzInner, + double aMaxDuOuter, double aMaxDzOuter) +{ + // Set TPC merging parameters for STAR TPC + fgMaxDuInner = aMaxDuInner; + fgMaxDzInner = aMaxDzInner; + fgMaxDuOuter = aMaxDuOuter; + fgMaxDzOuter = aMaxDzOuter; }; -AliFemtoPair::~AliFemtoPair() {/* no-op */} +AliFemtoPair::~AliFemtoPair() { + // Destructor +/* no-op */ +} AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair): fTrack1(0), fTrack2(0), @@ -219,7 +124,7 @@ AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair): fDKOut(0), fDKLong(0), fCVK(0), - kStarCalc(0), + fKStarCalc(0), fNonIdParNotCalculatedGlobal(0), fMergingParNotCalculated(0), fWeightedAvSep(0), @@ -244,6 +149,7 @@ AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair): fFracOfMergedRowV0NegV0Neg(0), fClosestRowAtDCAV0NegV0Neg(0) { + // Copy constructor fTrack1 = aPair.fTrack1; fTrack2 = aPair.fTrack2; @@ -252,7 +158,7 @@ AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair): fDKOut = aPair.fDKOut; fDKLong = aPair.fDKLong; fCVK = aPair.fCVK; - kStarCalc = aPair.kStarCalc; + fKStarCalc = aPair.fKStarCalc; fNonIdParNotCalculatedGlobal = aPair.fNonIdParNotCalculatedGlobal; @@ -288,6 +194,7 @@ AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair): AliFemtoPair& AliFemtoPair::operator=(const AliFemtoPair &aPair) { + // Assignment operator if (this == &aPair) return *this; @@ -299,7 +206,7 @@ AliFemtoPair& AliFemtoPair::operator=(const AliFemtoPair &aPair) fDKOut = aPair.fDKOut; fDKLong = aPair.fDKLong; fCVK = aPair.fCVK; - kStarCalc = aPair.kStarCalc; + fKStarCalc = aPair.fKStarCalc; fNonIdParNotCalculatedGlobal = aPair.fNonIdParNotCalculatedGlobal; @@ -336,15 +243,16 @@ AliFemtoPair& AliFemtoPair::operator=(const AliFemtoPair &aPair) } //_________________ -double AliFemtoPair::mInv() const +double AliFemtoPair::MInv() const { - double InvariantMass = abs(fTrack1->FourMomentum() + fTrack2->FourMomentum()); - return (InvariantMass); + // invariant mass + double tInvariantMass = abs(fTrack1->FourMomentum() + fTrack2->FourMomentum()); + return (tInvariantMass); } //_________________ -double AliFemtoPair::kT() const +double AliFemtoPair::KT() const { - + // transverse momentum double tmp = (fTrack1->FourMomentum() + fTrack2->FourMomentum()).perp(); tmp *= .5; @@ -352,7 +260,7 @@ double AliFemtoPair::kT() const return (tmp); } //_________________ -double AliFemtoPair::rap() const +double AliFemtoPair::Rap() const { // longitudinal pair rapidity : Y = 0.5 ::log( E1 + E2 + pz1 + pz2 / E1 + E2 - pz1 - pz2 ) double tmp = 0.5 * log ( @@ -362,9 +270,10 @@ double AliFemtoPair::rap() const return (tmp); } //_________________ -double AliFemtoPair::emissionAngle()const { - double pxTotal = this->fourMomentumSum().x(); - double pyTotal = this->fourMomentumSum().y(); +double AliFemtoPair::EmissionAngle() const { + // emission angle + double pxTotal = this->FourMomentumSum().x(); + double pyTotal = this->FourMomentumSum().y(); double angle = atan2(pyTotal,pxTotal)*180.0/3.1415926536; if (angle<0.0) angle+=360.0; return angle; @@ -372,20 +281,22 @@ double AliFemtoPair::emissionAngle()const { //_________________ // get rid of ambiguously-named method fourMomentum() and replace it with // fourMomentumSum() and fourMomentumDiff() - mal 13feb2000 -AliFemtoLorentzVector AliFemtoPair::fourMomentumSum() const +AliFemtoLorentzVector AliFemtoPair::FourMomentumSum() const { + // total momentum AliFemtoLorentzVector temp = fTrack1->FourMomentum()+fTrack2->FourMomentum(); return temp; } -AliFemtoLorentzVector AliFemtoPair::fourMomentumDiff() const +AliFemtoLorentzVector AliFemtoPair::FourMomentumDiff() const { + // momentum difference AliFemtoLorentzVector temp = fTrack1->FourMomentum()-fTrack2->FourMomentum(); return temp; } //__________________________________ -// Yano-Koonin-Podgoretskii Parametrisation in CMS -void AliFemtoPair::qYKPCMS(double& qP, double& qT, double& q0) const +void AliFemtoPair::QYKPCMS(double& qP, double& qT, double& q0) const { + // Yano-Koonin-Podgoretskii Parametrisation in CMS //// // calculate momentum difference in source rest frame (= lab frame) //// @@ -403,9 +314,9 @@ void AliFemtoPair::qYKPCMS(double& qP, double& qT, double& q0) const q0 = l.e() ; } //___________________________________ -// Yano-Koonin-Podgoretskii Parametrisation in LCMS -void AliFemtoPair::qYKPLCMS(double& qP, double& qT, double& q0) const +void AliFemtoPair::QYKPLCMS(double& qP, double& qT, double& q0) const { + // Yano-Koonin-Podgoretskii Parametrisation in LCMS //// // calculate momentum difference in LCMS : frame where pz1 + pz2 = 0 //// @@ -439,7 +350,7 @@ void AliFemtoPair::qYKPLCMS(double& qP, double& qT, double& q0) const } //___________________________________ // Yano-Koonin-Podgoretskii Parametrisation in pair rest frame -void AliFemtoPair::qYKPPF(double& qP, double& qT, double& q0) const +void AliFemtoPair::QYKPPF(double& qP, double& qT, double& q0) const { //// // calculate momentum difference in pair rest frame : frame where (pz1 + pz2, py1 + py2, px1 + px2) = (0,0,0) @@ -464,8 +375,9 @@ void AliFemtoPair::qYKPPF(double& qP, double& qT, double& q0) const q0 = l.e(); } //_________________ -double AliFemtoPair::qOutCMS() const +double AliFemtoPair::QOutCMS() const { + // relative momentum out component in lab frame AliFemtoThreeVector tmp1 = fTrack1->FourMomentum().vect(); AliFemtoThreeVector tmp2 = fTrack2->FourMomentum().vect(); @@ -481,8 +393,9 @@ double AliFemtoPair::qOutCMS() const return (tmp); } //_________________ -double AliFemtoPair::qSideCMS() const +double AliFemtoPair::QSideCMS() const { + // relative momentum side component in lab frame AliFemtoThreeVector tmp1 = fTrack1->FourMomentum().vect(); AliFemtoThreeVector tmp2 = fTrack2->FourMomentum().vect(); @@ -497,8 +410,9 @@ double AliFemtoPair::qSideCMS() const } //_________________________ -double AliFemtoPair::qLongCMS() const +double AliFemtoPair::QLongCMS() const { + // relative momentum component in lab frame AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum(); AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum(); @@ -516,54 +430,62 @@ double AliFemtoPair::qLongCMS() const } //________________________________ -double AliFemtoPair::qOutPf() const +double AliFemtoPair::QOutPf() const { - AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum(); - AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum(); - - double dt = tmp1.t() - tmp2.t(); - double tt = tmp1.t() + tmp2.t(); - - double xt = tmp1.x() + tmp2.x(); - double yt = tmp1.y() + tmp2.y(); - - double k1 = ::sqrt(xt*xt + yt*yt); - double bOut = k1/tt; - double gOut = 1.0/::sqrt(1.0 - bOut*bOut); - - double temp = gOut*(this->qOutCMS() - bOut*dt); - return (temp); + // relative momentum out component in pair frame + AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum(); + AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum(); + + double dt = tmp1.t() - tmp2.t(); + double tt = tmp1.t() + tmp2.t(); + + double xt = tmp1.x() + tmp2.x(); + double yt = tmp1.y() + tmp2.y(); + + double k1 = ::sqrt(xt*xt + yt*yt); + double bOut = k1/tt; + double gOut = 1.0/::sqrt(1.0 - bOut*bOut); + + double temp = gOut*(this->QOutCMS() - bOut*dt); + return (temp); } //___________________________________ -double AliFemtoPair::qSidePf() const +double AliFemtoPair::QSidePf() const { - return(this->qSideCMS()); + // relative momentum side component in pair frame + + return(this->QSideCMS()); } //___________________________________ -double AliFemtoPair::qLongPf() const +double AliFemtoPair::QLongPf() const { - return(this->qLongCMS()); + // relative momentum long component in pair frame + + return(this->QLongCMS()); } //___________________________________ -double AliFemtoPair::qOutBf(double beta) const +double AliFemtoPair::QOutBf(double beta) const { - return(this->qOutCMS()); + // relative momentum out component + return(this->QOutCMS()); } //___________________________________ -double AliFemtoPair::qSideBf(double beta) const +double AliFemtoPair::QSideBf(double beta) const { - return(this->qSideCMS()); + // relative momentum side component + return(this->QSideCMS()); } //___________________________________ -double AliFemtoPair::qLongBf(double beta) const +double AliFemtoPair::QLongBf(double beta) const { + // relative momentum long component AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum(); AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum(); @@ -576,7 +498,8 @@ double AliFemtoPair::qLongBf(double beta) const return (temp); } -double AliFemtoPair::quality() const { +double AliFemtoPair::Quality() const { + // Calculate split quality of the pair unsigned long mapMask0 = 0xFFFFFF00; unsigned long mapMask1 = 0x1FFFFF; unsigned long padRow1To24Track1 = fTrack1->TopologyMap(0) & mapMask0; @@ -591,37 +514,38 @@ double AliFemtoPair::quality() const { unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2; unsigned long bitI; int ibits; - int Quality = 0; + int tQuality = 0; double normQual = 0.0; - int MaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits(); + int tMaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits(); for (ibits=8;ibits<=31;ibits++) { bitI = 0; bitI |= 1UL<<(ibits); if ( onePad1To24 & bitI ) { - Quality++; + tQuality++; continue; } else{ - if ( bothPads1To24 & bitI ) Quality--; + if ( bothPads1To24 & bitI ) tQuality--; } } for (ibits=0;ibits<=20;ibits++) { bitI = 0; bitI |= 1UL<<(ibits); if ( onePad25To45 & bitI ) { - Quality++; + tQuality++; continue; } else{ - if ( bothPads25To45 & bitI ) Quality--; + if ( bothPads25To45 & bitI ) tQuality--; } } - normQual = (double)Quality/( (double) MaxQuality ); + normQual = (double)tQuality/( (double) tMaxQuality ); return ( normQual ); } -double AliFemtoPair::quality2() const { +double AliFemtoPair::Quality2() const { + // second implementation of split quality unsigned long mapMask0 = 0xFFFFFF00; unsigned long mapMask1 = 0x1FFFFF; unsigned long padRow1To24Track1 = fTrack1->TopologyMap(0) & mapMask0; @@ -638,50 +562,53 @@ double AliFemtoPair::quality2() const { unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2; unsigned long bitI; int ibits; - int Quality = 0; + int tQuality = 0; double normQual = 0.0; - int MaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits(); + int tMaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits(); for (ibits=8;ibits<=31;ibits++) { bitI = 0; bitI |= 1UL<<(ibits); if ( onePad1To24 & bitI ) { - Quality++; + tQuality++; continue; } //else{ - //if ( bothPads1To24 & bitI ) Quality--; + //if ( bothPads1To24 & bitI ) tQuality--; //} } for (ibits=0;ibits<=20;ibits++) { bitI = 0; bitI |= 1UL<<(ibits); if ( onePad25To45 & bitI ) { - Quality++; + tQuality++; continue; } //else{ - //if ( bothPads25To45 & bitI ) Quality--; + //if ( bothPads25To45 & bitI ) tQuality--; //} } - normQual = (double)Quality/( (double) MaxQuality ); + normQual = (double)tQuality/( (double) tMaxQuality ); return ( normQual ); } double AliFemtoPair::NominalTpcExitSeparation() const { + // separation at exit from STAR TPC AliFemtoThreeVector diff = fTrack1->NominalTpcExitPoint() - fTrack2->NominalTpcExitPoint(); return (diff.mag()); } double AliFemtoPair::NominalTpcEntranceSeparation() const { + // separation at entrance to STAR TPC AliFemtoThreeVector diff = fTrack1->NominalTpcEntrancePoint() - fTrack2->NominalTpcEntrancePoint(); return (diff.mag()); } double AliFemtoPair::NominalTpcAverageSeparation() const { + // average separation in STAR TPC AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt = 0; if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){ while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. && @@ -695,14 +622,15 @@ double AliFemtoPair::NominalTpcAverageSeparation() const { // for (int ipt=0; ipt<11; ipt++){ diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1.); - return (AveSep);} + tAveSep = tAveSep/(ipt+1.); + return (tAveSep);} else return -1; } double AliFemtoPair::OpeningAngle() const { + // opening angle return 57.296* fTrack1->FourMomentum().vect().angle( fTrack2->FourMomentum().vect() ); // AliFemtoThreeVector p1 = fTrack1->FourMomentum().vect(); // AliFemtoThreeVector p2 = fTrack2->FourMomentum().vect(); @@ -714,6 +642,7 @@ double AliFemtoPair::OpeningAngle() const { double AliFemtoPair::KStarFlipped() const { + // kstar with sign flipped AliFemtoLorentzVector tP1 = fTrack1->FourMomentum(); AliFmThreeVectorD qwe = tP1.vect(); @@ -746,6 +675,7 @@ double AliFemtoPair::KStarFlipped() const { //} double AliFemtoPair::CVKFlipped() const{ + // CVK with sign flipped AliFemtoLorentzVector tP1 = fTrack1->FourMomentum(); AliFmThreeVectorD qwe = tP1.vect(); qwe *= -1.; // flip it @@ -763,7 +693,8 @@ double AliFemtoPair::CVKFlipped() const{ return (tK.vect())*tGammaBeta/tGamma; } -double AliFemtoPair::pInv() const{ +double AliFemtoPair::PInv() const{ + // invariant total momentum AliFemtoLorentzVector tP1 = fTrack1->FourMomentum(); AliFemtoLorentzVector tP2 = fTrack2->FourMomentum(); double tP = (tP1.px()+tP2.px())*(tP1.px()+tP2.px())+ @@ -773,7 +704,8 @@ double AliFemtoPair::pInv() const{ return ::sqrt(fabs(tP)); } -double AliFemtoPair::qInvFlippedXY() const{ +double AliFemtoPair::QInvFlippedXY() const{ + // qinv with X and Y flipped AliFemtoLorentzVector tP1 = fTrack1->FourMomentum(); tP1.setX(-1.*tP1.x()); tP1.setY(-1.*tP1.y()); @@ -781,41 +713,44 @@ double AliFemtoPair::qInvFlippedXY() const{ return ( -1.* tDiff.m()); } -void AliFemtoPair::calcNonIdPar() const{ // fortran like function! faster? +void AliFemtoPair::CalcNonIdPar() const{ // fortran like function! faster? + // Calculate generalized relative mometum + // Use this instead of qXYZ() function when calculating + // anything for non-identical particles fNonIdParNotCalculated=0; double px1 = fTrack1->FourMomentum().vect().x(); double py1 = fTrack1->FourMomentum().vect().y(); double pz1 = fTrack1->FourMomentum().vect().z(); double pE1 = fTrack1->FourMomentum().e(); - double Particle1Mass = ::sqrt(pE1*pE1 - px1*px1 - py1*py1 - pz1*pz1); + double tParticle1Mass = ::sqrt(pE1*pE1 - px1*px1 - py1*py1 - pz1*pz1); double px2 = fTrack2->FourMomentum().vect().x(); double py2 = fTrack2->FourMomentum().vect().y(); double pz2 = fTrack2->FourMomentum().vect().z(); double pE2 = fTrack2->FourMomentum().e(); - double Particle2Mass = ::sqrt(pE2*pE2 - px2*px2 - py2*py2 - pz2*pz2); + double tParticle2Mass = ::sqrt(pE2*pE2 - px2*px2 - py2*py2 - pz2*pz2); - double Px = px1+px2; - double Py = py1+py2; - double Pz = pz1+pz2; - double PE = pE1+pE2; + double tPx = px1+px2; + double tPy = py1+py2; + double tPz = pz1+pz2; + double tPE = pE1+pE2; - double Ptrans = Px*Px + Py*Py; - double Mtrans = PE*PE - Pz*Pz; - double Pinv = ::sqrt(Mtrans - Ptrans); - Mtrans = ::sqrt(Mtrans); - Ptrans = ::sqrt(Ptrans); + double tPtrans = tPx*tPx + tPy*tPy; + double tMtrans = tPE*tPE - tPz*tPz; + double tPinv = ::sqrt(tMtrans - tPtrans); + tMtrans = ::sqrt(tMtrans); + tPtrans = ::sqrt(tPtrans); - double QinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) - + double tQinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) - (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2); - double Q = (Particle1Mass*Particle1Mass - Particle2Mass*Particle2Mass)/Pinv; - Q = sqrt ( Q*Q - QinvL); + double tQ = (tParticle1Mass*tParticle1Mass - tParticle2Mass*tParticle2Mass)/tPinv; + tQ = sqrt ( tQ*tQ - tQinvL); - kStarCalc = Q/2; + fKStarCalc = tQ/2; // ad 1) go to LCMS - double beta = Pz/PE; - double gamma = PE/Mtrans; + double beta = tPz/tPE; + double gamma = tPE/tMtrans; double pz1L = gamma * (pz1 - beta * pE1); double pE1L = gamma * (pE1 - beta * pz1); @@ -823,23 +758,23 @@ void AliFemtoPair::calcNonIdPar() const{ // fortran like function! faster? // fill histogram for beam projection ( z - axis ) fDKLong = pz1L; - // ad 2) rotation px -> Pt - double px1R = (px1*Px + py1*Py)/Ptrans; - double py1R = (-px1*Py + py1*Px)/Ptrans; + // ad 2) rotation px -> tPt + double px1R = (px1*tPx + py1*tPy)/tPtrans; + double py1R = (-px1*tPy + py1*tPx)/tPtrans; //fill histograms for side projection ( y - axis ) fDKSide = py1R; // ad 3) go from LCMS to CMS - beta = Ptrans/Mtrans; - gamma = Mtrans/Pinv; + beta = tPtrans/tMtrans; + gamma = tMtrans/tPinv; double px1C = gamma * (px1R - beta * pE1L); // fill histogram for out projection ( x - axis ) fDKOut = px1C; - fCVK = (fDKOut*Ptrans + fDKLong*Pz)/kStarCalc/::sqrt(Ptrans*Ptrans+Pz*Pz); + fCVK = (fDKOut*tPtrans + fDKLong*tPz)/fKStarCalc/::sqrt(tPtrans*tPtrans+tPz*tPz); } @@ -848,16 +783,16 @@ void AliFemtoPair::calcNonIdPar() const{ // fortran like function! faster? double px1 = fTrack1->Track()->PGlobal().x(); double py1 = fTrack1->Track()->PGlobal().y(); double pz1 = fTrack1->Track()->PGlobal().z(); - double Particle1Mass = fTrack1->FourMomentum().m2(); - double pE1 = ::sqrt(Particle1Mass + px1*px1 + py1*py1 + pz1*pz1); - Particle1Mass = ::sqrt(Particle1Mass); + double tParticle1Mass = fTrack1->FourMomentum().m2(); + double pE1 = ::sqrt(tParticle1Mass + px1*px1 + py1*py1 + pz1*pz1); + tParticle1Mass = ::sqrt(tParticle1Mass); double px2 = fTrack2->Track()->PGlobal().x(); double py2 = fTrack2->Track()->PGlobal().y(); double pz2 = fTrack2->Track()->PGlobal().z(); - double Particle2Mass = fTrack2->FourMomentum().m2(); - double pE2 = ::sqrt(Particle2Mass + px2*px2 + py2*py2 + pz2*pz2); - Particle2Mass = ::sqrt(Particle2Mass); + double tParticle2Mass = fTrack2->FourMomentum().m2(); + double pE2 = ::sqrt(tParticle2Mass + px2*px2 + py2*py2 + pz2*pz2); + tParticle2Mass = ::sqrt(tParticle2Mass); double Px = px1+px2; double Py = py1+py2; @@ -873,7 +808,7 @@ void AliFemtoPair::calcNonIdPar() const{ // fortran like function! faster? double QinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) - (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2); - double Q = (Particle1Mass*Particle1Mass - Particle2Mass*Particle2Mass)/Pinv; + double Q = (tParticle1Mass*tParticle1Mass - tParticle2Mass*tParticle2Mass)/Pinv; Q = sqrt ( Q*Q - QinvL); kStarCalcGlobal = Q/2; @@ -910,8 +845,8 @@ void AliFemtoPair::calcNonIdPar() const{ // fortran like function! faster? -double AliFemtoPair::dcaInsideTpc() const{ - +double AliFemtoPair::DcaInsideTpc() const{ + // dcs inside the STAR TPC double tMinDist=NominalTpcEntranceSeparation(); double tExit = NominalTpcExitSeparation(); tMinDist = (tExit>tMinDist) ? tMinDist : tExit; @@ -927,36 +862,36 @@ double AliFemtoPair::dcaInsideTpc() const{ // --- 2 lines : don't care right now //if (tHelix1.mSingularity) return -999.; // --- 2 helix - double dx = tHelix2.xcenter() - tHelix1.xcenter(); - double dy = tHelix2.ycenter() - tHelix1.ycenter(); + double dx = tHelix2.XCenter() - tHelix1.XCenter(); + double dy = tHelix2.YCenter() - tHelix1.YCenter(); double dd = ::sqrt(dx*dx + dy*dy); - double r1 = 1/tHelix1.curvature(); - double r2 = 1/tHelix2.curvature(); + double r1 = 1/tHelix1.Curvature(); + double r2 = 1/tHelix2.Curvature(); double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd); double x, y, r; double s; if (fabs(cosAlpha) < 1) { // two solutions double sinAlpha = sin(acos(cosAlpha)); - x = tHelix1.xcenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd; - y = tHelix1.ycenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd; + x = tHelix1.XCenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd; + y = tHelix1.YCenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd; r = ::sqrt(x*x+y*y); if( r > rMin && r < rMax && fabs(atan2(y,x)-fTrack1->NominalTpcEntrancePoint().phi())< 0.5 ){ // first solution inside - s = tHelix1.pathLength(x, y); - tInsideDist=tHelix2.distance(tHelix1.at(s)); + s = tHelix1.PathLength(x, y); + tInsideDist=tHelix2.Distance(tHelix1.At(s)); if(tInsideDist rMin && r < rMax && fabs(atan2(y,x)-fTrack1->NominalTpcEntrancePoint().phi())< 0.5 ) { // second solution inside - s = tHelix1.pathLength(x, y); - tInsideDist=tHelix2.distance(tHelix1.at(s)); + s = tHelix1.PathLength(x, y); + tInsideDist=tHelix2.Distance(tHelix1.At(s)); if(tInsideDistfZ[ti]-fTrack2->fZ[ti]); tN++; if(ti<13){ - fFracOfMergedRow += (tDuNominalTpcExitPoint() - fTrack2->TpcV0PosExitPoint(); return (diff.mag()); } double AliFemtoPair::TpcEntranceSeparationTrackV0Pos() const { +//________________V0 daughters exit/entrance/average separation calc. +//_______1st part is a track 2nd is a V0 considering Pos daughter AliFemtoThreeVector diff = fTrack1->NominalTpcEntrancePoint() - fTrack2->TpcV0PosEntrancePoint(); return (diff.mag()); } double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const { +//________________V0 daughters exit/entrance/average separation calc. +//_______1st part is a track 2nd is a V0 considering Pos daughter AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt = 0; if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){ while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. && @@ -1034,26 +975,28 @@ double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const { ){ diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1.); - return (AveSep);} + tAveSep = tAveSep/(ipt+1.); + return (tAveSep);} else return -1; } -//_______1st part is a track 2nd is a V0 considering Neg daughter double AliFemtoPair::TpcExitSeparationTrackV0Neg() const { +//_______1st part is a track 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff = fTrack1->NominalTpcExitPoint() - fTrack2->TpcV0NegExitPoint(); return (diff.mag()); } double AliFemtoPair::TpcEntranceSeparationTrackV0Neg() const { +//_______1st part is a track 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff = fTrack1->NominalTpcEntrancePoint() - fTrack2->TpcV0NegEntrancePoint(); return (diff.mag()); } double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const { +//_______1st part is a track 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt = 0; if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){ while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. && @@ -1066,26 +1009,28 @@ double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const { ){ diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1.); - return (AveSep);} + tAveSep = tAveSep/(ipt+1.); + return (tAveSep);} else return -1; } -//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter double AliFemtoPair::TpcExitSeparationV0PosV0Pos() const { +//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0PosExitPoint(); return (diff.mag()); } double AliFemtoPair::TpcEntranceSeparationV0PosV0Pos() const { +//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0PosEntrancePoint(); return (diff.mag()); } double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const { +//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt=0; if (fTrack1->fNominalPosSample && (fTrack2->fNominalPosSample)){ while ((fabs(fTrack1->fNominalPosSample[ipt].x())<9999.) && @@ -1098,26 +1043,28 @@ double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const { ){ diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1); - return (AveSep);} + tAveSep = tAveSep/(ipt+1); + return (tAveSep);} else return -1; } -//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter double AliFemtoPair::TpcExitSeparationV0PosV0Neg() const { +//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0NegExitPoint(); return (diff.mag()); } double AliFemtoPair::TpcEntranceSeparationV0PosV0Neg() const { +//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0NegEntrancePoint(); return (diff.mag()); } double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const { +//_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt = 0; if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){ while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. && @@ -1130,26 +1077,30 @@ double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const { ){ diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1.); - return (AveSep);} + tAveSep = tAveSep/(ipt+1.); + return (tAveSep);} else return -1; } +double AliFemtoPair::TpcExitSeparationV0NegV0Pos() const { //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter // this is to check the upper case -double AliFemtoPair::TpcExitSeparationV0NegV0Pos() const { AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0PosExitPoint(); return (diff.mag()); } double AliFemtoPair::TpcEntranceSeparationV0NegV0Pos() const { +//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter +// this is to check the upper case AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0PosEntrancePoint(); return (diff.mag()); } double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const { +//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter +// this is to check the upper case AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt = 0; if ( fTrack1->fTpcV0NegPosSample && fTrack2->fNominalPosSample){ while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. && @@ -1162,25 +1113,27 @@ double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const { ){ diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fNominalPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1); - return (AveSep);} + tAveSep = tAveSep/(ipt+1); + return (tAveSep);} else return -1; } -//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter double AliFemtoPair::TpcExitSeparationV0NegV0Neg() const { +//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0NegExitPoint(); return (diff.mag()); } double AliFemtoPair::TpcEntranceSeparationV0NegV0Neg() const { +//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0NegEntrancePoint(); return (diff.mag()); } double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const { +//_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter AliFemtoThreeVector diff; - double AveSep = 0.0; + double tAveSep = 0.0; int ipt=0; if (fTrack1->fTpcV0NegPosSample && fTrack2->fTpcV0NegPosSample){ while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. && @@ -1193,14 +1146,13 @@ double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const { ){ diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt]; ipt++; - AveSep += diff.mag(); + tAveSep += diff.mag(); } - AveSep = AveSep/(ipt+1); - return (AveSep);} + tAveSep = tAveSep/(ipt+1); + return (tAveSep);} else return -1; } -//________________end V0 daughters exit/entrance/average separation calc. void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn, float* tmpZ1,float* tmpU1, float* tmpZ2,float* tmpU2, @@ -1208,6 +1160,7 @@ void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn, double* tmpFracOfMergedRow, double* tmpClosestRowAtDCA ) const{ +// calculate heper variables for merging tmpMergingParNotCalculatedFctn=0; double tDu, tDz; int tN = 0; @@ -1221,14 +1174,14 @@ void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn, tDz = fabs(tmpZ1[ti]-tmpZ2[ti]); tN++; if(ti<13){ - *tmpFracOfMergedRow += (tDu + +#include "AliFemtoParticle.h" +#include "AliFemtoTypes.h" + +class AliFemtoPair { +public: + AliFemtoPair(); + AliFemtoPair(const AliFemtoPair& aPair); + AliFemtoPair(AliFemtoParticle*, AliFemtoParticle*); + ~AliFemtoPair(); + AliFemtoPair& operator=(const AliFemtoPair& aPair); + + // track Gets: + AliFemtoParticle* Track1() const; + AliFemtoParticle* Track2() const; + // track Sets: + void SetTrack1(const AliFemtoParticle* trkPtr); + void SetTrack2(const AliFemtoParticle* trkPtr); + + AliFemtoLorentzVector FourMomentumDiff() const; + AliFemtoLorentzVector FourMomentumSum() const; + double QInv() const; + double KT() const; + double MInv() const; + // pair rapidity + double Rap() const; + double EmissionAngle() const; + + // Bertsch-Pratt momentum components in Pair Frame - written by Bekele/Humanic + double QSidePf() const; + double QOutPf() const; + double QLongPf() const; + + // Bertsch-Pratt momentum components in Local CMS (longitudinally comoving) frame + // - written by Bekele/Humanic + double QSideCMS() const; + double QOutCMS() const; + double QLongCMS() const; + + double KSide() const; + double KOut() const; + double KLong() const; + + // Bertsch-Pratt momentum components in a longitudinally boosted frame + // the argument is the beta of the longitudinal boost (default is 0.0, meaning lab frame) + // - written by Bekele/Humanic + double QSideBf(double beta=0.0) const; + double QOutBf(double beta=0.0) const; + double QLongBf(double beta=0.0) const; + + // Yano-Koonin-Podgoretskii Parametrisation + // source rest frame (usually lab frame) + void QYKPCMS(double& qP, double& qT, double& q0) const ; + // longitudinal comoving frame + void QYKPLCMS(double& qP, double& qT, double& q0) const ; + // pair rest frame + void QYKPPF(double& qP, double& qT, double& q0) const ; + + + double Quality() const; + + // the following two methods calculate the "nominal" separation of the tracks + // at the inner field cage (EntranceSeparation) and when they exit the TPC, + // which may be at the outer field cage, or at the endcaps. + // "nominal" means that the tracks are assumed to start at (0,0,0). Making this + // assumption is important for the Event Mixing-- it is not a mistake. - MALisa + double NominalTpcExitSeparation() const; + double NominalTpcEntranceSeparation() const; + double NominalTpcAverageSeparation() const; + // adapted calculation of Entrance/Exit/Average Tpc separation to V0 daughters + double TpcExitSeparationTrackV0Pos() const; + double TpcEntranceSeparationTrackV0Pos() const; + double TpcAverageSeparationTrackV0Pos() const; + + double TpcExitSeparationTrackV0Neg() const; + double TpcEntranceSeparationTrackV0Neg() const; + double TpcAverageSeparationTrackV0Neg() const; + + double TpcExitSeparationV0PosV0Pos() const; + double TpcEntranceSeparationV0PosV0Pos() const; + double TpcAverageSeparationV0PosV0Pos() const; + + double TpcExitSeparationV0PosV0Neg() const; + double TpcEntranceSeparationV0PosV0Neg() const; + double TpcAverageSeparationV0PosV0Neg() const; + + double TpcExitSeparationV0NegV0Pos() const; + double TpcEntranceSeparationV0NegV0Pos() const; + double TpcAverageSeparationV0NegV0Pos() const; + + double TpcExitSeparationV0NegV0Neg() const; + double TpcEntranceSeparationV0NegV0Neg() const; + double TpcAverageSeparationV0NegV0Neg() const; + + double PInv() const; + double KStar() const; + double KStarFlipped() const; + double CVK() const; + double CVKFlipped() const; + double QInvFlippedXY() const; + + double OpeningAngle() const; + + // Fabrice Private <<< + double KStarSide() const; + double KStarOut() const; + double KStarLong() const; + + float PionPairProbability() const; + float ElectronPairProbability() const; + float KaonPairProbability() const; + float ProtonPairProbability() const; + float KaonPionPairProbability() const; + + double DcaInsideTpc() const; + double Quality2() const; + + /* double KStarGlobal() const; + double CVKGlobal() const; + double KStarSideGlobal() const; + double KStarOutGlobal() const; + double KStarLongGlobal() const;*/ + + void SetMergingPar(double aMaxDuInner, double aMaxDzInner, + double aMaxDuOuter, double aMaxDzOuter); + void SetDefaultHalfFieldMergingPar(); + void SetDefaultFullFieldMergingPar(); + double GetFracOfMergedRow() const; + double GetClosestRowAtDCA() const; + double GetWeightedAvSep() const; + // >>> + double GetFracOfMergedRowTrkV0Pos() const; + double GetClosestRowAtDCATrkV0Pos() const; + + double GetFracOfMergedRowTrkV0Neg() const; + double GetClosestRowAtDCATrkV0Neg() const; + + double GetFracOfMergedRowV0PosV0Neg() const; + double GetFracOfMergedRowV0NegV0Pos() const; + double GetFracOfMergedRowV0PosV0Pos() const; + double GetFracOfMergedRowV0NegV0Neg() const; + +private: + AliFemtoParticle* fTrack1; // Link to the first track in the pair + AliFemtoParticle* fTrack2; // Link to the second track in the pair + + mutable short fNonIdParNotCalculated; // Set to 1 when NonId variables (kstar) have been already calculated for this pair + mutable double fDKSide; // momemntum of first particle in PRF - k* side component + mutable double fDKOut; // momemntum of first particle in PRF - k* out component + mutable double fDKLong; // momemntum of first particle in PRF - k* long component + mutable double fCVK; // cos between velocity and relative momentum k* + mutable double fKStarCalc; // momemntum of first particle in PRF - k* + void CalcNonIdPar() const; + + mutable short fNonIdParNotCalculatedGlobal; // If global k* was calculated + /* mutable double fDKSideGlobal; + mutable double fDKOutGlobal; + mutable double fDKLongGlobal; + mutable double kStarCalcGlobal; + mutable double fCVKGlobal;*/ + //void calcNonIdParGlobal() const; + + mutable short fMergingParNotCalculated; // If merging parameters were calculated + mutable double fWeightedAvSep; // Weighted average separation + mutable double fFracOfMergedRow; // Fraction of merged rows + mutable double fClosestRowAtDCA; // Row at wchich DCA occurs + + mutable short fMergingParNotCalculatedTrkV0Pos; // merging parameters for track - V0 pos + mutable double fFracOfMergedRowTrkV0Pos; // fraction of merged rows for track - V0 pos + mutable double fClosestRowAtDCATrkV0Pos; // Row at which DCA occurs for track - V0 pos + + mutable short fMergingParNotCalculatedTrkV0Neg; // merging parameters for track - V0 neg + mutable double fFracOfMergedRowTrkV0Neg; // fraction of merged rows for track - V0 neg + mutable double fClosestRowAtDCATrkV0Neg; // Row at which DCA occurs for track - V0 neg + + mutable short fMergingParNotCalculatedV0PosV0Neg; // merging parameters for V0 pos - V0 neg + mutable double fFracOfMergedRowV0PosV0Neg; // fraction of merged rows for V0 pos - V0 neg + mutable double fClosestRowAtDCAV0PosV0Neg; // Row at which DCA occurs for V0 pos - V0 neg + + mutable short fMergingParNotCalculatedV0NegV0Pos; // merging parameters for V0 neg - V0 pos + mutable double fFracOfMergedRowV0NegV0Pos; // fraction of merged rows for V0 neg - V0 pos + mutable double fClosestRowAtDCAV0NegV0Pos; // Row at which DCA occurs for V0 neg - V0 pos + + mutable short fMergingParNotCalculatedV0PosV0Pos; // merging parameters for V0 pos - V0 pos + mutable double fFracOfMergedRowV0PosV0Pos; // fraction of merged rows for V0 pos - V0 pos + mutable double fClosestRowAtDCAV0PosV0Pos; // Row at which DCA occurs for V0 pos - V0 pos + + mutable short fMergingParNotCalculatedV0NegV0Neg; // merging parameters for V0 neg - V0 neg + mutable double fFracOfMergedRowV0NegV0Neg; // fraction of merged rows for V0 neg - V0 neg + mutable double fClosestRowAtDCAV0NegV0Neg; // Row at which DCA occurs for V0 neg - V0 neg + + static double fgMaxDuInner; // Minimum cluster separation in x in inner TPC padrow + static double fgMaxDzInner; // Minimum cluster separation in z in inner TPC padrow + static double fgMaxDuOuter; // Minimum cluster separation in x in outer TPC padrow + static double fgMaxDzOuter; // Minimum cluster separation in z in outer TPC padrow + void CalcMergingPar() const; + + void CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn, + float* tmpZ1,float* tmpU1, + float* tmpZ2,float* tmpU2, + int *tmpSect1,int *tmpSect2, + double* tmpFracOfMergedRow, + double* tmpClosestRowAtDCA + ) const; + + void ResetParCalculated(); +}; + +inline void AliFemtoPair::ResetParCalculated(){ + fNonIdParNotCalculated=1; + fNonIdParNotCalculatedGlobal=1; + fMergingParNotCalculated=1; + fMergingParNotCalculatedTrkV0Pos=1; + fMergingParNotCalculatedTrkV0Neg=1; + fMergingParNotCalculatedV0PosV0Pos=1; + fMergingParNotCalculatedV0NegV0Pos=1; + fMergingParNotCalculatedV0PosV0Neg=1; + fMergingParNotCalculatedV0NegV0Neg=1; +} + +inline void AliFemtoPair::SetTrack1(const AliFemtoParticle* trkPtr){ + fTrack1=(AliFemtoParticle*)trkPtr; + ResetParCalculated(); +} +inline void AliFemtoPair::SetTrack2(const AliFemtoParticle* trkPtr){ + fTrack2=(AliFemtoParticle*)trkPtr; + ResetParCalculated(); +} + +inline AliFemtoParticle* AliFemtoPair::Track1() const {return fTrack1;} +inline AliFemtoParticle* AliFemtoPair::Track2() const {return fTrack2;} + +inline double AliFemtoPair::KSide() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fDKSide; +} +inline double AliFemtoPair::KOut() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fDKOut; +} +inline double AliFemtoPair::KLong() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fDKLong; +} +inline double AliFemtoPair::KStar() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fKStarCalc; +} +inline double AliFemtoPair::QInv() const { + AliFemtoLorentzVector tDiff = (fTrack1->FourMomentum()-fTrack2->FourMomentum()); + return ( -1.* tDiff.m()); +} + +// Fabrice private <<< +inline double AliFemtoPair::KStarSide() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fDKSide;//mKStarSide; +} +inline double AliFemtoPair::KStarOut() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fDKOut;//mKStarOut; +} +inline double AliFemtoPair::KStarLong() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fDKLong;//mKStarLong; +} +inline double AliFemtoPair::CVK() const{ + if(fNonIdParNotCalculated) CalcNonIdPar(); + return fCVK; +} + +inline float AliFemtoPair::PionPairProbability() const{ + return (fTrack1->Track()->PidProbPion()) * + (fTrack2->Track()->PidProbPion()); +} +inline float AliFemtoPair::ElectronPairProbability() const{ + return (fTrack1->Track()->PidProbElectron()) * + (fTrack2->Track()->PidProbElectron()); +} +inline float AliFemtoPair::KaonPairProbability() const{ + return (fTrack1->Track()->PidProbKaon()) * + (fTrack2->Track()->PidProbKaon()); +} +inline float AliFemtoPair::ProtonPairProbability() const{ + return (fTrack1->Track()->PidProbProton()) * + (fTrack2->Track()->PidProbProton()); +} +inline float AliFemtoPair::KaonPionPairProbability() const{ + return (fTrack1->Track()->PidProbKaon()) * + (fTrack2->Track()->PidProbPion()); +} + +inline double AliFemtoPair::GetFracOfMergedRow() const{ + if(fMergingParNotCalculated) CalcMergingPar(); + return fFracOfMergedRow; +} +inline double AliFemtoPair::GetClosestRowAtDCA() const { + if(fMergingParNotCalculated) CalcMergingPar(); + return fClosestRowAtDCA; +} +inline double AliFemtoPair::GetWeightedAvSep() const { + if(fMergingParNotCalculated) CalcMergingPar(); + return fWeightedAvSep; +} + + +inline double AliFemtoPair::GetFracOfMergedRowTrkV0Pos() const{ + if(fMergingParNotCalculatedTrkV0Pos) + CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos, + &(fTrack1->fZ[0]),&(fTrack1->fU[0]), + &(fTrack2->fZ[0]),&(fTrack2->fU[0]), + &(fTrack1->fSect[0]),&(fTrack2->fSect[0]), + &(fFracOfMergedRowTrkV0Pos),&(fClosestRowAtDCATrkV0Pos) + ); + return fFracOfMergedRowTrkV0Pos; +} +inline double AliFemtoPair::GetClosestRowAtDCATrkV0Pos() const{ + if(fMergingParNotCalculatedTrkV0Pos) + CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos, + &(fTrack1->fZ[0]),&(fTrack1->fU[0]), + &(fTrack2->fZ[0]),&(fTrack2->fU[0]), + &(fTrack1->fSect[0]),&(fTrack2->fSect[0]), + &fFracOfMergedRowTrkV0Pos,&fClosestRowAtDCATrkV0Pos + ); + return fClosestRowAtDCATrkV0Pos; +} +inline double AliFemtoPair::GetFracOfMergedRowTrkV0Neg() const{ + if(fMergingParNotCalculatedTrkV0Neg) + CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg, + &(fTrack1->fZ[0]),&(fTrack1->fU[0]), + &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), + &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), + &(fFracOfMergedRowTrkV0Neg),&(fClosestRowAtDCATrkV0Neg) + ); + return fFracOfMergedRowTrkV0Neg; +} +inline double AliFemtoPair::GetClosestRowAtDCATrkV0Neg() const{ + if(fMergingParNotCalculatedTrkV0Neg) + CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg, + &(fTrack1->fZ[0]),&(fTrack1->fU[0]), + &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), + &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), + &fFracOfMergedRowTrkV0Neg,&fClosestRowAtDCATrkV0Neg + ); + return fClosestRowAtDCATrkV0Neg; +} +inline double AliFemtoPair::GetFracOfMergedRowV0PosV0Neg() const{ + if(fMergingParNotCalculatedV0PosV0Neg) + CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Neg, + &(fTrack1->fZ[0]),&(fTrack1->fU[0]), + &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), + &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), + &(fFracOfMergedRowV0PosV0Neg), + &(fClosestRowAtDCAV0PosV0Neg) + ); + return fFracOfMergedRowV0PosV0Neg; +} +inline double AliFemtoPair::GetFracOfMergedRowV0NegV0Pos() const{ + if(fMergingParNotCalculatedV0NegV0Pos) + CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Pos, + &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]), + &(fTrack2->fZ[0]),&(fTrack2->fU[0]), + &(fTrack1->fV0NegSect[0]), + &(fTrack2->fSect[0]), + &(fFracOfMergedRowV0NegV0Pos), + &(fClosestRowAtDCAV0NegV0Pos) + ); + return fFracOfMergedRowV0NegV0Pos; +} +inline double AliFemtoPair::GetFracOfMergedRowV0PosV0Pos() const{ + if(fMergingParNotCalculatedV0PosV0Pos) + CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Pos, + &(fTrack1->fZ[0]),&(fTrack1->fU[0]), + &(fTrack2->fZ[0]),&(fTrack2->fU[0]), + &(fTrack1->fSect[0]), + &(fTrack2->fSect[0]), + &(fFracOfMergedRowV0PosV0Pos), + &(fClosestRowAtDCAV0PosV0Pos) + ); + return fFracOfMergedRowV0PosV0Pos; +} +inline double AliFemtoPair::GetFracOfMergedRowV0NegV0Neg() const{ + if(fMergingParNotCalculatedV0NegV0Neg) + CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Neg, + &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]), + &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), + &(fTrack1->fV0NegSect[0]), + &(fTrack2->fV0NegSect[0]), + &(fFracOfMergedRowV0NegV0Neg), + &(fClosestRowAtDCAV0NegV0Neg) + ); + return fFracOfMergedRowV0NegV0Neg; +} + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoPairCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPairCut.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoPairCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPairCut.h index 1fbc30ee788..ed5c4f15e63 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoPairCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPairCut.h @@ -10,10 +10,10 @@ class AliFemtoBaseAnalysis; -#include "Infrastructure/AliFemtoString.h" -#include "Infrastructure/AliFemtoEvent.h" -#include "Infrastructure/AliFemtoPair.h" -#include "Infrastructure/AliFemtoCutMonitorHandler.h" +#include "AliFemtoString.h" +#include "AliFemtoEvent.h" +#include "AliFemtoPair.h" +#include "AliFemtoCutMonitorHandler.h" class AliFemtoPairCut : public AliFemtoCutMonitorHandler { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.cxx similarity index 74% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.cxx index f3d00c48dab..41b425f7d62 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.cxx @@ -1,112 +1,13 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * Particle objects are part of the PicoEvent, which is what is - * stored in the EventMixingBuffers - * A Track object gets converted to a Particle object if it - * passes the ParticleCut of an Analysis - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.22 2003/09/02 17:58:32 perev - * gcc 3.2 updates + WarnOff - * - * Revision 1.21 2003/05/07 15:30:43 magestro - * Fixed bug related to finding merged hits (commit for Fabrice) - * - * Revision 1.20 2003/01/14 09:41:26 renault - * changes on average separation calculation, hit shared finder and memory optimisation - * for Z,U and Sectors variables. - * - * Revision 1.19 2002/12/12 17:01:49 kisiel - * Hidden Information handling and purity calculation - * - * Revision 1.18 2002/11/19 23:36:00 renault - * Enable calculation of exit/entrance separation for V0 daughters - * - * Revision 1.17 2001/12/14 23:11:30 fretiere - * Add class HitMergingCut. Add class fabricesPairCut = HitMerginCut + pair purity cuts. Add TpcLocalTransform function which convert to local tpc coord (not pretty). Modify AliFemtoTrack, AliFemtoParticle, AliFemtoHiddenInfo, AliFemtoPair to handle the hit information and cope with my code - * - * Revision 1.16 2001/05/25 23:23:59 lisa - * Added in AliFemtoKink stuff - * - * Revision 1.15 2001/04/03 21:04:36 kisiel - * - * - * Changes needed to make the Theoretical code - * work. The main code is the ThCorrFctn directory. - * The most visible change is the addition of the - * HiddenInfo to AliFemtoPair. - * - * Revision 1.14 2000/10/05 23:09:05 lisa - * Added kT-dependent radii to mixed-event simulator AND implemented AverageSeparation Cut and CorrFctn - * - * Revision 1.13 2000/08/31 22:31:31 laue - * AliFemtoAnalysis: output changed (a little bit less) - * AliFemtoEvent: new version, members for reference mult added - * AliFemtoIOBinary: new IO for new AliFemtoEvent version - * AliFemtoTypes: TTree typedef to AliFemtoTTree added - * AliFemtoVertexAnalysis: overflow and underflow added - * - * Revision 1.12 2000/07/23 13:52:56 laue - * NominalExitPoint set to (-9999.,-9999.-9999.) if helix.at() - * returns nan (not a number). - * - * Revision 1.11 2000/07/19 17:18:48 laue - * Calculation of Entrance and Exit point added in AliFemtoParticle constructor - * - * Revision 1.10 2000/07/17 20:03:17 lisa - * Implemented tools for addressing and assessing trackmerging - * - * Revision 1.9 2000/07/16 21:38:23 laue - * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version - * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings - * AliFemtoParticle.cc AliFemtoParticle.h : pointers fTrack,fV0 initialized to 0 - * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG - * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better - * solution - * - * Revision 1.8 2000/05/03 17:44:43 laue - * AliFemtoEvent, AliFemtoTrack & AliFemtoV0 declared friend to AliFemtoIOBinary - * AliFemtoParticle updated for V0 pos,neg track Id - * - * Revision 1.7 2000/04/03 16:21:51 laue - * some include files changed - * Multi track cut added - * - * Revision 1.6 1999/12/11 15:58:29 lisa - * Add vertex decay position datum and accessor to AliFemtoParticle to allow pairwise cuts on seperation of V0s - * - * Revision 1.5 1999/09/17 22:38:02 lisa - * first full integration of V0s into AliFemto framework - * - * Revision 1.4 1999/09/01 19:04:53 lisa - * update Particle class AND add parity cf and Randys Coulomb correction - * - * Revision 1.3 1999/07/06 22:33:23 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.2 1999/06/29 17:50:27 fisyak - * formal changes to account new StEvent, does not complie yet - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#include "Infrastructure/AliFemtoParticle.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoParticle: main class halding all the necessary information // +// about particle that is required during femtoscopic analysis // +// This includes all the information about the quality of the track, // +// its identification as well as track chracteristics with connection // +// to the detector parts, e.g. entrance and exit points. // +// // +/////////////////////////////////////////////////////////////////////////// +#include "AliFemtoParticle.h" //#include "math_constants.h" #ifdef __CC5__ #include @@ -118,18 +19,18 @@ #include "TMath.h" using namespace TMath; -double AliFemtoParticle::fPrimPimPar0= 9.05632e-01; -double AliFemtoParticle::fPrimPimPar1= -2.26737e-01; -double AliFemtoParticle::fPrimPimPar2= -1.03922e-01; -double AliFemtoParticle::fPrimPipPar0= 9.09616e-01; -double AliFemtoParticle::fPrimPipPar1= -9.00511e-02; -double AliFemtoParticle::fPrimPipPar2= -6.02940e-02; -double AliFemtoParticle::fPrimPmPar0= 0.; -double AliFemtoParticle::fPrimPmPar1= 0.; -double AliFemtoParticle::fPrimPmPar2= 0.; -double AliFemtoParticle::fPrimPpPar0= 0.; -double AliFemtoParticle::fPrimPpPar1= 0.; -double AliFemtoParticle::fPrimPpPar2= 0.; +double AliFemtoParticle::fgPrimPimPar0= 9.05632e-01; +double AliFemtoParticle::fgPrimPimPar1= -2.26737e-01; +double AliFemtoParticle::fgPrimPimPar2= -1.03922e-01; +double AliFemtoParticle::fgPrimPipPar0= 9.09616e-01; +double AliFemtoParticle::fgPrimPipPar1= -9.00511e-02; +double AliFemtoParticle::fgPrimPipPar2= -6.02940e-02; +double AliFemtoParticle::fgPrimPmPar0= 0.; +double AliFemtoParticle::fgPrimPmPar1= 0.; +double AliFemtoParticle::fgPrimPmPar2= 0.; +double AliFemtoParticle::fgPrimPpPar0= 0.; +double AliFemtoParticle::fgPrimPpPar1= 0.; +double AliFemtoParticle::fgPrimPpPar2= 0.; int TpcLocalTransform(AliFmThreeVectorD& xgl, int& iSector, @@ -159,6 +60,7 @@ AliFemtoParticle::AliFemtoParticle() : fTpcV0NegEntrancePoint(0), fTpcV0NegExitPoint(0) { + // Default constructor /* no-op for default */ // cout << "Created particle " << this << endl; } @@ -183,6 +85,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoParticle& aParticle): fTpcV0NegEntrancePoint(0), fTpcV0NegExitPoint(0) { + // Copy constructor if (aParticle.fTrack) fTrack = new AliFemtoTrack(*aParticle.fTrack); if (aParticle.fV0) @@ -223,7 +126,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoParticle& aParticle): fSecondaryVertex = aParticle.fSecondaryVertex; CalculatePurity(); if(aParticle.fHiddenInfo){ - fHiddenInfo= aParticle.HiddenInfo()->clone(); + fHiddenInfo= aParticle.HiddenInfo()->Clone(); } fNominalTpcEntrancePoint = aParticle.fNominalTpcEntrancePoint; @@ -281,7 +184,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoTrack* const hbtTrack,const dou fTpcV0NegEntrancePoint(0), fTpcV0NegExitPoint(0) { - + // Constructor from normal track // I know there is a better way to do this... fTrack = new AliFemtoTrack(*hbtTrack); @@ -316,7 +219,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoTrack* const hbtTrack,const dou // *** fHiddenInfo= 0; if(hbtTrack->ValidHiddenInfo()){ - fHiddenInfo= hbtTrack->getHiddenInfo()->getParticleHiddenInfo()->clone(); + fHiddenInfo= hbtTrack->GetHiddenInfo()->Clone(); } // *** // cout << "Created particle " << this << endl; @@ -343,17 +246,18 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoV0* const hbtV0,const double& m fTpcV0NegEntrancePoint(0), fTpcV0NegExitPoint(0) { + // Constructor from V0 fV0 = new AliFemtoV0(*hbtV0); //fMap[0]= 0; //fMap[1]= 0; // I know there is a better way to do this... - AliFemtoThreeVector temp = hbtV0->momV0(); + AliFemtoThreeVector temp = hbtV0->MomV0(); fFourMomentum.setVect(temp); double ener = ::sqrt(temp.mag2()+mass*mass); fFourMomentum.setE(ener); // Calculating TpcEntrancePoint for Positive V0 daugther - fPrimaryVertex = hbtV0->primaryVertex(); - fSecondaryVertex = hbtV0->decayVertexV0(); + fPrimaryVertex = hbtV0->PrimaryVertex(); + fSecondaryVertex = hbtV0->DecayVertexV0(); fHelixV0Pos = hbtV0->HelixPos(); fTpcV0NegPosSample = new AliFemtoThreeVector[45];//for V0Neg @@ -381,7 +285,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoV0* const hbtV0,const double& m // *** fHiddenInfo= 0; if(hbtV0->ValidHiddenInfo()){ - fHiddenInfo= hbtV0->getHiddenInfo()->clone(); + fHiddenInfo= hbtV0->GetHiddenInfo()->Clone(); } // *** } @@ -406,6 +310,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoKink* const hbtKink,const doubl fTpcV0NegEntrancePoint(0), fTpcV0NegExitPoint(0) { + // Constructor from Kink fKink = new AliFemtoKink(*hbtKink); // fMap[0]= 0; //fMap[1]= 0; @@ -437,6 +342,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoXi* const hbtXi, const double& fTpcV0NegEntrancePoint(0), fTpcV0NegExitPoint(0) { + // Constructor from Xi fXi = new AliFemtoXi(*hbtXi); // fMap[0]= 0; //fMap[1]= 0; @@ -449,6 +355,7 @@ AliFemtoParticle::AliFemtoParticle(const AliFemtoXi* const hbtXi, const double& //_____________________ AliFemtoParticle& AliFemtoParticle::operator=(const AliFemtoParticle& aParticle) { + // assignment operator if (this == &aParticle) return *this; @@ -496,7 +403,7 @@ AliFemtoParticle& AliFemtoParticle::operator=(const AliFemtoParticle& aParticle) fSecondaryVertex = aParticle.fSecondaryVertex; CalculatePurity(); if(aParticle.fHiddenInfo){ - fHiddenInfo= aParticle.fHiddenInfo->clone(); + fHiddenInfo= aParticle.fHiddenInfo->Clone(); } fNominalTpcEntrancePoint = aParticle.fNominalTpcEntrancePoint; @@ -504,7 +411,7 @@ AliFemtoParticle& AliFemtoParticle::operator=(const AliFemtoParticle& aParticle) if (fHiddenInfo) delete fHiddenInfo; if (aParticle.fHiddenInfo) - fHiddenInfo = aParticle.HiddenInfo()->clone(); + fHiddenInfo = aParticle.HiddenInfo()->Clone(); for (int iter=0; iter<6; iter++) fPurity[iter] = aParticle.fPurity[iter]; @@ -532,12 +439,14 @@ const AliFemtoThreeVector& AliFemtoParticle::NominalTpcEntrancePoint() const{ } //_____________________ void AliFemtoParticle::CalculatePurity(){ + // Calculate additional parameterized purity + double tPt = fFourMomentum.perp(); // pi - - fPurity[0] = fPrimPimPar0*(1.-exp((tPt-fPrimPimPar1)/fPrimPimPar2)); + fPurity[0] = fgPrimPimPar0*(1.-exp((tPt-fgPrimPimPar1)/fgPrimPimPar2)); fPurity[0] *= fTrack->PidProbPion(); // pi+ - fPurity[1] = fPrimPipPar0*(1.-exp((tPt-fPrimPipPar1)/fPrimPipPar2)); + fPurity[1] = fgPrimPipPar0*(1.-exp((tPt-fgPrimPipPar1)/fgPrimPipPar2)); fPurity[1] *= fTrack->PidProbPion(); // K- fPurity[2] = fTrack->PidProbKaon(); @@ -551,6 +460,7 @@ void AliFemtoParticle::CalculatePurity(){ double AliFemtoParticle::GetPionPurity() { + // Get full pion purity if (fTrack->Charge()>0) return fPurity[1]; else @@ -558,6 +468,7 @@ double AliFemtoParticle::GetPionPurity() } double AliFemtoParticle::GetKaonPurity() { + // Get full kaon purity if (fTrack->Charge()>0) return fPurity[3]; else @@ -565,6 +476,7 @@ double AliFemtoParticle::GetKaonPurity() } double AliFemtoParticle::GetProtonPurity() { + // Get full proton purity if (fTrack->Charge()>0) return fPurity[5]; else @@ -587,35 +499,35 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH // which is the point at which it crosses the // inner field cage // static AliFemtoThreeVector ZeroVec(0.,0.,0.); - AliFemtoThreeVector ZeroVec(0.,0.,0.); -// ZeroVec.setX(tHelix->origin().x()-PrimVert->x()); -// ZeroVec.setY(tHelix->origin().y()-PrimVert->y()); -// ZeroVec.setZ(tHelix->origin().z()-PrimVert->z()); - ZeroVec.setX(SecVert->x()-PrimVert->x()); - ZeroVec.setY(SecVert->y()-PrimVert->y()); - ZeroVec.setZ(SecVert->z()-PrimVert->z()); + AliFemtoThreeVector tZeroVec(0.,0.,0.); +// tZeroVec.setX(tHelix->origin().x()-PrimVert->x()); +// tZeroVec.setY(tHelix->origin().y()-PrimVert->y()); +// tZeroVec.setZ(tHelix->origin().z()-PrimVert->z()); + tZeroVec.setX(SecVert->x()-PrimVert->x()); + tZeroVec.setY(SecVert->y()-PrimVert->y()); + tZeroVec.setZ(SecVert->z()-PrimVert->z()); double dip, curv, phase; int h; - curv = tHelix->curvature(); - dip = tHelix->dipAngle(); - phase= tHelix->phase(); - h = tHelix->h(); + curv = tHelix->Curvature(); + dip = tHelix->DipAngle(); + phase= tHelix->Phase(); + h = tHelix->H(); - AliFmHelixD hel(curv,dip,phase,ZeroVec,h); + AliFmHelixD hel(curv,dip,phase,tZeroVec,h); pairD candidates; double sideLength; // this is how much length to go to leave through sides of TPC double endLength; // this is how much length to go to leave through endcap of TPC // figure out how far to go to leave through side... - candidates = hel.pathLength(200.0); // bugfix MAL jul00 - 200cm NOT 2cm + candidates = hel.PathLength(200.0); // bugfix MAL jul00 - 200cm NOT 2cm sideLength = (candidates.first > 0) ? candidates.first : candidates.second; - static AliFemtoThreeVector WestEnd(0.,0.,200.); // bugfix MAL jul00 - 200cm NOT 2cm - static AliFemtoThreeVector EastEnd(0.,0.,-200.); // bugfix MAL jul00 - 200cm NOT 2cm - static AliFemtoThreeVector EndCapNormal(0.,0.,1.0); + static AliFemtoThreeVector tWestEnd(0.,0.,200.); // bugfix MAL jul00 - 200cm NOT 2cm + static AliFemtoThreeVector tEastEnd(0.,0.,-200.); // bugfix MAL jul00 - 200cm NOT 2cm + static AliFemtoThreeVector tEndCapNormal(0.,0.,1.0); - endLength = hel.pathLength(WestEnd,EndCapNormal); - if (endLength < 0.0) endLength = hel.pathLength(EastEnd,EndCapNormal); + endLength = hel.PathLength(tWestEnd,tEndCapNormal); + if (endLength < 0.0) endLength = hel.PathLength(tEastEnd,tEndCapNormal); if (endLength < 0.0) cout << "AliFemtoParticle::CalculateTpcExitAndEntrancePoints(): " @@ -623,13 +535,13 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH // OK, firstExitLength will be the shortest way out of the detector... double firstExitLength = (endLength < sideLength) ? endLength : sideLength; // now then, let's return the POSITION at which particle leaves TPC... - *tmpTpcExitPoint = hel.at(firstExitLength); + *tmpTpcExitPoint = hel.At(firstExitLength); // Finally, calculate the position at which the track crosses the inner field cage - candidates = hel.pathLength(50.0); // bugfix MAL jul00 - 200cm NOT 2cm + candidates = hel.PathLength(50.0); // bugfix MAL jul00 - 200cm NOT 2cm sideLength = (candidates.first > 0) ? candidates.first : candidates.second; // cout << "sideLength 2 ="<x()) || IsNaN(tmpTpcEntrancePoint->y()) || @@ -664,13 +576,13 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH // within the TPC, and for a pair cut // use the average separation of these N int irad = 0; - candidates = hel.pathLength(50.0); + candidates = hel.PathLength(50.0); sideLength = (candidates.first > 0) ? candidates.first : candidates.second; while (irad<11 && !IsNaN(sideLength)){ float radius = 50.0 + irad*15.0; - candidates = hel.pathLength(radius); + candidates = hel.PathLength(radius); sideLength = (candidates.first > 0) ? candidates.first : candidates.second; - tmpPosSample[irad] = hel.at(sideLength); + tmpPosSample[irad] = hel.At(sideLength); if(IsNaN(tmpPosSample[irad].x()) || IsNaN(tmpPosSample[irad].y()) || IsNaN(tmpPosSample[irad].z()) @@ -682,7 +594,7 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH irad++; if (irad<11){ float radius = 50.0 + irad*15.0; - candidates = hel.pathLength(radius); + candidates = hel.PathLength(radius); sideLength = (candidates.first > 0) ? candidates.first : candidates.second; } } @@ -707,7 +619,7 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH AliFmThreeVectorD tr(0,0,0); int ti =0; // test to enter the loop - candidates = hel.pathLength(tRowRadius[ti]); + candidates = hel.PathLength(tRowRadius[ti]); tLength = (candidates.first > 0) ? candidates.first : candidates.second; if (IsNaN(tLength)){ cout <<"tLength Init tmp NAN" << endl; @@ -717,7 +629,7 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH } // end test while(ti<45 && !IsNaN(tLength)){ - candidates = hel.pathLength(tRowRadius[ti]); + candidates = hel.PathLength(tRowRadius[ti]); tLength = (candidates.first > 0) ? candidates.first : candidates.second; if (IsNaN(tLength)){ cout <<"tLength loop 1st NAN" << endl; @@ -725,7 +637,7 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH cout << "*** THIS IS AN ERROR SHOULDN'T LOOP ***" << endl; tmpSect[ti]=-1;//sector } - tPoint = hel.at(tLength); + tPoint = hel.At(tLength); // Find which sector it is on TpcLocalTransform(tPoint,tmpSect[ti],tRow,tU,tPhi); if (IsNaN(tmpSect[ti])){ @@ -746,13 +658,13 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH tr.setX(tRowRadius[ti]*cos(tPhi)); tr.setY(tRowRadius[ti]*sin(tPhi)); // find crossing point - tLength = hel.pathLength(tr,tn); + tLength = hel.PathLength(tr,tn); if (IsNaN(tLength)){ cout <<"tLength loop 2nd NAN" << endl; cout <<"padrow number= " << ti << " not reached" << endl; tmpSect[ti]=-2;//sector } - tPoint = hel.at(tLength); + tPoint = hel.At(tLength); tmpZ[ti] = tPoint.z(); tOutOfBound = TpcLocalTransform(tPoint,tSect,tRow,tmpU[ti],tPhi); if (IsNaN(tSect)){ @@ -779,8 +691,8 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH tr.setX(tRowRadius[ti]*cos(tPhi)); tr.setY(tRowRadius[ti]*sin(tPhi)); // find crossing point - tLength = hel.pathLength(tr,tn); - tPoint = hel.at(tLength); + tLength = hel.PathLength(tr,tn); + tPoint = hel.At(tLength); if (IsNaN(tLength)){ cout <<"tLength loop 3rd NAN" << endl; cout <<"padrow number= "<< ti << " not reached" << endl; @@ -831,7 +743,7 @@ void AliFemtoParticle::CalculateTpcExitAndEntrancePoints(AliFmPhysicalHelixD* tH } ti++; if (ti<45){ - candidates = hel.pathLength(tRowRadius[ti]); + candidates = hel.PathLength(tRowRadius[ti]); tLength = (candidates.first > 0) ? candidates.first : candidates.second;} } } diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.h new file mode 100644 index 00000000000..d433e9243f9 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.h @@ -0,0 +1,160 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoParticle: main class halding all the necessary information // +// about a particle that is required during femtoscopic analysis // +// // +/////////////////////////////////////////////////////////////////////////// + +#ifndef ALIFEMTOPARTICLE_H +#define ALIFEMTOPARTICLE_H + +//#include "math.h" +#include "AliFemtoTypes.h" +#include "AliFemtoTrack.h" +#include "AliFemtoV0.h" +#include "AliFemtoKink.h" +#include "AliFemtoXi.h" +#include "AliFmPhysicalHelixD.h" +// *** +class AliFemtoHiddenInfo; +// *** +class AliFemtoParticle{ +public: + AliFemtoParticle(); + AliFemtoParticle(const AliFemtoParticle& aParticle); + AliFemtoParticle(const AliFemtoTrack* const hbtTrack, const double& mass); + AliFemtoParticle(const AliFemtoV0* const hbtV0, const double& mass); + AliFemtoParticle(const AliFemtoKink* const hbtKink, const double& mass); + AliFemtoParticle(const AliFemtoXi* const hbtXi, const double& mass); + ~AliFemtoParticle(); + + AliFemtoParticle& operator=(const AliFemtoParticle& aParticle); + + const AliFemtoLorentzVector& FourMomentum() const; + + AliFmPhysicalHelixD& Helix(); + + const AliFemtoThreeVector DecayVertexPosition() const; + unsigned long TopologyMap(const int word) const; + int NumberOfHits() const; + + unsigned long TrackId() const; // only for particles from tracks + unsigned short NegTrackId() const; // only for particles from v0 + unsigned short PosTrackId() const; // only for particles from v0 + + AliFemtoTrack* Track() const; + AliFemtoV0* V0() const; + AliFemtoKink* Kink() const; + + const AliFemtoThreeVector& NominalTpcExitPoint() const; // position track exits TPC assuming start at (0,0,0) + const AliFemtoThreeVector& NominalTpcEntrancePoint() const; // position track crosses IFC assuming start at (0,0,0) + const AliFemtoThreeVector& TpcV0PosExitPoint() const; + const AliFemtoThreeVector& TpcV0PosEntrancePoint() const; + const AliFemtoThreeVector& TpcV0NegExitPoint() const; + const AliFemtoThreeVector& TpcV0NegEntrancePoint() const; + + // the following method is for explicit internal calculation to fill datamembers. + // It is invoked automatically if AliFemtoParticle constructed from AliFemtoTrack + //void CalculateNominalTpcExitAndEntrancePoints(); // NOTE - this requires the fHelix, so be sure this is filled + + + AliFemtoThreeVector fNominalPosSample[11]; // I make this public for convenience and speed of AliFemtoPair() + float fZ[45]; // Z position of cluster on padrow + float fU[45]; // U position of cluster on padrow + int fSect[45]; // Sector number of cluster on padrow + + void ResetFourMomentum(const AliFemtoLorentzVector& fourMomentum); + + const AliFemtoHiddenInfo* HiddenInfo() const; + // Fab private + AliFemtoHiddenInfo* GetHiddenInfo() const; + void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo); + void CalculatePurity(); + double GetPionPurity(); + double GetKaonPurity(); + double GetProtonPurity(); + void CalculateTpcExitAndEntrancePoints( AliFmPhysicalHelixD* tHelix, + AliFemtoThreeVector* PrimVert, + AliFemtoThreeVector* SecVert, + AliFemtoThreeVector* tmpTpcEntrancePoint, + AliFemtoThreeVector* tmpTpcExitPoint, + AliFemtoThreeVector* tmpPosSample, + float* tmpZ,float* tmpU,int* tmpSect); + + // For V0 Neg Daugthers TpcEntrance/ExitPoints + AliFemtoThreeVector* fTpcV0NegPosSample; // Sample of TPC V0 neg + float* fV0NegZ; // Array of Neg Z cluster positions + float* fV0NegU; // Array of Neg U cluster positions + int* fV0NegSect; // Array of Neg cluster sectors + +private: + AliFemtoTrack* fTrack; // copy of the track the particle was formed of, else Null + AliFemtoV0* fV0; // copy of the v0 the particle was formed of, else Null + AliFemtoKink* fKink; // copy of the v0 the particle was formed of, else Null + AliFemtoXi* fXi; // copy of the Xi the particle was formed of, else Null + + AliFemtoLorentzVector fFourMomentum; // Particle momentum + AliFmPhysicalHelixD fHelix; // Particle trajectory helix + //unsigned long fMap[2]; + //int fNhits; + AliFemtoThreeVector fNominalTpcExitPoint; // Point where particle exits TPC + AliFemtoThreeVector fNominalTpcEntrancePoint; // Point where particle enters TPC + AliFemtoHiddenInfo* fHiddenInfo; // Fab private + + double fPurity[6]; // Purity variables + + static double fgPrimPimPar0; // purity parameterization parameter + static double fgPrimPimPar1; // purity parameterization parameter + static double fgPrimPimPar2; // purity parameterization parameter + static double fgPrimPipPar0; // purity parameterization parameter + static double fgPrimPipPar1; // purity parameterization parameter + static double fgPrimPipPar2; // purity parameterization parameter + static double fgPrimPmPar0; // purity parameterization parameter + static double fgPrimPmPar1; // purity parameterization parameter + static double fgPrimPmPar2; // purity parameterization parameter + static double fgPrimPpPar0; // purity parameterization parameter + static double fgPrimPpPar1; // purity parameterization parameter + static double fgPrimPpPar2; // purity parameterization parameter + + // For V0 Daugthers TpcEntrance/ExitPoints + AliFemtoThreeVector fPrimaryVertex; // primary vertex of V0 + AliFemtoThreeVector fSecondaryVertex; // secondary vertex of V0 + + AliFmPhysicalHelixD fHelixV0Pos; // helix for positive V0 daughter + AliFemtoThreeVector fTpcV0PosEntrancePoint; // positive V0 daughter entrance point to TPC + AliFemtoThreeVector fTpcV0PosExitPoint; // positive V0 daughter exit point from TPC + + AliFmPhysicalHelixD fHelixV0Neg; // helix for negative V0 daughter + AliFemtoThreeVector fTpcV0NegEntrancePoint; // negative V0 daughter entrance point to TPC + AliFemtoThreeVector fTpcV0NegExitPoint; // negative V0 daughter exit point from TPC +}; + +inline AliFemtoTrack* AliFemtoParticle::Track() const { return fTrack; } +inline unsigned long AliFemtoParticle::TrackId() const { return fTrack->TrackId(); }; +inline const AliFemtoLorentzVector& AliFemtoParticle::FourMomentum() const {return fFourMomentum;} +inline AliFmPhysicalHelixD& AliFemtoParticle::Helix() {return fHelix;} +//inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return fMap[word];} +//inline int AliFemtoParticle::NumberOfHits() const {return fNhits;} +//by marek chojnacki to could compile + +inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return 1;} +inline int AliFemtoParticle::NumberOfHits() const {return 1;} + +inline AliFemtoV0* AliFemtoParticle::V0() const { return fV0; } +inline unsigned short AliFemtoParticle::NegTrackId() const { return fV0->IdNeg(); } +inline unsigned short AliFemtoParticle::PosTrackId() const { return fV0->IdPos(); } +inline const AliFemtoThreeVector AliFemtoParticle::DecayVertexPosition() const {return fV0->DecayVertexV0(); } +// *** +inline AliFemtoHiddenInfo* AliFemtoParticle::GetHiddenInfo() const +{return fHiddenInfo;} +inline const AliFemtoHiddenInfo* AliFemtoParticle::HiddenInfo() const +{return fHiddenInfo;} +inline void AliFemtoParticle::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) +{ fHiddenInfo = aHiddenInfo->Clone();} +// *** + +inline void AliFemtoParticle::ResetFourMomentum(const AliFemtoLorentzVector& vec){fFourMomentum = vec;} + +inline AliFemtoKink* AliFemtoParticle::Kink() const { return fKink; } + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticleCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticleCollection.h similarity index 93% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticleCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticleCollection.h index 1de0927148c..fe101c71eb1 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticleCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticleCollection.h @@ -12,6 +12,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * @@ -25,7 +28,7 @@ **************************************************************************/ #ifndef AliFemtoParticleCollection_hh #define AliFemtoParticleCollection_hh -#include "Infrastructure/AliFemtoParticle.h" +#include "AliFemtoParticle.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoParticleCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticleCut.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoParticleCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticleCut.h index 51733e8b85a..63c73df5feb 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoParticleCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticleCut.h @@ -6,8 +6,8 @@ #ifndef AliFemtoParticleCut_hh #define AliFemtoParticleCut_hh -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoCutMonitorHandler.h" +#include "AliFemtoTypes.h" +#include "AliFemtoCutMonitorHandler.h" class AliFemtoBaseAnalysis; diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEvent.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEvent.cxx similarity index 98% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEvent.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEvent.cxx index a2c9eeed997..e0557f2846c 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEvent.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEvent.cxx @@ -16,6 +16,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -44,7 +47,7 @@ * **************************************************************************/ -#include "Infrastructure/AliFemtoPicoEvent.h" +#include "AliFemtoPicoEvent.h" //________________ AliFemtoPicoEvent::AliFemtoPicoEvent() : diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEvent.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEvent.h similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEvent.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEvent.h index 0351d47108a..1d33736fd38 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEvent.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEvent.h @@ -16,6 +16,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -33,7 +36,7 @@ #ifndef AliFemtoPicoEvent_hh #define AliFemtoPicoEvent_hh -#include "Infrastructure/AliFemtoParticleCollection.h" +#include "AliFemtoParticleCollection.h" class AliFemtoPicoEvent{ public: diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollection.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollection.h index 688ff620333..3e035ed20fe 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollection.h @@ -12,6 +12,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * @@ -26,7 +29,7 @@ #ifndef AliFemtoPicoEventCollection_hh #define AliFemtoPicoEventCollection_hh -#include "Infrastructure/AliFemtoPicoEvent.h" +#include "AliFemtoPicoEvent.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVector.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVector.h similarity index 91% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVector.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVector.h index d9ddd7fc057..f7244f03ffa 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVector.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVector.h @@ -10,6 +10,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * @@ -21,7 +24,7 @@ #ifndef AliFemtoPicoEventCollectionVector_hh #define AliFemtoPicoEventCollectionVector_hh -#include "Infrastructure/AliFemtoPicoEventCollection.h" +#include "AliFemtoPicoEventCollection.h" #include #include diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.cxx similarity index 97% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.cxx index 9b453b3ceec..a48e9edbc66 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.cxx @@ -10,6 +10,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -28,7 +31,7 @@ * * **************************************************************************/ -#include "Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h" +#include "AliFemtoPicoEventCollectionVectorHideAway.h" // ----------------------------------- AliFemtoPicoEventCollectionVectorHideAway::AliFemtoPicoEventCollectionVectorHideAway(int bx, double lx, double ux, diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.h similarity index 91% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.h index f8be9e767d2..b68c6c9da88 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.h @@ -10,6 +10,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -30,9 +33,9 @@ **************************************************************************/ #ifndef AliFemtoPicoEventCollectionVectorHideAway_hh #define AliFemtoPicoEventCollectionVectorHideAway_hh -#include "Infrastructure/AliFemtoPicoEvent.h" -#include "Infrastructure/AliFemtoPicoEventCollection.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVector.h" +#include "AliFemtoPicoEvent.h" +#include "AliFemtoPicoEventCollection.h" +#include "AliFemtoPicoEventCollectionVector.h" #include #include #include diff --git a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoQinvCorrFctn.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoQinvCorrFctn.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx index 7ddc088af41..4dbdf69e2b0 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoQinvCorrFctn.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx @@ -11,6 +11,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:40:42 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -40,8 +43,8 @@ * **************************************************************************/ -#include "CorrFctn/AliFemtoQinvCorrFctn.h" -//#include "Infrastructure/AliFemtoHisto.h" +#include "AliFemtoQinvCorrFctn.h" +//#include "AliFemtoHisto.h" #include #ifdef __ROOT__ @@ -142,16 +145,16 @@ AliFemtoString AliFemtoQinvCorrFctn::Report(){ return returnThis; } //____________________________ -void AliFemtoQinvCorrFctn::AddRealPair(const AliFemtoPair* pair){ - double Qinv = fabs(pair->qInv()); // note - qInv() will be negative for identical pairs... +void AliFemtoQinvCorrFctn::AddRealPair(AliFemtoPair* pair){ + double Qinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs... fNumerator->Fill(Qinv); // cout << "AliFemtoQinvCorrFctn::AddRealPair : " << pair->qInv() << " " << Qinv << //" " << pair->track1().FourMomentum() << " " << pair->track2().FourMomentum() << endl; } //____________________________ -void AliFemtoQinvCorrFctn::AddMixedPair(const AliFemtoPair* pair){ +void AliFemtoQinvCorrFctn::AddMixedPair(AliFemtoPair* pair){ double weight = 1.0; - double Qinv = fabs(pair->qInv()); // note - qInv() will be negative for identical pairs... + double Qinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs... fDenominator->Fill(Qinv,weight); } diff --git a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoQinvCorrFctn.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoQinvCorrFctn.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.h index 1d1ca57ee2b..98c094b1608 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/CorrFctn/AliFemtoQinvCorrFctn.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.h @@ -11,6 +11,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:40:42 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -41,7 +44,7 @@ #define AliFemtoQinvCorrFctn_hh #include "TH1D.h" -#include "Base/AliFemtoCorrFctn.h" +#include "AliFemtoCorrFctn.h" class AliFemtoQinvCorrFctn : public AliFemtoCorrFctn { public: @@ -52,8 +55,8 @@ public: AliFemtoQinvCorrFctn& operator=(const AliFemtoQinvCorrFctn& aCorrFctn); virtual AliFemtoString Report(); - virtual void AddRealPair(const AliFemtoPair*); - virtual void AddMixedPair(const AliFemtoPair*); + virtual void AddRealPair(AliFemtoPair*); + virtual void AddMixedPair(AliFemtoPair*); virtual void Finish(); diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoString.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoString.h similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoString.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoString.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoThreeVector.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoThreeVector.h similarity index 99% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoThreeVector.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoThreeVector.h index 63cb152ef9f..f4443556408 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoThreeVector.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoThreeVector.h @@ -15,6 +15,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoThreeVectorD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoThreeVectorD.h similarity index 88% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoThreeVectorD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoThreeVectorD.h index 906f5aa4215..b230a23f3ff 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoThreeVectorD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoThreeVectorD.h @@ -2,6 +2,9 @@ * * $Id$ * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrack.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrack.cxx similarity index 63% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrack.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrack.cxx index b990ef49389..fd0623e49d5 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrack.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrack.cxx @@ -1,98 +1,26 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * Implementation of methods - * - *************************************************************************** - * $Log$ - * Revision 1.3 2007/04/27 07:24:34 akisiel - * Make revisions needed for compilation from the main AliRoot tree - * - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.3 2007-04-03 16:00:09 mchojnacki - * Changes to iprove memory managing - * - * Revision 1.2 2007/03/08 14:58:04 mchojnacki - * adding some alice stuff - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.19 2005/07/15 17:41:43 kopytin - * initialized fHiddenInfo in AliFemtoTrack() to null - * - * Revision 1.18 2005/07/10 02:17:21 chajecki - * Ftpc (Eeat+West) hits included in nHits() - * - * Revision 1.17 2005/06/17 21:41:12 chajecki - * Two bugs fixed: - * 1. wrong value of mNHits set in one of the constructors - * AliFemtoTrack::AliFemtoTrack(const StTrack* ST, AliFemtoThreeVector PrimaryVertex) - * - * 2. since year 4 the StMuTrack::nHits() returns the total number of hits. - * We're interested in TPC hits only so this value can be taken by - * StMuTrack::topologyMap().numberOfHits(kTpcId); - * This change is backwards compatible so the code should work also - * for data <=Y3 - * - * Revision 1.16 2003/03/18 14:41:48 kisiel - * Bugfix update for the theoretical part of the code. Reverts the changes to the Lednicky weight calculator, as the previuos one had problems with strong interaction - * - * Revision 1.15 2003/01/31 19:57:15 magestro - * Cleared up simple compiler warnings on i386_linux24 - * - * Revision 1.14 2003/01/21 17:26:33 magestro - * Added condition to globalTrack() call so GlobalTracks branch in MuDst can be disabled - * - * Revision 1.13 2002/03/21 18:49:31 laue - * updated for new MuDst reader - * - * Revision 1.12 2002/02/04 18:58:33 laue - * *** empty log message *** - * - * Revision 1.11 2001/12/14 23:11:30 fretiere - * Add class HitMergingCut. Add class fabricesPairCut = HitMerginCut + pair purity cuts. Add TpcLocalTransform function which convert to local tpc coord (not pretty). Modify AliFemtoTrack, AliFemtoParticle, AliFemtoHiddenInfo, AliFemtoPair to handle the hit information and cope with my code - * - * Revision 1.4 2001/06/21 19:15:48 laue - * Modified fiels: - * CTH.h : new constructor added - * AliFemtoEvent, AliFemtoKink, AliFemtoTrack : constructors from the persistent - * (TTree) classes added - * AliFemtoLikeSignAnalysis : minor changes, for debugging - * AliFemtoTypes: split into different files - * Added files: for the new TTree muDst's - * StExceptions.cxx StExceptions.h AliFemtoEnumeration.h - * AliFemtoHelix.h AliFemtoHisto.h AliFemtoString.h AliFemtoTFile.h - * AliFemtoTTreeEvent.cxx AliFemtoTTreeEvent.h AliFemtoTTreeKink.cxx - * AliFemtoTTreeKink.h AliFemtoTTreeTrack.cxx AliFemtoTTreeTrack.h - * AliFemtoTTreeV0.cxx AliFemtoTTreeV0.h AliFemtoVector.h - * - * Revision 1.3 2001/05/25 23:23:59 lisa - * Added in AliFemtoKink stuff - * - * - ****************************************************************************/ - -#include "Infrastructure/AliFemtoTrack.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoTrack: main class holding all the necessary information // +// about a track (before the identification) that is required during // +// femtoscopic analysis. This class is filled with information from the // +// input stream by the reader. A particle has a link back to the Track // +// it was created from, so we do not copy the information. // +// // +/////////////////////////////////////////////////////////////////////////// + +#include "AliFemtoTrack.h" #ifndef __NO_STAR_DEPENDENCE_ALLOWED__ #ifdef __ROOT__ #include "StEvent/StEnumerations.h" -#include "Infrastructure/AliFemtoAihongPid.h" +#include "AliFemtoAihongPid.h" #include "StEventUtilities/StuProbabilityPidAlgorithm.h" #endif #endif -#include "Base/SystemOfUnits.h" // has "tesla" in it +#include "SystemOfUnits.h" // has "tesla" in it //#include "AliFemtoParticleTypes.h" -//#include "Infrastructure/AliFemtoTTreeEvent.h" -//#include "Infrastructure/AliFemtoTTreeTrack.h" +//#include "AliFemtoTTreeEvent.h" +//#include "AliFemtoTTreeTrack.h" AliFemtoTrack::AliFemtoTrack(): fCharge(0), @@ -123,6 +51,7 @@ AliFemtoTrack::AliFemtoTrack(): fShared(159), fHiddenInfo(0) { + // Default constructor fHiddenInfo = NULL; // cout << "Created track " << this << endl; } @@ -156,7 +85,8 @@ AliFemtoTrack::AliFemtoTrack(const AliFemtoTrack& t) : fClusters(159), fShared(159), fHiddenInfo(0) - { // copy constructor + { + // copy constructor fCharge = t.fCharge; fPidProbElectron = t.fPidProbElectron; fPidProbPion = t.fPidProbPion; @@ -184,7 +114,7 @@ AliFemtoTrack::AliFemtoTrack(const AliFemtoTrack& t) : fClusters=t.fClusters; fShared=t.fShared; if (t.ValidHiddenInfo()) - fHiddenInfo = t.getHiddenInfo()->clone(); + fHiddenInfo = t.GetHiddenInfo()->Clone(); else fHiddenInfo = NULL; // cout << "Created track " << this << endl; @@ -192,6 +122,7 @@ AliFemtoTrack::AliFemtoTrack(const AliFemtoTrack& t) : AliFemtoTrack& AliFemtoTrack::operator=(const AliFemtoTrack& aTrack) { + // assignment operator if (this == &aTrack) return *this; fCharge = aTrack.fCharge; @@ -223,7 +154,7 @@ AliFemtoTrack& AliFemtoTrack::operator=(const AliFemtoTrack& aTrack) if (ValidHiddenInfo()) delete fHiddenInfo; if (aTrack.ValidHiddenInfo()) - fHiddenInfo = aTrack.getHiddenInfo()->clone(); + fHiddenInfo = aTrack.GetHiddenInfo()->Clone(); else fHiddenInfo = NULL; @@ -280,7 +211,7 @@ float AliFemtoTrack::TPCsignalS() const{return fTPCsignalS;} void AliFemtoTrack::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) {fHiddenInfo=aHiddenInfo;} bool AliFemtoTrack::ValidHiddenInfo() const { if (fHiddenInfo) return true; else return false; } -AliFemtoHiddenInfo* AliFemtoTrack::getHiddenInfo() const {return fHiddenInfo;} +AliFemtoHiddenInfo* AliFemtoTrack::GetHiddenInfo() const {return fHiddenInfo;} AliFemtoTrack::~AliFemtoTrack() { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrack.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrack.h similarity index 60% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrack.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrack.h index 5c9ae6de2dd..108bb473f5d 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrack.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrack.h @@ -1,27 +1,21 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * Intermediate format for particle. This is built from the - * input particle format (e.g. StTrack of StEvent) and presented to - * the Analyses for ParticleCuts. - * - *************************************************************************** - * ... Lots of stuff deleted here ... - **************************************************************************/ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoTrack: main class holding all the necessary information // +// about a track (before the identification) that is required during // +// femtoscopic analysis. This class is filled with information from the // +// input stream by the reader. A particle has a link back to the Track // +// it was created from, so we do not copy the information. // +// // +/////////////////////////////////////////////////////////////////////////// -#ifndef AliFemtoTrack_hh -#define AliFemtoTrack_hh +#ifndef ALIFEMTOTRACK_H +#define ALIFEMTOTRACK_H -#include "Infrastructure/AliFemtoTypes.h" +#include "AliFemtoTypes.h" #include "AliFmPhysicalHelixD.h" #include "TBits.h" /* Th stuff */ -#include "Base/AliFemtoHiddenInfo.h" +#include "AliFemtoHiddenInfo.h" /***/ #ifndef __NO_STAR_DEPENDENCE_ALLOWED__ @@ -34,7 +28,7 @@ class StMuTrack; class AliFemtoTrack{ public: AliFemtoTrack(); - AliFemtoTrack(const AliFemtoTrack&);// copy constructor + AliFemtoTrack(const AliFemtoTrack& aTrack);// copy constructor AliFemtoTrack& operator=(const AliFemtoTrack& aTrack); #ifndef __NO_STAR_DEPENDENCE_ALLOWED__ #ifdef __ROOT__ @@ -77,32 +71,32 @@ public: const TBits& TPCclusters() const; const TBits& TPCsharing() const; - void SetCharge(const short&); - void SetPidProbElectron(const float&); - void SetPidProbPion(const float&); - void SetPidProbKaon(const float&); - void SetPidProbProton(const float&); - void SetPidProbMuon(const float&); + void SetCharge(const short& s); + void SetPidProbElectron(const float& x); + void SetPidProbPion(const float& x); + void SetPidProbKaon(const float& x); + void SetPidProbProton(const float& x); + void SetPidProbMuon(const float& x); void SetP(const AliFemtoThreeVector&); - void SetPt(const float&); + void SetPt(const float& x); void SetHelix(const AliFmPhysicalHelixD&); - void SetTrackId(const short&); - void SetFlags(const long int&); - void SetLabel(const int&); - void SetImpactD(const float&); - void SetImpactZ(const float&); - void SetCdd(const float&); - void SetCdz(const float&); - void SetCzz(const float&); + void SetTrackId(const short& s); + void SetFlags(const long int& i); + void SetLabel(const int& i); + void SetImpactD(const float& x); + void SetImpactZ(const float& x); + void SetCdd(const float& x); + void SetCdz(const float& x); + void SetCzz(const float& x); - void SetITSchi2(const float&); - void SetITSncls(const int&); - void SetTPCchi2(const float&); - void SetTPCncls(const int&); - void SetTPCnclsF(const short&); - void SetTPCsignalN(const short&); - void SetTPCsignalS(const float&); + void SetITSchi2(const float& x); + void SetITSncls(const int& i); + void SetTPCchi2(const float& x); + void SetTPCncls(const int& i); + void SetTPCnclsF(const short& s); + void SetTPCsignalN(const short& s); + void SetTPCsignalS(const float& x); void SetTPCcluster(const short& aNBit, const Bool_t& aValue); void SetTPCshared(const short& aNBit, const Bool_t& aValue); @@ -111,11 +105,11 @@ public: void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo); bool ValidHiddenInfo() const; // Fab private : (official : const AliFemtoHiddenInfo* HiddenInfo() const; - AliFemtoHiddenInfo* getHiddenInfo() const; + AliFemtoHiddenInfo* GetHiddenInfo() const; /***/ //Alice stuff - enum { + enum { kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008, kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080, kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800, @@ -126,20 +120,20 @@ public: kESDpid=0x40000000, kTIME=0x80000000 }; - -private: - char fCharge; - float fPidProbElectron; // new - float fPidProbPion; // new - float fPidProbKaon; // new - float fPidProbProton; // new - float fPidProbMuon; //new - unsigned int fTrackId; + + private: + char fCharge; // track charge + float fPidProbElectron; // electron pid + float fPidProbPion; // pion pid + float fPidProbKaon; // kaon pid + float fPidProbProton; // proton pid + float fPidProbMuon; // muon pid + unsigned int fTrackId; // track unique id - AliFemtoThreeVector fP; - float fPt; - AliFmPhysicalHelixD fHelix; + AliFemtoThreeVector fP; // track momentum + float fPt; // transverse momenta + AliFmPhysicalHelixD fHelix; // track helix //alice stuff long int fFlags; //Reconsruction status flags @@ -156,13 +150,13 @@ private: short fTPCnclsF; // number of findable clusters in the TPC short fTPCsignalN; // number of points used for dEdx float fTPCsignalS; // RMS of dEdx measurement - TBits fClusters; - TBits fShared; + TBits fClusters; // Cluster per padrow map + TBits fShared; // Sharing per padrow map /* Th stuff */ // Fab private : add mutable // mutable - AliFemtoHiddenInfo* fHiddenInfo; //! + AliFemtoHiddenInfo* fHiddenInfo; //! hidden info /***/ }; diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrackCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrackCollection.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrackCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrackCollection.h index 920b3fc049e..27f6d8da06e 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTrackCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrackCollection.h @@ -12,6 +12,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * @@ -26,7 +29,7 @@ #ifndef AliFemtoTrackCollection_hh #define AliFemtoTrackCollection_hh -#include "Infrastructure/AliFemtoTrack.h" +#include "AliFemtoTrack.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoTrackCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrackCut.h similarity index 90% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoTrackCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrackCut.h index 1be1afd52be..d512d43aae2 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoTrackCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTrackCut.h @@ -6,9 +6,9 @@ #ifndef AliFemtoTrackCut_hh #define AliFemtoTrackCut_hh -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoTrack.h" -#include "Base/AliFemtoParticleCut.h" +#include "AliFemtoTypes.h" +#include "AliFemtoTrack.h" +#include "AliFemtoParticleCut.h" class AliFemtoTrackCut : public AliFemtoParticleCut { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTypes.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTypes.h similarity index 85% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTypes.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoTypes.h index 28984b85394..b4898bb65a6 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoTypes.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoTypes.h @@ -8,6 +8,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * @@ -33,10 +36,10 @@ // load/recompile everything all over again. // -//#include "Infrastructure/AliFemtoHisto.h" -#include "Infrastructure/AliFemtoString.h" -#include "Infrastructure/AliFemtoVector.h" -#include "Infrastructure/AliFemtoHelix.h" -#include "Infrastructure/AliFemtoEnumeration.h" +//#include "AliFemtoHisto.h" +#include "AliFemtoString.h" +#include "AliFemtoVector.h" +#include "AliFemtoHelix.h" +#include "AliFemtoEnumeration.h" diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.cxx similarity index 88% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.cxx index b178dc5eb76..75b33d78e65 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.cxx @@ -1,3 +1,12 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoV0: special type of particle desling with the specifics // +// of the V0 type of particle // +// It stores the information both about the V0 itself and about it's // +// daughters, so that the caut betwen the daughter characteristics is // +// possible. +// // +/////////////////////////////////////////////////////////////////////////// #include "AliFemtoV0.h" #include "phys_constants.h" @@ -26,7 +35,10 @@ AliFemtoV0::AliFemtoV0(): fPtNeg(0), fPtotNeg(0), fKeyNeg(0), fKeyPos(0), fHiddenInfo(0) /***/ -{ /* no-op */} +{ + // Default empty constructor + /* no-op */ +} // ----------------------------------------------------------------------- AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) : fDecayLengthV0(0), fDecayVertexV0(0), fPrimaryVertex(0), @@ -52,7 +64,8 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) : fPtNeg(0), fPtotNeg(0), fKeyNeg(0), fKeyPos(0), fHiddenInfo(0) /***/ -{ // copy constructor +{ + // copy constructor fDecayLengthV0 = v.fDecayLengthV0; fDecayVertexV0 = v.fDecayVertexV0; fDcaV0Daughters = v.fDcaV0Daughters; @@ -91,11 +104,12 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) : fHelixPos = v.fHelixPos;// Gael 12 Sept fHelixNeg = v.fHelixNeg;// Gael 12 Sept - fHiddenInfo = v.fHiddenInfo? v.fHiddenInfo->clone() : 0;// GR 11 DEC 02 + fHiddenInfo = v.fHiddenInfo? v.fHiddenInfo->Clone() : 0;// GR 11 DEC 02 UpdateV0(); } AliFemtoV0& AliFemtoV0::operator=(const AliFemtoV0& aV0) { + // assignment operator if (this == &aV0) return *this; fDecayLengthV0 = aV0.fDecayLengthV0; @@ -137,7 +151,7 @@ AliFemtoV0& AliFemtoV0::operator=(const AliFemtoV0& aV0) fHelixPos = aV0.fHelixPos;// Gael 12 Sept fHelixNeg = aV0.fHelixNeg;// Gael 12 Sept if (fHiddenInfo) delete fHiddenInfo; - fHiddenInfo = aV0.fHiddenInfo? aV0.fHiddenInfo->clone() : 0;// GR 11 DEC 02 + fHiddenInfo = aV0.fHiddenInfo? aV0.fHiddenInfo->Clone() : 0;// GR 11 DEC 02 UpdateV0(); return *this; @@ -146,7 +160,7 @@ AliFemtoV0& AliFemtoV0::operator=(const AliFemtoV0& aV0) // ----------------------------------------------------------------------- void AliFemtoV0::UpdateV0(){ //Calc. derived memebers of the v0 class - float MomNegAlongV0, MomPosAlongV0; + float tMomNegAlongV0, tMomPosAlongV0; fMomV0 = fMomPos + fMomNeg; fPtV0 = fMomV0.perp(); @@ -162,11 +176,11 @@ void AliFemtoV0::UpdateV0(){ fEPosPion = ::sqrt(fPtotPos*fPtotPos+M_PION_PLUS*M_PION_PLUS); fENegPion = ::sqrt(fPtotNeg*fPtotNeg+M_PION_MINUS*M_PION_MINUS); - MomNegAlongV0 = fMomNeg*fMomV0 / ::sqrt(::pow(fPtotV0,2)); - MomPosAlongV0 = fMomPos*fMomV0 / ::sqrt(::pow(fPtotV0,2)); + tMomNegAlongV0 = fMomNeg*fMomV0 / ::sqrt(::pow(fPtotV0,2)); + tMomPosAlongV0 = fMomPos*fMomV0 / ::sqrt(::pow(fPtotV0,2)); - fAlphaV0 = (MomPosAlongV0-MomNegAlongV0)/(MomPosAlongV0+MomNegAlongV0); - fPtArmV0 = ::sqrt(fPtotPos*fPtotPos - MomPosAlongV0*MomPosAlongV0); + fAlphaV0 = (tMomPosAlongV0-tMomNegAlongV0)/(tMomPosAlongV0+tMomNegAlongV0); + fPtArmV0 = ::sqrt(fPtotPos*fPtotPos - tMomPosAlongV0*tMomPosAlongV0); fMassLambda = ::sqrt(::pow(fEPosProton+fENegPion,2)-::pow(fPtotV0,2)); fMassAntiLambda = ::sqrt(::pow(fENegProton+fEPosPion,2)-::pow(fPtotV0,2)); fMassK0Short = ::sqrt(::pow(fENegPion+fEPosPion,2)-::pow(fPtotV0,2)); @@ -268,5 +282,5 @@ const AliFmPhysicalHelixD& AliFemtoV0::HelixNeg() const {return fHelixNeg;}// Ga void AliFemtoV0::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) {fHiddenInfo=aHiddenInfo;} bool AliFemtoV0::ValidHiddenInfo() const { if (fHiddenInfo) return true; else return false; } -AliFemtoHiddenInfo* AliFemtoV0::getHiddenInfo() const {return fHiddenInfo;} +AliFemtoHiddenInfo* AliFemtoV0::GetHiddenInfo() const {return fHiddenInfo;} diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.h new file mode 100644 index 00000000000..3ac9b19a483 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0.h @@ -0,0 +1,397 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoV0: special type of particle desling with the specifics // +// of the V0 type of particle +// // +/////////////////////////////////////////////////////////////////////////// +#ifndef ALIFEMTOV0_H +#define ALIFEMTOV0_H + +#include "AliFemtoTypes.h" //same as in AliFemtoTrack.h +#include "AliFmPhysicalHelixD.h" // Gael 12 Sept 02 +#ifdef __ROOT__ +#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ +#include "StStrangeMuDstMaker/StV0MuDst.h" +#endif +#endif +/* Th stuff */ +#include "AliFemtoHiddenInfo.h" +/***/ + +class AliFemtoV0 { +public: + AliFemtoV0(); + AliFemtoV0(const AliFemtoV0& v); // copy constructor +#ifdef __ROOT__ +#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ + AliFemtoV0( StV0MuDst&); // from strangeness V0 micro dst structure +#endif +#endif + virtual ~AliFemtoV0(){if(fHiddenInfo) delete fHiddenInfo;} + AliFemtoV0& operator=(const AliFemtoV0& aV0); + + + float DecayLengthV0() const; // 3-d decay distance + AliFemtoThreeVector DecayVertexV0() const; // Coordinates of decay vertex + AliFemtoThreeVector PrimaryVertex() const; // Coordinates of primary vertex + float DecayVertexV0X() const; // Coordinates of decay vertex + float DecayVertexV0Y() const; // Coordinates of decay vertex + float DecayVertexV0Z() const; // Coordinates of decay vertex + float DcaV0Daughters() const; // DCA of v0 daughters at Decay vertex + float DcaV0ToPrimVertex() const; // DCA of v0 to primary vertex + float DcaPosToPrimVertex() const; // DCA of pos v0 daughter to pri vertex + float DcaNegToPrimVertex() const; // DCA of neg v0 daughter to pri vertex + AliFemtoThreeVector MomPos() const; // Momentum components of pos. daughter + float MomPosX() const; // Momentum components of pos. daughter + float MomPosY() const; // Momentum components of pos. daughter + float MomPosZ() const; // Momentum components of pos. daughter + AliFemtoThreeVector MomNeg() const; // Momentum components of neg. daughter + float MomNegX() const; // Momentum components of neg. daughter + float MomNegY() const; // Momentum components of neg. daughter + float MomNegZ() const; // Momentum components of neg. daughter + + int TpcHitsPos() const; // Number of TPC hits on pos. daughter + int TpcHitsNeg() const; // Number of TPC hits on neg. daughter + unsigned long TrackTopologyMapPos(unsigned int word) const; + unsigned long TrackTopologyMapNeg(unsigned int word) const; + + AliFemtoThreeVector MomV0() const ; // Momentum components of V0 + float MomV0X() const ; // Momentum components of V0 + float MomV0Y() const ; // Momentum components of V0 + float MomV0Z() const ; // Momentum components of V0 + float AlphaV0() const ; // Armenteros-Podolanski variable + float PtArmV0() const ; // Armenteros-Podolanski variable + float ELambda() const ; // Energy assuming lambda hypothesis + float EK0Short() const ; // Energy assuming k-short hypothesis + float EPosProton() const ; // Energy of pos. daughter assuming proton + float EPosPion() const ; // Energy of pos. daughter assuming pion + float ENegProton() const ; // Energy of neg. daughter assuming antiproton + float ENegPion() const ; // Energy of neg. daughter assuming pion + float MassLambda() const ; // Mass assuming lambda hypothesis + float MassAntiLambda() const ; // Mass assuming antilambda hypothesis + float MassK0Short() const ; // Mass assuming k-short hypothesis + float RapLambda() const ; // Rapidity assuming (anti) constlambda + float RapK0Short() const ; // Rapidity assuming k-short + float CTauLambda() const ; // Lifetime (ctau) const assuming (anti) constlambda + float CTauK0Short() const ; // Lifetime (ctau) const assuming k-short + float PtV0() const ; // Transverse momentum + float PtotV0() const ; // Total momentum + float PtPos() const ; // Transverse momentum of pos. daughter + float PtotPos() const ; // Total momentum of pos. daughter + float DedxPos() const; // dedx of Positive track + float NumdedxPos() const; +// number of hits in dE/dX track of pos. daughter--Gael04Fev 2002 + float ErrdedxPos() const; +// error on dedx of Positive track--Gael04Fev 2002 + float LendedxPos() const; +// Length of dE/dX track of pos. daughter--Gael04Fev 2002 + float PseudoRapPos() const; +// Length of dE/dX track of neg. daughter--Gael04Fev 2002 + + float PtNeg() const ; // Transverse momentum of neg. daughter + float PtotNeg() const ; // Total momentum of neg. daughter + float DedxNeg() const; // dedx of Negative track + float NumdedxNeg() const; +// number of hits in dE/dX track of neg. daughter--Gael04Fev 2002 + float ErrdedxNeg() const; +// error on dedx of Negative track--Gael04Fev 2002 + float LendedxNeg() const; +// Length of dE/dX track of neg. daughter--Gael04Fev 2002 + float PseudoRapNeg() const; +// Length of dE/dX track of neg. daughter--Gael04Fev 2002 + + unsigned short IdNeg() const; // Id of negative track + unsigned short IdPos() const; // Id of positive track + unsigned short KeyNeg() const; // Id of negative track + unsigned short KeyPos() const; // Id of positive track + + const AliFmPhysicalHelixD& HelixPos() const; // Gael 12 Sept 02 + const AliFmPhysicalHelixD& HelixNeg() const; // Gael 12 Sept 02 + + void UpdateV0(); // Fills derived info + void SetdecayLengthV0(const float x); + void SetdecayVertexV0(const AliFemtoThreeVector v); + void SetdecayVertexV0X(const float x); + void SetdecayVertexV0Y(const float x); + void SetdecayVertexV0Z(const float x); + void SetdcaV0Daughters(const float x); + void SetdcaV0ToPrimVertex(const float x); + void SetdcaPosToPrimVertex(const float x); + void SetdcaNegToPrimVertex(const float x); + void SetmomPos(const AliFemtoThreeVector v); + void SetmomPosX(const float x); + void SetmomPosY(const float x); + void SetmomPosZ(const float x); + void SetmomNeg(const AliFemtoThreeVector v); + void SetmomNegX(const float x); + void SetmomNegY(const float x); + void SetmomNegZ(const float x); + + void SettpcHitsPos(const int& i); + void SettpcHitsNeg(const int& i); + + void SetTrackTopologyMapPos(unsigned int word, const unsigned long& m); + void SetTrackTopologyMapNeg(unsigned int word, const unsigned long& m); + + void SetmomV0( AliFemtoThreeVector v); + void SetmomV0X( float x); + void SetmomV0Y( float x); + void SetmomV0Z( float x); + void SetalphaV0( float x); + void SetptArmV0( float x); + void SeteLambda( float x); + void SeteK0Short( float x); + void SetePosProton( float x); + void SetePosPion( float x); + void SeteNegProton( float x); + void SeteNegPion( float x); + void SetmassLambda( float x); + void SetmassAntiLambda( float x); + void SetmassK0Short( float x); + void SetrapLambda( float x); + void SetrapK0Short( float x); + void SetcTauLambda( float x); + void SetcTauK0Short( float x); + void SetptV0( float x); + void SetptotV0( float x); + void SetptPos( float x); + void SetptotPos( float x); + void SetptNeg( float x); + void SetptotNeg( float x); + void SetidNeg(const unsigned short& i); + void SetidPos(const unsigned short& i); + void SetdedxNeg(float x); + void SeterrdedxNeg(float x);//Gael 04Fev2002 + void SetlendedxNeg(float x);//Gael 04Fev2002 + void SetpseudoRapNeg(float x);//Gael 04Fev2002 + void SetdedxPos(float x); + void SeterrdedxPos(float x);//Gael 04Fev2002 + void SetlendedxPos(float x);//Gael 04Fev2002 + void SetpseudoRapPos(float x);//Gael 04Fev2002 + void SetkeyNeg(const unsigned short& i); + void SetkeyPos(const unsigned short& i); + + void SetHelixPos(const AliFmPhysicalHelixD& h); // Gael 12 Sept 02 + void SetHelixNeg(const AliFmPhysicalHelixD& h); // Gael 12 Sept 02 + + void SetprimaryVertex(const AliFemtoThreeVector v);//Gael 24 Sept 02 + /* Th stuff */ + void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo); + bool ValidHiddenInfo() const; + // Fab private : (official : const AliFemtoHiddenInfo* HiddenInfo() const; + AliFemtoHiddenInfo* GetHiddenInfo() const; + /***/ + +protected: + + float fDecayLengthV0; // 3-d decay distance \\ V0 decay length + AliFemtoThreeVector fDecayVertexV0; // Coordinates of decay vertex + AliFemtoThreeVector fPrimaryVertex; // Coordinates of primary vertex + float fDcaV0Daughters; // DCA of v0 daughters at Decay vertex + float fDcaV0ToPrimVertex; // DCA of v0 to primary vertex + float fDcaPosToPrimVertex; // DCA of pos v0 daughter to pri vertex + float fDcaNegToPrimVertex; // DCA of neg v0 daughter to pri vertex + AliFemtoThreeVector fMomPos; // Momentum components of pos. daughter + AliFemtoThreeVector fMomNeg; // Momentum components of neg. daughter + + unsigned long fTrackTopologyMapPos[2]; // Topology map for positive daughter + unsigned long fTrackTopologyMapNeg[2]; // Topology map for negative daughter + + int fTpcHitsPos; // Number of TPC hits for positive daughter + int fTpcHitsNeg; // Number of TPC hits for negative daughter + + float fChi2V0; // Fit quality for V0 + float fClV0; // Confidence level for V0 + float fChi2Pos; // Fit quality for positive daughter + float fClPos; // Confidence level for positive daughter + float fChi2Neg; // Fit quality for negative daughter + float fClNeg; // Confidence level for negative daughter + + float fDedxPos; // dEdx positive daughter + float fErrDedxPos; // dEdx error positive daughter + float fLenDedxPos; // dEdx length positive daughter + + float fDedxNeg; // dEdx negative daughter + float fErrDedxNeg; // dEdx error negative daughter + float fLenDedxNeg; // dEdx length negative daughter + + unsigned short fNufDedxPos; // Number of dEdx points positive + unsigned short fNufDedxNeg; // Number of dEdx points negative + + AliFmPhysicalHelixD fHelixPos; // Helix for positive + AliFmPhysicalHelixD fHelixNeg; // Helix for negative + + AliFemtoThreeVector fMomV0; // Momentum of the V0 + float fAlphaV0; // Armenteros-Podolanski variable + float fPtArmV0; // Armenteros-Podolanski variable + float fELambda; // Energy assuming lambda hypothesis + float fEK0Short; // Energy assuming k-short hypothesis + float fEPosProton; // Energy of pos. daughter assuming proton + float fEPosPion; // Energy of pos. daughter assuming pion + float fENegProton; // Energy of neg. daughter assuming antiproton + float fENegPion; // Energy of neg. daughter assuming pion + float fMassLambda; // Mass assuming lambda hypothesis + float fMassAntiLambda; // Mass assuming antilambda hypothesis + float fMassK0Short; // Mass assuming k-short hypothesis + float fRapLambda; // Rapidity assuming (anti) constlambda + float fRapK0Short; // Rapidity assuming k-short + float fCTauLambda; // Lifetime (ctau) assuming (anti)lambda + float fCTauK0Short; // Lifetime (ctau) assuming k-short + float fPtV0; // Total momentum + float fPtotV0; // Transverse momentum + float fPtPos; // Transverse momentum of pos. daughter + float fPtotPos; // Total momentum of pos. daughter + float fPtNeg; // Transverse momentum of neg. daughter + float fPtotNeg; // Total momentum of neg. daughter + + unsigned short fKeyNeg; // Unique key negative + unsigned short fKeyPos; // Unique key positive + /* Th stuff */ + // Fab private : add mutable + mutable AliFemtoHiddenInfo* fHiddenInfo; //! Hidden info + /***/ + + +}; + +inline float AliFemtoV0::DecayLengthV0() const { return fDecayLengthV0; } +inline AliFemtoThreeVector AliFemtoV0::DecayVertexV0() const { return fDecayVertexV0; } +inline AliFemtoThreeVector AliFemtoV0::PrimaryVertex() const { return fPrimaryVertex; } +inline float AliFemtoV0::DecayVertexV0X() const { return fDecayVertexV0.x(); } +inline float AliFemtoV0::DecayVertexV0Y() const { return fDecayVertexV0.y(); } +inline float AliFemtoV0::DecayVertexV0Z() const { return fDecayVertexV0.z(); } +inline float AliFemtoV0::DcaV0Daughters() const { return fDcaV0Daughters; } +inline float AliFemtoV0::DcaV0ToPrimVertex() const { return fDcaV0ToPrimVertex; } +inline float AliFemtoV0::DcaPosToPrimVertex() const { return fDcaPosToPrimVertex; } +inline float AliFemtoV0::DcaNegToPrimVertex() const { return fDcaNegToPrimVertex; } +inline AliFemtoThreeVector AliFemtoV0::MomPos() const { return fMomPos; } +inline float AliFemtoV0::MomPosX() const { return fMomPos.x(); } +inline float AliFemtoV0::MomPosY() const { return fMomPos.y(); } +inline float AliFemtoV0::MomPosZ() const { return fMomPos.z(); } +inline AliFemtoThreeVector AliFemtoV0::MomNeg() const { return fMomNeg; } +inline float AliFemtoV0::MomNegX() const { return fMomNeg.x(); } +inline float AliFemtoV0::MomNegY() const { return fMomNeg.y(); } +inline float AliFemtoV0::MomNegZ() const { return fMomNeg.z(); } +inline AliFemtoThreeVector AliFemtoV0::MomV0() const { return fMomV0; } +inline float AliFemtoV0::MomV0X() const { return fMomV0.x(); } +inline float AliFemtoV0::MomV0Y() const { return fMomV0.y(); } +inline float AliFemtoV0::MomV0Z() const { return fMomV0.z(); } +inline float AliFemtoV0::AlphaV0() const { return fAlphaV0; } +inline float AliFemtoV0::PtArmV0() const {return fPtArmV0;} +inline float AliFemtoV0::ELambda() const {return fELambda;} +inline float AliFemtoV0::EK0Short() const {return fEK0Short;} +inline float AliFemtoV0::EPosProton() const {return fEPosProton;} +inline float AliFemtoV0::EPosPion() const {return fEPosPion;} +inline float AliFemtoV0::ENegProton() const {return fENegProton;} +inline float AliFemtoV0::ENegPion() const {return fENegPion;} +inline float AliFemtoV0::MassLambda() const {return fMassLambda;} +inline float AliFemtoV0::MassAntiLambda() const {return fMassAntiLambda;} +inline float AliFemtoV0::MassK0Short() const {return fMassK0Short;} +inline float AliFemtoV0::RapLambda() const {return fRapLambda;} +inline float AliFemtoV0::RapK0Short() const {return fRapK0Short;} +inline float AliFemtoV0::CTauLambda() const {return fCTauLambda;} +inline float AliFemtoV0::CTauK0Short() const {return fCTauK0Short;} +inline float AliFemtoV0::PtV0() const {return fPtV0;} +inline float AliFemtoV0::PtotV0() const {return fPtotV0;} +inline float AliFemtoV0::PtPos() const {return fPtPos;} +inline float AliFemtoV0::PtotPos() const {return fPtotPos;} +inline float AliFemtoV0::PtNeg() const {return fPtNeg;} +inline float AliFemtoV0::PtotNeg() const {return fPtotNeg;} +inline int AliFemtoV0::TpcHitsPos() const { return fTpcHitsPos; } +inline int AliFemtoV0::TpcHitsNeg() const { return fTpcHitsNeg; } +inline float AliFemtoV0::DedxNeg() const {return fDedxNeg;} +inline float AliFemtoV0::NumdedxNeg() const {return fNufDedxNeg;} //Gael 04Fev2002 +inline float AliFemtoV0::ErrdedxNeg() const {return fErrDedxNeg;} //Gael 04Fev2002 +inline float AliFemtoV0::LendedxNeg() const {return fLenDedxNeg;} //Gael 04Fev2002 +inline float AliFemtoV0::PseudoRapNeg() const {return fMomNeg.pseudoRapidity();} //Gael 04Fev2002 +inline float AliFemtoV0::DedxPos() const {return fDedxPos;} +inline float AliFemtoV0::NumdedxPos() const {return fNufDedxPos;} //Gael 04Fev2002 +inline float AliFemtoV0::ErrdedxPos() const {return fErrDedxPos;} //Gael 04Fev2002 +inline float AliFemtoV0::LendedxPos() const {return fLenDedxPos;} //Gael 04Fev2002 +inline float AliFemtoV0::PseudoRapPos() const {return fMomPos.pseudoRapidity();} //Gael 04Fev2002 + + +inline unsigned long AliFemtoV0::TrackTopologyMapPos(unsigned int word) const { return fTrackTopologyMapPos[word]; } +inline unsigned long AliFemtoV0::TrackTopologyMapNeg(unsigned int word) const { return fTrackTopologyMapNeg[word]; } +inline unsigned short AliFemtoV0::IdNeg() const { return fKeyNeg; } +inline unsigned short AliFemtoV0::KeyNeg() const { return fKeyNeg; } +inline unsigned short AliFemtoV0::IdPos() const { return fKeyPos; } +inline unsigned short AliFemtoV0::KeyPos() const { return fKeyPos; } + +inline void AliFemtoV0::SetdecayLengthV0(const float x){ fDecayLengthV0= x;} +inline void AliFemtoV0::SetdecayVertexV0X(const float x){ fDecayVertexV0.setX(x);} +inline void AliFemtoV0::SetdecayVertexV0Y(const float x){ fDecayVertexV0.setY(x);} +inline void AliFemtoV0::SetdecayVertexV0Z(const float x){ fDecayVertexV0.setZ(x);} +inline void AliFemtoV0::SetdecayVertexV0(const AliFemtoThreeVector v){ fDecayVertexV0 = v; } +inline void AliFemtoV0::SetdcaV0Daughters(const float x){fDcaV0Daughters= x;} +inline void AliFemtoV0::SetdcaV0ToPrimVertex(const float x){fDcaV0ToPrimVertex= x;} +inline void AliFemtoV0::SetdcaPosToPrimVertex(const float x){fDcaPosToPrimVertex = x;} +inline void AliFemtoV0::SetdcaNegToPrimVertex(const float x){fDcaNegToPrimVertex = x;} +inline void AliFemtoV0::SetmomPos(const AliFemtoThreeVector v){fMomPos = v; } +inline void AliFemtoV0::SetmomPosX(const float x){fMomPos.setX(x);} +inline void AliFemtoV0::SetmomPosY(const float x){fMomPos.setY(x);} +inline void AliFemtoV0::SetmomPosZ(const float x){fMomPos.setZ(x);} +inline void AliFemtoV0::SetmomNeg(const AliFemtoThreeVector v){fMomNeg = v; } +inline void AliFemtoV0::SetmomNegX(const float x){fMomNeg.setX(x);} +inline void AliFemtoV0::SetmomNegY(const float x){fMomNeg.setY(x);} +inline void AliFemtoV0::SetmomNegZ(const float x){fMomNeg.setZ(x);} +inline void AliFemtoV0::SetTrackTopologyMapPos(unsigned int word, const unsigned long& m){fTrackTopologyMapPos[word]=m;} +inline void AliFemtoV0::SetTrackTopologyMapNeg(unsigned int word, const unsigned long& m){fTrackTopologyMapNeg[word]=m;} +inline void AliFemtoV0::SetmomV0(AliFemtoThreeVector v){fMomV0= v; } +inline void AliFemtoV0::SetmomV0X(const float x){fMomV0.setX(x);} +inline void AliFemtoV0::SetmomV0Y(const float x){fMomV0.setY(x);} +inline void AliFemtoV0::SetmomV0Z(const float x){fMomV0.setZ(x);} + +inline void AliFemtoV0::SetalphaV0( float x){fAlphaV0= x;} +inline void AliFemtoV0::SetptArmV0( float x){fPtArmV0 = x;} +inline void AliFemtoV0::SeteLambda( float x){fELambda= x;} +inline void AliFemtoV0::SeteK0Short( float x){fEK0Short= x;} +inline void AliFemtoV0::SetePosProton( float x){fEPosProton= x;} +inline void AliFemtoV0::SetePosPion( float x){fEPosPion= x;} +inline void AliFemtoV0::SeteNegProton( float x){fENegProton= x;} +inline void AliFemtoV0::SeteNegPion( float x){fENegPion= x;} +inline void AliFemtoV0::SetmassLambda( float x){fMassLambda = x;} +inline void AliFemtoV0::SetmassAntiLambda( float x){fMassAntiLambda= x;} +inline void AliFemtoV0::SetmassK0Short( float x){fMassK0Short= x;} +inline void AliFemtoV0::SetrapLambda( float x){fRapLambda= x;} +inline void AliFemtoV0::SetrapK0Short( float x){fRapK0Short = x;} +inline void AliFemtoV0::SetcTauLambda( float x){fCTauLambda = x;} +inline void AliFemtoV0::SetcTauK0Short( float x){fCTauK0Short = x;} +inline void AliFemtoV0::SetptV0( float x){fPtV0 = x;} +inline void AliFemtoV0::SetptotV0( float x){fPtotV0 = x;} +inline void AliFemtoV0::SetptPos( float x){fPtPos = x;} +inline void AliFemtoV0::SetptotPos( float x){fPtotPos = x;} +inline void AliFemtoV0::SetptNeg( float x){ fPtNeg= x;} +inline void AliFemtoV0::SetptotNeg( float x){ fPtotNeg= x;} +inline void AliFemtoV0::SetidNeg(const unsigned short& s){ fKeyNeg= s;} +inline void AliFemtoV0::SetidPos(const unsigned short& s){ fKeyPos= s;} +inline void AliFemtoV0::SetkeyNeg(const unsigned short& s){ fKeyNeg= s;} +inline void AliFemtoV0::SetkeyPos(const unsigned short& s){ fKeyPos= s;} +inline void AliFemtoV0::SettpcHitsPos(const int& i){fTpcHitsPos=i;} +inline void AliFemtoV0::SettpcHitsNeg(const int& i){fTpcHitsNeg=i;} +inline void AliFemtoV0::SetdedxNeg(float x){fDedxNeg=x;} +inline void AliFemtoV0::SeterrdedxNeg(float x){fErrDedxNeg=x;}//Gael 04Fev2002 +inline void AliFemtoV0::SetlendedxNeg(float x){fLenDedxNeg=x;}//Gael 04Fev2002 +inline void AliFemtoV0::SetdedxPos(float x){fDedxPos=x;} +inline void AliFemtoV0::SeterrdedxPos(float x){fErrDedxPos=x;}//Gael 04Fev2002 +inline void AliFemtoV0::SetlendedxPos(float x){fLenDedxPos=x;}//Gael 04Fev2002 +inline void AliFemtoV0::SetprimaryVertex(const AliFemtoThreeVector v) { fPrimaryVertex = v; }//Gael 24 Sept 02 +#endif + + + + + + + + + + + + + + + + + + diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0Collection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0Collection.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0Collection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0Collection.h index 4a4d9a43f56..951d33d0052 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0Collection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0Collection.h @@ -14,7 +14,7 @@ #ifndef AliFemtoV0Collection_hh #define AliFemtoV0Collection_hh -#include "Infrastructure/AliFemtoV0.h" +#include "AliFemtoV0.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoV0Cut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0Cut.h similarity index 89% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoV0Cut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0Cut.h index d4f63f9dcf4..6918f1b4ec3 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoV0Cut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoV0Cut.h @@ -6,9 +6,9 @@ #ifndef AliFemtoV0Cut_hh #define AliFemtoV0Cut_hh -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoV0.h" -#include "Base/AliFemtoParticleCut.h" +#include "AliFemtoTypes.h" +#include "AliFemtoV0.h" +#include "AliFemtoParticleCut.h" class AliFemtoV0Cut : public AliFemtoParticleCut { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoVector.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVector.h similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoVector.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoVector.h index 7045e2ec6f2..dccbfdf34d0 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoVector.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVector.h @@ -8,6 +8,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexAnalysis.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.cxx similarity index 94% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexAnalysis.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.cxx index f50a9363091..3cb1fd819d4 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexAnalysis.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.cxx @@ -13,6 +13,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:39:37 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -35,13 +38,13 @@ * **************************************************************************/ -#include "Analysis/AliFemtoVertexAnalysis.h" -#include "Infrastructure/AliFemtoParticleCollection.h" -#include "Base/AliFemtoTrackCut.h" -#include "Base/AliFemtoV0Cut.h" -#include "Base/AliFemtoKinkCut.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVector.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h" +#include "AliFemtoVertexAnalysis.h" +#include "AliFemtoParticleCollection.h" +#include "AliFemtoTrackCut.h" +#include "AliFemtoV0Cut.h" +#include "AliFemtoKinkCut.h" +#include "AliFemtoPicoEventCollectionVector.h" +#include "AliFemtoPicoEventCollectionVectorHideAway.h" #ifdef __ROOT__ diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexAnalysis.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.h similarity index 95% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexAnalysis.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.h index f79a51b7c93..89ae8821a98 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexAnalysis.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.h @@ -7,7 +7,7 @@ #ifndef AliFemtoVertexAnalysis_hh #define AliFemtoVertexAnalysis_hh -#include "Analysis/AliFemtoAnalysis.h" // base analysis class +#include "AliFemtoAnalysis.h" // base analysis class class AliFemtoVertexAnalysis : public AliFemtoAnalysis { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexMultAnalysis.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.cxx similarity index 95% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexMultAnalysis.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.cxx index 0b97218ddc2..02fe7d45ad9 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexMultAnalysis.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.cxx @@ -13,6 +13,9 @@ *************************************************************************** * * $Log$ + * Revision 1.2 2007/05/03 09:39:37 akisiel + * Fixing Effective C++ warnings + * * Revision 1.1.1.1 2007/04/25 15:38:41 panos * Importing the HBT code dir * @@ -36,13 +39,13 @@ * **************************************************************************/ -#include "Analysis/AliFemtoVertexMultAnalysis.h" -#include "Infrastructure/AliFemtoParticleCollection.h" -#include "Base/AliFemtoTrackCut.h" -#include "Base/AliFemtoV0Cut.h" -#include "Base/AliFemtoKinkCut.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVector.h" -#include "Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h" +#include "AliFemtoVertexMultAnalysis.h" +#include "AliFemtoParticleCollection.h" +#include "AliFemtoTrackCut.h" +#include "AliFemtoV0Cut.h" +#include "AliFemtoKinkCut.h" +#include "AliFemtoPicoEventCollectionVector.h" +#include "AliFemtoPicoEventCollectionVectorHideAway.h" #ifdef __ROOT__ diff --git a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexMultAnalysis.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.h similarity index 96% rename from PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexMultAnalysis.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.h index bf75f8b14f5..98741fcbc56 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Analysis/AliFemtoVertexMultAnalysis.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.h @@ -6,7 +6,7 @@ #ifndef AliFemtoVertexMultAnalysis_hh #define AliFemtoVertexMultAnalysis_hh -#include "Analysis/AliFemtoAnalysis.h" // base analysis class +#include "AliFemtoAnalysis.h" // base analysis class #include class AliFemtoVertexMultAnalysis : public AliFemtoAnalysis { diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.cxx similarity index 63% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.cxx rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.cxx index e180d36a75d..610e47a49a4 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.cxx @@ -1,4 +1,14 @@ -#include "Infrastructure/AliFemtoXi.h" +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoXi: special type of particle desling with the specifics // +// of the Xi type of particle // +// It stores the information both about the Xi itself and about it's // +// daughters, as well as the bachelor particle from first decay vertex // +// so that the caut betwen the daughter characteristics and the bachelor // +// is possible. // +// // +/////////////////////////////////////////////////////////////////////////// +#include "AliFemtoXi.h" #include "phys_constants.h" // ----------------------------------------------------------------------- @@ -19,30 +29,30 @@ AliFemtoXi::AliFemtoXi(): // ----------------------------------------------------------------------- void AliFemtoXi::UpdateXi(){ //Calc. derived members of the xi class - float MomV0AlongXi, MomBacAlongXi; + float tMomV0AlongXi, tMomBacAlongXi; - fMomXi = momV0() + momBac(); + fMomXi = MomV0() + MomBac(); fPtXi = fMomXi.perp(); fPtotXi = fMomXi.mag(); - fPtBac = momBac().perp(); - fPtotBac= momBac().mag(); + fPtBac = MomBac().perp(); + fPtotBac= MomBac().mag(); fEXi= ::sqrt(fPtotXi*fPtotXi+M_XI_MINUS*M_XI_MINUS); fEOmega= ::sqrt(fPtotXi*fPtotXi+M_OMEGA_MINUS*M_OMEGA_MINUS); - fEBacPion = ::sqrt(ptotBac()*ptotBac()+M_PION_MINUS*M_PION_MINUS); - fEBacKaon = ::sqrt(ptotBac()*ptotBac()+M_KAON_MINUS*M_KAON_MINUS); + fEBacPion = ::sqrt(PtotBac()*PtotBac()+M_PION_MINUS*M_PION_MINUS); + fEBacKaon = ::sqrt(PtotBac()*PtotBac()+M_KAON_MINUS*M_KAON_MINUS); - MomV0AlongXi = momV0()*fMomXi / ::sqrt(::pow(fPtotXi,2)); - MomBacAlongXi = momBac()*fMomXi / ::sqrt(::pow(fPtotXi,2)); + tMomV0AlongXi = MomV0()*fMomXi / ::sqrt(::pow(fPtotXi,2)); + tMomBacAlongXi = MomBac()*fMomXi / ::sqrt(::pow(fPtotXi,2)); - fAlphaXi = (MomBacAlongXi-MomV0AlongXi)/(MomBacAlongXi+MomV0AlongXi); - fPtArmXi = ::sqrt(ptotBac()*ptotBac() - MomBacAlongXi*MomBacAlongXi); - fMassXi = ::sqrt(::pow(eBacPion()+eLambda(),2)-::pow(fPtotXi,2)); - fMassOmega = ::sqrt(::pow(eBacKaon()+eLambda(),2)-::pow(fPtotXi,2)); + fAlphaXi = (tMomBacAlongXi-tMomV0AlongXi)/(tMomBacAlongXi+tMomV0AlongXi); + fPtArmXi = ::sqrt(PtotBac()*PtotBac() - tMomBacAlongXi*tMomBacAlongXi); + fMassXi = ::sqrt(::pow(EBacPion()+ELambda(),2)-::pow(fPtotXi,2)); + fMassOmega = ::sqrt(::pow(EBacKaon()+ELambda(),2)-::pow(fPtotXi,2)); - fRapXi = 0.5*::log( (eXi()+fMomXi.z()) / (eXi()-fMomXi.z()) ); + fRapXi = 0.5*::log( (EXi()+fMomXi.z()) / (EXi()-fMomXi.z()) ); fCTauXi = M_XI_MINUS*(fDecayLengthXi) / ::sqrt( ::pow((double)fMomXi.mag(),2.) ); - fRapOmega = 0.5*::log( (eOmega()+fMomXi.z()) / (eOmega()-fMomXi.z()) );// eO, + fRapOmega = 0.5*::log( (EOmega()+fMomXi.z()) / (EOmega()-fMomXi.z()) );// eO, fCTauOmega = M_OMEGA_MINUS*(fDecayLengthXi) / ::sqrt( ::pow((double)fMomXi.mag(),2.) ); } // ----------------------------------------------------------------------- diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.h new file mode 100644 index 00000000000..f05709e08f9 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXi.h @@ -0,0 +1,274 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoXi: special type of particle desling with the specifics // +// of the Xi type of particle // +// // +/////////////////////////////////////////////////////////////////////////// +#ifndef ALIFEMTOXI_H +#define ALIFEMTOXI_H + +#include "AliFemtoVector.h" //same as in AliFemtoTrack.h +#include "AliFemtoV0.h" + +#ifdef __ROOT__ +#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ +#include "StStrangeMuDstMaker/StXiMuDst.h" +#endif +#endif + +class AliFemtoXi : public AliFemtoV0 { +public: + AliFemtoXi(); +#ifdef __ROOT__ +#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ + AliFemtoXi(StXiMuDst&); // from strangeness Xi micro dst structure +#endif +#endif + virtual ~AliFemtoXi(){/* no-op */} + + void UpdateXi(); + float DecayLengthXi() const; // 3-d decay distance + AliFemtoThreeVector DecayVertexXi() const; // Coordinates of decay vertex + float DecayVertexXiX() const; // Coordinates of decay vertex + float DecayVertexXiY() const; // Coordinates of decay vertex + float DecayVertexXiZ() const; // Coordinates of decay vertex + float DcaXiDaughters() const; // DCA of xi daughters at decay vertex + float DcaXiToPrimVertex() const; // DCA of xi to primary vertex + float DcaBacToPrimVertex() const; // DCA of bachelor xi daughter to pri vertex + AliFemtoThreeVector MomBac() const; // Momentum components of bac. daughter + float MomBacX() const; // Momentum components of bac. daughter + float MomBacY() const; // Momentum components of bac. daughter + float MomBacZ() const; // Momentum components of bac. daughter + + int TpcHitsBac() const; // Number of TPC hits on bac. daughter + unsigned long TrackTopologyMapBac(unsigned int i) const; + + AliFemtoThreeVector MomXi() const ; // Momentum components of Xi + float MomXiX() const ; // Momentum components of Xi + float MomXiY() const ; // Momentum components of Xi + float MomXiZ() const ; // Momentum components of Xi + float AlphaXi() const ; // Armenteros-Podolanski variable + float PtArmXi() const ; // Armenteros-Podolanski variable + float EXi() const ; // Energy assuming xi hypothesis + float EOmega() const ; // Energy assuming omega hypothesis + float EBacKaon() const ; // Energy of bac. daughter assuming kaon + float EBacPion() const ; // Energy of bac. daughter assuming pion + float MassXi() const ; // Mass assuming Xi hypothesis + float MassOmega() const ; // Mass assuming Omega hypothesis + float RapXi() const ; // Rapidity assuming (anti) xi + float RapOmega() const ; // Rapidity assuming (anti) omega + float CTauXi() const ; // Lifetime (ctau) const assuming (anti) xi + float CTauOmega() const ; // Lifetime (ctau) const assuming (anti) omega + float PtXi() const ; // Transverse momentum + float PtotXi() const ; // Total momentum + float PtBac() const ; // Transverse momentum of bac. daughter + float PtotBac() const ; // Total momentum of bac. daughter + float DedxBac() const; // dedx of Bac track + unsigned short IdBac() const; // Id of bac. track + unsigned short KeyBac() const; // Id of bac. track + + void SetdecayLengthXi(const float x); + void SetdecayVertexXi(const AliFemtoThreeVector v); + void SetdecayVertexXiX(const float x); + void SetdecayVertexXiY(const float x); + void SetdecayVertexXiZ(const float x); + void SetdcaXiDaughters(const float x); + void SetdcaXiToPrimVertex(const float x); + void SetdcaBacToPrimVertex(const float x); + void SetmomBac(const AliFemtoThreeVector v); + void SetmomBacX(const float x); + void SetmomBacY(const float x); + void SetmomBacZ(const float x); + + void SettpcHitsBac(const int& word); + + void SetTrackTopologyMapBac(unsigned int word, const unsigned long& m); + + void SetmomXi( AliFemtoThreeVector v); + void SetmomXiX( float x); + void SetmomXiY( float x); + void SetmomXiZ( float x); + void SetalphaXi( float x); + void SetptArmXi( float x); + void SeteXi( float x); + void SeteOmega( float x); + void SeteBacPion( float x); + void SeteBacKaon( float x); + void SetmassXi( float x); + void SetmassOmega( float x); + void SetrapXi( float x); + void SetrapOmega( float x); + void SetcTauXi( float x); + void SetcTauOmega( float x); + void SetptXi( float x); + void SetptotXi( float x); + void SetptBac( float x); + void SetptotBac( float x); + void SetidBac(const unsigned short& s); + void SetdedxBac(float x); + void SetkeyBac(const unsigned short& s); + + +protected: + int fCharge; // Charge + float fDecayLengthXi; // Decay Length of th Xi + AliFemtoThreeVector fDecayVertexXi; // Xi decay vertex location + float fDcaXiDaughters; // Dca of Xi daughters + float fDcaXiToPrimVertex; // Dca of Xi to primary vertex + float fDcaBachelorToPrimVertex; // Dca of bachelor to primary vertex + AliFemtoThreeVector fMomBachelor; // Momentum of the bachelor + + unsigned int fTopologyMapBachelor[2]; // TPC topology map for the bachelor + unsigned short fKeyBachelor; // Unique key for the bachelor + + int fTpcHitsBac; // Number of TPC hits for bachelor + + float fChi2Xi; // Fit quality for Xi + float fClXi; // Confidence level for Xi + float fChi2Bachelor; // Fit quality for bachelor + float fClBachelor; // Confidence level for bachelor + + float fDedxBachelor; // dEdx for bachelor + unsigned short fNufDedxBachelor; // dEdx for bachelor + + // the following variables are not in the persistent version and can be calculated via UpdateXi(); + AliFemtoThreeVector fMomXi; // Momentum of the Xi + float fAlphaXi; // Armenteros-Podolanski variable + float fPtArmXi; // Armenteros-Podolanski variable + + float fEXi; // Energy assuming xi hypothesis + float fEOmega; // Energy assuming omega hypothesis + float fEBacPion; // Energy of bac. daughter assuming kaon + float fEBacKaon; // Energy of bac. daughter assuming pion + float fMassXi; // Mass assuming Xi hypothesis + float fMassOmega; // Mass assuming Omega hypothesis + float fRapXi; // Rapidity assuming (anti) xi + float fRapOmega; // Rapidity assuming (anti) omega + float fCTauXi; // Lifetime (ctau) const assuming (anti) xi + float fCTauOmega; // Lifetime (ctau) const assuming (anti) omega + float fPtXi; // Transverse momentum + float fPtotXi; // Total momentum + float fPtBac; // Transverse momentum of bac. daughter + float fPtotBac; // Total momentum of bac. daughter + + unsigned short fKeyBac; // Key of bac. track +}; + +inline float AliFemtoXi::DecayLengthXi() const { return fDecayLengthXi; } +inline AliFemtoThreeVector AliFemtoXi::DecayVertexXi() const { return fDecayVertexXi; } +inline float AliFemtoXi::DecayVertexXiX() const { return fDecayVertexXi.x(); } +inline float AliFemtoXi::DecayVertexXiY() const { return fDecayVertexXi.y(); } +inline float AliFemtoXi::DecayVertexXiZ() const { return fDecayVertexXi.z(); } +inline float AliFemtoXi::DcaXiDaughters() const { return fDcaXiDaughters; } +inline float AliFemtoXi::DcaXiToPrimVertex() const { return fDcaXiToPrimVertex; } +inline float AliFemtoXi::DcaBacToPrimVertex() const { return fDcaBachelorToPrimVertex; } +inline AliFemtoThreeVector AliFemtoXi::MomBac() const { return fMomBachelor; } +inline float AliFemtoXi::MomBacX() const { return fMomBachelor.x(); } +inline float AliFemtoXi::MomBacY() const { return fMomBachelor.y(); } +inline float AliFemtoXi::MomBacZ() const { return fMomBachelor.z(); } +inline AliFemtoThreeVector AliFemtoXi::MomXi() const { return fMomXi; } +inline float AliFemtoXi::MomXiX() const { return fMomXi.x(); } +inline float AliFemtoXi::MomXiY() const { return fMomXi.y(); } +inline float AliFemtoXi::MomXiZ() const { return fMomXi.z(); } +inline float AliFemtoXi::AlphaXi() const { return fAlphaXi; } +inline float AliFemtoXi::PtArmXi() const {return fPtArmXi;} +inline float AliFemtoXi::EXi() const {return fEXi;} +inline float AliFemtoXi::EOmega() const {return fEOmega;} +inline float AliFemtoXi::EBacPion() const {return fEBacPion;} +inline float AliFemtoXi::EBacKaon() const {return fEBacKaon;} +inline float AliFemtoXi::MassXi() const {return fMassXi;} +inline float AliFemtoXi::MassOmega() const {return fMassOmega;} +inline float AliFemtoXi::RapXi() const {return fRapXi;} +inline float AliFemtoXi::RapOmega() const {return fRapOmega;} +inline float AliFemtoXi::CTauXi() const {return fCTauXi;} +inline float AliFemtoXi::CTauOmega() const {return fCTauOmega;} +inline float AliFemtoXi::PtXi() const {return fPtXi;} +inline float AliFemtoXi::PtotXi() const {return fPtotXi;} +inline float AliFemtoXi::PtBac() const {return fPtBac;} +inline float AliFemtoXi::PtotBac() const {return fPtotBac;} +inline int AliFemtoXi::TpcHitsBac() const + { return fTpcHitsBac; } +inline float AliFemtoXi::DedxBac() const {return fDedxBachelor;} + +inline unsigned long AliFemtoXi::TrackTopologyMapBac(unsigned int word) const { return fTopologyMapBachelor[word]; } +inline unsigned short AliFemtoXi::IdBac() const { return fKeyBac; }; +inline unsigned short AliFemtoXi::KeyBac() const { return fKeyBac; } + +inline void AliFemtoXi::SetdecayLengthXi(const float x){ fDecayLengthXi= x;} +inline void AliFemtoXi::SetdecayVertexXiX(const float x){ fDecayVertexXi.setX(x);} +inline void AliFemtoXi::SetdecayVertexXiY(const float x){ fDecayVertexXi.setY(x);} +inline void AliFemtoXi::SetdecayVertexXiZ(const float x){ fDecayVertexXi.setZ(x);} +inline void AliFemtoXi::SetdecayVertexXi(const AliFemtoThreeVector v){ fDecayVertexXi = v; } +inline void AliFemtoXi::SetdcaXiDaughters(const float x){fDcaXiDaughters= x;} +inline void AliFemtoXi::SetdcaXiToPrimVertex(const float x){fDcaXiToPrimVertex= x;} +inline void AliFemtoXi::SetdcaBacToPrimVertex(const float x){ fDcaBachelorToPrimVertex = x;} +inline void AliFemtoXi::SetmomBac(const AliFemtoThreeVector v){fMomBachelor = v; } +inline void AliFemtoXi::SetmomBacX(const float x){fMomBachelor.setX(x);} +inline void AliFemtoXi::SetmomBacY(const float x){fMomBachelor.setY(x);} +inline void AliFemtoXi::SetmomBacZ(const float x){fMomBachelor.setZ(x);} +inline void AliFemtoXi::SetTrackTopologyMapBac(unsigned int word, const unsigned long& m){fTopologyMapBachelor[word]=m;} +inline void AliFemtoXi::SetmomXi(AliFemtoThreeVector v){fMomXi= v; } +inline void AliFemtoXi::SetmomXiX(const float x){fMomXi.setX(x);} +inline void AliFemtoXi::SetmomXiY(const float x){fMomXi.setY(x);} +inline void AliFemtoXi::SetmomXiZ(const float x){fMomXi.setZ(x);} + +inline void AliFemtoXi::SetalphaXi( float x){fAlphaXi= x;} +inline void AliFemtoXi::SetptArmXi( float x){fPtArmXi = x;} +inline void AliFemtoXi::SeteXi( float x){fEXi= x;} +inline void AliFemtoXi::SeteOmega( float x){fEOmega= x;} +inline void AliFemtoXi::SeteBacPion( float x){fEBacPion= x;} +inline void AliFemtoXi::SeteBacKaon( float x){fEBacKaon= x;} +inline void AliFemtoXi::SetmassXi( float x){fMassXi = x;} +inline void AliFemtoXi::SetmassOmega( float x){fMassOmega= x;} +inline void AliFemtoXi::SetrapXi( float x){fRapXi= x;} +inline void AliFemtoXi::SetrapOmega( float x){fRapOmega = x;} +inline void AliFemtoXi::SetcTauXi( float x){fCTauXi = x;} +inline void AliFemtoXi::SetcTauOmega( float x){fCTauOmega = x;} +inline void AliFemtoXi::SetptXi( float x){fPtXi = x;} +inline void AliFemtoXi::SetptotXi( float x){fPtotXi = x;} +inline void AliFemtoXi::SetptBac( float x){fPtBac = x;} +inline void AliFemtoXi::SetptotBac( float x){fPtotBac = x;} +inline void AliFemtoXi::SetidBac(const unsigned short& s){ fKeyBac= s;} +inline void AliFemtoXi::SetkeyBac(const unsigned short& s){ fKeyBac= s;} +inline void AliFemtoXi::SettpcHitsBac(const int& i){fTpcHitsBac=i;} +inline void AliFemtoXi::SetdedxBac(float x){fDedxBachelor=x;} + +#endif + + +/*********************************************************************** + * + * $Log$ + * Revision 1.2 2007/05/03 09:42:29 akisiel + * Fixing Effective C++ warnings + * + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * + * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki + * First version on CVS + * + * Revision 1.3 2003/09/02 17:58:33 perev + * gcc 3.2 updates + WarnOff + * + * Revision 1.2 2001/12/05 15:10:33 laue + * Boris' updates (mainly access functions) + * + * + ***********************************************************************/ + + + + + + + + + + + + + + + + diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXiCollection.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXiCollection.h similarity index 95% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXiCollection.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoXiCollection.h index c9337ff013d..8446dae8fff 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXiCollection.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXiCollection.h @@ -14,7 +14,7 @@ #ifndef AliFemtoXiCollection_hh #define AliFemtoXiCollection_hh -#include "Infrastructure/AliFemtoXi.h" +#include "AliFemtoXi.h" #include #if !defined(ST_NO_NAMESPACES) diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoXiCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXiCut.h similarity index 89% rename from PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoXiCut.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFemtoXiCut.h index bcfbadb6609..223c089f43d 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoXiCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoXiCut.h @@ -6,9 +6,9 @@ #ifndef AliFemtoXiCut_hh #define AliFemtoXiCut_hh -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoXi.h" -#include "Base/AliFemtoParticleCut.h" +#include "AliFemtoTypes.h" +#include "AliFemtoXi.h" +#include "AliFemtoParticleCut.h" class AliFemtoXiCut : public AliFemtoParticleCut { diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.cxx new file mode 100644 index 00000000000..ea2a8a3bed8 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.cxx @@ -0,0 +1,650 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFmHelix: a helper helix class // +// Includes all the operations and specifications of the helix. Can be // +// used to determine path lengths, distance of closest approach etc. // +// // +/////////////////////////////////////////////////////////////////////////// +#if !defined(ST_NO_NUMERIC_LIMITS) +# include +# if !defined(ST_NO_NAMESPACES) +using std::numeric_limits; +# endif +#endif +#define FOR_HELIX +#include +#include + +#include "AliFmHelix.h" +#include "PhysicalConstants.h" +#include "SystemOfUnits.h" +#ifdef __ROOT__ +ClassImpT(AliFmHelix,double); +#endif + +#ifdef WIN32 +#include "gcc2vs.h" +#endif + +#include +#include +using namespace std; + +const double AliFmHelix::fgkNoSolution = 3.e+33; + +AliFmHelix::AliFmHelix() : + fSingularity(0), + fOrigin(0,0,0), + fDipAngle(0), + fCurvature(0), + fPhase(0), + fH(0), + fCosDipAngle(0), + fSinDipAngle(0), + fCosPhase(0), + fSinPhase(0) +{ + //Default constructor +/*noop*/ +} + +AliFmHelix::AliFmHelix(double c, double d, double phase, + const AliFmThreeVector& o, int h) : + fSingularity(0), + fOrigin(0,0,0), + fDipAngle(0), + fCurvature(0), + fPhase(0), + fH(0), + fCosDipAngle(0), + fSinDipAngle(0), + fCosPhase(0), + fSinPhase(0) +{ + // Constructor with helix parameters + SetParameters(c, d, phase, o, h); +} + +AliFmHelix::~AliFmHelix() { + // Default destructor +/* noop */ +} + +void AliFmHelix::SetParameters(double c, double dip, double phase, + const AliFmThreeVector& o, int h) +{ + // + // The order in which the parameters are set is important + // since setCurvature might have to adjust the others. + // + fH = (h>=0) ? 1 : -1; // Default is: positive particle + // positive field + fOrigin = o; + SetDipAngle(dip); + SetPhase(phase); + + // + // Check for singularity and correct for negative curvature. + // May change mH and mPhase. Must therefore be set last. + // + SetCurvature(c); + + // + // For the case B=0, h is ill defined. In the following we + // always assume h = +1. Since phase = psi - h * pi/2 + // we have to correct the phase in case h = -1. + // This assumes that the user uses the same h for phase + // as the one he passed to the constructor. + // + if (fSingularity && fH == -1) { + fH = +1; + SetPhase(fPhase-M_PI); + } +} + +void AliFmHelix::SetCurvature(double val) +{ + // Set helix curvature + if (val < 0) { + fCurvature = -val; + fH = -fH; + SetPhase(fPhase+M_PI); + } + else + fCurvature = val; + +#ifndef ST_NO_NUMERIC_LIMITS + if (fabs(fCurvature) <= numeric_limits::epsilon()) +#else + if (fabs(fCurvature) <= static_cast(0)) +#endif + fSingularity = true; // straight line + else + fSingularity = false; // curved +} + +void AliFmHelix::SetPhase(double val) +{ + // Set helix phase + fPhase = val; + fCosPhase = cos(fPhase); + fSinPhase = sin(fPhase); + if (fabs(fPhase) > M_PI) + fPhase = atan2(fSinPhase, fCosPhase); // force range [-pi,pi] +} + +void AliFmHelix::SetDipAngle(double val) +{ + // Set helix dip angle + fDipAngle = val; + fCosDipAngle = cos(fDipAngle); + fSinDipAngle = sin(fDipAngle); +} + +double AliFmHelix::XCenter() const +{ + // Set helix center in X + if (fSingularity) + return 0; + else + return fOrigin.x()-fCosPhase/fCurvature; +} + +double AliFmHelix::YCenter() const +{ + // Set helix center in Y + if (fSingularity) + return 0; + else + return fOrigin.y()-fSinPhase/fCurvature; +} + +double AliFmHelix::FudgePathLength(const AliFmThreeVector& p) const +{ + // Path length + double s; + double dx = p.x()-fOrigin.x(); + double dy = p.y()-fOrigin.y(); + + if (fSingularity) { + s = (dy*fCosPhase - dx*fSinPhase)/fCosDipAngle; + } + else { + s = atan2(dy*fCosPhase - dx*fSinPhase, + 1/fCurvature + dx*fCosPhase+dy*fSinPhase)/ + (fH*fCurvature*fCosDipAngle); + } + return s; +} + +double AliFmHelix::Distance(const AliFmThreeVector& p, bool scanPeriods) const +{ + // calculate distance between origin an p along the helix + return abs(this->At(PathLength(p,scanPeriods))-p); +} + +double AliFmHelix::PathLength(const AliFmThreeVector& p, bool scanPeriods) const +{ + // + // Returns the path length at the distance of closest + // approach between the helix and point p. + // For the case of B=0 (straight line) the path length + // can be calculated analytically. For B>0 there is + // unfortunately no easy solution to the problem. + // Here we use the Newton method to find the root of the + // referring equation. The 'fudgePathLength' serves + // as a starting value. + // + double s; + double dx = p.x()-fOrigin.x(); + double dy = p.y()-fOrigin.y(); + double dz = p.z()-fOrigin.z(); + + if (fSingularity) { + s = fCosDipAngle*(fCosPhase*dy-fSinPhase*dx) + + fSinDipAngle*dz; + } + else { // +#ifndef ST_NO_NAMESPACES + { + using namespace units; +#endif + const double ktMaxPrecisionNeeded = micrometer; + const int ktMaxIterations = 100; + + // + // The math is taken from Maple with C(expr,optimized) and + // some hand-editing. It is not very nice but efficient. + // + double t34 = fCurvature*fCosDipAngle*fCosDipAngle; + double t41 = fSinDipAngle*fSinDipAngle; + double t6, t7, t11, t12, t19; + + // + // Get a first guess by using the dca in 2D. Since + // in some extreme cases we might be off by n periods + // we add (subtract) periods in case we get any closer. + // + s = FudgePathLength(p); + + if (scanPeriods) { + double ds = Period(); + int j, jmin = 0; + double d, dmin = abs(At(s) - p); + for(j=1; j::max(); +#else + return DBL_MAX; +#endif + else + return fabs(2*M_PI/(fH*fCurvature*fCosDipAngle)); +} + +pair AliFmHelix::PathLength(double r) const +{ + // + // The math is taken from Maple with C(expr,optimized) and + // some hand-editing. It is not very nice but efficient. + // 'first' is the smallest of the two solutions (may be negative) + // 'second' is the other. + // + pair tvalue; + pair tVALUE(999999999.,999999999.); + if (fSingularity) { + double t1 = fCosDipAngle*(fOrigin.x()*fSinPhase-fOrigin.y()*fCosPhase); + double t12 = fOrigin.y()*fOrigin.y(); + double t13 = fCosPhase*fCosPhase; + double t15 = r*r; + double t16 = fOrigin.x()*fOrigin.x(); + double t20 = -fCosDipAngle*fCosDipAngle*(2.0*fOrigin.x()*fSinPhase*fOrigin.y()*fCosPhase + + t12-t12*t13-t15+t13*t16); + if (t20<0.) return tVALUE; + t20 = ::sqrt(t20); + tvalue.first = (t1-t20)/(fCosDipAngle*fCosDipAngle); + tvalue.second = (t1+t20)/(fCosDipAngle*fCosDipAngle); + } + else { + double t1 = fOrigin.y()*fCurvature; + double t2 = fSinPhase; + double t3 = fCurvature*fCurvature; + double t4 = fOrigin.y()*t2; + double t5 = fCosPhase; + double t6 = fOrigin.x()*t5; + double t8 = fOrigin.x()*fOrigin.x(); + double t11 = fOrigin.y()*fOrigin.y(); + double t14 = r*r; + double t15 = t14*fCurvature; + double t17 = t8*t8; + double t19 = t11*t11; + double t21 = t11*t3; + double t23 = t5*t5; + double t32 = t14*t14; + double t35 = t14*t3; + double t38 = 8.0*t4*t6 - 4.0*t1*t2*t8 - 4.0*t11*fCurvature*t6 + + 4.0*t15*t6 + t17*t3 + t19*t3 + 2.0*t21*t8 + 4.0*t8*t23 - + 4.0*t8*fOrigin.x()*fCurvature*t5 - 4.0*t11*t23 - + 4.0*t11*fOrigin.y()*fCurvature*t2 + 4.0*t11 - 4.0*t14 + + t32*t3 + 4.0*t15*t4 - 2.0*t35*t11 - 2.0*t35*t8; + double t40 = (-t3*t38); + if (t40<0.) return tVALUE; + t40 = ::sqrt(t40); + + double t43 = fOrigin.x()*fCurvature; + double t45 = 2.0*t5 - t35 + t21 + 2.0 - 2.0*t1*t2 -2.0*t43 - 2.0*t43*t5 + t8*t3; + double t46 = fH*fCosDipAngle*fCurvature; + + tvalue.first = (-fPhase + 2.0*atan((-2.0*t1 + 2.0*t2 + t40)/t45))/t46; + tvalue.second = -(fPhase + 2.0*atan((2.0*t1 - 2.0*t2 + t40)/t45))/t46; + + // + // Solution can be off by +/- one Period, select smallest + // + double p = Period(); + // malisa deletes "isnan" check 22apr2006 if (!isnan(value.first)) { + if (fabs(tvalue.first-p) < fabs(tvalue.first)) tvalue.first = tvalue.first-p; + else if (fabs(tvalue.first+p) < fabs(tvalue.first)) tvalue.first = tvalue.first+p; + // malisa } + // malisa deletes "isnan" check 22apr2006 if (!isnan(tvalue.second)) { + if (fabs(tvalue.second-p) < fabs(tvalue.second)) tvalue.second = tvalue.second-p; + else if (fabs(tvalue.second+p) < fabs(tvalue.second)) tvalue.second = tvalue.second+p; + // malisa } + } + if (tvalue.first > tvalue.second) + swap(tvalue.first,tvalue.second); + return(tvalue); +} + +pair AliFmHelix::PathLength(double r, double x, double y, bool scanPeriods) +{ + // path length + double x0 = fOrigin.x(); + double y0 = fOrigin.y(); + fOrigin.setX(x0-x); + fOrigin.setY(y0-y); + pair result = this->PathLength(r); + fOrigin.setX(x0); + fOrigin.setY(y0); + return result; +} + +double AliFmHelix::PathLength(const AliFmThreeVector& r, + const AliFmThreeVector& n) const +{ + // + // Vector 'r' defines the position of the center and + // vector 'n' the normal vector of the plane. + // For a straight line there is a simple analytical + // solution. For curvatures > 0 the root is determined + // by Newton method. In case no valid s can be found + // the max. largest value for s is returned. + // + double s; + + if (fSingularity) { + double t = n.z()*fSinDipAngle + + n.y()*fCosDipAngle*fCosPhase - + n.x()*fCosDipAngle*fSinPhase; + if (t == 0) + s = fgkNoSolution; + else + s = ((r - fOrigin)*n)/t; + } + else { + const double ktMaxPrecisionNeeded = micrometer; + const int ktMaxIterations = 20; + + double tA = fCurvature*((fOrigin - r)*n) - + n.x()*fCosPhase - + n.y()*fSinPhase; + double t = fH*fCurvature*fCosDipAngle; + double u = n.z()*fCurvature*fSinDipAngle; + + double a, f, fp; + double sOld = s = 0; + double shiftOld = 0; + double shift; + // (cos(kangMax)-1)/kangMax = 0.1 + const double kangMax = 0.21; + double deltas = fabs(kangMax/(fCurvature*fCosDipAngle)); + // dampingFactor = exp(-0.5); + double dampingFactor = 0.60653; + int i; + + for (i=0; i +AliFmHelix::PathLengths(const AliFmHelix& h, bool scanPeriods) const +{ + // + // Cannot handle case where one is a helix + // and the other one is a straight line. + // + if (fSingularity != h.fSingularity) + return pair(fgkNoSolution, fgkNoSolution); + + double s1, s2; + + if (fSingularity) { + // + // Analytic solution + // + AliFmThreeVector dv = h.fOrigin - fOrigin; + AliFmThreeVector a(-fCosDipAngle*fSinPhase, + fCosDipAngle*fCosPhase, + fSinDipAngle); + AliFmThreeVector b(-h.fCosDipAngle*h.fSinPhase, + h.fCosDipAngle*h.fCosPhase, + h.fSinDipAngle); + double ab = a*b; + double g = dv*a; + double k = dv*b; + s2 = (k-ab*g)/(ab*ab-1.); + s1 = g+s2*ab; + return pair(s1, s2); + } + else { + // + // First step: get dca in the xy-plane as start value + // + double dx = h.XCenter() - XCenter(); + double dy = h.YCenter() - YCenter(); + double dd = ::sqrt(dx*dx + dy*dy); + double r1 = 1/Curvature(); + double r2 = 1/h.Curvature(); + + /* malisa 22apr2006 is commenting out the "isnan" check + * if ( !finite(r1) || isnan(r1) || !finite(r2) || isnan(r2) ) { + * cerr << __FUNCTION__ << " *** error *** "; + * cerr << " r1=" << r1; + * cerr << " r2=" << r2 << endl; + * return pair(fgkNoSolution, fgkNoSolution); + * } + */ + + double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd); + + double s; + double x, y; + if (fabs(cosAlpha) < 1) { // two solutions + double sinAlpha = sin(acos(cosAlpha)); + x = XCenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd; + y = YCenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd; + s = PathLength(x, y); + x = XCenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd; + y = YCenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd; + double a = PathLength(x, y); + if (h.Distance(At(a),scanPeriods) < h.Distance(At(s),scanPeriods)) s = a; + } + else { // no intersection (or exactly one) + x = XCenter() + r1*dx/dd; + y = YCenter() + r1*dy/dd; + s = PathLength(x, y); + } + + // + // Second step: scan in decreasing intervals around seed 's' + // + const double ktMinStepSize = 10*micrometer; + const double ktMinRange = 10*centimeter; + double dmin = h.Distance(At(s),scanPeriods); + double range = max(2*dmin, ktMinRange); + + /* malisa comments out the "isnan" check 22apr2006 + * if ( !finite(range) || isnan(range)) { + * cerr << __FUNCTION__ << " *** error *** "; + * cerr << " range=" << range << endl; + * return pair(fgkNoSolution, fgkNoSolution); + * } + */ + + double ds = range/10.; + double slast=-999999, d; + s1 = s - range/2.; + s2 = s + range/2.; + + double tmp1; + double tmp2; + + while (ds > ktMinStepSize) { + if ( !(s1& o, int h=-1); + + virtual ~AliFmHelix(); + // AliFmHelix(const AliFmHelix&); // use default + // AliFmHelix& operator=(const AliFmHelix&); // use default + + double DipAngle() const; + double Curvature() const; /// 1/R in xy-plane + double Phase() const; /// aziumth in xy-plane measured from ring center + double XCenter() const; /// x-center of circle in xy-plane + double YCenter() const; /// y-center of circle in xy-plane + int H() const; /// -sign(q*B); + + const AliFmThreeVector& Origin() const; /// starting point + + void SetParameters(double c, double dip, double phase, const AliFmThreeVector& o, int h); + + double X(double s) const; + double Y(double s) const; + double Z(double s) const; + + AliFmThreeVector At(double s) const; + + /// returns period length of helix + double Period() const; + + /// path length at given r (cylindrical r) + pair PathLength(double r) const; + + /// path length at given r (cylindrical r, cylinder axis at x,y) + pair PathLength(double r, double x, double y, bool scanPeriods = true); + + /// path length at distance of closest approach to a given point + double PathLength(const AliFmThreeVector& p, bool scanPeriods = true) const; + + /// path length at intersection with plane + double PathLength(const AliFmThreeVector& r, + const AliFmThreeVector& n) const; + + /// path length at distance of closest approach in the xy-plane to a given point + double PathLength(double x, double y) const; + + /// path lengths at dca between two helices + pair PathLengths(const AliFmHelix& h, bool scanPeriods = true) const; + + /// minimal distance between point and helix + double Distance(const AliFmThreeVector& p, bool scanPeriods = true) const; + + /// checks for valid parametrization + bool Valid(double world = 1.e+5) const {return !Bad(world);} + int Bad(double world = 1.e+5) const; + + /// move the origin along the helix to s which becomes then s=0 + virtual void MoveOrigin(double s); + + static const double fgkNoSolution; + +protected: + AliFmHelix(); + + void SetCurvature(double d); /// performs also various checks + void SetPhase(double d); + void SetDipAngle(double d); + + /// value of S where distance in x-y plane is minimal + double FudgePathLength(const AliFmThreeVector& v) const; + +protected: + bool fSingularity; // true for straight line case (B=0) + AliFmThreeVector fOrigin; // Helix origin + double fDipAngle; // Helix dip angle + double fCurvature; // curvature + double fPhase; // phase + int fH; // -sign(q*B); + + double fCosDipAngle; // cosine of the dip angle + double fSinDipAngle; // sine of the dip angle + double fCosPhase; // cosine of the phase + double fSinPhase; // sine of the phase +#ifdef __ROOT__ + ClassDef(AliFmHelix,1) +#endif +}; + +// +// Non-member functions +// +int operator== (const AliFmHelix&, const AliFmHelix&); +int operator!= (const AliFmHelix&, const AliFmHelix&); +ostream& operator<<(ostream&, const AliFmHelix&); + +// +// Inline functions +// +inline int AliFmHelix::H() const {return fH;} + +inline double AliFmHelix::DipAngle() const {return fDipAngle;} + +inline double AliFmHelix::Curvature() const {return fCurvature;} + +inline double AliFmHelix::Phase() const {return fPhase;} + +inline double AliFmHelix::X(double s) const +{ + if (fSingularity) + return fOrigin.x() - s*fCosDipAngle*fSinPhase; + else + return fOrigin.x() + (cos(fPhase + s*fH*fCurvature*fCosDipAngle)-fCosPhase)/fCurvature; +} + +inline double AliFmHelix::Y(double s) const +{ + if (fSingularity) + return fOrigin.y() + s*fCosDipAngle*fCosPhase; + else + return fOrigin.y() + (sin(fPhase + s*fH*fCurvature*fCosDipAngle)-fSinPhase)/fCurvature; +} + +inline double AliFmHelix::Z(double s) const +{ + return fOrigin.z() + s*fSinDipAngle; +} + +inline const AliFmThreeVector& AliFmHelix::Origin() const {return fOrigin;} + +inline AliFmThreeVector AliFmHelix::At(double s) const +{ + return AliFmThreeVector(X(s), Y(s), Z(s)); +} + +inline double AliFmHelix::PathLength(double x, double y) const +{ + return FudgePathLength(AliFmThreeVector(x, y, 0)); +} +inline int AliFmHelix::Bad(double WorldSize) const +{ + + int ierr; + if (!::finite(fDipAngle )) return 11; + if (!::finite(fCurvature )) return 12; + + ierr = fOrigin.bad(WorldSize); + if (ierr) return 3+ierr*100; + + if (::fabs(fDipAngle) >1.58) return 21; + double qwe = ::fabs(::fabs(fDipAngle)-M_PI/2); + if (qwe < 1./WorldSize ) return 31; + + if (::fabs(fCurvature) > WorldSize) return 22; + if (fCurvature < 0 ) return 32; + + if (abs(fH) != 1 ) return 24; + + return 0; +} + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelixD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmHelixD.h similarity index 89% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelixD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmHelixD.h index 031f31b6f07..d2cd52e73c7 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelixD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmHelixD.h @@ -2,6 +2,9 @@ * * $Id$ * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmLorentzVector.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmLorentzVector.h similarity index 99% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmLorentzVector.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmLorentzVector.h index 407bb49999e..048de88ad98 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmLorentzVector.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmLorentzVector.h @@ -20,6 +20,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmLorentzVectorD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmLorentzVectorD.h similarity index 89% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmLorentzVectorD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmLorentzVectorD.h index 3fad3d4de9c..bbfab85567f 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmLorentzVectorD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmLorentzVectorD.h @@ -2,6 +2,9 @@ * * $Id$ * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.cxx new file mode 100644 index 00000000000..f6fb0acf2bf --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.cxx @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFmHelix: a helper helix class // +// Includes all the operations and specifications of the helix. Can be // +// used to determine path lengths, distance of closest approach etc. // +// // +/////////////////////////////////////////////////////////////////////////// +#include +#include "AliFmHelix.h" +#include "AliFmPhysicalHelix.h" +#include "PhysicalConstants.h" +#include "SystemOfUnits.h" +#ifdef __ROOT__ +ClassImpT(AliFmPhysicalHelix,double); +#endif +AliFmPhysicalHelix::AliFmPhysicalHelix(){} + +AliFmPhysicalHelix::~AliFmPhysicalHelix() { /* nop */ } + +AliFmPhysicalHelix::AliFmPhysicalHelix(const AliFmThreeVector& p, + const AliFmThreeVector& o, + double B, double q) +{ + // Constructor from given parameters + fH = (q*B <= 0) ? 1 : -1; + if(p.y() == 0 && p.x() == 0) + SetPhase((M_PI/4)*(1-2.*fH)); + else + SetPhase(atan2(p.y(),p.x())-fH*M_PI/2); + SetDipAngle(atan2(p.z(),p.perp())); + fOrigin = o; + +#ifndef ST_NO_NAMESPACES + { + using namespace units; +#endif + SetCurvature(fabs((c_light*nanosecond/meter*q*B/tesla)/ + (abs(p.mag())/GeV*fCosDipAngle)/meter)); +#ifndef ST_NO_NAMESPACES + } +#endif +} + +AliFmPhysicalHelix::AliFmPhysicalHelix(double c, double d, double phase, + const AliFmThreeVector& o, int h) + : AliFmHelix(c, d, phase, o, h) { /* nop */} + + +AliFmThreeVector AliFmPhysicalHelix::Momentum(double B) const +{ + // momentum for given magnetic field + if (fSingularity) + return(AliFmThreeVector(0,0,0)); + else { +#ifndef ST_NO_NAMESPACES + { + using namespace units; +#endif + double pt = GeV*fabs(c_light*nanosecond/meter*B/tesla)/(fabs(fCurvature)*meter); + + return (AliFmThreeVector(pt*cos(fPhase+fH*M_PI/2), // pos part pos field + pt*sin(fPhase+fH*M_PI/2), + pt*tan(fDipAngle))); +#ifndef ST_NO_NAMESPACES + } +#endif + } +} + +AliFmThreeVector AliFmPhysicalHelix::MomentumAt(double S, double B) const +{ + // Obtain phase-shifted momentum from phase-shift of origin + double xc = this->XCenter(); + double yc = this->YCenter(); + double rx = (Y(S)-yc)/(fOrigin.y()-yc); + double ry = (X(S)-xc)/(fOrigin.x()-xc); + return (this->Momentum(B)).pseudoProduct(rx,ry,1.0); +} + +int AliFmPhysicalHelix::Charge(double B) const +{ + // charge + return (B > 0 ? -fH : fH); +} + +double AliFmPhysicalHelix::GeometricSignedDistance(double x, double y) +{ + // Geometric signed distance + double thePath = this->PathLength(x,y); + AliFmThreeVector tDCA2dPosition = this->At(thePath); + tDCA2dPosition.setZ(0); + AliFmThreeVector position(x,y,0); + AliFmThreeVector tDCAVec = (tDCA2dPosition-position); + AliFmThreeVector momVec; + // Deal with straight tracks + if (this->fSingularity) { + momVec = this->At(1)- this->At(0); + momVec.setZ(0); + } + else { + momVec = this->MomentumAt(thePath,1./tesla); // Don't care about Bmag. Helicity is what matters. + momVec.setZ(0); + } + + double cross = tDCAVec.x()*momVec.y() - tDCAVec.y()*momVec.x(); + double theSign = (cross>=0) ? 1. : -1.; + return theSign*tDCAVec.perp(); +} + +double AliFmPhysicalHelix::CurvatureSignedDistance(double x, double y) +{ + // Protect against fH = 0 or zero field + if (this->fSingularity || abs(this->fH)<=0) { + return (this->GeometricSignedDistance(x,y)); + } + else { + return (this->GeometricSignedDistance(x,y))/(this->fH); + } + +} + +double AliFmPhysicalHelix::GeometricSignedDistance(const AliFmThreeVector& pos) +{ + // Geometric distance + double sdca2d = this->GeometricSignedDistance(pos.x(),pos.y()); + double theSign = (sdca2d>=0) ? 1. : -1.; + return (this->Distance(pos))*theSign; +} + +double AliFmPhysicalHelix::CurvatureSignedDistance(const AliFmThreeVector& pos) +{ + // Distance with the sign dependent on curvature sigm + double sdca2d = this->CurvatureSignedDistance(pos.x(),pos.y()); + double theSign = (sdca2d>=0) ? 1. : -1.; + return (this->Distance(pos))*theSign; +} diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.h new file mode 100644 index 00000000000..192b9a7c0a6 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelix.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////// +// // +// AliFmHelix: a helper helix class // +// // +/////////////////////////////////////////////////////////////////////////// +#ifndef ALIPHYSICALHELIX_H +#define ALIPHYSICALHELIX_H + +#include "AliFmThreeVector.h" +#include "AliFmHelix.h" + +class AliFmPhysicalHelix : public AliFmHelix { + public: + // Requires: momentum, origin, signed Magnetic Field + // and Charge of particle (+/- 1) + AliFmPhysicalHelix(const AliFmThreeVector& v, + const AliFmThreeVector& v, + double x, double x); + + // curvature, dip angle, phase, origin, h + AliFmPhysicalHelix(double curvature, double dipAngle, double phase, + const AliFmThreeVector& origin, int h=-1); + AliFmPhysicalHelix(); + + ~AliFmPhysicalHelix(); + + // Requires: signed Magnetic Field + AliFmThreeVector Momentum(double x) const; // returns the momentum at origin + AliFmThreeVector MomentumAt(double x, double x) const; // returns momemtum at S + int Charge(double x) const; // returns charge of particle + // 2d DCA to x,y point signed relative to curvature + double CurvatureSignedDistance(double x, double y) ; + // 2d DCA to x,y point signed relative to rotation + double GeometricSignedDistance(double x, double y) ; + // 3d DCA to 3d point signed relative to curvature + double CurvatureSignedDistance(const AliFmThreeVector& v) ; + // 3d DCA to 3d point signed relative to rotation + double GeometricSignedDistance(const AliFmThreeVector& v) ; + +#ifdef __ROOT__ + ClassDef(AliFmPhysicalHelix,1) +#endif +}; + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelixD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelixD.h similarity index 89% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelixD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelixD.h index 39bcfaec9b4..0b4ae01f375 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelixD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmPhysicalHelixD.h @@ -2,6 +2,9 @@ * * $Id$ * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVector.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVector.h similarity index 99% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVector.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVector.h index 63cb152ef9f..f4443556408 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVector.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVector.h @@ -15,6 +15,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVectorD.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVectorD.h similarity index 88% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVectorD.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVectorD.h index 906f5aa4215..b230a23f3ff 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVectorD.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVectorD.h @@ -2,6 +2,9 @@ * * $Id$ * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVectorF.h b/PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVectorF.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVectorF.h rename to PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVectorF.h index e9f15823c92..57bd5176c84 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmThreeVectorF.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFmThreeVectorF.h @@ -13,6 +13,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.cxx b/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.cxx deleted file mode 100644 index bb13bb40968..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.cxx +++ /dev/null @@ -1,111 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * A simple event-wise cut that selects on multiplicity and z-position - * of primary vertex - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.7 2000/02/18 21:27:10 laue - * franksTrackCut changed. If mCharge is set to '0' there will be no cut - * on charge. This is important for front-loaded cuts. - * - * Revision 1.6 2000/01/25 17:35:02 laue - * I. In order to run the stand alone version of the AliFemtoMaker the following - * changes have been done: - * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements - * b) unnecessary includes of StMaker.h have been removed - * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything - * needed for the stand alone version - * - * II. To reduce the amount of compiler warning - * a) some variables have been type casted - * b) some destructors have been declared as virtual - * - * Revision 1.5 1999/10/15 01:57:03 lisa - * Important enhancement of AliFemtoMaker - implement Franks CutMonitors - * ---------------------------------------------------------- - * This means 3 new files in Infrastructure area (CutMonitor), - * several specific CutMonitor classes in the Cut area - * and a new base class in the Base area (AliFemtoCutMonitor). - * This means also changing all Cut Base class header files from .h to .h - * so we have access to CutMonitor methods from Cint command line. - * This last means - * 1) files which include these header files are slightly modified - * 2) a side benefit: the TrackCuts and V0Cuts no longer need - * a SetMass() implementation in each Cut class, which was stupid. - * Also: - * ----- - * Include Franks AliFemtoAssociationReader - * ** None of these changes should affect any user ** - * - * Revision 1.4 1999/07/24 16:24:20 lisa - * adapt AliFemtoMaker to dev version of library - solaris still gives problems with strings - * - * Revision 1.3 1999/07/19 14:24:04 hardtke - * modifications to implement uDST - * - * Revision 1.2 1999/07/06 22:33:21 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:56 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#include "Cut/AliFemtoBasicEventCut.h" -#include - -#ifdef __ROOT__ -ClassImp(AliFemtoBasicEventCut) -#endif - -AliFemtoBasicEventCut::AliFemtoBasicEventCut() : - fNEventsPassed(0), fNEventsFailed(0) -{ - /* no-op */ -} -//------------------------------ -//AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){ -// /* noop */ -//} -//------------------------------ -bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){ - int mult = event->NumberOfTracks(); - double VertexZPos = event->PrimVertPos().z(); - cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl; - cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << VertexZPos << " < " << fVertZPos[1] << endl; - bool goodEvent = - ((mult > fEventMult[0]) && - (mult < fEventMult[1]) && - (VertexZPos > fVertZPos[0]) && - (VertexZPos < fVertZPos[1])); - goodEvent ? fNEventsPassed++ : fNEventsFailed++ ; - cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl; - return (goodEvent); -} -//------------------------------ -AliFemtoString AliFemtoBasicEventCut::Report(){ - string Stemp; - char Ctemp[100]; - sprintf(Ctemp,"\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]); - Stemp = Ctemp; - sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]); - Stemp += Ctemp; - sprintf(Ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed); - Stemp += Ctemp; - AliFemtoString returnThis = Stemp; - return returnThis; -} diff --git a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.h b/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.h deleted file mode 100644 index 904bb16b803..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Cut/AliFemtoBasicEventCut.h +++ /dev/null @@ -1,116 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * A simple event-wise cut that selects on multiplicity and z-position - * of primary vertex - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.5 2000/03/23 22:57:28 laue - * Clone() function implemented - * - * Revision 1.4 2000/01/25 17:35:02 laue - * I. In order to run the stand alone version of the AliFemtoMaker the following - * changes have been done: - * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements - * b) unnecessary includes of StMaker.h have been removed - * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything - * needed for the stand alone version - * - * II. To reduce the amount of compiler warning - * a) some variables have been type casted - * b) some destructors have been declared as virtual - * - * Revision 1.3 1999/10/15 01:57:04 lisa - * Important enhancement of AliFemtoMaker - implement Franks CutMonitors - * ---------------------------------------------------------- - * This means 3 new files in Infrastructure area (CutMonitor), - * several specific CutMonitor classes in the Cut area - * and a new base class in the Base area (AliFemtoCutMonitor). - * This means also changing all Cut Base class header files from .h to .h - * so we have access to CutMonitor methods from Cint command line. - * This last means - * 1) files which include these header files are slightly modified - * 2) a side benefit: the TrackCuts and V0Cuts no longer need - * a SetMass() implementation in each Cut class, which was stupid. - * Also: - * ----- - * Include Franks AliFemtoAssociationReader - * ** None of these changes should affect any user ** - * - * Revision 1.2 1999/07/06 22:33:21 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:56 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#ifndef AliFemtoBasicEventCut_hh -#define AliFemtoBasicEventCut_hh - -// do I need these lines ? -//#ifndef StMaker_H -//#include "StMaker.h" -//#endif - -#include "Base/AliFemtoEventCut.h" - -class AliFemtoBasicEventCut : public AliFemtoEventCut { - -public: - - AliFemtoBasicEventCut(); - AliFemtoBasicEventCut(AliFemtoBasicEventCut&); - //~AliFemtoBasicEventCut(); - - void SetEventMult(const int& lo,const int& hi); - void SetVertZPos(const float& lo, const float& hi); - int NEventsPassed(); - int NEventsFailed(); - - virtual AliFemtoString Report(); - virtual bool Pass(const AliFemtoEvent*); - - AliFemtoBasicEventCut* Clone(); - -private: // here are the quantities I want to cut on... - - int fEventMult[2]; // range of multiplicity - float fVertZPos[2]; // range of z-position of vertex - - long fNEventsPassed; - long fNEventsFailed; - -#ifdef __ROOT__ - ClassDef(AliFemtoBasicEventCut, 1) -#endif - -}; - -inline void AliFemtoBasicEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;} -inline void AliFemtoBasicEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;} -inline int AliFemtoBasicEventCut::NEventsPassed() {return fNEventsPassed;} -inline int AliFemtoBasicEventCut::NEventsFailed() {return fNEventsFailed;} -inline AliFemtoBasicEventCut* AliFemtoBasicEventCut::Clone() { AliFemtoBasicEventCut* c = new AliFemtoBasicEventCut(*this); return c;} -inline AliFemtoBasicEventCut::AliFemtoBasicEventCut(AliFemtoBasicEventCut& c) : AliFemtoEventCut(c), fNEventsPassed(0), fNEventsFailed(0) { - fEventMult[0] = c.fEventMult[0]; - fEventMult[1] = c.fEventMult[1]; - fVertZPos[0] = c.fVertZPos[0]; - fVertZPos[1] = c.fVertZPos[1]; -} - - -#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.h deleted file mode 100644 index 47aa5e65fcc..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoEvent.h +++ /dev/null @@ -1,202 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * HbtEvent is the "transient microDST" Objects of this class are - * generated from the input data by a Reader, and then presented to - * the Cuts of the various active Analyses. - * - *************************************************************************** - * Revision 1.21 to use in Alice version 1 Chojnacki - * - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.20 2003/01/17 16:46:22 mercedes - * StMuEvent::refMult() added - * - * Revision 1.19 2002/11/19 23:27:25 renault - * New event constructor to find V0 daughters informations(helix for average - * separation calculation) - * - * Revision 1.18 2002/03/21 18:49:31 laue - * updated for new MuDst reader - * - * Revision 1.17 2001/12/06 16:47:13 laue - * l3 trigger algorithm added - * - * Revision 1.14 2001/06/21 19:15:45 laue - * Modified fiels: - * CTH.h : new constructor added - * AliFemtoEvent, AliFemtoKink, AliFemtoTrack : constructors from the persistent - * (TTree) classes added - * AliFemtoLikeSignAnalysis : minor changes, for debugging - * AliFemtoTypes: split into different files - * Added files: for the new TTree muDst's - * StExceptions.cxx StExceptions.h AliFemtoEnumeration.h - * AliFemtoHelix.h AliFemtoHisto.h AliFemtoString.h AliFemtoTFile.h - * AliFemtoTTreeEvent.cxx AliFemtoTTreeEvent.h AliFemtoTTreeKink.cxx - * AliFemtoTTreeKink.h AliFemtoTTreeTrack.cxx AliFemtoTTreeTrack.h - * AliFemtoTTreeV0.cxx AliFemtoTTreeV0.h AliFemtoVector.h - * - * Revision 1.13 2001/06/04 19:09:52 rcwells - * Adding B-field, run number, and improved reaction plane functionality - * - * Revision 1.12 2001/05/25 23:23:59 lisa - * Added in AliFemtoKink stuff - * - * Revision 1.11 2001/05/15 15:30:16 rcwells - * Added magnetic field to AliFemtoEvent - * - * Revision 1.10 2000/08/31 22:31:31 laue - * AliFemtoAnalysis: output changed (a little bit less) - * AliFemtoEvent: new version, members for reference mult added - * AliFemtoIOBinary: new IO for new AliFemtoEvent version - * AliFemtoTypes: TTree typedef to AliFemtoTTree added - * AliFemtoVertexAnalysis: overflow and underflow added - * - * Revision 1.9 2000/05/25 21:54:16 laue - * RotateZ implemented. Rotates momentum and helix around the z axis - * - * Revision 1.7 2000/02/18 21:32:23 laue - * franksTrackCut changed. If mCharge is set to '0' there will be no cut - * on charge. This is important for front-loaded cuts. - * - * copy constructor implemented for AliFemtoEvent, AliFemtoTrack and AliFemtoV0. - * - * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h - * removed. We can now (CC5 on Solaris) use the versions (no D) - * - * Revision 1.6 1999/09/16 18:47:59 lisa - * replace placeholder HbtV0Track stuff with Helens AliFemtoV0 classes - * - * Revision 1.5 1999/09/03 22:39:15 lisa - * Readers now MUST have Report() methods and MAY have WriteHbtEvent() methods - * - * Revision 1.4 1999/07/19 14:24:06 hardtke - * modifications to implement uDST - * - * Revision 1.3 1999/07/06 22:33:22 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.2 1999/06/29 17:50:27 fisyak - * formal changes to account new StEvent, does not complie yet - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#ifndef AliFemtoEvent_hh -#define AliFemtoEvent_hh - -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoTrackCollection.h" -#include "Infrastructure/AliFemtoV0Collection.h" -#include "Infrastructure/AliFemtoXiCollection.h" -#include "Infrastructure/AliFemtoKinkCollection.h" - -class AliFemtoTrackCut; -class AliFemtoV0Cut; -class AliFemtoXiCut; -class AliFemtoKinkCut; - - -#ifdef __ROOT__ - -// the following encapsulation by malisa 21apr2006 -#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ -class StMuDst; -#endif - -#endif - -class AliFemtoEvent{ -public: - AliFemtoEvent(); -#ifdef __ROOT__ -#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ -// -#endif -#endif - AliFemtoEvent(const AliFemtoEvent&, AliFemtoTrackCut* =0, AliFemtoV0Cut* =0, AliFemtoXiCut* =0, AliFemtoKinkCut* =0); // copy constructor with track and v0 cuts - ~AliFemtoEvent(); - AliFemtoEvent& operator=(const AliFemtoEvent& aEvent); - - unsigned short EventNumber() const; - int RunNumber() const; - unsigned short NumberOfTracks() const; - AliFemtoThreeVector PrimVertPos() const; - AliFemtoV0Collection* V0Collection() const; - AliFemtoXiCollection* XiCollection() const; - AliFemtoKinkCollection* KinkCollection() const; - AliFemtoTrackCollection* TrackCollection() const; - double MagneticField() const; - - //functions for alice variables - float ZDCN1Energy() const; - float ZDCP1Energy() const; - float ZDCN2Energy() const; - float ZDCP2Energy() const; - float ZDCEMEnergy() const; - unsigned int ZDCParticipants() const; - - unsigned long int TriggerMask() const; - unsigned char TriggerCluster() const; - - void SetEventNumber(const unsigned short&); - void SetRunNumber(const int&); - void SetNumberOfTracks(const unsigned short&); - void SetPrimVertPos(const AliFemtoThreeVector&); - void SetMagneticField(const double&); - - //functions for alice variables - void SetZDCN1Energy(const float&); - void SetZDCP1Energy(const float&); - void SetZDCN2Energy(const float&); - void SetZDCP2Energy(const float&); - void SetZDCEMEnergy(const float&); - void SetZDCParticipants(const unsigned int&); - - void SetTriggerMask(const unsigned long int&); - void SetTriggerCluster(const unsigned char&); - - double UncorrectedNumberOfNegativePrimaries() const; - double UncorrectedNumberOfPrimaries() const; - -private: - unsigned short fEventNumber; // - unsigned short fRunNumber; - unsigned short fNumberOfTracks; // total number of TPC tracks - double fMagneticField; // magnetic field in Z direction - - AliFemtoThreeVector fPrimVertPos; - AliFemtoTrackCollection* fTrackCollection; - AliFemtoV0Collection* fV0Collection; - AliFemtoXiCollection* fXiCollection; - AliFemtoKinkCollection* fKinkCollection; - - //for alice changed by Marek Chojnacki - float fZDCN1Energy; // reconstructed energy in the neutron ZDC - float fZDCP1Energy; // reconstructed energy in the proton ZDC - float fZDCN2Energy; // reconstructed energy in the neutron ZDC - float fZDCP2Energy; // reconstructed energy in the proton ZDC - float fZDCEMEnergy; // reconstructed energy in the electromagnetic ZDC - unsigned int fZDCParticipants; // number of participants estimated by the ZDC - - unsigned long int fTriggerMask; // Trigger Type (mask) - unsigned char fTriggerCluster; // Trigger cluster (mask) -}; - - - -#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.cxx b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.cxx deleted file mode 100644 index e7ec1ecc9cc..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.cxx +++ /dev/null @@ -1,360 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * The Manager is the top-level object that coordinates activities - * and performs event, particle, and pair loops, and checks the - * various Cuts of the Analyses in its AnalysisCollection - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.20 2001/06/21 19:15:46 laue - * Modified fiels: - * CTH.h : new constructor added - * AliFemtoEvent, AliFemtoKink, AliFemtoTrack : constructors from the persistent - * (TTree) classes added - * AliFemtoLikeSignAnalysis : minor changes, for debugging - * AliFemtoTypes: split into different files - * Added files: for the new TTree muDst's - * StExceptions.cxx StExceptions.h AliFemtoEnumeration.h - * AliFemtoHelix.h AliFemtoHisto.h AliFemtoString.h AliFemtoTFile.h - * AliFemtoTTreeEvent.cxx AliFemtoTTreeEvent.h AliFemtoTTreeKink.cxx - * AliFemtoTTreeKink.h AliFemtoTTreeTrack.cxx AliFemtoTTreeTrack.h - * AliFemtoTTreeV0.cxx AliFemtoTTreeV0.h AliFemtoVector.h - * - * Revision 1.19 2000/05/08 15:45:50 laue - * Memory leak fixed. Current hbt event was not deleted - * - * Revision 1.18 2000/03/17 17:23:05 laue - * Roberts new three particle correlations implemented. - * - * Revision 1.16 2000/02/26 19:04:52 laue - * Some unnecessary includes removed. - * StThreeVectorD replace by AliFemtoThreeVector. - * AliFemtoCoulomb modified to compile without Root (ClassDef embraced into - * #ifdef __ROOT__ ..... #endif) - * AliFemtoParticle now returns references (FourMomentum(),Helix(), - * DecayVertexPosiion()) - * - * Revision 1.15 2000/02/18 21:32:24 laue - * franksTrackCut changed. If mCharge is set to '0' there will be no cut - * on charge. This is important for front-loaded cuts. - * - * copy constructor implemented for AliFemtoEvent, AliFemtoTrack and AliFemtoV0. - * - * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h - * removed. We can now (CC5 on Solaris) use the versions (no D) - * - * Revision 1.14 2000/02/13 17:17:12 laue - * Calls to the EventBegin() and EventEnd() functions implemented - * The actual analysis is moved from AliFemtoManager to AliFemtoAnalysis - * - * Revision 1.13 2000/01/25 17:35:17 laue - * I. In order to run the stand alone version of the AliFemtoMaker the following - * changes have been done: - * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements - * b) unnecessary includes of StMaker.h have been removed - * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything - * needed for the stand alone version - * - * II. To reduce the amount of compiler warning - * a) some variables have been type casted - * b) some destructors have been declared as virtual - * - * Revision 1.12 1999/10/15 01:57:29 lisa - * Important enhancement of AliFemtoMaker - implement Franks CutMonitors - * ---------------------------------------------------------- - * This means 3 new files in Infrastructure area (CutMonitor), - * several specific CutMonitor classes in the Cut area - * and a new base class in the Base area (AliFemtoCutMonitor). - * This means also changing all Cut Base class header files from .h to .h - * so we have access to CutMonitor methods from Cint command line. - * This last means - * 1) files which include these header files are slightly modified - * 2) a side benefit: the TrackCuts and V0Cuts no longer need - * a SetMass() implementation in each Cut class, which was stupid. - * Also: - * ----- - * Include Franks AliFemtoAssociationReader - * ** None of these changes should affect any user ** - * - * Revision 1.11 1999/10/04 15:38:57 lisa - * include Franks new accessor methods AliFemtoAnalysis::CorrFctn and AliFemtoManager::Analysis as well as McEnt example macro - * - * Revision 1.10 1999/09/17 22:38:02 lisa - * first full integration of V0s into AliFemto framework - * - * Revision 1.9 1999/09/08 04:15:52 lisa - * persistent microDST implementation tweaked to please fickle solaris details - * - * Revision 1.8 1999/09/05 02:58:11 lisa - * add ASCII microDST reader/writer AND franksParticle cuts - * - * Revision 1.7 1999/09/04 04:41:01 lisa - * AliFemtoEvent IO --and-- AliFemtoEventWriter (microDST) method added to framework - * - * Revision 1.6 1999/09/03 22:39:15 lisa - * Readers now MUST have Report() methods and MAY have WriteHbtEvent() methods - * - * Revision 1.5 1999/07/27 10:47:04 lisa - * now works in dev on linux and solaris - mistake in deleting picoEvents fixed - * - * Revision 1.4 1999/07/26 16:21:26 lisa - * always convert string to char when output - needed on solaris - * - * Revision 1.3 1999/07/22 18:49:10 lisa - * Implement idea of Fabrice to not create and delete AliFemtoPair all the time - * - * Revision 1.2 1999/07/06 22:33:22 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#include "Infrastructure/AliFemtoManager.h" -//#include "Infrastructure/AliFemtoParticleCollection.h" -//#include "Base/AliFemtoTrackCut.h" -//#include "Base/AliFemtoV0Cut.h" -#include - -#ifdef __ROOT__ -ClassImp(AliFemtoManager) -#endif - - - -//____________________________ -AliFemtoManager::AliFemtoManager(): - fAnalysisCollection(0), - fEventReader(0), - fEventWriterCollection(0) -{ - fAnalysisCollection = new AliFemtoAnalysisCollection; - fEventWriterCollection = new AliFemtoEventWriterCollection; - fEventReader = 0; -} -//____________________________ -AliFemtoManager::AliFemtoManager(const AliFemtoManager& aManager) : - fAnalysisCollection(0), - fEventReader(0), - fEventWriterCollection(0) -{ - fEventReader = aManager.fEventReader; - AliFemtoAnalysisIterator AnalysisIter; - fAnalysisCollection = new AliFemtoAnalysisCollection; - for (AnalysisIter=aManager.fAnalysisCollection->begin();AnalysisIter!=aManager.fAnalysisCollection->end();AnalysisIter++){ - fAnalysisCollection->push_back(*AnalysisIter); - } - AliFemtoEventWriterIterator EventWriterIter; - fEventWriterCollection = new AliFemtoEventWriterCollection; - for (EventWriterIter=aManager.fEventWriterCollection->begin();EventWriterIter!=aManager.fEventWriterCollection->end();EventWriterIter++){ - fEventWriterCollection->push_back(*EventWriterIter); - } -} - -//____________________________ -AliFemtoManager::~AliFemtoManager(){ - delete fEventReader; - // now delete each Analysis in the Collection, and then the Collection itself - AliFemtoAnalysisIterator AnalysisIter; - for (AnalysisIter=fAnalysisCollection->begin();AnalysisIter!=fAnalysisCollection->end();AnalysisIter++){ - delete *AnalysisIter; - *AnalysisIter = 0; - } - delete fAnalysisCollection; - // now delete each EventWriter in the Collection, and then the Collection itself - AliFemtoEventWriterIterator EventWriterIter; - for (EventWriterIter=fEventWriterCollection->begin();EventWriterIter!=fEventWriterCollection->end();EventWriterIter++){ - delete *EventWriterIter; - *EventWriterIter = 0; - } - delete fEventWriterCollection; -} -//____________________________ -AliFemtoManager& AliFemtoManager::operator=(const AliFemtoManager& aManager) -{ - if (this == &aManager) - return *this; - - fEventReader = aManager.fEventReader; - AliFemtoAnalysisIterator AnalysisIter; - if (fAnalysisCollection) { - for (AnalysisIter=fAnalysisCollection->begin();AnalysisIter!=fAnalysisCollection->end();AnalysisIter++){ - delete *AnalysisIter; - *AnalysisIter = 0; - } - delete fAnalysisCollection; - } - // now delete each EventWriter in the Collection, and then the Collection itself - AliFemtoEventWriterIterator EventWriterIter; - if (fEventWriterCollection) { - for (EventWriterIter=fEventWriterCollection->begin();EventWriterIter!=fEventWriterCollection->end();EventWriterIter++){ - delete *EventWriterIter; - *EventWriterIter = 0; - } - delete fEventWriterCollection; - } - - fAnalysisCollection = new AliFemtoAnalysisCollection; - for (AnalysisIter=aManager.fAnalysisCollection->begin();AnalysisIter!=aManager.fAnalysisCollection->end();AnalysisIter++){ - fAnalysisCollection->push_back(*AnalysisIter); - } - - fEventWriterCollection = new AliFemtoEventWriterCollection; - for (EventWriterIter=aManager.fEventWriterCollection->begin();EventWriterIter!=aManager.fEventWriterCollection->end();EventWriterIter++){ - fEventWriterCollection->push_back(*EventWriterIter); - } - return *this; -} - -//____________________________ -int AliFemtoManager::Init(){ - AliFemtoString readerMessage; - readerMessage += "*** *** *** *** *** *** *** *** *** *** *** *** \n"; - // EventReader - if (fEventReader) { - if (fEventReader->Init("r",readerMessage)){ - cout << " AliFemtoManager::Init() - Reader initialization failed " << endl; - return (1); - } - readerMessage += fEventReader->Report(); - } - // EventWriters - AliFemtoEventWriterIterator EventWriterIter; - for (EventWriterIter=fEventWriterCollection->begin();EventWriterIter!=fEventWriterCollection->end();EventWriterIter++){ - //cout << "*EventWriterIter " << *EventWriterIter << endl; - // The message (AliFemtoString) passed into Init will be at the file header. - // for that reason take the readerReport, add my own report and pass as message - AliFemtoString writerMessage = readerMessage; - writerMessage += "*** *** *** *** *** *** *** *** *** *** *** *** \n"; - writerMessage += (*EventWriterIter)->Report(); - if (*EventWriterIter) { - if ( (*EventWriterIter)->Init("w",writerMessage)){ // yes, the message from the reader is passed into the writer - cout << " AliFemtoManager::Init() - Writer initialization failed " << endl; - return (1); - } - } - } - - - return (0); -} -//____________________________ -void AliFemtoManager::Finish(){ - // EventReader - if (fEventReader) fEventReader->Finish(); - // EventWriters - AliFemtoEventWriterIterator EventWriterIter; - AliFemtoEventWriter* currentEventWriter; - for (EventWriterIter=fEventWriterCollection->begin();EventWriterIter!=fEventWriterCollection->end();EventWriterIter++){ - currentEventWriter = *EventWriterIter; - currentEventWriter->Finish(); - } - // Analyses - AliFemtoAnalysisIterator AnalysisIter; - AliFemtoBaseAnalysis* currentAnalysis; - for (AnalysisIter=fAnalysisCollection->begin();AnalysisIter!=fAnalysisCollection->end();AnalysisIter++){ - currentAnalysis = *AnalysisIter; - currentAnalysis->Finish(); - } -} -//____________________________ -AliFemtoString AliFemtoManager::Report(){ - string stemp; - char ctemp[100]; - // EventReader - stemp = fEventReader->Report(); - // EventWriters - sprintf(ctemp,"\nAliFemtoManager Reporting %u EventWriters\n",(unsigned int) fEventWriterCollection->size()); - stemp += ctemp; - AliFemtoEventWriterIterator EventWriterIter; - AliFemtoEventWriter* currentEventWriter; - for (EventWriterIter=fEventWriterCollection->begin();EventWriterIter!=fEventWriterCollection->end();EventWriterIter++){ - cout << "AliFemtoManager - asking for EventWriter Report" << endl; - currentEventWriter = *EventWriterIter; - stemp+=currentEventWriter->Report(); - } - // Analyses - sprintf(ctemp,"\nAliFemtoManager Reporting %u Analyses\n",(unsigned int) fAnalysisCollection->size()); - stemp += ctemp; - AliFemtoAnalysisIterator AnalysisIter; - AliFemtoBaseAnalysis* currentAnalysis; - for (AnalysisIter=fAnalysisCollection->begin();AnalysisIter!=fAnalysisCollection->end();AnalysisIter++){ - cout << "AliFemtoManager - asking for Analysis Report" << endl; - currentAnalysis = *AnalysisIter; - stemp+=currentAnalysis->Report(); - } - - AliFemtoString returnThis = stemp; - return returnThis; -} -//____________________________ -AliFemtoBaseAnalysis* AliFemtoManager::Analysis( int n ){ // return pointer to n-th analysis - if ( n<0 || n > (int) fAnalysisCollection->size() ) - return NULL; - AliFemtoAnalysisIterator iter = fAnalysisCollection->begin(); - for (int i=0; i (int) fEventWriterCollection->size() ) - return NULL; - AliFemtoEventWriterIterator iter = fEventWriterCollection->begin(); - for (int i=0; iReturnHbtEvent(); - cout << "Event reader has returned control to manager" << endl; - - // if no HbtEvent is returned, then we abort processing. - // the question is now: do we try again next time (i.e. there may be an HbtEvent next time) - // or are we at EOF or something? If Reader says Status=0, then that means try again later. - // so, we just return the Reader's Status. - if (!currentHbtEvent){ - cout << "AliFemtoManager::ProcessEvent() - Reader::ReturnHbtEvent() has returned null pointer\n"; - return fEventReader->Status(); - } - - // loop over all the EventWriters - AliFemtoEventWriterIterator EventWriterIter; - for (EventWriterIter=fEventWriterCollection->begin();EventWriterIter!=fEventWriterCollection->end();EventWriterIter++){ -#ifdef STHBRDEBUG - cout << " *EventWriterIter " << *EventWriterIter << endl; -#endif - (*EventWriterIter)->WriteHbtEvent(currentHbtEvent); - } - - // loop over all the Analysis - AliFemtoAnalysisIterator AnalysisIter; - for (AnalysisIter=fAnalysisCollection->begin();AnalysisIter!=fAnalysisCollection->end();AnalysisIter++){ - (*AnalysisIter)->ProcessEvent(currentHbtEvent); - } - - if (currentHbtEvent) delete currentHbtEvent; -#ifdef STHBRDEBUG - cout << "AliFemtoManager::ProcessEvent() - return to caller ... " << endl; -#endif - return 0; // 0 = "good return" -} // ProcessEvent diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.h deleted file mode 100644 index d0e22fa068a..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoManager.h +++ /dev/null @@ -1,131 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * The Manager is the top-level object that coordinates activities - * and performs event, particle, and pair loops, and checks the - * various Cuts of the Analyses in its AnalysisCollection - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.10 2000/03/17 17:23:05 laue - * Roberts new three particle correlations implemented. - * - * Revision 1.9 2000/02/18 21:32:24 laue - * franksTrackCut changed. If mCharge is set to '0' there will be no cut - * on charge. This is important for front-loaded cuts. - * - * copy constructor implemented for AliFemtoEvent, AliFemtoTrack and AliFemtoV0. - * - * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h - * removed. We can now (CC5 on Solaris) use the versions (no D) - * - * Revision 1.8 2000/01/25 17:35:17 laue - * I. In order to run the stand alone version of the AliFemtoMaker the following - * changes have been done: - * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements - * b) unnecessary includes of StMaker.h have been removed - * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything - * needed for the stand alone version - * - * II. To reduce the amount of compiler warning - * a) some variables have been type casted - * b) some destructors have been declared as virtual - * - * Revision 1.7 1999/10/04 15:38:58 lisa - * include Franks new accessor methods AliFemtoAnalysis::CorrFctn and AliFemtoManager::Analysis as well as McEvent example macro - * - * Revision 1.6 1999/09/24 01:23:12 fisyak - * Reduced Include Path - * - * Revision 1.5 1999/09/08 04:15:52 lisa - * persistent microDST implementation tweaked to please fickle solaris details - * - * Revision 1.4 1999/09/05 02:58:12 lisa - * add ASCII microDST reader/writer AND franksParticle cuts - * - * Revision 1.3 1999/09/04 04:41:02 lisa - * AliFemtoEvent IO --and-- AliFemtoEventWriter (microDST) method added to framework - * - * Revision 1.2 1999/07/06 22:33:22 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#ifndef AliFemtoManager_hh -#define AliFemtoManager_hh - - -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoAnalysisCollection.h" -#include "Infrastructure/AliFemtoEventWriterCollection.h" -#include "Infrastructure/AliFemtoEvent.h" -#include "Base/AliFemtoBaseAnalysis.h" -#include "Base/AliFemtoEventReader.h" -#include "Base/AliFemtoEventWriter.h" - -class AliFemtoManager{ - -private: - AliFemtoAnalysisCollection* fAnalysisCollection; - AliFemtoEventReader* fEventReader; - AliFemtoEventWriterCollection* fEventWriterCollection; - -public: - AliFemtoManager(); - AliFemtoManager(const AliFemtoManager& aManager); - virtual ~AliFemtoManager(); - - AliFemtoManager& operator=(const AliFemtoManager& aManager); - - // Gets and Sets... - AliFemtoAnalysisCollection* AnalysisCollection(); - AliFemtoBaseAnalysis* Analysis(int n); // Access to Analysis within Collection - void AddAnalysis(AliFemtoBaseAnalysis*); - - AliFemtoEventWriterCollection* EventWriterCollection(); - AliFemtoEventWriter* EventWriter(int n);// Access to EventWriter within Collection - void SetEventWriter(AliFemtoEventWriter*); // just for historic reasons - void AddEventWriter(AliFemtoEventWriter*); - - AliFemtoEventReader* EventReader(); - void SetEventReader(AliFemtoEventReader*); - - - int Init(); - int ProcessEvent(); // a "0" return value means success - otherwise quit - void Finish(); - - AliFemtoString Report(); //! -#ifdef __ROOT__ - ClassDef(AliFemtoManager, 0) -#endif -}; - -inline AliFemtoAnalysisCollection* AliFemtoManager::AnalysisCollection(){return fAnalysisCollection;} -inline void AliFemtoManager::AddAnalysis(AliFemtoBaseAnalysis* anal){fAnalysisCollection->push_back(anal);} - -inline AliFemtoEventWriterCollection* AliFemtoManager::EventWriterCollection(){return fEventWriterCollection;} -inline void AliFemtoManager::AddEventWriter(AliFemtoEventWriter* writer){fEventWriterCollection->push_back(writer);} -inline void AliFemtoManager::SetEventWriter(AliFemtoEventWriter* writer){fEventWriterCollection->push_back(writer);} - -inline AliFemtoEventReader* AliFemtoManager::EventReader(){return fEventReader;} -inline void AliFemtoManager::SetEventReader(AliFemtoEventReader* reader){fEventReader = reader;} - - -#endif - diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.h deleted file mode 100644 index ea2b331ab04..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoPair.h +++ /dev/null @@ -1,516 +0,0 @@ -/*************************************************************************** - * - * $Id: AliFemtoPair.h,v 1.17 - * - * Author: Brian Laziuk, Yale University - * slightly modified by Mike Lisa - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * the Pair object is passed to the PairCuts for verification, and - * then to the AddRealPair and AddMixedPair methods of the - * Correlation Functions - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.19 2003/01/14 09:44:00 renault - * corrections on average separation calculation for tracks which doesn't cross - * all 45 padrows. - * - * Revision 1.18 2002/11/19 23:33:18 renault - * Enable average separation calculation for all combinaisons of - * V0 daughters and tracks - * - * Revision 1.16 2002/02/28 14:18:36 rcwells - * Added emissionAngle function to AliFemtoPair - * - * Revision 1.15 2001/12/14 23:11:30 fretiere - * Add class HitMergingCut. Add class fabricesPairCut = HitMerginCut + pair purity cuts. Add TpcLocalTransform function which convert to local tpc coord (not pretty). Modify AliFemtoTrack, AliFemtoParticle, AliFemtoHiddenInfo, AliFemtoPair to handle the hit information and cope with my code - * - * Revision 1.14 2001/04/03 21:04:36 kisiel - * - * - * Changes needed to make the Theoretical code - * work. The main code is the ThCorrFctn directory. - * The most visible change is the addition of the - * HiddenInfo to AliFemtoPair. - * - * Revision 1.13 2001/03/28 22:35:23 flierl - * changes and bugfixes in qYKP* - * add pairrapidity - * - * Revision 1.12 2001/01/22 22:56:40 laue - * Yano-Koonin-Podgoretskii Parametrisation added - * - * Revision 1.11 2000/10/26 16:09:16 lisa - * Added OpeningAngle PairCut class and method to AliFemtoPair - * - * Revision 1.10 2000/10/05 23:09:05 lisa - * Added kT-dependent radii to mixed-event simulator AND implemented AverageSeparation Cut and CorrFctn - * - * Revision 1.9 2000/07/17 20:03:17 lisa - * Implemented tools for addressing and assessing trackmerging - * - * Revision 1.8 2000/04/04 16:13:09 lisa - * AliFemtoPair:quality() now returns normalized value (and so is double) and add a CorrFctn which looks at quality() - * - * Revision 1.7 2000/04/03 22:09:12 rcwells - * Add member function ... quality(). - * - * Revision 1.6 2000/02/13 21:13:34 lisa - * changed ambiguous AliFemtoPair::fourMomentum() to fourMomentumSum() and fourMomentumDiff() and fixed related bug in QvecCorrFctn - * - * Revision 1.5 2000/01/25 17:35:17 laue - * I. In order to run the stand alone version of the AliFemtoMaker the following - * changes have been done: - * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements - * b) unnecessary includes of StMaker.h have been removed - * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything - * needed for the stand alone version - * - * II. To reduce the amount of compiler warning - * a) some variables have been type casted - * b) some destructors have been declared as virtual - * - * Revision 1.4 1999/07/29 16:16:34 lisa - * Selemons upgrade of AliFemtoPair class - * - * Revision 1.3 1999/07/22 18:49:10 lisa - * Implement idea of Fabrice to not create and delete AliFemtoPair all the time - * - * Revision 1.2 1999/07/06 22:33:22 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#ifndef ST_HBT_PAIR_HH -#define ST_HBT_PAIR_HH - -#include - -#include "Infrastructure/AliFemtoParticle.h" -#include "Infrastructure/AliFemtoTypes.h" - -class AliFemtoPair { -public: - AliFemtoPair(); - AliFemtoPair(const AliFemtoPair& aPair); - AliFemtoPair(AliFemtoParticle*, AliFemtoParticle*); - ~AliFemtoPair(); - AliFemtoPair& operator=(const AliFemtoPair& aPair); - - // track Gets: - AliFemtoParticle* track1() const; - AliFemtoParticle* track2() const; - // track Sets: - void SetTrack1(const AliFemtoParticle* trkPtr); - void SetTrack2(const AliFemtoParticle* trkPtr); - - AliFemtoLorentzVector fourMomentumDiff() const; - AliFemtoLorentzVector fourMomentumSum() const; - double qInv() const; - double kT() const; - double mInv() const; - // pair rapidity - double rap() const; - double emissionAngle() const; - - // Bertsch-Pratt momentum components in Pair Frame - written by Bekele/Humanic - double qSidePf() const; - double qOutPf() const; - double qLongPf() const; - - // Bertsch-Pratt momentum components in Local CMS (longitudinally comoving) frame - // - written by Bekele/Humanic - double qSideCMS() const; - double qOutCMS() const; - double qLongCMS() const; - - double dKSide() const; - double dKOut() const; - double dKLong() const; - - // Bertsch-Pratt momentum components in a longitudinally boosted frame - // the argument is the beta of the longitudinal boost (default is 0.0, meaning lab frame) - // - written by Bekele/Humanic - double qSideBf(double beta=0.0) const; - double qOutBf(double beta=0.0) const; - double qLongBf(double beta=0.0) const; - - // Yano-Koonin-Podgoretskii Parametrisation - // source rest frame (usually lab frame) - void qYKPCMS(double& qP, double& qT, double& q0) const ; - // longitudinal comoving frame - void qYKPLCMS(double& qP, double& qT, double& q0) const ; - // pair rest frame - void qYKPPF(double& qP, double& qT, double& q0) const ; - - - double quality() const; - - // the following two methods calculate the "nominal" separation of the tracks - // at the inner field cage (EntranceSeparation) and when they exit the TPC, - // which may be at the outer field cage, or at the endcaps. - // "nominal" means that the tracks are assumed to start at (0,0,0). Making this - // assumption is important for the Event Mixing-- it is not a mistake. - MALisa - double NominalTpcExitSeparation() const; - double NominalTpcEntranceSeparation() const; - double NominalTpcAverageSeparation() const; - // adapted calculation of Entrance/Exit/Average Tpc separation to V0 daughters - double TpcExitSeparationTrackV0Pos() const; - double TpcEntranceSeparationTrackV0Pos() const; - double TpcAverageSeparationTrackV0Pos() const; - - double TpcExitSeparationTrackV0Neg() const; - double TpcEntranceSeparationTrackV0Neg() const; - double TpcAverageSeparationTrackV0Neg() const; - - double TpcExitSeparationV0PosV0Pos() const; - double TpcEntranceSeparationV0PosV0Pos() const; - double TpcAverageSeparationV0PosV0Pos() const; - - double TpcExitSeparationV0PosV0Neg() const; - double TpcEntranceSeparationV0PosV0Neg() const; - double TpcAverageSeparationV0PosV0Neg() const; - - double TpcExitSeparationV0NegV0Pos() const; - double TpcEntranceSeparationV0NegV0Pos() const; - double TpcAverageSeparationV0NegV0Pos() const; - - double TpcExitSeparationV0NegV0Neg() const; - double TpcEntranceSeparationV0NegV0Neg() const; - double TpcAverageSeparationV0NegV0Neg() const; - - double pInv() const; - double KStar() const; - double KStarFlipped() const; - double CVK() const; - double CVKFlipped() const; - double qInvFlippedXY() const; - - double OpeningAngle() const; - - // Fabrice Private <<< - double KStarSide() const; - double KStarOut() const; - double KStarLong() const; - - float PionPairProbability() const; - float ElectronPairProbability() const; - float KaonPairProbability() const; - float ProtonPairProbability() const; - float KaonPionPairProbability() const; - - double dcaInsideTpc() const; - double quality2() const; - - /* double KStarGlobal() const; - double CVKGlobal() const; - double KStarSideGlobal() const; - double KStarOutGlobal() const; - double KStarLongGlobal() const;*/ - - void setMergingPar(double aMaxDuInner, double aMaxDzInner, - double aMaxDuOuter, double aMaxDzOuter); - void setDefaultHalfFieldMergingPar(); - void setDefaultFullFieldMergingPar(); - double getFracOfMergedRow() const; - double getClosestRowAtDCA() const; - double getWeightedAvSep() const; - // >>> - double getFracOfMergedRowTrkV0Pos() const; - double getClosestRowAtDCATrkV0Pos() const; - - double getFracOfMergedRowTrkV0Neg() const; - double getClosestRowAtDCATrkV0Neg() const; - - double getFracOfMergedRowV0PosV0Neg() const; - double getFracOfMergedRowV0NegV0Pos() const; - double getFracOfMergedRowV0PosV0Pos() const; - double getFracOfMergedRowV0NegV0Neg() const; - -private: - AliFemtoParticle* fTrack1; - AliFemtoParticle* fTrack2; - - mutable short fNonIdParNotCalculated; - mutable double fDKSide; - mutable double fDKOut; - mutable double fDKLong; - mutable double fCVK; - mutable double kStarCalc; - void calcNonIdPar() const; - - mutable short fNonIdParNotCalculatedGlobal; - /* mutable double fDKSideGlobal; - mutable double fDKOutGlobal; - mutable double fDKLongGlobal; - mutable double kStarCalcGlobal; - mutable double fCVKGlobal;*/ - //void calcNonIdParGlobal() const; - - mutable short fMergingParNotCalculated; - mutable double fWeightedAvSep; - mutable double fFracOfMergedRow; - mutable double fClosestRowAtDCA; - - mutable short fMergingParNotCalculatedTrkV0Pos; - mutable double fFracOfMergedRowTrkV0Pos; - mutable double fClosestRowAtDCATrkV0Pos; - - mutable short fMergingParNotCalculatedTrkV0Neg; - mutable double fFracOfMergedRowTrkV0Neg; - mutable double fClosestRowAtDCATrkV0Neg; - - mutable short fMergingParNotCalculatedV0PosV0Neg; - mutable double fFracOfMergedRowV0PosV0Neg; - mutable double fClosestRowAtDCAV0PosV0Neg; - - mutable short fMergingParNotCalculatedV0NegV0Pos; - mutable double fFracOfMergedRowV0NegV0Pos; - mutable double fClosestRowAtDCAV0NegV0Pos; - - mutable short fMergingParNotCalculatedV0PosV0Pos; - mutable double fFracOfMergedRowV0PosV0Pos; - mutable double fClosestRowAtDCAV0PosV0Pos; - - mutable short fMergingParNotCalculatedV0NegV0Neg; - mutable double fFracOfMergedRowV0NegV0Neg; - mutable double fClosestRowAtDCAV0NegV0Neg; - - static double fMaxDuInner; - static double fMaxDzInner; - static double fMaxDuOuter; - static double fMaxDzOuter; - void calcMergingPar() const; - - void CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn, - float* tmpZ1,float* tmpU1, - float* tmpZ2,float* tmpU2, - int *tmpSect1,int *tmpSect2, - double* tmpFracOfMergedRow, - double* tmpClosestRowAtDCA - ) const; - - void resetParCalculated(); -}; - -inline void AliFemtoPair::resetParCalculated(){ - fNonIdParNotCalculated=1; - fNonIdParNotCalculatedGlobal=1; - fMergingParNotCalculated=1; - fMergingParNotCalculatedTrkV0Pos=1; - fMergingParNotCalculatedTrkV0Neg=1; - fMergingParNotCalculatedV0PosV0Pos=1; - fMergingParNotCalculatedV0NegV0Pos=1; - fMergingParNotCalculatedV0PosV0Neg=1; - fMergingParNotCalculatedV0NegV0Neg=1; -} - -inline void AliFemtoPair::SetTrack1(const AliFemtoParticle* trkPtr){ - fTrack1=(AliFemtoParticle*)trkPtr; - resetParCalculated(); -} -inline void AliFemtoPair::SetTrack2(const AliFemtoParticle* trkPtr){ - fTrack2=(AliFemtoParticle*)trkPtr; - resetParCalculated(); -} - -inline AliFemtoParticle* AliFemtoPair::track1() const {return fTrack1;} -inline AliFemtoParticle* AliFemtoPair::track2() const {return fTrack2;} - -inline double AliFemtoPair::dKSide() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fDKSide; -} -inline double AliFemtoPair::dKOut() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fDKOut; -} -inline double AliFemtoPair::dKLong() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fDKLong; -} -inline double AliFemtoPair::KStar() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return kStarCalc; -} -inline double AliFemtoPair::qInv() const { - AliFemtoLorentzVector tDiff = (fTrack1->FourMomentum()-fTrack2->FourMomentum()); - return ( -1.* tDiff.m()); -} - -// Fabrice private <<< -inline double AliFemtoPair::KStarSide() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fDKSide;//mKStarSide; -} -inline double AliFemtoPair::KStarOut() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fDKOut;//mKStarOut; -} -inline double AliFemtoPair::KStarLong() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fDKLong;//mKStarLong; -} -inline double AliFemtoPair::CVK() const{ - if(fNonIdParNotCalculated) calcNonIdPar(); - return fCVK; -} - -/*inline double AliFemtoPair::KStarGlobal() const{ - if(fNonIdParNotCalculatedGlobal) calcNonIdParGlobal(); - return kStarCalcGlobal; -} -inline double AliFemtoPair::KStarSideGlobal() const{ - if(fNonIdParNotCalculatedGlobal) calcNonIdParGlobal(); - return fDKSideGlobal;//mKStarSide; -} -inline double AliFemtoPair::KStarOutGlobal() const{ - if(fNonIdParNotCalculatedGlobal) calcNonIdParGlobal(); - return fDKOutGlobal;//mKStarOut; -} -inline double AliFemtoPair::KStarLongGlobal() const{ - if(fNonIdParNotCalculatedGlobal) calcNonIdParGlobal(); - return fDKLongGlobal;//mKStarLong; -} -inline double AliFemtoPair::CVKGlobal() const{ - if(fNonIdParNotCalculatedGlobal) calcNonIdParGlobal(); - return fCVKGlobal; -}*/ - - -inline float AliFemtoPair::PionPairProbability() const{ - return (fTrack1->Track()->PidProbPion()) * - (fTrack2->Track()->PidProbPion()); -} -inline float AliFemtoPair::ElectronPairProbability() const{ - return (fTrack1->Track()->PidProbElectron()) * - (fTrack2->Track()->PidProbElectron()); -} -inline float AliFemtoPair::KaonPairProbability() const{ - return (fTrack1->Track()->PidProbKaon()) * - (fTrack2->Track()->PidProbKaon()); -} -inline float AliFemtoPair::ProtonPairProbability() const{ - return (fTrack1->Track()->PidProbProton()) * - (fTrack2->Track()->PidProbProton()); -} -inline float AliFemtoPair::KaonPionPairProbability() const{ - return (fTrack1->Track()->PidProbKaon()) * - (fTrack2->Track()->PidProbPion()); -} - -inline double AliFemtoPair::getFracOfMergedRow() const{ - if(fMergingParNotCalculated) calcMergingPar(); - return fFracOfMergedRow; -} -inline double AliFemtoPair::getClosestRowAtDCA() const { - if(fMergingParNotCalculated) calcMergingPar(); - return fClosestRowAtDCA; -} -inline double AliFemtoPair::getWeightedAvSep() const { - if(fMergingParNotCalculated) calcMergingPar(); - return fWeightedAvSep; -} - - -inline double AliFemtoPair::getFracOfMergedRowTrkV0Pos() const{ - if(fMergingParNotCalculatedTrkV0Pos) - CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos, - &(fTrack1->fZ[0]),&(fTrack1->fU[0]), - &(fTrack2->fZ[0]),&(fTrack2->fU[0]), - &(fTrack1->fSect[0]),&(fTrack2->fSect[0]), - &(fFracOfMergedRowTrkV0Pos),&(fClosestRowAtDCATrkV0Pos) - ); - return fFracOfMergedRowTrkV0Pos; -} -inline double AliFemtoPair::getClosestRowAtDCATrkV0Pos() const{ - if(fMergingParNotCalculatedTrkV0Pos) - CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Pos, - &(fTrack1->fZ[0]),&(fTrack1->fU[0]), - &(fTrack2->fZ[0]),&(fTrack2->fU[0]), - &(fTrack1->fSect[0]),&(fTrack2->fSect[0]), - &fFracOfMergedRowTrkV0Pos,&fClosestRowAtDCATrkV0Pos - ); - return fClosestRowAtDCATrkV0Pos; -} -inline double AliFemtoPair::getFracOfMergedRowTrkV0Neg() const{ - if(fMergingParNotCalculatedTrkV0Neg) - CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg, - &(fTrack1->fZ[0]),&(fTrack1->fU[0]), - &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), - &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), - &(fFracOfMergedRowTrkV0Neg),&(fClosestRowAtDCATrkV0Neg) - ); - return fFracOfMergedRowTrkV0Neg; -} -inline double AliFemtoPair::getClosestRowAtDCATrkV0Neg() const{ - if(fMergingParNotCalculatedTrkV0Neg) - CalcMergingParFctn(&fMergingParNotCalculatedTrkV0Neg, - &(fTrack1->fZ[0]),&(fTrack1->fU[0]), - &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), - &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), - &fFracOfMergedRowTrkV0Neg,&fClosestRowAtDCATrkV0Neg - ); - return fClosestRowAtDCATrkV0Neg; -} -inline double AliFemtoPair::getFracOfMergedRowV0PosV0Neg() const{ - if(fMergingParNotCalculatedV0PosV0Neg) - CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Neg, - &(fTrack1->fZ[0]),&(fTrack1->fU[0]), - &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), - &(fTrack1->fSect[0]),&(fTrack2->fV0NegSect[0]), - &(fFracOfMergedRowV0PosV0Neg), - &(fClosestRowAtDCAV0PosV0Neg) - ); - return fFracOfMergedRowV0PosV0Neg; -} -inline double AliFemtoPair::getFracOfMergedRowV0NegV0Pos() const{ - if(fMergingParNotCalculatedV0NegV0Pos) - CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Pos, - &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]), - &(fTrack2->fZ[0]),&(fTrack2->fU[0]), - &(fTrack1->fV0NegSect[0]), - &(fTrack2->fSect[0]), - &(fFracOfMergedRowV0NegV0Pos), - &(fClosestRowAtDCAV0NegV0Pos) - ); - return fFracOfMergedRowV0NegV0Pos; -} -inline double AliFemtoPair::getFracOfMergedRowV0PosV0Pos() const{ - if(fMergingParNotCalculatedV0PosV0Pos) - CalcMergingParFctn(&fMergingParNotCalculatedV0PosV0Pos, - &(fTrack1->fZ[0]),&(fTrack1->fU[0]), - &(fTrack2->fZ[0]),&(fTrack2->fU[0]), - &(fTrack1->fSect[0]), - &(fTrack2->fSect[0]), - &(fFracOfMergedRowV0PosV0Pos), - &(fClosestRowAtDCAV0PosV0Pos) - ); - return fFracOfMergedRowV0PosV0Pos; -} -inline double AliFemtoPair::getFracOfMergedRowV0NegV0Neg() const{ - if(fMergingParNotCalculatedV0NegV0Neg) - CalcMergingParFctn(&fMergingParNotCalculatedV0NegV0Neg, - &(fTrack1->fV0NegZ[0]),&(fTrack1->fV0NegU[0]), - &(fTrack2->fV0NegZ[0]),&(fTrack2->fV0NegU[0]), - &(fTrack1->fV0NegSect[0]), - &(fTrack2->fV0NegSect[0]), - &(fFracOfMergedRowV0NegV0Neg), - &(fClosestRowAtDCAV0NegV0Neg) - ); - return fFracOfMergedRowV0NegV0Neg; -} - -#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.h deleted file mode 100644 index dda50266c60..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoParticle.h +++ /dev/null @@ -1,252 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu - *************************************************************************** - * - * Description: part of STAR HBT Framework: AliFemtoMaker package - * Particle objects are part of the PicoEvent, which is what is - * stored in the EventMixingBuffers - * A Track object gets converted to a Particle object if it - * passes the ParticleCut of an Analysis - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.2 2007-04-03 16:00:08 mchojnacki - * Changes to iprove memory managing - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.19 2003/01/14 09:41:16 renault - * changes on average separation calculation, hit shared finder and memory optimisation - * for Z,U and Sectors variables. - * - * Revision 1.18 2002/12/12 17:01:50 kisiel - * Hidden Information handling and purity calculation - * - * Revision 1.17 2002/11/19 23:35:52 renault - * Enable calculation of exit/entrance separation for V0 daughters - * - * Revision 1.16 2001/12/14 23:11:30 fretiere - * Add class HitMergingCut. Add class fabricesPairCut = HitMerginCut + pair purity cuts. Add TpcLocalTransform function which convert to local tpc coord (not pretty). Modify AliFemtoTrack, AliFemtoParticle, AliFemtoHiddenInfo, AliFemtoPair to handle the hit information and cope with my code - * - * Revision 1.15 2001/05/25 23:23:59 lisa - * Added in AliFemtoKink stuff - * - * Revision 1.14 2001/05/23 00:19:05 lisa - * Add in Smearing classes and methods needed for momentum resolution studies and correction - * - * Revision 1.13 2001/04/03 21:04:36 kisiel - * - * - * Changes needed to make the Theoretical code - * work. The main code is the ThCorrFctn directory. - * The most visible change is the addition of the - * HiddenInfo to AliFemtoPair. - * - * Revision 1.12 2000/10/05 23:09:05 lisa - * Added kT-dependent radii to mixed-event simulator AND implemented AverageSeparation Cut and CorrFctn - * - * Revision 1.11 2000/07/17 20:03:17 lisa - * Implemented tools for addressing and assessing trackmerging - * - * Revision 1.10 2000/07/16 21:38:23 laue - * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version - * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings - * AliFemtoParticle.cc AliFemtoParticle.h : pointers fTrack,fV0 initialized to 0 - * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG - * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better - * solution - * - * Revision 1.9 2000/05/03 17:44:43 laue - * AliFemtoEvent, AliFemtoTrack & AliFemtoV0 declared friend to AliFemtoIOBinary - * AliFemtoParticle updated for V0 pos,neg track Id - * - * Revision 1.8 2000/04/03 16:21:51 laue - * some include files changed - * Multi track cut added - * - * Revision 1.6 2000/02/26 19:04:52 laue - * Some unnecessary includes removed. - * StThreeVectorD replace by AliFemtoThreeVector. - * AliFemtoCoulomb modified to compile without Root (ClassDef embraced into - * #ifdef __ROOT__ ..... #endif) - * AliFemtoParticle now returns references (FourMomentum(),Helix(), - * DecayVertexPosiion()) - * - * Revision 1.5 1999/12/11 15:58:29 lisa - * Add vertex decay position datum and accessor to AliFemtoParticle to allow pairwise cuts on seperation of V0s - * - * Revision 1.4 1999/09/17 22:38:02 lisa - * first full integration of V0s into AliFemto framework - * - * Revision 1.3 1999/09/01 19:04:54 lisa - * update Particle class AND add parity cf and Randys Coulomb correction - * - * Revision 1.2 1999/07/06 22:33:23 lisa - * Adjusted all to work in pro and new - dev itself is broken - * - * Revision 1.1.1.1 1999/06/29 16:02:57 lisa - * Installation of AliFemtoMaker - * - **************************************************************************/ - -#ifndef AliFemtoParticle_hh -#define AliFemtoParticle_hh - -//#include "math.h" -#include "Infrastructure/AliFemtoTypes.h" -#include "Infrastructure/AliFemtoTrack.h" -#include "Infrastructure/AliFemtoV0.h" -#include "Infrastructure/AliFemtoKink.h" -#include "Infrastructure/AliFemtoXi.h" -#include "AliFmPhysicalHelixD.h" -// *** -class AliFemtoHiddenInfo; -// *** -class AliFemtoParticle{ -public: - AliFemtoParticle(); - AliFemtoParticle(const AliFemtoParticle& aParticle); - AliFemtoParticle(const AliFemtoTrack* const hbtTrack, const double& mass); - AliFemtoParticle(const AliFemtoV0* const hbtV0, const double& mass); - AliFemtoParticle(const AliFemtoKink* const hbtKink, const double& mass); - AliFemtoParticle(const AliFemtoXi* const hbtXi, const double& mass); - ~AliFemtoParticle(); - - AliFemtoParticle& operator=(const AliFemtoParticle& aParticle); - - const AliFemtoLorentzVector& FourMomentum() const; - - AliFmPhysicalHelixD& Helix(); - - const AliFemtoThreeVector DecayVertexPosition() const; - unsigned long TopologyMap(const int word) const; - int NumberOfHits() const; - - unsigned long TrackId() const; // only for particles from tracks - unsigned short NegTrackId() const; // only for particles from v0 - unsigned short PosTrackId() const; // only for particles from v0 - - AliFemtoTrack* Track() const; - AliFemtoV0* V0() const; - AliFemtoKink* Kink() const; - - const AliFemtoThreeVector& NominalTpcExitPoint() const; // position track exits TPC assuming start at (0,0,0) - const AliFemtoThreeVector& NominalTpcEntrancePoint() const; // position track crosses IFC assuming start at (0,0,0) - const AliFemtoThreeVector& TpcV0PosExitPoint() const; - const AliFemtoThreeVector& TpcV0PosEntrancePoint() const; - const AliFemtoThreeVector& TpcV0NegExitPoint() const; - const AliFemtoThreeVector& TpcV0NegEntrancePoint() const; - - // the following method is for explicit internal calculation to fill datamembers. - // It is invoked automatically if AliFemtoParticle constructed from AliFemtoTrack - //void CalculateNominalTpcExitAndEntrancePoints(); // NOTE - this requires the fHelix, so be sure this is filled - - - AliFemtoThreeVector fNominalPosSample[11]; // I make this public for convenience and speed of AliFemtoPair() - float fZ[45]; - float fU[45]; - int fSect[45]; - - void ResetFourMomentum(const AliFemtoLorentzVector& fourMomentum); - - const AliFemtoHiddenInfo* HiddenInfo() const; - // Fab private - AliFemtoHiddenInfo* getHiddenInfo() const; - void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo); - void CalculatePurity(); - double GetPionPurity(); - double GetKaonPurity(); - double GetProtonPurity(); - void CalculateTpcExitAndEntrancePoints( AliFmPhysicalHelixD* tHelix, - AliFemtoThreeVector* PrimVert, - AliFemtoThreeVector* SecVert, - AliFemtoThreeVector* tmpTpcEntrancePoint, - AliFemtoThreeVector* tmpTpcExitPoint, - AliFemtoThreeVector* tmpPosSample, - float* tmpZ,float* tmpU,int* tmpSect); - - // For V0 Neg Daugthers TpcEntrance/ExitPoints - AliFemtoThreeVector* fTpcV0NegPosSample; - float* fV0NegZ; - float* fV0NegU; - int* fV0NegSect; - -private: - AliFemtoTrack* fTrack; // copy of the track the particle was formed of, else Null - AliFemtoV0* fV0; // copy of the v0 the particle was formed of, else Null - AliFemtoKink* fKink; // copy of the v0 the particle was formed of, else Null - AliFemtoXi* fXi; - - AliFemtoLorentzVector fFourMomentum; - AliFmPhysicalHelixD fHelix; - //unsigned long fMap[2]; - //int fNhits; - AliFemtoThreeVector fNominalTpcExitPoint; - AliFemtoThreeVector fNominalTpcEntrancePoint; - AliFemtoHiddenInfo* fHiddenInfo; // Fab private - - double fPurity[6]; - - static double fPrimPimPar0; - static double fPrimPimPar1; - static double fPrimPimPar2; - static double fPrimPipPar0; - static double fPrimPipPar1; - static double fPrimPipPar2; - static double fPrimPmPar0; - static double fPrimPmPar1; - static double fPrimPmPar2; - static double fPrimPpPar0; - static double fPrimPpPar1; - static double fPrimPpPar2; - - // For V0 Daugthers TpcEntrance/ExitPoints - AliFemtoThreeVector fPrimaryVertex; - AliFemtoThreeVector fSecondaryVertex; - - AliFmPhysicalHelixD fHelixV0Pos; - AliFemtoThreeVector fTpcV0PosEntrancePoint; - AliFemtoThreeVector fTpcV0PosExitPoint; - - AliFmPhysicalHelixD fHelixV0Neg; - AliFemtoThreeVector fTpcV0NegEntrancePoint; - AliFemtoThreeVector fTpcV0NegExitPoint; -}; - -inline AliFemtoTrack* AliFemtoParticle::Track() const { return fTrack; } -inline unsigned long AliFemtoParticle::TrackId() const { return fTrack->TrackId(); }; -inline const AliFemtoLorentzVector& AliFemtoParticle::FourMomentum() const {return fFourMomentum;} -inline AliFmPhysicalHelixD& AliFemtoParticle::Helix() {return fHelix;} -//inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return fMap[word];} -//inline int AliFemtoParticle::NumberOfHits() const {return fNhits;} -//by marek chojnacki to could compile - -inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return 1;} -inline int AliFemtoParticle::NumberOfHits() const {return 1;} - -inline AliFemtoV0* AliFemtoParticle::V0() const { return fV0; } -inline unsigned short AliFemtoParticle::NegTrackId() const { return fV0->idNeg(); } -inline unsigned short AliFemtoParticle::PosTrackId() const { return fV0->idPos(); } -inline const AliFemtoThreeVector AliFemtoParticle::DecayVertexPosition() const {return fV0->decayVertexV0(); } -// *** -inline AliFemtoHiddenInfo* AliFemtoParticle::getHiddenInfo() const -{return fHiddenInfo;} -inline const AliFemtoHiddenInfo* AliFemtoParticle::HiddenInfo() const -{return fHiddenInfo;} -inline void AliFemtoParticle::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) -{ fHiddenInfo = aHiddenInfo->clone();} -// *** - -inline void AliFemtoParticle::ResetFourMomentum(const AliFemtoLorentzVector& vec){fFourMomentum = vec;} - -inline AliFemtoKink* AliFemtoParticle::Kink() const { return fKink; } - -#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.h deleted file mode 100644 index d76894fc1e2..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoV0.h +++ /dev/null @@ -1,468 +0,0 @@ -/*********************************************************************** - * - * $Id: AliFemtoV0.h,v 1.0 1999/09/07 - * - * Authors: Helen Caines, Tom Humanic 07-Sep-1999 - * - *********************************************************************** - * - * Description: V0 class with members copied from StV0hbtV0.h - * - *********************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.13 2003/09/02 17:58:32 perev - * gcc 3.2 updates + WarnOff - * - * Revision 1.12 2003/01/14 09:45:14 renault - * enable this class to be used for theorical calculations. - * - * Revision 1.11 2002/11/19 23:37:56 renault - * Get V0 daughters helix - * - * Revision 1.10 2002/02/09 19:25:36 laue - * updates (dedx length) - * - * Revision 1.9 2001/09/05 20:41:43 laue - * Updates of the hbtMuDstTree microDSTs - * - * Revision 1.8 2000/10/09 21:54:23 laue - * Helens changes to the V0s - * - * Revision 1.7 2000/08/09 14:50:22 laue - * 'const' removed to compile on solaris - * - * Revision 1.6 2000/07/16 21:38:23 laue - * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version - * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings - * AliFemtoParticle.cc AliFemtoParticle.h : pointers mTrack,mV0 initialized to 0 - * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG - * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better - * solution - * - * Revision 1.5 2000/05/03 17:44:43 laue - * AliFemtoEvent, AliFemtoTrack & AliFemtoV0 declared friend to AliFemtoIOBinary - * AliFemtoParticle updated for V0 pos,neg track Id - * - * Revision 1.4 2000/02/18 21:32:24 laue - * franksTrackCut changed. If mCharge is set to '0' there will be no cut - * on charge. This is important for front-loaded cuts. - * - * copy constructor implemented for AliFemtoEvent, AliFemtoTrack and AliFemtoV0. - * - * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h - * removed. We can now (CC5 on Solaris) use the versions (no D) - * - * Revision 1.3 2000/02/01 00:33:32 laue - * namespaces changed to run on the new Solaris Compiler CC5 - * since we can use member templates in franks1Histo.h we are doing it - * - * Revision 1.2 1999/10/15 02:32:37 lisa - * Helen has added method AliFemtoV0::UpdateV0() to fill derived information - this leads to smaller microDSTs - * - * Revision 1.1 1999/09/16 18:47:59 lisa - * replace placeholder HbtV0Track stuff with Helens AliFemtoV0 classes - * - * - * - ***********************************************************************/ -#ifndef AliFemtoV0_hh -#define AliFemtoV0_hh - -#include "Infrastructure/AliFemtoTypes.h" //same as in AliFemtoTrack.h -#include "AliFmPhysicalHelixD.h" // Gael 12 Sept 02 -#ifdef __ROOT__ -#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ -#include "StStrangeMuDstMaker/StV0MuDst.h" -#endif -#endif -/* Th stuff */ -#include "Base/AliFemtoHiddenInfo.h" -/***/ - -class AliFemtoV0 { -public: - AliFemtoV0(); - AliFemtoV0( const AliFemtoV0&); // copy constructor -#ifdef __ROOT__ -#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ - AliFemtoV0( StV0MuDst&); // from strangeness V0 micro dst structure -#endif -#endif - virtual ~AliFemtoV0(){if(fHiddenInfo) delete fHiddenInfo;} - AliFemtoV0& operator=(const AliFemtoV0& aV0); - - - float decayLengthV0() const; // 3-d decay distance - AliFemtoThreeVector decayVertexV0() const; // Coordinates of decay vertex - AliFemtoThreeVector primaryVertex() const; // Coordinates of primary vertex - float decayVertexV0X() const; // Coordinates of decay vertex - float decayVertexV0Y() const; // Coordinates of decay vertex - float decayVertexV0Z() const; // Coordinates of decay vertex - float dcaV0Daughters() const; // DCA of v0 daughters at decay vertex - float dcaV0ToPrimVertex() const; // DCA of v0 to primary vertex - float dcaPosToPrimVertex() const; // DCA of pos v0 daughter to pri vertex - float dcaNegToPrimVertex() const; // DCA of neg v0 daughter to pri vertex - AliFemtoThreeVector momPos() const; // Momentum components of pos. daughter - float momPosX() const; // Momentum components of pos. daughter - float momPosY() const; // Momentum components of pos. daughter - float momPosZ() const; // Momentum components of pos. daughter - AliFemtoThreeVector momNeg() const; // Momentum components of neg. daughter - float momNegX() const; // Momentum components of neg. daughter - float momNegY() const; // Momentum components of neg. daughter - float momNegZ() const; // Momentum components of neg. daughter - - int tpcHitsPos() const; // Number of TPC hits on pos. daughter - int tpcHitsNeg() const; // Number of TPC hits on neg. daughter - unsigned long trackTopologyMapPos(unsigned int) const; - unsigned long trackTopologyMapNeg(unsigned int) const; - - AliFemtoThreeVector momV0() const ; // Momentum components of V0 - float momV0X() const ; // Momentum components of V0 - float momV0Y() const ; // Momentum components of V0 - float momV0Z() const ; // Momentum components of V0 - float alphaV0() const ; // Armenteros-Podolanski variable - float ptArmV0() const ; // Armenteros-Podolanski variable - float eLambda() const ; // Energy assuming lambda hypothesis - float eK0Short() const ; // Energy assuming k-short hypothesis - float ePosProton() const ; // Energy of pos. daughter assuming proton - float ePosPion() const ; // Energy of pos. daughter assuming pion - float eNegProton() const ; // Energy of neg. daughter assuming antiproton - float eNegPion() const ; // Energy of neg. daughter assuming pion - float massLambda() const ; // Mass assuming lambda hypothesis - float massAntiLambda() const ; // Mass assuming antilambda hypothesis - float massK0Short() const ; // Mass assuming k-short hypothesis - float rapLambda() const ; // Rapidity assuming (anti) constlambda - float rapK0Short() const ; // Rapidity assuming k-short - float cTauLambda() const ; // Lifetime (ctau) const assuming (anti) constlambda - float cTauK0Short() const ; // Lifetime (ctau) const assuming k-short - float ptV0() const ; // Transverse momentum - float ptotV0() const ; // Total momentum - float ptPos() const ; // Transverse momentum of pos. daughter - float ptotPos() const ; // Total momentum of pos. daughter - float dedxPos() const; // dedx of Positive track - float numdedxPos() const; -// number of hits in dE/dX track of pos. daughter--Gael04Fev 2002 - float errdedxPos() const; -// error on dedx of Positive track--Gael04Fev 2002 - float lendedxPos() const; -// Length of dE/dX track of pos. daughter--Gael04Fev 2002 - float pseudoRapPos() const; -// Length of dE/dX track of neg. daughter--Gael04Fev 2002 - - float ptNeg() const ; // Transverse momentum of neg. daughter - float ptotNeg() const ; // Total momentum of neg. daughter - float dedxNeg() const; // dedx of Negative track - float numdedxNeg() const; -// number of hits in dE/dX track of neg. daughter--Gael04Fev 2002 - float errdedxNeg() const; -// error on dedx of Negative track--Gael04Fev 2002 - float lendedxNeg() const; -// Length of dE/dX track of neg. daughter--Gael04Fev 2002 - float pseudoRapNeg() const; -// Length of dE/dX track of neg. daughter--Gael04Fev 2002 - - unsigned short idNeg() const; // Id of negative track - unsigned short idPos() const; // Id of positive track - unsigned short keyNeg() const; // Id of negative track - unsigned short keyPos() const; // Id of positive track - - const AliFmPhysicalHelixD& HelixPos() const; // Gael 12 Sept 02 - const AliFmPhysicalHelixD& HelixNeg() const; // Gael 12 Sept 02 - - void UpdateV0(); // Fills derived info - void SetdecayLengthV0(const float); - void SetdecayVertexV0(const AliFemtoThreeVector); - void SetdecayVertexV0X(const float); - void SetdecayVertexV0Y(const float); - void SetdecayVertexV0Z(const float); - void SetdcaV0Daughters(const float); - void SetdcaV0ToPrimVertex(const float); - void SetdcaPosToPrimVertex(const float); - void SetdcaNegToPrimVertex(const float); - void SetmomPos(const AliFemtoThreeVector); - void SetmomPosX(const float); - void SetmomPosY(const float); - void SetmomPosZ(const float); - void SetmomNeg(const AliFemtoThreeVector); - void SetmomNegX(const float); - void SetmomNegY(const float); - void SetmomNegZ(const float); - - void SettpcHitsPos(const int&); - void SettpcHitsNeg(const int&); - - void SetTrackTopologyMapPos(unsigned int, const unsigned long&); - void SetTrackTopologyMapNeg(unsigned int, const unsigned long&); - - void SetmomV0( AliFemtoThreeVector); - void SetmomV0X( float); - void SetmomV0Y( float); - void SetmomV0Z( float); - void SetalphaV0( float); - void SetptArmV0( float); - void SeteLambda( float); - void SeteK0Short( float); - void SetePosProton( float); - void SetePosPion( float); - void SeteNegProton( float); - void SeteNegPion( float); - void SetmassLambda( float); - void SetmassAntiLambda( float); - void SetmassK0Short( float); - void SetrapLambda( float); - void SetrapK0Short( float); - void SetcTauLambda( float); - void SetcTauK0Short( float); - void SetptV0( float); - void SetptotV0( float); - void SetptPos( float); - void SetptotPos( float); - void SetptNeg( float); - void SetptotNeg( float); - void SetidNeg(const unsigned short&); - void SetidPos(const unsigned short&); - void SetdedxNeg(float); - void SeterrdedxNeg(float x);//Gael 04Fev2002 - void SetlendedxNeg(float x);//Gael 04Fev2002 - void SetpseudoRapNeg(float x);//Gael 04Fev2002 - void SetdedxPos(float); - void SeterrdedxPos(float x);//Gael 04Fev2002 - void SetlendedxPos(float x);//Gael 04Fev2002 - void SetpseudoRapPos(float x);//Gael 04Fev2002 - void SetkeyNeg(const unsigned short&); - void SetkeyPos(const unsigned short&); - - void SetHelixPos(const AliFmPhysicalHelixD&); // Gael 12 Sept 02 - void SetHelixNeg(const AliFmPhysicalHelixD&); // Gael 12 Sept 02 - - void SetprimaryVertex(const AliFemtoThreeVector v);//Gael 24 Sept 02 - /* Th stuff */ - void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo); - bool ValidHiddenInfo() const; - // Fab private : (official : const AliFemtoHiddenInfo* HiddenInfo() const; - AliFemtoHiddenInfo* getHiddenInfo() const; - /***/ - -protected: - - float fDecayLengthV0; - AliFemtoThreeVector fDecayVertexV0; - AliFemtoThreeVector fPrimaryVertex; - float fDcaV0Daughters; - float fDcaV0ToPrimVertex; - float fDcaPosToPrimVertex; - float fDcaNegToPrimVertex; - AliFemtoThreeVector fMomPos; - AliFemtoThreeVector fMomNeg; - - unsigned long fTrackTopologyMapPos[2]; - unsigned long fTrackTopologyMapNeg[2]; - - int fTpcHitsPos; - int fTpcHitsNeg; - - float fChi2V0; - float fClV0; - float fChi2Pos; - float fClPos; - float fChi2Neg; - float fClNeg; - - float fDedxPos; - float fErrDedxPos; - float fLenDedxPos; - - float fDedxNeg; - float fErrDedxNeg; - float fLenDedxNeg; - - unsigned short fNufDedxPos; - unsigned short fNufDedxNeg; - - AliFmPhysicalHelixD fHelixPos; // Gael 12 Sept 02 - AliFmPhysicalHelixD fHelixNeg; // Gael 12 Sept 02 - - // the following variables are not in the persistent version and can be calculated via UpdateV0(); - AliFemtoThreeVector fMomV0; - float fAlphaV0; - float fPtArmV0; - float fELambda; - float fEK0Short; - float fEPosProton; - float fEPosPion; - float fENegProton; - float fENegPion; - float fMassLambda; - float fMassAntiLambda; - float fMassK0Short; - float fRapLambda; - float fRapK0Short; - float fCTauLambda; - float fCTauK0Short; - float fPtV0; - float fPtotV0; - float fPtPos; - float fPtotPos; - float fPtNeg; - float fPtotNeg; - - unsigned short fKeyNeg; - unsigned short fKeyPos; - /* Th stuff */ - // Fab private : add mutable - mutable AliFemtoHiddenInfo* fHiddenInfo; //! - /***/ - - -}; - - - -inline float AliFemtoV0::decayLengthV0() const { return fDecayLengthV0; } -inline AliFemtoThreeVector AliFemtoV0::decayVertexV0() const { return fDecayVertexV0; } -inline AliFemtoThreeVector AliFemtoV0::primaryVertex() const { return fPrimaryVertex; } -inline float AliFemtoV0::decayVertexV0X() const { return fDecayVertexV0.x(); } -inline float AliFemtoV0::decayVertexV0Y() const { return fDecayVertexV0.y(); } -inline float AliFemtoV0::decayVertexV0Z() const { return fDecayVertexV0.z(); } -inline float AliFemtoV0::dcaV0Daughters() const { return fDcaV0Daughters; } -inline float AliFemtoV0::dcaV0ToPrimVertex() const { return fDcaV0ToPrimVertex; } -inline float AliFemtoV0::dcaPosToPrimVertex() const { return fDcaPosToPrimVertex; } -inline float AliFemtoV0::dcaNegToPrimVertex() const { return fDcaNegToPrimVertex; } -inline AliFemtoThreeVector AliFemtoV0::momPos() const { return fMomPos; } -inline float AliFemtoV0::momPosX() const { return fMomPos.x(); } -inline float AliFemtoV0::momPosY() const { return fMomPos.y(); } -inline float AliFemtoV0::momPosZ() const { return fMomPos.z(); } -inline AliFemtoThreeVector AliFemtoV0::momNeg() const { return fMomNeg; } -inline float AliFemtoV0::momNegX() const { return fMomNeg.x(); } -inline float AliFemtoV0::momNegY() const { return fMomNeg.y(); } -inline float AliFemtoV0::momNegZ() const { return fMomNeg.z(); } -inline AliFemtoThreeVector AliFemtoV0::momV0() const { return fMomV0; } -inline float AliFemtoV0::momV0X() const { return fMomV0.x(); } -inline float AliFemtoV0::momV0Y() const { return fMomV0.y(); } -inline float AliFemtoV0::momV0Z() const { return fMomV0.z(); } -inline float AliFemtoV0::alphaV0() const { return fAlphaV0; } -inline float AliFemtoV0::ptArmV0() const {return fPtArmV0;} -inline float AliFemtoV0::eLambda() const {return fELambda;} -inline float AliFemtoV0::eK0Short() const {return fEK0Short;} -inline float AliFemtoV0::ePosProton() const {return fEPosProton;} -inline float AliFemtoV0::ePosPion() const {return fEPosPion;} -inline float AliFemtoV0::eNegProton() const {return fENegProton;} -inline float AliFemtoV0::eNegPion() const {return fENegPion;} -inline float AliFemtoV0::massLambda() const {return fMassLambda;} -inline float AliFemtoV0::massAntiLambda() const {return fMassAntiLambda;} -inline float AliFemtoV0::massK0Short() const {return fMassK0Short;} -inline float AliFemtoV0::rapLambda() const {return fRapLambda;} -inline float AliFemtoV0::rapK0Short() const {return fRapK0Short;} -inline float AliFemtoV0::cTauLambda() const {return fCTauLambda;} -inline float AliFemtoV0::cTauK0Short() const {return fCTauK0Short;} -inline float AliFemtoV0::ptV0() const {return fPtV0;} -inline float AliFemtoV0::ptotV0() const {return fPtotV0;} -inline float AliFemtoV0::ptPos() const {return fPtPos;} -inline float AliFemtoV0::ptotPos() const {return fPtotPos;} -inline float AliFemtoV0::ptNeg() const {return fPtNeg;} -inline float AliFemtoV0::ptotNeg() const {return fPtotNeg;} -inline int AliFemtoV0::tpcHitsPos() const { return fTpcHitsPos; } -inline int AliFemtoV0::tpcHitsNeg() const { return fTpcHitsNeg; } -inline float AliFemtoV0::dedxNeg() const {return fDedxNeg;} -inline float AliFemtoV0::numdedxNeg() const {return fNufDedxNeg;} //Gael 04Fev2002 -inline float AliFemtoV0::errdedxNeg() const {return fErrDedxNeg;} //Gael 04Fev2002 -inline float AliFemtoV0::lendedxNeg() const {return fLenDedxNeg;} //Gael 04Fev2002 -inline float AliFemtoV0::pseudoRapNeg() const {return fMomNeg.pseudoRapidity();} //Gael 04Fev2002 -inline float AliFemtoV0::dedxPos() const {return fDedxPos;} -inline float AliFemtoV0::numdedxPos() const {return fNufDedxPos;} //Gael 04Fev2002 -inline float AliFemtoV0::errdedxPos() const {return fErrDedxPos;} //Gael 04Fev2002 -inline float AliFemtoV0::lendedxPos() const {return fLenDedxPos;} //Gael 04Fev2002 -inline float AliFemtoV0::pseudoRapPos() const {return fMomPos.pseudoRapidity();} //Gael 04Fev2002 - - -inline unsigned long AliFemtoV0::trackTopologyMapPos(unsigned int word) const { return fTrackTopologyMapPos[word]; } -inline unsigned long AliFemtoV0::trackTopologyMapNeg(unsigned int word) const { return fTrackTopologyMapNeg[word]; } -inline unsigned short AliFemtoV0::idNeg() const { return fKeyNeg; } -inline unsigned short AliFemtoV0::keyNeg() const { return fKeyNeg; } -inline unsigned short AliFemtoV0::idPos() const { return fKeyPos; } -inline unsigned short AliFemtoV0::keyPos() const { return fKeyPos; } - -inline void AliFemtoV0::SetdecayLengthV0(const float x){ fDecayLengthV0= x;} -inline void AliFemtoV0::SetdecayVertexV0X(const float x){ fDecayVertexV0.setX(x);} -inline void AliFemtoV0::SetdecayVertexV0Y(const float x){ fDecayVertexV0.setY(x);} -inline void AliFemtoV0::SetdecayVertexV0Z(const float x){ fDecayVertexV0.setZ(x);} -inline void AliFemtoV0::SetdecayVertexV0(const AliFemtoThreeVector v){ fDecayVertexV0 = v; } -inline void AliFemtoV0::SetdcaV0Daughters(const float x){fDcaV0Daughters= x;} -inline void AliFemtoV0::SetdcaV0ToPrimVertex(const float x){fDcaV0ToPrimVertex= x;} -inline void AliFemtoV0::SetdcaPosToPrimVertex(const float x){fDcaPosToPrimVertex = x;} -inline void AliFemtoV0::SetdcaNegToPrimVertex(const float x){fDcaNegToPrimVertex = x;} -inline void AliFemtoV0::SetmomPos(const AliFemtoThreeVector v){fMomPos = v; } -inline void AliFemtoV0::SetmomPosX(const float x){fMomPos.setX(x);} -inline void AliFemtoV0::SetmomPosY(const float x){fMomPos.setY(x);} -inline void AliFemtoV0::SetmomPosZ(const float x){fMomPos.setZ(x);} -inline void AliFemtoV0::SetmomNeg(const AliFemtoThreeVector v){fMomNeg = v; } -inline void AliFemtoV0::SetmomNegX(const float x){fMomNeg.setX(x);} -inline void AliFemtoV0::SetmomNegY(const float x){fMomNeg.setY(x);} -inline void AliFemtoV0::SetmomNegZ(const float x){fMomNeg.setZ(x);} -inline void AliFemtoV0::SetTrackTopologyMapPos(unsigned int word, const unsigned long& m){fTrackTopologyMapPos[word]=m;} -inline void AliFemtoV0::SetTrackTopologyMapNeg(unsigned int word, const unsigned long& m){fTrackTopologyMapNeg[word]=m;} -inline void AliFemtoV0::SetmomV0(AliFemtoThreeVector v){fMomV0= v; } -inline void AliFemtoV0::SetmomV0X(const float x){fMomV0.setX(x);} -inline void AliFemtoV0::SetmomV0Y(const float x){fMomV0.setY(x);} -inline void AliFemtoV0::SetmomV0Z(const float x){fMomV0.setZ(x);} - -inline void AliFemtoV0::SetalphaV0( float x){fAlphaV0= x;} -inline void AliFemtoV0::SetptArmV0( float x){fPtArmV0 = x;} -inline void AliFemtoV0::SeteLambda( float x){fELambda= x;} -inline void AliFemtoV0::SeteK0Short( float x){fEK0Short= x;} -inline void AliFemtoV0::SetePosProton( float x){fEPosProton= x;} -inline void AliFemtoV0::SetePosPion( float x){fEPosPion= x;} -inline void AliFemtoV0::SeteNegProton( float x){fENegProton= x;} -inline void AliFemtoV0::SeteNegPion( float x){fENegPion= x;} -inline void AliFemtoV0::SetmassLambda( float x){fMassLambda = x;} -inline void AliFemtoV0::SetmassAntiLambda( float x){fMassAntiLambda= x;} -inline void AliFemtoV0::SetmassK0Short( float x){fMassK0Short= x;} -inline void AliFemtoV0::SetrapLambda( float x){fRapLambda= x;} -inline void AliFemtoV0::SetrapK0Short( float x){fRapK0Short = x;} -inline void AliFemtoV0::SetcTauLambda( float x){fCTauLambda = x;} -inline void AliFemtoV0::SetcTauK0Short( float x){fCTauK0Short = x;} -inline void AliFemtoV0::SetptV0( float x){fPtV0 = x;} -inline void AliFemtoV0::SetptotV0( float x){fPtotV0 = x;} -inline void AliFemtoV0::SetptPos( float x){fPtPos = x;} -inline void AliFemtoV0::SetptotPos( float x){fPtotPos = x;} -inline void AliFemtoV0::SetptNeg( float x){ fPtNeg= x;} -inline void AliFemtoV0::SetptotNeg( float x){ fPtotNeg= x;} -inline void AliFemtoV0::SetidNeg(const unsigned short& s){ fKeyNeg= s;} -inline void AliFemtoV0::SetidPos(const unsigned short& s){ fKeyPos= s;} -inline void AliFemtoV0::SetkeyNeg(const unsigned short& s){ fKeyNeg= s;} -inline void AliFemtoV0::SetkeyPos(const unsigned short& s){ fKeyPos= s;} -inline void AliFemtoV0::SettpcHitsPos(const int& i){fTpcHitsPos=i;} -inline void AliFemtoV0::SettpcHitsNeg(const int& i){fTpcHitsNeg=i;} -inline void AliFemtoV0::SetdedxNeg(float x){fDedxNeg=x;} -inline void AliFemtoV0::SeterrdedxNeg(float x){fErrDedxNeg=x;}//Gael 04Fev2002 -inline void AliFemtoV0::SetlendedxNeg(float x){fLenDedxNeg=x;}//Gael 04Fev2002 -inline void AliFemtoV0::SetdedxPos(float x){fDedxPos=x;} -inline void AliFemtoV0::SeterrdedxPos(float x){fErrDedxPos=x;}//Gael 04Fev2002 -inline void AliFemtoV0::SetlendedxPos(float x){fLenDedxPos=x;}//Gael 04Fev2002 -inline void AliFemtoV0::SetprimaryVertex(const AliFemtoThreeVector v) { fPrimaryVertex = v; }//Gael 24 Sept 02 -#endif - - - - - - - - - - - - - - - - - - diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.h deleted file mode 100644 index 3a42d26372d..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoXi.h +++ /dev/null @@ -1,276 +0,0 @@ -/*********************************************************************** - * - * $Id: AliFemtoXi.h,v 1.0 1999/09/07 - * - * Authors: Frank Laue - * - *********************************************************************** - * - * Description: Xi class with members copied from StXihbtXi.h - * - ***********************************************************************/ -#ifndef AliFemtoXi_hh -#define AliFemtoXi_hh - -#include "Infrastructure/AliFemtoVector.h" //same as in AliFemtoTrack.h -#include "Infrastructure/AliFemtoV0.h" - -#ifdef __ROOT__ -#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ -#include "StStrangeMuDstMaker/StXiMuDst.h" -#endif -#endif - -class AliFemtoXi : public AliFemtoV0 { -public: - AliFemtoXi(); -#ifdef __ROOT__ -#ifndef __NO_STAR_DEPENDENCE_ALLOWED__ - AliFemtoXi(StXiMuDst&); // from strangeness Xi micro dst structure -#endif -#endif - virtual ~AliFemtoXi(){/* no-op */} - - void UpdateXi(); - float decayLengthXi() const; // 3-d decay distance - AliFemtoThreeVector decayVertexXi() const; // Coordinates of decay vertex - float decayVertexXiX() const; // Coordinates of decay vertex - float decayVertexXiY() const; // Coordinates of decay vertex - float decayVertexXiZ() const; // Coordinates of decay vertex - float dcaXiDaughters() const; // DCA of xi daughters at decay vertex - float dcaXiToPrimVertex() const; // DCA of xi to primary vertex - float dcaBacToPrimVertex() const; // DCA of bachelor xi daughter to pri vertex - AliFemtoThreeVector momBac() const; // Momentum components of bac. daughter - float momBacX() const; // Momentum components of bac. daughter - float momBacY() const; // Momentum components of bac. daughter - float momBacZ() const; // Momentum components of bac. daughter - - int tpcHitsBac() const; // Number of TPC hits on bac. daughter - unsigned long trackTopologyMapBac(unsigned int) const; - - AliFemtoThreeVector momXi() const ; // Momentum components of Xi - float momXiX() const ; // Momentum components of Xi - float momXiY() const ; // Momentum components of Xi - float momXiZ() const ; // Momentum components of Xi - float alphaXi() const ; // Armenteros-Podolanski variable - float ptArmXi() const ; // Armenteros-Podolanski variable - float eXi() const ; // Energy assuming xi hypothesis - float eOmega() const ; // Energy assuming omega hypothesis - float eBacKaon() const ; // Energy of bac. daughter assuming kaon - float eBacPion() const ; // Energy of bac. daughter assuming pion - float massXi() const ; // Mass assuming Xi hypothesis - float massOmega() const ; // Mass assuming Omega hypothesis - float rapXi() const ; // Rapidity assuming (anti) xi - float rapOmega() const ; // Rapidity assuming (anti) omega - float cTauXi() const ; // Lifetime (ctau) const assuming (anti) xi - float cTauOmega() const ; // Lifetime (ctau) const assuming (anti) omega - float ptXi() const ; // Transverse momentum - float ptotXi() const ; // Total momentum - float ptBac() const ; // Transverse momentum of bac. daughter - float ptotBac() const ; // Total momentum of bac. daughter - float dedxBac() const; // dedx of Bac track - unsigned short idBac() const; // Id of bac. track - unsigned short keyBac() const; // Id of bac. track - - void SetdecayLengthXi(const float); - void SetdecayVertexXi(const AliFemtoThreeVector); - void SetdecayVertexXiX(const float); - void SetdecayVertexXiY(const float); - void SetdecayVertexXiZ(const float); - void SetdcaXiDaughters(const float); - void SetdcaXiToPrimVertex(const float); - void SetdcaBacToPrimVertex(const float); - void SetmomBac(const AliFemtoThreeVector); - void SetmomBacX(const float); - void SetmomBacY(const float); - void SetmomBacZ(const float); - - void SettpcHitsBac(const int&); - - void SetTrackTopologyMapBac(unsigned int, const unsigned long&); - - void SetmomXi( AliFemtoThreeVector); - void SetmomXiX( float); - void SetmomXiY( float); - void SetmomXiZ( float); - void SetalphaXi( float); - void SetptArmXi( float); - void SeteXi( float); - void SeteOmega( float); - void SeteBacPion( float); - void SeteBacKaon( float); - void SetmassXi( float); - void SetmassOmega( float); - void SetrapXi( float); - void SetrapOmega( float); - void SetcTauXi( float); - void SetcTauOmega( float); - void SetptXi( float); - void SetptotXi( float); - void SetptBac( float); - void SetptotBac( float); - void SetidBac(const unsigned short&); - void SetdedxBac(float); - void SetkeyBac(const unsigned short&); - - -protected: - int fCharge; - float fDecayLengthXi; - AliFemtoThreeVector fDecayVertexXi; - float fDcaXiDaughters; - float fDcaXiToPrimVertex; - float fDcaBachelorToPrimVertex; - AliFemtoThreeVector fMomBachelor; - - unsigned int fTopologyMapBachelor[2]; - unsigned short fKeyBachelor; - - int fTpcHitsBac; - - float fChi2Xi; - float fClXi; - float fChi2Bachelor; - float fClBachelor; - - float fDedxBachelor; - unsigned short fNufDedxBachelor; - - // the following variables are not in the persistent version and can be calculated via UpdateXi(); - AliFemtoThreeVector fMomXi; - float fAlphaXi; - float fPtArmXi; - - float fEXi; - float fEOmega; - float fEBacPion; - float fEBacKaon; - float fMassXi; - float fMassOmega; - float fRapXi; - float fRapOmega; - float fCTauXi; - float fCTauOmega; - float fPtXi; - float fPtotXi; - float fPtBac; - float fPtotBac; - - unsigned short fKeyBac; -}; - -inline float AliFemtoXi::decayLengthXi() const { return fDecayLengthXi; } -inline AliFemtoThreeVector AliFemtoXi::decayVertexXi() const { return fDecayVertexXi; } -inline float AliFemtoXi::decayVertexXiX() const { return fDecayVertexXi.x(); } -inline float AliFemtoXi::decayVertexXiY() const { return fDecayVertexXi.y(); } -inline float AliFemtoXi::decayVertexXiZ() const { return fDecayVertexXi.z(); } -inline float AliFemtoXi::dcaXiDaughters() const { return fDcaXiDaughters; } -inline float AliFemtoXi::dcaXiToPrimVertex() const { return fDcaXiToPrimVertex; } -inline float AliFemtoXi::dcaBacToPrimVertex() const { return fDcaBachelorToPrimVertex; } -inline AliFemtoThreeVector AliFemtoXi::momBac() const { return fMomBachelor; } -inline float AliFemtoXi::momBacX() const { return fMomBachelor.x(); } -inline float AliFemtoXi::momBacY() const { return fMomBachelor.y(); } -inline float AliFemtoXi::momBacZ() const { return fMomBachelor.z(); } -inline AliFemtoThreeVector AliFemtoXi::momXi() const { return fMomXi; } -inline float AliFemtoXi::momXiX() const { return fMomXi.x(); } -inline float AliFemtoXi::momXiY() const { return fMomXi.y(); } -inline float AliFemtoXi::momXiZ() const { return fMomXi.z(); } -inline float AliFemtoXi::alphaXi() const { return fAlphaXi; } -inline float AliFemtoXi::ptArmXi() const {return fPtArmXi;} -inline float AliFemtoXi::eXi() const {return fEXi;} -inline float AliFemtoXi::eOmega() const {return fEOmega;} -inline float AliFemtoXi::eBacPion() const {return fEBacPion;} -inline float AliFemtoXi::eBacKaon() const {return fEBacKaon;} -inline float AliFemtoXi::massXi() const {return fMassXi;} -inline float AliFemtoXi::massOmega() const {return fMassOmega;} -inline float AliFemtoXi::rapXi() const {return fRapXi;} -inline float AliFemtoXi::rapOmega() const {return fRapOmega;} -inline float AliFemtoXi::cTauXi() const {return fCTauXi;} -inline float AliFemtoXi::cTauOmega() const {return fCTauOmega;} -inline float AliFemtoXi::ptXi() const {return fPtXi;} -inline float AliFemtoXi::ptotXi() const {return fPtotXi;} -inline float AliFemtoXi::ptBac() const {return fPtBac;} -inline float AliFemtoXi::ptotBac() const {return fPtotBac;} -inline int AliFemtoXi::tpcHitsBac() const - { return fTpcHitsBac; } -inline float AliFemtoXi::dedxBac() const {return fDedxBachelor;} - -inline unsigned long AliFemtoXi::trackTopologyMapBac(unsigned int word) const { return fTopologyMapBachelor[word]; } -inline unsigned short AliFemtoXi::idBac() const { return fKeyBac; }; -inline unsigned short AliFemtoXi::keyBac() const { return fKeyBac; } - -inline void AliFemtoXi::SetdecayLengthXi(const float x){ fDecayLengthXi= x;} -inline void AliFemtoXi::SetdecayVertexXiX(const float x){ fDecayVertexXi.setX(x);} -inline void AliFemtoXi::SetdecayVertexXiY(const float x){ fDecayVertexXi.setY(x);} -inline void AliFemtoXi::SetdecayVertexXiZ(const float x){ fDecayVertexXi.setZ(x);} -inline void AliFemtoXi::SetdecayVertexXi(const AliFemtoThreeVector v){ fDecayVertexXi = v; } -inline void AliFemtoXi::SetdcaXiDaughters(const float x){fDcaXiDaughters= x;} -inline void AliFemtoXi::SetdcaXiToPrimVertex(const float x){fDcaXiToPrimVertex= x;} -inline void AliFemtoXi::SetdcaBacToPrimVertex(const float x){ fDcaBachelorToPrimVertex = x;} -inline void AliFemtoXi::SetmomBac(const AliFemtoThreeVector v){fMomBachelor = v; } -inline void AliFemtoXi::SetmomBacX(const float x){fMomBachelor.setX(x);} -inline void AliFemtoXi::SetmomBacY(const float x){fMomBachelor.setY(x);} -inline void AliFemtoXi::SetmomBacZ(const float x){fMomBachelor.setZ(x);} -inline void AliFemtoXi::SetTrackTopologyMapBac(unsigned int word, const unsigned long& m){fTopologyMapBachelor[word]=m;} -inline void AliFemtoXi::SetmomXi(AliFemtoThreeVector v){fMomXi= v; } -inline void AliFemtoXi::SetmomXiX(const float x){fMomXi.setX(x);} -inline void AliFemtoXi::SetmomXiY(const float x){fMomXi.setY(x);} -inline void AliFemtoXi::SetmomXiZ(const float x){fMomXi.setZ(x);} - -inline void AliFemtoXi::SetalphaXi( float x){fAlphaXi= x;} -inline void AliFemtoXi::SetptArmXi( float x){fPtArmXi = x;} -inline void AliFemtoXi::SeteXi( float x){fEXi= x;} -inline void AliFemtoXi::SeteOmega( float x){fEOmega= x;} -inline void AliFemtoXi::SeteBacPion( float x){fEBacPion= x;} -inline void AliFemtoXi::SeteBacKaon( float x){fEBacKaon= x;} -inline void AliFemtoXi::SetmassXi( float x){fMassXi = x;} -inline void AliFemtoXi::SetmassOmega( float x){fMassOmega= x;} -inline void AliFemtoXi::SetrapXi( float x){fRapXi= x;} -inline void AliFemtoXi::SetrapOmega( float x){fRapOmega = x;} -inline void AliFemtoXi::SetcTauXi( float x){fCTauXi = x;} -inline void AliFemtoXi::SetcTauOmega( float x){fCTauOmega = x;} -inline void AliFemtoXi::SetptXi( float x){fPtXi = x;} -inline void AliFemtoXi::SetptotXi( float x){fPtotXi = x;} -inline void AliFemtoXi::SetptBac( float x){fPtBac = x;} -inline void AliFemtoXi::SetptotBac( float x){fPtotBac = x;} -inline void AliFemtoXi::SetidBac(const unsigned short& s){ fKeyBac= s;} -inline void AliFemtoXi::SetkeyBac(const unsigned short& s){ fKeyBac= s;} -inline void AliFemtoXi::SettpcHitsBac(const int& i){fTpcHitsBac=i;} -inline void AliFemtoXi::SetdedxBac(float x){fDedxBachelor=x;} - -#endif - - -/*********************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.3 2003/09/02 17:58:33 perev - * gcc 3.2 updates + WarnOff - * - * Revision 1.2 2001/12/05 15:10:33 laue - * Boris' updates (mainly access functions) - * - * - ***********************************************************************/ - - - - - - - - - - - - - - - - diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelix.cxx b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelix.cxx deleted file mode 100644 index a52153d3f34..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmHelix.cxx +++ /dev/null @@ -1,734 +0,0 @@ -/*************************************************************************** -* -* $Id$ -* -* Author: Thomas Ullrich, Sep 1997 -*************************************************************************** -* -* Description: Parametrization of a helix -* -*************************************************************************** -* -* $Log$ -* Revision 1.3 2007/04/27 07:24:34 akisiel -* Make revisions needed for compilation from the main AliRoot tree -* -* Revision 1.1.1.1 2007/04/25 15:38:41 panos -* Importing the HBT code dir -* -* Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki -* First version on CVS -* -* Revision 1.26 2005/10/13 23:15:13 genevb -* Save a few calculations -* -* Revision 1.25 2005/10/13 22:25:35 genevb -* pathLength to plane now finds nearest approach to intersection regardless of # of loops -* -* Revision 1.24 2005/07/06 18:49:56 fisyak -* Replace AliFmHelixD, AliFmLorentzVectorD,AliFmLorentzVectorF,AliFmMatrixD,AliFmMatrixF,AliFmPhysicalHelixD,AliFmThreeVectorD,AliFmThreeVectorF by templated version -* -* Revision 1.23 2004/12/02 02:51:16 ullrich -* Added option to pathLenghth() and distance() to search for -* DCA only within one period. Default stays as it was. -* -* Revision 1.22 2004/05/03 23:35:31 perev -* Possible non init WarnOff -* -* Revision 1.21 2004/01/27 02:49:48 perev -* Big value appropriate for float -* -* Revision 1.20 2003/12/22 18:59:36 perev -* remove test for only +ve pathLeng added before -* -* Revision 1.19 2003/12/18 17:27:02 perev -* Small bug fix in number of iters. i++ ==> i-- -* -* Revision 1.18 2003/10/30 20:06:46 perev -* Check of quality added -* -* Revision 1.17 2003/10/19 20:17:00 perev -* Protection agains overfloat added into pathLength(AliFmThreeVector,AliFmThreeVector) -* -* Revision 1.16 2003/10/06 23:39:21 perev -* sqrt(-ve) == no solution. infinity returns -* -* Revision 1.15 2003/09/02 17:59:34 perev -* gcc 3.2 updates + WarnOff -* -* Revision 1.14 2003/06/26 17:15:56 ullrich -* Changed local variable name in pathLenght. -* -* Revision 1.13 2002/06/21 17:49:25 genevb -* Some minor speed improvements -* -* Revision 1.12 2002/04/24 02:40:25 ullrich -* Restored old format and lost CVS statements. -* -* Revision 1.11 2002/02/12 19:37:51 jeromel -* fix for Linux 7.2 (float.h). Took oportunity to doxygenize. -* -* Revision 1.10 2000/07/17 21:44:19 ullrich -* Fixed problem in pathLength(cyl_rad). -* -* Revision 1.9 2000/05/22 21:38:28 ullrich -* Add parenthesis to make Linux compiler happy. -* -* Revision 1.8 2000/05/22 21:11:21 ullrich -* In pathLength(AliFmThreeVector&): Increased number of max iteration -* in Newton method from 10 to 100. Improved initial guess in case -* it is off by n period. -* -* Revision 1.7 2000/03/06 20:24:25 ullrich -* Parameter h for case B=0 correctly handled now. -* -* Revision 1.6 1999/12/22 15:14:39 ullrich -* Added analytical solution for dca between two helices -* in the case for B=0. -* -* Revision 1.5 1999/12/21 15:14:08 ullrich -* Modified to cope with new compiler version on Sun (CC5.0). -* -* Revision 1.4 1999/11/29 21:45:38 fisyak -* fix abs for HP -* -* Revision 1.3 1999/03/07 14:55:41 wenaus -* fix scope problem -* -* Revision 1.2 1999/03/02 19:47:35 ullrich -* Added method to find dca between two helices -* -* Revision 1.1 1999/01/30 03:59:02 fisyak -* Root Version of AliFmarClassLibrary -* -* Revision 1.1 1999/01/23 00:29:15 ullrich -* Initial Revision -* -**************************************************************************/ -#if !defined(ST_NO_NUMERIC_LIMITS) -# include -# if !defined(ST_NO_NAMESPACES) -using std::numeric_limits; -# endif -#endif -#define FOR_HELIX -#include -#include - -#include "AliFmHelix.h" -#include "Base/PhysicalConstants.h" -#include "Base/SystemOfUnits.h" -#ifdef __ROOT__ -ClassImpT(AliFmHelix,double); -#endif - -#ifdef WIN32 -#include "gcc2vs.h" -#endif - -#include -#include -using namespace std; - -const double AliFmHelix::NoSolution = 3.e+33; - -AliFmHelix::AliFmHelix() : - mSingularity(0), - mOrigin(0,0,0), - mDipAngle(0), - mCurvature(0), - mPhase(0), - mH(0), - mCosDipAngle(0), - mSinDipAngle(0), - mCosPhase(0), - mSinPhase(0) -{ /*noop*/ } - -AliFmHelix::AliFmHelix(double c, double d, double phase, - const AliFmThreeVector& o, int h) : - mSingularity(0), - mOrigin(0,0,0), - mDipAngle(0), - mCurvature(0), - mPhase(0), - mH(0), - mCosDipAngle(0), - mSinDipAngle(0), - mCosPhase(0), - mSinPhase(0) -{ - setParameters(c, d, phase, o, h); -} - -AliFmHelix::~AliFmHelix() { /* noop */ }; - -void AliFmHelix::setParameters(double c, double dip, double phase, - const AliFmThreeVector& o, int h) -{ - // - // The order in which the parameters are set is important - // since setCurvature might have to adjust the others. - // - mH = (h>=0) ? 1 : -1; // Default is: positive particle - // positive field - mOrigin = o; - setDipAngle(dip); - setPhase(phase); - - // - // Check for singularity and correct for negative curvature. - // May change mH and mPhase. Must therefore be set last. - // - setCurvature(c); - - // - // For the case B=0, h is ill defined. In the following we - // always assume h = +1. Since phase = psi - h * pi/2 - // we have to correct the phase in case h = -1. - // This assumes that the user uses the same h for phase - // as the one he passed to the constructor. - // - if (mSingularity && mH == -1) { - mH = +1; - setPhase(mPhase-M_PI); - } -} - -void AliFmHelix::setCurvature(double val) -{ - if (val < 0) { - mCurvature = -val; - mH = -mH; - setPhase(mPhase+M_PI); - } - else - mCurvature = val; - -#ifndef ST_NO_NUMERIC_LIMITS - if (fabs(mCurvature) <= numeric_limits::epsilon()) -#else - if (fabs(mCurvature) <= static_cast(0)) -#endif - mSingularity = true; // straight line - else - mSingularity = false; // curved -} - -void AliFmHelix::setPhase(double val) -{ - mPhase = val; - mCosPhase = cos(mPhase); - mSinPhase = sin(mPhase); - if (fabs(mPhase) > M_PI) - mPhase = atan2(mSinPhase, mCosPhase); // force range [-pi,pi] -} - -void AliFmHelix::setDipAngle(double val) -{ - mDipAngle = val; - mCosDipAngle = cos(mDipAngle); - mSinDipAngle = sin(mDipAngle); -} - -double AliFmHelix::xcenter() const -{ - if (mSingularity) - return 0; - else - return mOrigin.x()-mCosPhase/mCurvature; -} - -double AliFmHelix::ycenter() const -{ - if (mSingularity) - return 0; - else - return mOrigin.y()-mSinPhase/mCurvature; -} - -double AliFmHelix::fudgePathLength(const AliFmThreeVector& p) const -{ - double s; - double dx = p.x()-mOrigin.x(); - double dy = p.y()-mOrigin.y(); - - if (mSingularity) { - s = (dy*mCosPhase - dx*mSinPhase)/mCosDipAngle; - } - else { - s = atan2(dy*mCosPhase - dx*mSinPhase, - 1/mCurvature + dx*mCosPhase+dy*mSinPhase)/ - (mH*mCurvature*mCosDipAngle); - } - return s; -} - -double AliFmHelix::distance(const AliFmThreeVector& p, bool scanPeriods) const -{ - return abs(this->at(pathLength(p,scanPeriods))-p); -} - -double AliFmHelix::pathLength(const AliFmThreeVector& p, bool scanPeriods) const -{ - // - // Returns the path length at the distance of closest - // approach between the helix and point p. - // For the case of B=0 (straight line) the path length - // can be calculated analytically. For B>0 there is - // unfortunately no easy solution to the problem. - // Here we use the Newton method to find the root of the - // referring equation. The 'fudgePathLength' serves - // as a starting value. - // - double s; - double dx = p.x()-mOrigin.x(); - double dy = p.y()-mOrigin.y(); - double dz = p.z()-mOrigin.z(); - - if (mSingularity) { - s = mCosDipAngle*(mCosPhase*dy-mSinPhase*dx) + - mSinDipAngle*dz; - } - else { // -#ifndef ST_NO_NAMESPACES - { - using namespace units; -#endif - const double MaxPrecisionNeeded = micrometer; - const int MaxIterations = 100; - - // - // The math is taken from Maple with C(expr,optimized) and - // some hand-editing. It is not very nice but efficient. - // - double t34 = mCurvature*mCosDipAngle*mCosDipAngle; - double t41 = mSinDipAngle*mSinDipAngle; - double t6, t7, t11, t12, t19; - - // - // Get a first guess by using the dca in 2D. Since - // in some extreme cases we might be off by n periods - // we add (subtract) periods in case we get any closer. - // - s = fudgePathLength(p); - - if (scanPeriods) { - double ds = period(); - int j, jmin = 0; - double d, dmin = abs(at(s) - p); - for(j=1; j::max(); -#else - return DBL_MAX; -#endif - else - return fabs(2*M_PI/(mH*mCurvature*mCosDipAngle)); -} - -pair AliFmHelix::pathLength(double r) const -{ - pair value; - pair VALUE(999999999.,999999999.); - // - // The math is taken from Maple with C(expr,optimized) and - // some hand-editing. It is not very nice but efficient. - // 'first' is the smallest of the two solutions (may be negative) - // 'second' is the other. - // - if (mSingularity) { - double t1 = mCosDipAngle*(mOrigin.x()*mSinPhase-mOrigin.y()*mCosPhase); - double t12 = mOrigin.y()*mOrigin.y(); - double t13 = mCosPhase*mCosPhase; - double t15 = r*r; - double t16 = mOrigin.x()*mOrigin.x(); - double t20 = -mCosDipAngle*mCosDipAngle*(2.0*mOrigin.x()*mSinPhase*mOrigin.y()*mCosPhase + - t12-t12*t13-t15+t13*t16); - if (t20<0.) return VALUE; - t20 = ::sqrt(t20); - value.first = (t1-t20)/(mCosDipAngle*mCosDipAngle); - value.second = (t1+t20)/(mCosDipAngle*mCosDipAngle); - } - else { - double t1 = mOrigin.y()*mCurvature; - double t2 = mSinPhase; - double t3 = mCurvature*mCurvature; - double t4 = mOrigin.y()*t2; - double t5 = mCosPhase; - double t6 = mOrigin.x()*t5; - double t8 = mOrigin.x()*mOrigin.x(); - double t11 = mOrigin.y()*mOrigin.y(); - double t14 = r*r; - double t15 = t14*mCurvature; - double t17 = t8*t8; - double t19 = t11*t11; - double t21 = t11*t3; - double t23 = t5*t5; - double t32 = t14*t14; - double t35 = t14*t3; - double t38 = 8.0*t4*t6 - 4.0*t1*t2*t8 - 4.0*t11*mCurvature*t6 + - 4.0*t15*t6 + t17*t3 + t19*t3 + 2.0*t21*t8 + 4.0*t8*t23 - - 4.0*t8*mOrigin.x()*mCurvature*t5 - 4.0*t11*t23 - - 4.0*t11*mOrigin.y()*mCurvature*t2 + 4.0*t11 - 4.0*t14 + - t32*t3 + 4.0*t15*t4 - 2.0*t35*t11 - 2.0*t35*t8; - double t40 = (-t3*t38); - if (t40<0.) return VALUE; - t40 = ::sqrt(t40); - - double t43 = mOrigin.x()*mCurvature; - double t45 = 2.0*t5 - t35 + t21 + 2.0 - 2.0*t1*t2 -2.0*t43 - 2.0*t43*t5 + t8*t3; - double t46 = mH*mCosDipAngle*mCurvature; - - value.first = (-mPhase + 2.0*atan((-2.0*t1 + 2.0*t2 + t40)/t45))/t46; - value.second = -(mPhase + 2.0*atan((2.0*t1 - 2.0*t2 + t40)/t45))/t46; - - // - // Solution can be off by +/- one period, select smallest - // - double p = period(); - // malisa deletes "isnan" check 22apr2006 if (!isnan(value.first)) { - if (fabs(value.first-p) < fabs(value.first)) value.first = value.first-p; - else if (fabs(value.first+p) < fabs(value.first)) value.first = value.first+p; - // malisa } - // malisa deletes "isnan" check 22apr2006 if (!isnan(value.second)) { - if (fabs(value.second-p) < fabs(value.second)) value.second = value.second-p; - else if (fabs(value.second+p) < fabs(value.second)) value.second = value.second+p; - // malisa } - } - if (value.first > value.second) - swap(value.first,value.second); - return(value); -} - -pair AliFmHelix::pathLength(double r, double x, double y, bool scanPeriods) -{ - double x0 = mOrigin.x(); - double y0 = mOrigin.y(); - mOrigin.setX(x0-x); - mOrigin.setY(y0-y); - pair result = this->pathLength(r); - mOrigin.setX(x0); - mOrigin.setY(y0); - return result; -} - -double AliFmHelix::pathLength(const AliFmThreeVector& r, - const AliFmThreeVector& n) const -{ - // - // Vector 'r' defines the position of the center and - // vector 'n' the normal vector of the plane. - // For a straight line there is a simple analytical - // solution. For curvatures > 0 the root is determined - // by Newton method. In case no valid s can be found - // the max. largest value for s is returned. - // - double s; - - if (mSingularity) { - double t = n.z()*mSinDipAngle + - n.y()*mCosDipAngle*mCosPhase - - n.x()*mCosDipAngle*mSinPhase; - if (t == 0) - s = NoSolution; - else - s = ((r - mOrigin)*n)/t; - } - else { - const double MaxPrecisionNeeded = micrometer; - const int MaxIterations = 20; - - double A = mCurvature*((mOrigin - r)*n) - - n.x()*mCosPhase - - n.y()*mSinPhase; - double t = mH*mCurvature*mCosDipAngle; - double u = n.z()*mCurvature*mSinDipAngle; - - double a, f, fp; - double sOld = s = 0; - double shiftOld = 0; - double shift; - // (cos(angMax)-1)/angMax = 0.1 - const double angMax = 0.21; - double deltas = fabs(angMax/(mCurvature*mCosDipAngle)); - // dampingFactor = exp(-0.5); - double dampingFactor = 0.60653; - int i; - - for (i=0; i -AliFmHelix::pathLengths(const AliFmHelix& h, bool scanPeriods) const -{ - - // - // Cannot handle case where one is a helix - // and the other one is a straight line. - // - if (mSingularity != h.mSingularity) - return pair(NoSolution, NoSolution); - - double s1, s2; - - if (mSingularity) { - // - // Analytic solution - // - AliFmThreeVector dv = h.mOrigin - mOrigin; - AliFmThreeVector a(-mCosDipAngle*mSinPhase, - mCosDipAngle*mCosPhase, - mSinDipAngle); - AliFmThreeVector b(-h.mCosDipAngle*h.mSinPhase, - h.mCosDipAngle*h.mCosPhase, - h.mSinDipAngle); - double ab = a*b; - double g = dv*a; - double k = dv*b; - s2 = (k-ab*g)/(ab*ab-1.); - s1 = g+s2*ab; - return pair(s1, s2); - } - else { - // - // First step: get dca in the xy-plane as start value - // - double dx = h.xcenter() - xcenter(); - double dy = h.ycenter() - ycenter(); - double dd = ::sqrt(dx*dx + dy*dy); - double r1 = 1/curvature(); - double r2 = 1/h.curvature(); - - /* malisa 22apr2006 is commenting out the "isnan" check - * if ( !finite(r1) || isnan(r1) || !finite(r2) || isnan(r2) ) { - * cerr << __FUNCTION__ << " *** error *** "; - * cerr << " r1=" << r1; - * cerr << " r2=" << r2 << endl; - * return pair(NoSolution, NoSolution); - * } - */ - - double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd); - - double s; - double x, y; - if (fabs(cosAlpha) < 1) { // two solutions - double sinAlpha = sin(acos(cosAlpha)); - x = xcenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd; - y = ycenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd; - s = pathLength(x, y); - x = xcenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd; - y = ycenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd; - double a = pathLength(x, y); - if (h.distance(at(a),scanPeriods) < h.distance(at(s),scanPeriods)) s = a; - } - else { // no intersection (or exactly one) - x = xcenter() + r1*dx/dd; - y = ycenter() + r1*dy/dd; - s = pathLength(x, y); - } - - // - // Second step: scan in decreasing intervals around seed 's' - // - const double MinStepSize = 10*micrometer; - const double MinRange = 10*centimeter; - double dmin = h.distance(at(s),scanPeriods); - double range = max(2*dmin, MinRange); - - /* malisa comments out the "isnan" check 22apr2006 - * if ( !finite(range) || isnan(range)) { - * cerr << __FUNCTION__ << " *** error *** "; - * cerr << " range=" << range << endl; - * return pair(NoSolution, NoSolution); - * } - */ - - double ds = range/10.; - double slast=-999999, d; - s1 = s - range/2.; - s2 = s + range/2.; - - double tmp1; - double tmp2; - - while (ds > MinStepSize) { - if ( !(s1& o, int h=-1); - - virtual ~AliFmHelix(); - // AliFmHelix(const AliFmHelix&); // use default - // AliFmHelix& operator=(const AliFmHelix&); // use default - - double dipAngle() const; - double curvature() const; /// 1/R in xy-plane - double phase() const; /// aziumth in xy-plane measured from ring center - double xcenter() const; /// x-center of circle in xy-plane - double ycenter() const; /// y-center of circle in xy-plane - int h() const; /// -sign(q*B); - - const AliFmThreeVector& origin() const; /// starting point - - void setParameters(double c, double dip, double phase, const AliFmThreeVector& o, int h); - - double x(double s) const; - double y(double s) const; - double z(double s) const; - - AliFmThreeVector at(double s) const; - - /// returns period length of helix - double period() const; - - /// path length at given r (cylindrical r) - pair pathLength(double r) const; - - /// path length at given r (cylindrical r, cylinder axis at x,y) - pair pathLength(double r, double x, double y, bool scanPeriods = true); - - /// path length at distance of closest approach to a given point - double pathLength(const AliFmThreeVector& p, bool scanPeriods = true) const; - - /// path length at intersection with plane - double pathLength(const AliFmThreeVector& r, - const AliFmThreeVector& n) const; - - /// path length at distance of closest approach in the xy-plane to a given point - double pathLength(double x, double y) const; - - /// path lengths at dca between two helices - pair pathLengths(const AliFmHelix&, bool scanPeriods = true) const; - - /// minimal distance between point and helix - double distance(const AliFmThreeVector& p, bool scanPeriods = true) const; - - /// checks for valid parametrization - bool valid(double world = 1.e+5) const {return !bad(world);} - int bad(double world = 1.e+5) const; - - /// move the origin along the helix to s which becomes then s=0 - virtual void moveOrigin(double s); - - static const double NoSolution; - -protected: - AliFmHelix(); - - void setCurvature(double); /// performs also various checks - void setPhase(double); - void setDipAngle(double); - - /// value of S where distance in x-y plane is minimal - double fudgePathLength(const AliFmThreeVector&) const; - -protected: - bool mSingularity; // true for straight line case (B=0) - AliFmThreeVector mOrigin; - double mDipAngle; - double mCurvature; - double mPhase; - int mH; // -sign(q*B); - - double mCosDipAngle; - double mSinDipAngle; - double mCosPhase; - double mSinPhase; -#ifdef __ROOT__ - ClassDef(AliFmHelix,1) -#endif -}; - -// -// Non-member functions -// -int operator== (const AliFmHelix&, const AliFmHelix&); -int operator!= (const AliFmHelix&, const AliFmHelix&); -ostream& operator<<(ostream&, const AliFmHelix&); - -// -// Inline functions -// -inline int AliFmHelix::h() const {return mH;} - -inline double AliFmHelix::dipAngle() const {return mDipAngle;} - -inline double AliFmHelix::curvature() const {return mCurvature;} - -inline double AliFmHelix::phase() const {return mPhase;} - -inline double AliFmHelix::x(double s) const -{ - if (mSingularity) - return mOrigin.x() - s*mCosDipAngle*mSinPhase; - else - return mOrigin.x() + (cos(mPhase + s*mH*mCurvature*mCosDipAngle)-mCosPhase)/mCurvature; -} - -inline double AliFmHelix::y(double s) const -{ - if (mSingularity) - return mOrigin.y() + s*mCosDipAngle*mCosPhase; - else - return mOrigin.y() + (sin(mPhase + s*mH*mCurvature*mCosDipAngle)-mSinPhase)/mCurvature; -} - -inline double AliFmHelix::z(double s) const -{ - return mOrigin.z() + s*mSinDipAngle; -} - -inline const AliFmThreeVector& AliFmHelix::origin() const {return mOrigin;} - -inline AliFmThreeVector AliFmHelix::at(double s) const -{ - return AliFmThreeVector(x(s), y(s), z(s)); -} - -inline double AliFmHelix::pathLength(double x, double y) const -{ - return fudgePathLength(AliFmThreeVector(x, y, 0)); -} -inline int AliFmHelix::bad(double WorldSize) const -{ - - int ierr; - if (!::finite(mDipAngle )) return 11; - if (!::finite(mCurvature )) return 12; - - ierr = mOrigin.bad(WorldSize); - if (ierr) return 3+ierr*100; - - if (::fabs(mDipAngle) >1.58) return 21; - double qwe = ::fabs(::fabs(mDipAngle)-M_PI/2); - if (qwe < 1./WorldSize ) return 31; - - if (::fabs(mCurvature) > WorldSize) return 22; - if (mCurvature < 0 ) return 32; - - if (abs(mH) != 1 ) return 24; - - return 0; -} - -#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.cxx b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.cxx deleted file mode 100644 index b05fd2ca29b..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.cxx +++ /dev/null @@ -1,168 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Brian Lasiuk, Sep 1997 - *************************************************************************** - * - * Description: - * Parametrization of a physical helix. - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/04/25 15:38:41 panos - * Importing the HBT code dir - * - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.7 2005/07/06 18:49:56 fisyak - * Replace StHelixD, StLorentzVectorD,StLorentzVectorF,StMatrixD,StMatrixF,AliFmPhysicalHelixD,StThreeVectorD,StThreeVectorF by templated version - * - * Revision 1.6 2003/09/02 17:59:35 perev - * gcc 3.2 updates + WarnOff - * - * Revision 1.5 2002/06/21 17:49:26 genevb - * Some minor speed improvements - * - * Revision 1.4 2002/02/20 00:56:23 ullrich - * Added methods to calculate signed DCA. - * - * Revision 1.3 1999/02/24 11:42:18 ullrich - * Fixed bug in momentum(). - * - * Revision 1.2 1999/02/12 01:01:04 wenaus - * Fix bug in momentum calculation - * - * Revision 1.1 1999/01/30 03:59:04 fisyak - * Root Version of StarClassLibrary - * - * Revision 1.1 1999/01/23 00:29:21 ullrich - * Initial Revision - * - **************************************************************************/ -#include -#include "AliFmHelix.h" -#include "AliFmPhysicalHelix.h" -#include "Base/PhysicalConstants.h" -#include "Base/SystemOfUnits.h" -#ifdef __ROOT__ -ClassImpT(AliFmPhysicalHelix,double); -#endif -AliFmPhysicalHelix::AliFmPhysicalHelix(){} - -AliFmPhysicalHelix::~AliFmPhysicalHelix() { /* nop */ } - -AliFmPhysicalHelix::AliFmPhysicalHelix(const AliFmThreeVector& p, - const AliFmThreeVector& o, - double B, double q) -{ - mH = (q*B <= 0) ? 1 : -1; - if(p.y() == 0 && p.x() == 0) - setPhase((M_PI/4)*(1-2.*mH)); - else - setPhase(atan2(p.y(),p.x())-mH*M_PI/2); - setDipAngle(atan2(p.z(),p.perp())); - mOrigin = o; - -#ifndef ST_NO_NAMESPACES - { - using namespace units; -#endif - setCurvature(fabs((c_light*nanosecond/meter*q*B/tesla)/ - (abs(p.mag())/GeV*mCosDipAngle)/meter)); -#ifndef ST_NO_NAMESPACES - } -#endif -} - -AliFmPhysicalHelix::AliFmPhysicalHelix(double c, double d, double phase, - const AliFmThreeVector& o, int h) - : AliFmHelix(c, d, phase, o, h) { /* nop */} - - -AliFmThreeVector AliFmPhysicalHelix::momentum(double B) const -{ - if (mSingularity) - return(AliFmThreeVector(0,0,0)); - else { -#ifndef ST_NO_NAMESPACES - { - using namespace units; -#endif - double pt = GeV*fabs(c_light*nanosecond/meter*B/tesla)/(fabs(mCurvature)*meter); - - return (AliFmThreeVector(pt*cos(mPhase+mH*M_PI/2), // pos part pos field - pt*sin(mPhase+mH*M_PI/2), - pt*tan(mDipAngle))); -#ifndef ST_NO_NAMESPACES - } -#endif - } -} - -AliFmThreeVector AliFmPhysicalHelix::momentumAt(double S, double B) const -{ - // Obtain phase-shifted momentum from phase-shift of origin - double xc = this->xcenter(); - double yc = this->ycenter(); - double rx = (y(S)-yc)/(mOrigin.y()-yc); - double ry = (x(S)-xc)/(mOrigin.x()-xc); - return (this->momentum(B)).pseudoProduct(rx,ry,1.0); -} - -int AliFmPhysicalHelix::charge(double B) const -{ - return (B > 0 ? -mH : mH); -} - -double AliFmPhysicalHelix::geometricSignedDistance(double x, double y) -{ - // Geometric signed distance - double thePath = this->pathLength(x,y); - AliFmThreeVector DCA2dPosition = this->at(thePath); - DCA2dPosition.setZ(0); - AliFmThreeVector position(x,y,0); - AliFmThreeVector DCAVec = (DCA2dPosition-position); - AliFmThreeVector momVec; - // Deal with straight tracks - if (this->mSingularity) { - momVec = this->at(1)- this->at(0); - momVec.setZ(0); - } - else { - momVec = this->momentumAt(thePath,1./tesla); // Don't care about Bmag. Helicity is what matters. - momVec.setZ(0); - } - - double cross = DCAVec.x()*momVec.y() - DCAVec.y()*momVec.x(); - double theSign = (cross>=0) ? 1. : -1.; - return theSign*DCAVec.perp(); -} - -double AliFmPhysicalHelix::curvatureSignedDistance(double x, double y) -{ - // Protect against mH = 0 or zero field - if (this->mSingularity || abs(this->mH)<=0) { - return (this->geometricSignedDistance(x,y)); - } - else { - return (this->geometricSignedDistance(x,y))/(this->mH); - } - -} - -double AliFmPhysicalHelix::geometricSignedDistance(const AliFmThreeVector& pos) -{ - double sdca2d = this->geometricSignedDistance(pos.x(),pos.y()); - double theSign = (sdca2d>=0) ? 1. : -1.; - return (this->distance(pos))*theSign; -} - -double AliFmPhysicalHelix::curvatureSignedDistance(const AliFmThreeVector& pos) -{ - double sdca2d = this->curvatureSignedDistance(pos.x(),pos.y()); - double theSign = (sdca2d>=0) ? 1. : -1.; - return (this->distance(pos))*theSign; -} diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.h b/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.h deleted file mode 100644 index d078cc73988..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFmPhysicalHelix.h +++ /dev/null @@ -1,72 +0,0 @@ -/*************************************************************************** - * - * $Id$ - * - * Author: Brian Lasiuk, Sep 1997 - *************************************************************************** - * - * Description: - * Parametrization of a physical helix. See the SCL user guide for more. - * - *************************************************************************** - * - * $Log$ - * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki - * First version on CVS - * - * Revision 1.4 2005/07/06 18:49:56 fisyak - * Replace AliFmHelixD, AliFmLorentzVectorD,AliFmLorentzVectorF,AliFmMatrixD,AliFmMatrixF,AliFmPhysicalHelixD,AliFmThreeVectorD,AliFmThreeVectorF by templated version - * - * Revision 1.3 2002/06/21 17:49:26 genevb - * Some minor speed improvements - * - * Revision 1.2 2002/02/20 00:56:23 ullrich - * Added methods to calculate signed DCA. - * - * Revision 1.1 1999/01/30 03:59:04 fisyak - * Root Version of AliFmarClassLibrary - * - * Revision 1.1 1999/01/23 00:27:59 ullrich - * Initial Revision - * - **************************************************************************/ -#ifndef ST_PHYSICAL_HELIX_HH -#define ST_PHYSICAL_HELIX_HH - -#include "AliFmThreeVector.h" -#include "AliFmHelix.h" - -class AliFmPhysicalHelix : public AliFmHelix { -public: - // Requires: momentum, origin, signed Magnetic Field - // and Charge of particle (+/- 1) - AliFmPhysicalHelix(const AliFmThreeVector&, - const AliFmThreeVector&, - double, double); - - // curvature, dip angle, phase, origin, h - AliFmPhysicalHelix(double, double, double, - const AliFmThreeVector&, int h=-1); - AliFmPhysicalHelix(); - - ~AliFmPhysicalHelix(); - - // Requires: signed Magnetic Field - AliFmThreeVector momentum(double) const; // returns the momentum at origin - AliFmThreeVector momentumAt(double, double) const; // returns momemtum at S - int charge(double) const; // returns charge of particle - // 2d DCA to x,y point signed relative to curvature - double curvatureSignedDistance(double x, double y) ; - // 2d DCA to x,y point signed relative to rotation - double geometricSignedDistance(double x, double y) ; - // 3d DCA to 3d point signed relative to curvature - double curvatureSignedDistance(const AliFmThreeVector&) ; - // 3d DCA to 3d point signed relative to rotation - double geometricSignedDistance(const AliFmThreeVector&) ; - -#ifdef __ROOT__ - ClassDef(AliFmPhysicalHelix,1) -#endif -}; - -#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.cxx b/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.cxx deleted file mode 100644 index 42432791744..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.cxx +++ /dev/null @@ -1,107 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// /// -/// AliFemtoModelWeightGenerator - abstract base class for femtoscopic /// -/// weight generator /// -/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// -/// /// -//////////////////////////////////////////////////////////////////////////////// -#ifdef __ROOT__ - ClassImp(AliFemtoModelGausLCMSFreezeOutGenerator, 1) -#endif - -#include "AliFemtoModelWeightGenerator.h" -#include "AliFemtoModelHiddenInfo.h" - -const Int_t AliFemtoModelWeightGenerator::kPionPlusPionPlus = 1; -const Int_t AliFemtoModelWeightGenerator::kPionPlusPionMinus = 2; -const Int_t AliFemtoModelWeightGenerator::kKaonPlusKaonPlus = 3; -const Int_t AliFemtoModelWeightGenerator::kKaonPlusKaonMinus = 4; -const Int_t AliFemtoModelWeightGenerator::kProtonProton = 5; -const Int_t AliFemtoModelWeightGenerator::kProtonAntiproton = 6; -const Int_t AliFemtoModelWeightGenerator::kPionPlusKaonPlus = 7; -const Int_t AliFemtoModelWeightGenerator::kPionPlusKaonMinus = 8; -const Int_t AliFemtoModelWeightGenerator::kPionPlusProton = 9; -const Int_t AliFemtoModelWeightGenerator::kPionPlusAntiproton = 10; -const Int_t AliFemtoModelWeightGenerator::kKaonPlusProton = 11; -const Int_t AliFemtoModelWeightGenerator::kKaonPlusAntiproton = 12; - -//_____________________________________________ -AliFemtoModelWeightGenerator::AliFemtoModelWeightGenerator() : - fPairType(0), - fKStarOut(0), fKStarSide(0), fKStarLong(0), fKStar(0), - fRStarOut(0), fRStarSide(0), fRStarLong(0), fRStar(0) -{} -//_____________________________________________ -AliFemtoModelWeightGenerator::AliFemtoModelWeightGenerator(const AliFemtoModelWeightGenerator &aModel) : - fPairType(0), - fKStarOut(0), fKStarSide(0), fKStarLong(0), fKStar(0), - fRStarOut(0), fRStarSide(0), fRStarLong(0), fRStar(0) -{ - fPairType = aModel.fPairType; -} -//_____________________________________________ -AliFemtoModelWeightGenerator::~AliFemtoModelWeightGenerator(){/* no-op */} -//_____________________________________________ -void AliFemtoModelWeightGenerator::SetPairType(Int_t aPairType) -{ - fPairType = aPairType; -} - -//_____________________________________________ -Int_t AliFemtoModelWeightGenerator::GetPairType() -{ - return fPairType; -} - -//_____________________________________________ -void AliFemtoModelWeightGenerator::SetPairTypeFromPair(AliFemtoPair *aPair) -{ - AliFemtoModelHiddenInfo *inf1 = ( AliFemtoModelHiddenInfo *) aPair->track1()->HiddenInfo(); - AliFemtoModelHiddenInfo *inf2 = ( AliFemtoModelHiddenInfo *) aPair->track2()->HiddenInfo(); - - const Int_t tPid1 = inf1->GetPDGPid(); - const Int_t tPid2 = inf2->GetPDGPid(); - - if (((tPid1 == 211) && (tPid2 == 211)) || - ((tPid1 == -211) && (tPid2 == -211))) - fPairType = kPionPlusPionPlus; - else if (((tPid1 == -211) && (tPid2 == 211)) || - ((tPid1 == 211) && (tPid2 == -211))) - fPairType = kPionPlusPionMinus; - else if (((tPid1 == 321) && (tPid2 == 321)) || - ((tPid1 == -321) && (tPid2 == -321))) - fPairType = kKaonPlusKaonPlus; - else if (((tPid1 == -321) && (tPid2 == 321)) || - ((tPid1 == 321) && (tPid2 == -321))) - fPairType = kKaonPlusKaonMinus; - else if (((tPid1 == 2212) && (tPid2 == 2212)) || - ((tPid1 == -2212) && (tPid2 == -2212))) - fPairType = kProtonProton; - else if (((tPid1 == -2212) && (tPid2 == 2212)) || - ((tPid1 == 2212) && (tPid2 == -2212))) - fPairType = kProtonAntiproton; - else if (((tPid1 == 211) && (tPid2 == 321)) || - ((tPid1 == -211) && (tPid2 == -321))) - fPairType = kPionPlusKaonPlus; - else if (((tPid1 == -211) && (tPid2 == 321)) || - ((tPid1 == 211) && (tPid2 == -321))) - fPairType = kPionPlusKaonMinus; - else if (((tPid1 == 211) && (tPid2 == 2212)) || - ((tPid1 == -211) && (tPid2 == -2212))) - fPairType = kPionPlusProton; - else if (((tPid1 == -211) && (tPid2 == 2212)) || - ((tPid1 == 211) && (tPid2 == -2212))) - fPairType = kPionPlusAntiproton; - else if (((tPid1 == 321) && (tPid2 == 2212)) || - ((tPid1 == -321) && (tPid2 == -2212))) - fPairType = kKaonPlusProton; - else if (((tPid1 == -321) && (tPid2 == 2212)) || - ((tPid1 == 321) && (tPid2 == -2212))) - fPairType = kKaonPlusAntiproton; -} - -//_____________________________________________ -AliFemtoModelWeightGenerator* AliFemtoModelWeightGenerator::Clone() const -{ - return 0; -} diff --git a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.h b/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.h deleted file mode 100644 index e6a6520684a..00000000000 --- a/PWG2/FEMTOSCOPY/AliFemto/Model/AliFemtoModelWeightGenerator.h +++ /dev/null @@ -1,82 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// /// -/// AliFemtoModelWeightGenerator - abstract base class for femtoscopic /// -/// weight generator /// -/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// -/// /// -//////////////////////////////////////////////////////////////////////////////// -#ifndef AliFemtoModelWeightGenerator_hh -#define AliFemtoModelWeightGenerator_hh - -#include "TRandom2.h" -#include "AliFemtoPair.h" - -class AliFemtoModelWeightGenerator -{ - public: - AliFemtoModelWeightGenerator(); - AliFemtoModelWeightGenerator(const AliFemtoModelWeightGenerator &aModel); - virtual ~AliFemtoModelWeightGenerator(); - virtual Double_t GenerateWeight(AliFemtoPair *aPair) = 0; - - virtual void SetPairType(Int_t aPairType); - virtual void SetPairTypeFromPair(AliFemtoPair *aPair); - virtual Int_t GetPairType(); - - virtual Double_t GetKStar(); - virtual Double_t GetKStarOut(); - virtual Double_t GetKStarSide(); - virtual Double_t GetKStarLong(); - virtual Double_t GetRStar(); - virtual Double_t GetRStarOut(); - virtual Double_t GetRStarSide(); - virtual Double_t GetRStarLong(); - - virtual AliFemtoModelWeightGenerator* Clone() const; - - static const Int_t kPionPlusPionPlus; - static const Int_t kPionPlusPionMinus; - static const Int_t kKaonPlusKaonPlus; - static const Int_t kKaonPlusKaonMinus; - static const Int_t kProtonProton; - static const Int_t kProtonAntiproton; - static const Int_t kPionPlusKaonPlus; - static const Int_t kPionPlusKaonMinus; - static const Int_t kPionPlusProton; - static const Int_t kPionPlusAntiproton; - static const Int_t kKaonPlusProton; - static const Int_t kKaonPlusAntiproton; - - protected: - Int_t fPairType; - - Double_t fKStarOut; // relative momentum out component in PRF - Double_t fKStarSide; // relative momentum side component in PRF - Double_t fKStarLong; // relative momentum long component in PRF - Double_t fKStar; // relative momentum magnitude - - Double_t fRStarOut; // relative separation out component in PRF - Double_t fRStarSide; // relative separation side component in PRF - Double_t fRStarLong; // relative separation long component in PRF - Double_t fRStar; // relative separation magnitude - private: - -#ifdef __ROOT__ - ClassDef(AliFemtoModelWeightGenerator, 1) -#endif - - }; - -inline Double_t AliFemtoModelWeightGenerator::GetKStar() { return fKStar; } -inline Double_t AliFemtoModelWeightGenerator::GetKStarOut() { return fKStarOut; } -inline Double_t AliFemtoModelWeightGenerator::GetKStarSide() { return fKStarSide; } -inline Double_t AliFemtoModelWeightGenerator::GetKStarLong() { return fKStarLong; } -inline Double_t AliFemtoModelWeightGenerator::GetRStar() { return fRStar; } -inline Double_t AliFemtoModelWeightGenerator::GetRStarOut() { return fRStarOut; } -inline Double_t AliFemtoModelWeightGenerator::GetRStarSide() { return fRStarSide; } -inline Double_t AliFemtoModelWeightGenerator::GetRStarLong() { return fRStarLong; } - - -#endif - - diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/PhysicalConstants.h b/PWG2/FEMTOSCOPY/AliFemto/PhysicalConstants.h similarity index 98% rename from PWG2/FEMTOSCOPY/AliFemto/Base/PhysicalConstants.h rename to PWG2/FEMTOSCOPY/AliFemto/PhysicalConstants.h index 90d96c4ff6c..09984beb0c0 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/PhysicalConstants.h +++ b/PWG2/FEMTOSCOPY/AliFemto/PhysicalConstants.h @@ -10,6 +10,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Base/SystemOfUnits.h b/PWG2/FEMTOSCOPY/AliFemto/SystemOfUnits.h similarity index 99% rename from PWG2/FEMTOSCOPY/AliFemto/Base/SystemOfUnits.h rename to PWG2/FEMTOSCOPY/AliFemto/SystemOfUnits.h index 8521f9dfdd6..c5cf7a52a93 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Base/SystemOfUnits.h +++ b/PWG2/FEMTOSCOPY/AliFemto/SystemOfUnits.h @@ -35,6 +35,9 @@ *************************************************************************** * * $Log$ + * Revision 1.1.1.1 2007/04/25 15:38:41 panos + * Importing the HBT code dir + * * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki * First version on CVS * diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/TpcLocalTransform.cxx b/PWG2/FEMTOSCOPY/AliFemto/TpcLocalTransform.cxx similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/TpcLocalTransform.cxx rename to PWG2/FEMTOSCOPY/AliFemto/TpcLocalTransform.cxx diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/TpcLocalTransform.h b/PWG2/FEMTOSCOPY/AliFemto/TpcLocalTransform.h similarity index 100% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/TpcLocalTransform.h rename to PWG2/FEMTOSCOPY/AliFemto/TpcLocalTransform.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/phys_constants.h b/PWG2/FEMTOSCOPY/AliFemto/phys_constants.h similarity index 92% rename from PWG2/FEMTOSCOPY/AliFemto/Infrastructure/phys_constants.h rename to PWG2/FEMTOSCOPY/AliFemto/phys_constants.h index a8f2f7873ee..adf5931593d 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/Infrastructure/phys_constants.h +++ b/PWG2/FEMTOSCOPY/AliFemto/phys_constants.h @@ -5,7 +5,7 @@ #ifndef _StHbt_phys_constants_h_ #define _StHbt_phys_constants_h_ -#include "Base/PhysicalConstants.h" // from StarClassLibrary +#include "PhysicalConstants.h" // from StarClassLibrary // the strangeness guys used a different naming system (of course) static const double M_LAMBDA = lambda_mass_c2; -- 2.39.3