StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mercedesStarStandardEventCut.cxx
1 /***************************************************************************
2  *
3  * $Id: mercedesStarStandardEventCut.cxx,v 1.2 2003/01/17 16:47:18 mercedes Exp $
4  *
5  * Author: Mercedes Lopez Noriega , Ohio State, mercedes@pacific.mps.ohio-state.edu
6  *
7  ***************************************************************************
8  *
9  * Description:part of STAR HBT Framework: StHbtMaker package
10  * A event-wise cut taht cuts on multiplicity ("new" STAR standard multipliity
11  * definition for charge hadrons, 2001 data) and:
12  * primary tracks only
13  * flag > 0
14  * fit points >= 10
15  * abs(eta) < 0.5
16  * dca < 3 cm
17  *
18  ***************************************************************************
19  *
20  * $Log: mercedesStarStandardEventCut.cxx,v $
21  * Revision 1.2 2003/01/17 16:47:18 mercedes
22  * Updated to get reference multiplicity
23  *
24  * Revision 1.1 2002/02/22 15:50:13 mercedes
25  * added StarStandard multiplicity cut for charge hadrons (2001 data)
26  *
27  * Revision 1.1 2002/02/22 16:27:15 mercedes
28  * added StarStandard multiplicity cut for charge hadrons
29  *
30  **************************************************************************/
31 
32 
33 #include "StHbtMaker/Cut/mercedesStarStandardEventCut.h"
34 #include <cstdio>
35 
36 #ifdef __ROOT__
38 #endif
39 
40 mercedesStarStandardEventCut::mercedesStarStandardEventCut(){
41  mNEventsPassed = mNEventsFailed = 0;
42 }
43 
44 //------------------------------
45 bool mercedesStarStandardEventCut::Pass(const StHbtEvent* event){
46 
47  double VertexZPos = event->PrimVertPos().z();
48  cout << "mercedesStarStandardEventCut:: VertexZPos: " << mVertZPos[0] << " < " << VertexZPos << " < " << mVertZPos[1] << endl;
49  bool goodEvent =
50  ((VertexZPos > mVertZPos[0]) &&
51  (VertexZPos < mVertZPos[1]));
52  if (goodEvent){
53  // this is the StMuEvent::refMult():
54  int mult = event->UncorrectedNumberOfPrimaries();
55 
56  // int mult = 0;
57  // StHbtTrack* track;
58  // for (StHbtTrackIterator pIter=event->TrackCollection()->begin();pIter!=event->TrackCollection()->end();pIter++){
59  // track = *pIter;
60  // if ((track->NHits()>=10)&&(track->DCAxy()<3.0)&&(fabs(track->P().pseudoRapidity())<0.5)){
61  // mult++;
62  // }
63  // }
64 
65  cout << "mercedesStarStandardEventCut:: mult: " << mEventMult[0] << " < " << mult << " < " << mEventMult[1] << endl;
66  goodEvent = (goodEvent&& (mult > mEventMult[0]) && (mult < mEventMult[1]));
67  }
68 
69  goodEvent ? mNEventsPassed++ : mNEventsFailed++ ;
70  cout << "mercedesStarStandardEventCut:: return : " << goodEvent << endl;
71 
72  return (goodEvent);
73 }
74 
75 //------------------------------
76 StHbtString mercedesStarStandardEventCut::Report(){
77  string Stemp;
78  char Ctemp[100];
79  sprintf(Ctemp,"\nMultiplicity:\t %d-%d",mEventMult[0],mEventMult[1]);
80  Stemp = Ctemp;
81  sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",mVertZPos[0],mVertZPos[1]);
82  Stemp += Ctemp;
83  sprintf(Ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",mNEventsPassed,mNEventsFailed);
84  Stemp += Ctemp;
85  StHbtString returnThis = Stemp;
86  return returnThis;
87 }