BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DTagTool Class Reference

#include <DTagTool.h>

Public Member Functions

 DTagTool ()
 ~DTagTool ()
bool isDTagListEmpty ()
void setPID (bool pid)
EvtRecDTagCol::iterator modes_begin ()
EvtRecDTagCol::iterator modes_end ()
EvtRecPi0Col::iterator pi0_begin ()
EvtRecPi0Col::iterator pi0_end ()
EvtRecEtaToGGCol::iterator eta_begin ()
EvtRecEtaToGGCol::iterator eta_end ()
EvtRecVeeVertexCol::iterator ks_begin ()
EvtRecVeeVertexCol::iterator ks_end ()
vector< int > D0modes ()
vector< int > Dpmodes ()
vector< int > Dsmodes ()
vector< int > mode (EvtRecDTag::DecayMode decaymode)
vector< int > mode (int decaymode)
bool findSTag (EvtRecDTag::DecayMode mode, int tagcharm)
bool findSTag (EvtRecDTag::DecayMode mode)
bool findDTag (EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2, string smass="mbc")
bool findDTag (EvtRecDTag::DecayMode mode1, int tagcharm1, EvtRecDTag::DecayMode mode2, int tagcharm2, string smass="mbc")
bool findADTag (EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2)
bool findADTag (EvtRecDTag::DecayMode mode1, int tagcharm1, EvtRecDTag::DecayMode mode2, int tagcharm2)
bool findSTag (int mode, int tagcharm)
bool findSTag (int mode)
bool findDTag (int mode1, int mode2, string smass="mbc")
bool findDTag (int mode1, int tagcharm1, int mode2, int tagcharm2, string smass="mbc")
bool findADTag (int mode1, int mode2)
bool findADTag (int mode1, int tagcharm1, int mode2, int tagcharm2)
EvtRecDTagCol::iterator stag ()
EvtRecDTagCol::iterator dtag1 ()
EvtRecDTagCol::iterator dtag2 ()
vector< EvtRecDTagCol::iterator > vdtag1 ()
vector< EvtRecDTagCol::iterator > vdtag2 ()
void setdtagDE (double sigma1, double sigma2)
bool compare (EvtRecDTagCol::iterator pair1_iter1, EvtRecDTagCol::iterator pair1_iter2, EvtRecDTagCol::iterator pair2_iter1, EvtRecDTagCol::iterator pair2_iter2, double mD, string smass)
void operator<< (EvtRecDTagCol::iterator iter)
HepLorentzVector pi0p4 (EvtRecPi0Col::iterator pi0Itr, bool isconstrain=true)
HepLorentzVector etap4 (EvtRecEtaToGGCol::iterator etaItr, bool isconstrain=true)
vector< int > pi0Id (EvtRecDTagCol::iterator iter, int numpi0=1)
vector< int > etaId (EvtRecDTagCol::iterator iter, int numeta=1)
vector< int > ksId (EvtRecDTagCol::iterator iter, int numks=1)
HepLorentzVector p4shower (RecEmcShower *shower)
HepLorentzVector p4 (RecMdcKalTrack *mdcKalTrack, int pid)
bool isPion (EvtRecTrack *trk)
bool isKaon (EvtRecTrack *trk)
bool isElectron (EvtRecTrack *trk)
bool isMuon (EvtRecTrack *trk)
bool isGoodTrack (EvtRecTrack *trk)
bool isGoodTrack_loose (EvtRecTrack *trk)
bool isGoodShower (EvtRecTrack *trk)
bool isGoodShower (EvtRecTrack *trk, double shwDang)
bool cosmicandleptonVeto (bool emc=true)
int numofShowerAboveThreshold ()
int numofShowerAboveThreshold (int threshold)
bool shareTracks (EvtRecDTagCol::iterator iter1, EvtRecDTagCol::iterator iter2)
double angleShowerwithTrack (EvtRecTrack *shower, EvtRecTrack *track)
void clear ()
void name ()
 DTagTool ()
 ~DTagTool ()
bool isDTagListEmpty ()
void setPID (bool pid)
EvtRecDTagCol::iterator modes_begin ()
EvtRecDTagCol::iterator modes_end ()
EvtRecPi0Col::iterator pi0_begin ()
EvtRecPi0Col::iterator pi0_end ()
EvtRecEtaToGGCol::iterator eta_begin ()
EvtRecEtaToGGCol::iterator eta_end ()
EvtRecVeeVertexCol::iterator ks_begin ()
EvtRecVeeVertexCol::iterator ks_end ()
vector< int > D0modes ()
vector< int > Dpmodes ()
vector< int > Dsmodes ()
vector< int > mode (EvtRecDTag::DecayMode decaymode)
vector< int > mode (int decaymode)
bool findSTag (EvtRecDTag::DecayMode mode, int tagcharm)
bool findSTag (EvtRecDTag::DecayMode mode)
bool findDTag (EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2, string smass="mbc")
bool findDTag (EvtRecDTag::DecayMode mode1, int tagcharm1, EvtRecDTag::DecayMode mode2, int tagcharm2, string smass="mbc")
bool findADTag (EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2)
bool findADTag (EvtRecDTag::DecayMode mode1, int tagcharm1, EvtRecDTag::DecayMode mode2, int tagcharm2)
bool findSTag (int mode, int tagcharm)
bool findSTag (int mode)
bool findDTag (int mode1, int mode2, string smass="mbc")
bool findDTag (int mode1, int tagcharm1, int mode2, int tagcharm2, string smass="mbc")
bool findADTag (int mode1, int mode2)
bool findADTag (int mode1, int tagcharm1, int mode2, int tagcharm2)
EvtRecDTagCol::iterator stag ()
EvtRecDTagCol::iterator dtag1 ()
EvtRecDTagCol::iterator dtag2 ()
vector< EvtRecDTagCol::iterator > vdtag1 ()
vector< EvtRecDTagCol::iterator > vdtag2 ()
void setdtagDE (double sigma1, double sigma2)
bool compare (EvtRecDTagCol::iterator pair1_iter1, EvtRecDTagCol::iterator pair1_iter2, EvtRecDTagCol::iterator pair2_iter1, EvtRecDTagCol::iterator pair2_iter2, double mD, string smass)
void operator<< (EvtRecDTagCol::iterator iter)
HepLorentzVector pi0p4 (EvtRecPi0Col::iterator pi0Itr, bool isconstrain=true)
HepLorentzVector etap4 (EvtRecEtaToGGCol::iterator etaItr, bool isconstrain=true)
vector< int > pi0Id (EvtRecDTagCol::iterator iter, int numpi0=1)
vector< int > etaId (EvtRecDTagCol::iterator iter, int numeta=1)
vector< int > ksId (EvtRecDTagCol::iterator iter, int numks=1)
HepLorentzVector p4shower (RecEmcShower *shower)
HepLorentzVector p4 (RecMdcKalTrack *mdcKalTrack, int pid)
bool isPion (EvtRecTrack *trk)
bool isKaon (EvtRecTrack *trk)
bool isElectron (EvtRecTrack *trk)
bool isMuon (EvtRecTrack *trk)
bool isGoodTrack (EvtRecTrack *trk)
bool isGoodTrack_loose (EvtRecTrack *trk)
bool isGoodShower (EvtRecTrack *trk)
bool isGoodShower (EvtRecTrack *trk, double shwDang)
bool cosmicandleptonVeto (bool emc=true)
int numofShowerAboveThreshold ()
int numofShowerAboveThreshold (int threshold)
bool shareTracks (EvtRecDTagCol::iterator iter1, EvtRecDTagCol::iterator iter2)
double angleShowerwithTrack (EvtRecTrack *shower, EvtRecTrack *track)
void clear ()
void name ()
 DTagTool ()
 ~DTagTool ()
bool isDTagListEmpty ()
void setPID (bool pid)
EvtRecDTagCol::iterator modes_begin ()
EvtRecDTagCol::iterator modes_end ()
EvtRecPi0Col::iterator pi0_begin ()
EvtRecPi0Col::iterator pi0_end ()
EvtRecEtaToGGCol::iterator eta_begin ()
EvtRecEtaToGGCol::iterator eta_end ()
EvtRecVeeVertexCol::iterator ks_begin ()
EvtRecVeeVertexCol::iterator ks_end ()
vector< int > D0modes ()
vector< int > Dpmodes ()
vector< int > Dsmodes ()
vector< int > mode (EvtRecDTag::DecayMode decaymode)
vector< int > mode (int decaymode)
bool findSTag (EvtRecDTag::DecayMode mode, int tagcharm)
bool findSTag (EvtRecDTag::DecayMode mode)
bool findDTag (EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2, string smass="mbc")
bool findDTag (EvtRecDTag::DecayMode mode1, int tagcharm1, EvtRecDTag::DecayMode mode2, int tagcharm2, string smass="mbc")
bool findADTag (EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2)
bool findADTag (EvtRecDTag::DecayMode mode1, int tagcharm1, EvtRecDTag::DecayMode mode2, int tagcharm2)
bool findSTag (int mode, int tagcharm)
bool findSTag (int mode)
bool findDTag (int mode1, int mode2, string smass="mbc")
bool findDTag (int mode1, int tagcharm1, int mode2, int tagcharm2, string smass="mbc")
bool findADTag (int mode1, int mode2)
bool findADTag (int mode1, int tagcharm1, int mode2, int tagcharm2)
EvtRecDTagCol::iterator stag ()
EvtRecDTagCol::iterator dtag1 ()
EvtRecDTagCol::iterator dtag2 ()
vector< EvtRecDTagCol::iterator > vdtag1 ()
vector< EvtRecDTagCol::iterator > vdtag2 ()
void setdtagDE (double sigma1, double sigma2)
bool compare (EvtRecDTagCol::iterator pair1_iter1, EvtRecDTagCol::iterator pair1_iter2, EvtRecDTagCol::iterator pair2_iter1, EvtRecDTagCol::iterator pair2_iter2, double mD, string smass)
void operator<< (EvtRecDTagCol::iterator iter)
HepLorentzVector pi0p4 (EvtRecPi0Col::iterator pi0Itr, bool isconstrain=true)
HepLorentzVector etap4 (EvtRecEtaToGGCol::iterator etaItr, bool isconstrain=true)
vector< int > pi0Id (EvtRecDTagCol::iterator iter, int numpi0=1)
vector< int > etaId (EvtRecDTagCol::iterator iter, int numeta=1)
vector< int > ksId (EvtRecDTagCol::iterator iter, int numks=1)
HepLorentzVector p4shower (RecEmcShower *shower)
HepLorentzVector p4 (RecMdcKalTrack *mdcKalTrack, int pid)
bool isPion (EvtRecTrack *trk)
bool isKaon (EvtRecTrack *trk)
bool isElectron (EvtRecTrack *trk)
bool isMuon (EvtRecTrack *trk)
bool isGoodTrack (EvtRecTrack *trk)
bool isGoodTrack_loose (EvtRecTrack *trk)
bool isGoodShower (EvtRecTrack *trk)
bool isGoodShower (EvtRecTrack *trk, double shwDang)
bool cosmicandleptonVeto (bool emc=true)
int numofShowerAboveThreshold ()
int numofShowerAboveThreshold (int threshold)
bool shareTracks (EvtRecDTagCol::iterator iter1, EvtRecDTagCol::iterator iter2)
double angleShowerwithTrack (EvtRecTrack *shower, EvtRecTrack *track)
void clear ()
void name ()

Protected Member Functions

IDataProviderSvc * eventSvc ()
IDataProviderSvc * eventSvc ()
IDataProviderSvc * eventSvc ()

Detailed Description

Constructor & Destructor Documentation

◆ DTagTool() [1/3]

DTagTool::DTagTool ( )

Accessing DTagList

Accessing Ks list

Accessing pi0 list

Accessing eta list

Definition at line 16 of file DTagTool.cxx.

17 : m_evtSvc( 0 )
18 , m_iterbegin( 0 )
19 , m_iterend( 0 )
20 , m_iterstag( 0 )
21 , m_iterdtag1( 0 )
22 , m_iterdtag2( 0 )
23 , m_chargebegin( 0 )
24 , m_chargeend( 0 )
25 , m_showerbegin( 0 )
26 , m_showerend( 0 )
27 , m_tag1desigma( 1.0 )
28 , m_tag2desigma( 1.0 ) {
29
30 SmartDataPtr<EvtRecEvent> evtRecEvent( eventSvc(), "/Event/EvtRec/EvtRecEvent" );
31 if ( !evtRecEvent )
32 {
33 cout << MSG::FATAL << "Could not find EvtRecEvent" << endl;
34 exit( 1 );
35 }
36
37 SmartDataPtr<EvtRecTrackCol> evtRecTrackCol( eventSvc(), "/Event/EvtRec/EvtRecTrackCol" );
38 if ( !evtRecTrackCol )
39 {
40 cout << MSG::FATAL << "Could not find EvtRecTrackCol" << endl;
41 exit( 1 );
42 }
43
44 StatusCode sc = Gaudi::svcLocator()->service( "SimplePIDSvc", m_simplePIDSvc );
45 if ( sc.isFailure() )
46 {
47 // log << MSG::FATAL << "Could not load SimplePIDSvc!" << endmsg;
48 exit( 1 );
49 }
50
51 m_chargebegin = evtRecTrackCol->begin();
52 m_chargeend = evtRecTrackCol->begin() + evtRecEvent->totalCharged();
53 m_showerbegin = evtRecTrackCol->begin() + evtRecEvent->totalCharged();
54 m_showerend = evtRecTrackCol->begin() + evtRecEvent->totalTracks();
55
56 /// Accessing DTagList
57 SmartDataPtr<EvtRecDTagCol> evtRecDTagCol( eventSvc(), EventModel::EvtRec::EvtRecDTagCol );
58 if ( !evtRecDTagCol )
59 {
60 cout << "Could not find EvtRecDTagCol" << endl;
61 exit( 1 );
62 }
63
64 /// Accessing Ks list
65 SmartDataPtr<EvtRecVeeVertexCol> evtRecVeeVertexCol( eventSvc(),
66 "/Event/EvtRec/EvtRecVeeVertexCol" );
67 if ( !evtRecVeeVertexCol )
68 {
69 cout << "Could not find EvtRecVeeVertexCol" << endl;
70 exit( 1 );
71 }
72
73 /// Accessing pi0 list
74 SmartDataPtr<EvtRecPi0Col> recPi0Col( eventSvc(), "/Event/EvtRec/EvtRecPi0Col" );
75 if ( !recPi0Col )
76 {
77 cout << "Could not find EvtRecPi0Col" << endl;
78 exit( 1 );
79 }
80
81 /// Accessing eta list
82
83 SmartDataPtr<EvtRecEtaToGGCol> recEtaToGGCol( eventSvc(), "/Event/EvtRec/EvtRecEtaToGGCol" );
84 if ( !recEtaToGGCol )
85 {
86 cout << "Could not find EvtRecEtaToGGCol" << endl;
87 exit( 1 );
88 }
89
90 m_iterbegin = evtRecDTagCol->begin();
91 m_iterend = evtRecDTagCol->end();
92 m_pi0iterbegin = recPi0Col->begin();
93 m_pi0iterend = recPi0Col->end();
94 m_etaiterbegin = recEtaToGGCol->begin();
95 m_etaiterend = recEtaToGGCol->end();
96 m_ksiterbegin = evtRecVeeVertexCol->begin();
97 m_ksiterend = evtRecVeeVertexCol->end();
98
99 if ( evtRecDTagCol->size() > 0 ) m_isdtaglistempty = false;
100 else m_isdtaglistempty = true;
101
102 // set initial pid requirement
103 m_pid = true;
104
105 // fill d0, dp, ds modes seprately
106 int index = 0;
107 for ( EvtRecDTagCol::iterator iter = m_iterbegin; iter != m_iterend; iter++ )
108 {
109
110 if ( (int)( ( *iter )->decayMode() ) < 200 ) m_d0modes.push_back( index );
111 else if ( (int)( ( *iter )->decayMode() ) < 400 ) m_dpmodes.push_back( index );
112 else if ( (int)( ( *iter )->decayMode() ) < 1000 ) m_dsmodes.push_back( index );
113
114 index++;
115 }
116}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
IDataProviderSvc * eventSvc()

◆ ~DTagTool() [1/3]

DTagTool::~DTagTool ( )

Definition at line 125 of file DTagTool.cxx.

125 {
126
127 m_d0modes.clear();
128 m_dpmodes.clear();
129 m_dsmodes.clear();
130}

◆ DTagTool() [2/3]

DTagTool::DTagTool ( )

◆ ~DTagTool() [2/3]

DTagTool::~DTagTool ( )

◆ DTagTool() [3/3]

DTagTool::DTagTool ( )

◆ ~DTagTool() [3/3]

DTagTool::~DTagTool ( )

Member Function Documentation

◆ angleShowerwithTrack() [1/3]

double DTagTool::angleShowerwithTrack ( EvtRecTrack * shower,
EvtRecTrack * track )

Definition at line 1262 of file DTagTool.cxx.

1262 {
1263
1264 double angle = -100;
1265
1266 RecEmcShower* emcTrk = shower->emcShower();
1267 Hep3Vector emcpos( emcTrk->x(), emcTrk->y(), emcTrk->z() );
1268
1269 if ( !track->isExtTrackValid() ) return angle;
1270 RecExtTrack* extTrk = track->extTrack();
1271 if ( extTrk->emcVolumeNumber() == -1 ) return angle;
1272 Hep3Vector extpos = extTrk->emcPosition();
1273 // maqm if(extpos==(-99,-99,-99))
1274 Hep3Vector temp( -99, -99, -99 );
1275 if ( extpos == temp ) return angle;
1276
1277 return extpos.angle( emcpos ) * 180 / CLHEP::pi;
1278}

Referenced by cosmicandleptonVeto().

◆ angleShowerwithTrack() [2/3]

double DTagTool::angleShowerwithTrack ( EvtRecTrack * shower,
EvtRecTrack * track )

◆ angleShowerwithTrack() [3/3]

double DTagTool::angleShowerwithTrack ( EvtRecTrack * shower,
EvtRecTrack * track )

◆ clear() [1/3]

void DTagTool::clear ( )

Definition at line 118 of file DTagTool.cxx.

118 {
119
120 m_d0modes.clear();
121 m_dpmodes.clear();
122 m_dsmodes.clear();
123}

Referenced by DDecay::execute(), and DSemilepAlg::execute().

◆ clear() [2/3]

void DTagTool::clear ( )

◆ clear() [3/3]

void DTagTool::clear ( )

◆ compare() [1/3]

bool DTagTool::compare ( EvtRecDTagCol::iterator pair1_iter1,
EvtRecDTagCol::iterator pair1_iter2,
EvtRecDTagCol::iterator pair2_iter1,
EvtRecDTagCol::iterator pair2_iter2,
double mD,
string smass )

Definition at line 132 of file DTagTool.cxx.

135 {
136
137 double value1 = 0;
138 double value2 = 0;
139 if ( smass == "mbc" )
140 {
141 value1 = fabs( 0.5 * ( ( *pair1_iter1 )->mBC() + ( *pair1_iter2 )->mBC() ) - mD );
142 value2 = fabs( 0.5 * ( ( *pair2_iter1 )->mBC() + ( *pair2_iter2 )->mBC() ) - mD );
143 }
144 else if ( smass == "de" )
145 {
146 value1 = pow( ( *pair1_iter1 )->deltaE() / m_tag1desigma, 2 ) +
147 pow( ( *pair1_iter2 )->deltaE() / m_tag2desigma, 2 );
148 value2 = pow( ( *pair2_iter1 )->deltaE() / m_tag1desigma, 2 ) +
149 pow( ( *pair2_iter2 )->deltaE() / m_tag2desigma, 2 );
150 }
151 else if ( smass == "inv" )
152 {
153 value1 = fabs( 0.5 * ( ( *pair1_iter1 )->mass() + ( *pair1_iter2 )->mass() ) - mD );
154 value2 = fabs( 0.5 * ( ( *pair2_iter1 )->mass() + ( *pair2_iter2 )->mass() ) - mD );
155 }
156
157 if ( value1 <= value2 ) return true;
158 else return false;
159}

Referenced by findDTag(), and findDTag().

◆ compare() [2/3]

bool DTagTool::compare ( EvtRecDTagCol::iterator pair1_iter1,
EvtRecDTagCol::iterator pair1_iter2,
EvtRecDTagCol::iterator pair2_iter1,
EvtRecDTagCol::iterator pair2_iter2,
double mD,
string smass )

◆ compare() [3/3]

bool DTagTool::compare ( EvtRecDTagCol::iterator pair1_iter1,
EvtRecDTagCol::iterator pair1_iter2,
EvtRecDTagCol::iterator pair2_iter1,
EvtRecDTagCol::iterator pair2_iter2,
double mD,
string smass )

◆ cosmicandleptonVeto() [1/3]

bool DTagTool::cosmicandleptonVeto ( bool emc = true)

Definition at line 1187 of file DTagTool.cxx.

1187 {
1188
1189 // good track list
1190 vector<EvtRecTrackIterator> iGood;
1191 iGood.clear();
1192 for ( EvtRecTrackIterator iter = m_chargebegin; iter != m_chargeend; iter++ )
1193 {
1194 if ( isGoodTrack( *iter ) ) iGood.push_back( iter );
1195 }
1196
1197 if ( iGood.size() != 2 ) return true;
1198
1199 // cosmic veto
1200 double time1 = -99, time2 = -99;
1201 for ( vector<EvtRecTrackIterator>::size_type i = 0; i < 2; i++ )
1202 {
1203 if ( ( *iGood[i] )->isTofTrackValid() )
1204 {
1205 SmartRefVector<RecTofTrack> tofTrkCol = ( *iGood[i] )->tofTrack();
1206 SmartRefVector<RecTofTrack>::iterator iter_tof = tofTrkCol.begin();
1207
1208 for ( ; iter_tof != tofTrkCol.end(); iter_tof++ )
1209 {
1210 TofHitStatus* status = new TofHitStatus;
1211 status->setStatus( ( *iter_tof )->status() );
1212 if ( status->is_cluster() )
1213 {
1214 if ( i == 0 ) time1 = ( *iter_tof )->tof();
1215 else time2 = ( *iter_tof )->tof();
1216 }
1217 delete status;
1218 }
1219 }
1220 }
1221 if ( time1 != -99 && time2 != -99 && fabs( time1 - time2 ) > 5 ) return false;
1222
1223 // rad bhabha veto
1224 if ( isElectron( *iGood[0] ) && isElectron( *iGood[1] ) ) return false;
1225
1226 // rad dimu veto
1227 if ( isMuon( *iGood[0] ) && isMuon( *iGood[1] ) ) return false;
1228
1229 // require additonal emc shower in the event
1230 if ( emc )
1231 {
1232
1233 bool gotgoodshower = false;
1234
1235 for ( EvtRecTrackIterator iter = m_showerbegin; iter != m_showerend; iter++ )
1236 {
1237
1238 if ( !( *iter )->isEmcShowerValid() ) continue;
1239 RecEmcShower* emcTrk = ( *iter )->emcShower();
1240
1241 double eraw = emcTrk->energy();
1242 double time = emcTrk->time();
1243 if ( !( eraw > 0.05 && time > 0 && time < 14 ) ) continue;
1244
1245 double angle1 = angleShowerwithTrack( *iter, *iGood[0] );
1246 double angle2 = angleShowerwithTrack( *iter, *iGood[1] );
1247
1248 if ( angle1 > 20 && angle2 > 20 )
1249 {
1250 gotgoodshower = true;
1251 break;
1252 }
1253 }
1254
1255 return gotgoodshower;
1256
1257 } // end of adding emc
1258
1259 return true;
1260}
Double_t time
EvtRecTrackCol::iterator EvtRecTrackIterator
bool isGoodTrack(EvtRecTrack *trk)
double angleShowerwithTrack(EvtRecTrack *shower, EvtRecTrack *track)
bool isElectron(EvtRecTrack *trk)
Definition DTagTool.cxx:985
bool isMuon(EvtRecTrack *trk)
void setStatus(unsigned int status)

Referenced by DDecay::execute(), DSemilepAlg::execute(), and SD0Tag::execute().

◆ cosmicandleptonVeto() [2/3]

bool DTagTool::cosmicandleptonVeto ( bool emc = true)

◆ cosmicandleptonVeto() [3/3]

bool DTagTool::cosmicandleptonVeto ( bool emc = true)

◆ D0modes() [1/3]

vector< int > DTagTool::D0modes ( )
inline

Definition at line 41 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

41{ return m_d0modes; }

Referenced by DDecay::execute().

◆ D0modes() [2/3]

vector< int > DTagTool::D0modes ( )
inline

Definition at line 41 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

41{ return m_d0modes; }

◆ D0modes() [3/3]

vector< int > DTagTool::D0modes ( )
inline

Definition at line 41 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

41{ return m_d0modes; }

◆ Dpmodes() [1/3]

vector< int > DTagTool::Dpmodes ( )
inline

Definition at line 42 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

42{ return m_dpmodes; }

Referenced by DDecay::execute().

◆ Dpmodes() [2/3]

vector< int > DTagTool::Dpmodes ( )
inline

Definition at line 42 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

42{ return m_dpmodes; }

◆ Dpmodes() [3/3]

vector< int > DTagTool::Dpmodes ( )
inline

Definition at line 42 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

42{ return m_dpmodes; }

◆ Dsmodes() [1/3]

vector< int > DTagTool::Dsmodes ( )
inline

Definition at line 43 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

43{ return m_dsmodes; }

Referenced by DDecay::execute().

◆ Dsmodes() [2/3]

vector< int > DTagTool::Dsmodes ( )
inline

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

43{ return m_dsmodes; }

◆ Dsmodes() [3/3]

vector< int > DTagTool::Dsmodes ( )
inline

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

43{ return m_dsmodes; }

◆ dtag1() [1/3]

EvtRecDTagCol::iterator DTagTool::dtag1 ( )
inline

Definition at line 66 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

66{ return m_iterdtag1; }

Referenced by DDecay::execute().

◆ dtag1() [2/3]

EvtRecDTagCol::iterator DTagTool::dtag1 ( )
inline

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

66{ return m_iterdtag1; }

◆ dtag1() [3/3]

EvtRecDTagCol::iterator DTagTool::dtag1 ( )
inline

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

66{ return m_iterdtag1; }

◆ dtag2() [1/3]

EvtRecDTagCol::iterator DTagTool::dtag2 ( )
inline

Definition at line 67 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

67{ return m_iterdtag2; }

Referenced by DDecay::execute().

◆ dtag2() [2/3]

EvtRecDTagCol::iterator DTagTool::dtag2 ( )
inline

Definition at line 67 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

67{ return m_iterdtag2; }

◆ dtag2() [3/3]

EvtRecDTagCol::iterator DTagTool::dtag2 ( )
inline

Definition at line 67 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

67{ return m_iterdtag2; }

◆ eta_begin() [1/3]

EvtRecEtaToGGCol::iterator DTagTool::eta_begin ( )
inline

Definition at line 36 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

36{ return m_etaiterbegin; }

◆ eta_begin() [2/3]

EvtRecEtaToGGCol::iterator DTagTool::eta_begin ( )
inline

Definition at line 36 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

36{ return m_etaiterbegin; }

◆ eta_begin() [3/3]

EvtRecEtaToGGCol::iterator DTagTool::eta_begin ( )
inline

Definition at line 36 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

36{ return m_etaiterbegin; }

◆ eta_end() [1/3]

EvtRecEtaToGGCol::iterator DTagTool::eta_end ( )
inline

Definition at line 37 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

37{ return m_etaiterend; }

◆ eta_end() [2/3]

EvtRecEtaToGGCol::iterator DTagTool::eta_end ( )
inline

Definition at line 37 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

37{ return m_etaiterend; }

◆ eta_end() [3/3]

EvtRecEtaToGGCol::iterator DTagTool::eta_end ( )
inline

Definition at line 37 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

37{ return m_etaiterend; }

◆ etaId() [1/3]

vector< int > DTagTool::etaId ( EvtRecDTagCol::iterator iter,
int numeta = 1 )

Access eta children

Definition at line 792 of file DTagTool.cxx.

792 {
793
794 SmartRefVector<EvtRecTrack> showers = ( *iter_dtag )->showers();
795 if ( showers.size() < 2 * numeta )
796 {
797 cout << "too many eta required" << endl;
798 exit( 1 );
799 }
800
801 vector<int> canid;
802 canid.clear();
803
804 for ( EvtRecEtaToGGCol::iterator etaItr = m_etaiterbegin; etaItr < m_etaiterend; etaItr++ )
805 {
806
807 /// Access eta children
808 EvtRecTrack* heGammaTrk = const_cast<EvtRecTrack*>( ( *etaItr )->hiEnGamma() );
809 EvtRecTrack* leGammaTrk = const_cast<EvtRecTrack*>( ( *etaItr )->loEnGamma() );
810
811 int heGammaTrkId = heGammaTrk->trackId();
812 int leGammaTrkId = leGammaTrk->trackId();
813
814 for ( int index = 0; index < numeta; ++index )
815 {
816 bool isheid = false;
817 bool isleid = false;
818
819 for ( int i = index * 2; i < index * 2 + 2; ++i )
820 {
821
822 if ( !isheid && heGammaTrkId == showers[i]->trackId() ) isheid = true;
823 if ( !isleid && leGammaTrkId == showers[i]->trackId() ) isleid = true;
824 }
825
826 if ( isheid && isleid ) canid.push_back( etaItr - m_etaiterbegin );
827 }
828
829 if ( canid.size() == numeta )
830 {
831 return canid;
832 break;
833 }
834
835 } // End "etaItr" FOR Loop
836
837 return canid;
838}

◆ etaId() [2/3]

vector< int > DTagTool::etaId ( EvtRecDTagCol::iterator iter,
int numeta = 1 )

◆ etaId() [3/3]

vector< int > DTagTool::etaId ( EvtRecDTagCol::iterator iter,
int numeta = 1 )

◆ etap4() [1/3]

HepLorentzVector DTagTool::etap4 ( EvtRecEtaToGGCol::iterator etaItr,
bool isconstrain = true )

Definition at line 722 of file DTagTool.cxx.

722 {
723
724 if ( isconstrain )
725 {
726 HepLorentzVector p41 = ( *etaItr )->hiPfit();
727 HepLorentzVector p42 = ( *etaItr )->loPfit();
728 return ( p41 + p42 );
729 }
730 else
731 {
732 EvtRecTrack* trk1 = const_cast<EvtRecTrack*>( ( *etaItr )->hiEnGamma() );
733 EvtRecTrack* trk2 = const_cast<EvtRecTrack*>( ( *etaItr )->loEnGamma() );
734
735 RecEmcShower* emctrk1 = ( trk1 )->emcShower();
736 RecEmcShower* emctrk2 = ( trk2 )->emcShower();
737
738 HepLorentzVector p41 = p4shower( emctrk1 );
739 HepLorentzVector p42 = p4shower( emctrk2 );
740 return ( p41 + p42 );
741 }
742}
HepLorentzVector p4shower(RecEmcShower *shower)
Definition DTagTool.cxx:889

◆ etap4() [2/3]

HepLorentzVector DTagTool::etap4 ( EvtRecEtaToGGCol::iterator etaItr,
bool isconstrain = true )

◆ etap4() [3/3]

HepLorentzVector DTagTool::etap4 ( EvtRecEtaToGGCol::iterator etaItr,
bool isconstrain = true )

◆ eventSvc() [1/3]

IDataProviderSvc * DTagTool::eventSvc ( )
protected

Definition at line 1308 of file DTagTool.cxx.

1308 {
1309
1310 if ( m_evtSvc == 0 )
1311 {
1312
1313 StatusCode sc = Gaudi::svcLocator()->service( "EventDataSvc", m_evtSvc, true );
1314 if ( sc.isFailure() ) { assert( false ); }
1315 }
1316
1317 return m_evtSvc;
1318}

Referenced by DTagTool(), and isGoodShower().

◆ eventSvc() [2/3]

IDataProviderSvc * DTagTool::eventSvc ( )
protected

◆ eventSvc() [3/3]

IDataProviderSvc * DTagTool::eventSvc ( )
protected

◆ findADTag() [1/12]

bool DTagTool::findADTag ( EvtRecDTag::DecayMode mode1,
EvtRecDTag::DecayMode mode2 )

Definition at line 306 of file DTagTool.cxx.

306 {
307
308 return findADTag( static_cast<int>( mode1 ), static_cast<int>( mode2 ) );
309}
bool findADTag(EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2)
Definition DTagTool.cxx:306

Referenced by DDecay::execute(), findADTag(), and findADTag().

◆ findADTag() [2/12]

bool DTagTool::findADTag ( EvtRecDTag::DecayMode mode1,
EvtRecDTag::DecayMode mode2 )

◆ findADTag() [3/12]

bool DTagTool::findADTag ( EvtRecDTag::DecayMode mode1,
EvtRecDTag::DecayMode mode2 )

◆ findADTag() [4/12]

bool DTagTool::findADTag ( EvtRecDTag::DecayMode mode1,
int tagcharm1,
EvtRecDTag::DecayMode mode2,
int tagcharm2 )

Definition at line 311 of file DTagTool.cxx.

312 {
313
314 return findADTag( static_cast<int>( mode1 ), tagcharm1, static_cast<int>( mode2 ),
315 tagcharm2 );
316
317} // end of findDtag

◆ findADTag() [5/12]

bool DTagTool::findADTag ( EvtRecDTag::DecayMode mode1,
int tagcharm1,
EvtRecDTag::DecayMode mode2,
int tagcharm2 )

◆ findADTag() [6/12]

bool DTagTool::findADTag ( EvtRecDTag::DecayMode mode1,
int tagcharm1,
EvtRecDTag::DecayMode mode2,
int tagcharm2 )

◆ findADTag() [7/12]

bool DTagTool::findADTag ( int mode1,
int mode2 )

Definition at line 511 of file DTagTool.cxx.

511 {
512
513 int tagcharm1 = ( mode1 < 10 || mode1 >= 200 ) ? +1 : 0;
514 int tagcharm2 = ( mode2 < 10 || mode2 >= 200 ) ? -1 : 0;
515
516 if ( tagcharm1 * tagcharm2 > 0 )
517 {
518 cout << "double tagging warning! two modes can't have same nonzero charmness" << endl;
519 return false;
520 }
521
522 // define D candidate mass
523 double mDcand = 0;
524 if ( mode1 < 200 && mode2 < 200 ) mDcand = 1.86484;
525 else if ( mode1 >= 200 && mode1 < 400 && mode2 >= 200 && mode2 < 400 ) mDcand = 1.86966;
526 else if ( mode1 >= 400 && mode1 < 1000 && mode2 >= 400 && mode2 < 1000 ) mDcand = 1.96835;
527 else
528 {
529 cout << "double tag modes are not from same particle ! " << endl;
530 return false;
531 }
532
533 vector<int> igood1, igood2;
534 igood1.clear(), igood2.clear();
535 int index = 0;
536 EvtRecDTagCol::iterator iter_dtag = m_iterbegin;
537
538 // charge conjucation considered
539 for ( ; iter_dtag != m_iterend; iter_dtag++ )
540 {
541 int iter_mode = ( *iter_dtag )->decayMode();
542 int iter_charm = ( *iter_dtag )->charm();
543 int iter_type = ( *iter_dtag )->type();
544
545 if ( m_pid )
546 {
547 if ( iter_mode == mode1 && iter_charm == tagcharm1 && iter_type == 1 )
548 igood1.push_back( index );
549 if ( tagcharm1 != 0 && iter_mode == mode1 && iter_charm == -tagcharm1 && iter_type == 1 )
550 igood1.push_back( index );
551
552 if ( iter_mode == mode2 && iter_charm == tagcharm2 && iter_type == 1 )
553 igood2.push_back( index );
554 if ( tagcharm2 != 0 && iter_mode == mode2 && iter_charm == -tagcharm2 && iter_type == 1 )
555 igood2.push_back( index );
556 }
557 else
558 {
559 if ( iter_mode == mode1 && iter_charm == tagcharm1 ) igood1.push_back( index );
560 if ( tagcharm1 != 0 && iter_mode == mode1 && iter_charm == -tagcharm1 )
561 igood1.push_back( index );
562
563 if ( iter_mode == mode2 && iter_charm == tagcharm2 ) igood2.push_back( index );
564 if ( tagcharm2 != 0 && iter_mode == mode2 && iter_charm == -tagcharm2 )
565 igood2.push_back( index );
566 }
567
568 index++;
569 }
570
571 // look for the best pair of double-tagged event
572
573 bool isDtcand = false;
574 EvtRecDTagCol::iterator iter_i, iter_j;
575
576 for ( int i = 0; i < igood1.size(); i++ )
577 {
578
579 iter_i = m_iterbegin + igood1[i];
580 int charm_i = ( *iter_i )->charm();
581
582 for ( int j = 0; j < igood2.size(); j++ )
583 {
584 iter_j = m_iterbegin + igood2[j];
585 int charm_j = ( *iter_j )->charm();
586 if ( charm_i * charm_j > 0 || igood2[j] == igood1[i] ) continue;
587 if ( shareTracks( iter_i, iter_j ) ) continue;
588
589 m_viterdtag1.push_back( m_iterbegin + igood1[i] );
590 m_viterdtag2.push_back( m_iterbegin + igood2[j] );
591
592 } // end of j loop
593 } // end of i loop
594
595 if ( m_viterdtag1.size() > 0 ) { isDtcand = true; }
596
597 return isDtcand;
598}
bool shareTracks(EvtRecDTagCol::iterator iter1, EvtRecDTagCol::iterator iter2)

◆ findADTag() [8/12]

bool DTagTool::findADTag ( int mode1,
int mode2 )

◆ findADTag() [9/12]

bool DTagTool::findADTag ( int mode1,
int mode2 )

◆ findADTag() [10/12]

bool DTagTool::findADTag ( int mode1,
int tagcharm1,
int mode2,
int tagcharm2 )

Definition at line 600 of file DTagTool.cxx.

600 {
601
602 if ( tagcharm1 * tagcharm2 > 0 )
603 {
604 cout << "double tagging warning! two modes can't have same nonzero charmness" << endl;
605 return false;
606 }
607
608 // define D candidate mass
609 double mDcand = 0;
610 if ( mode1 < 200 && mode2 < 200 ) mDcand = 1.86484;
611 else if ( mode1 >= 200 && mode1 < 400 && mode2 >= 200 && mode2 < 400 ) mDcand = 1.86966;
612 else if ( mode1 >= 400 && mode1 < 1000 && mode2 >= 400 && mode2 < 1000 ) mDcand = 1.96835;
613 else
614 {
615 cout << "double tag modes are not from same particle ! " << endl;
616 return false;
617 }
618
619 vector<int> igood1, igood2;
620 igood1.clear(), igood2.clear();
621 int index = 0;
622 EvtRecDTagCol::iterator iter_dtag = m_iterbegin;
623
624 for ( ; iter_dtag != m_iterend; iter_dtag++ )
625 {
626 int iter_mode = ( *iter_dtag )->decayMode();
627 int iter_charm = ( *iter_dtag )->charm();
628 int iter_type = ( *iter_dtag )->type();
629
630 if ( m_pid )
631 {
632 if ( iter_mode == mode1 && iter_charm == tagcharm1 && iter_type == 1 )
633 igood1.push_back( index );
634
635 if ( iter_mode == mode2 && iter_charm == tagcharm2 && iter_type == 1 )
636 igood2.push_back( index );
637 }
638 else
639 {
640 if ( iter_mode == mode1 && iter_charm == tagcharm1 ) igood1.push_back( index );
641
642 if ( iter_mode == mode2 && iter_charm == tagcharm2 ) igood2.push_back( index );
643 }
644
645 index++;
646 }
647
648 // look for the best pair of double-tagged event
649
650 bool isDtcand = false;
651 double deltaM = 1.00;
652 int index_i = 0, index_j = 0;
653 EvtRecDTagCol::iterator iter_i, iter_j;
654
655 for ( int i = 0; i < igood1.size(); i++ )
656 {
657
658 iter_i = m_iterbegin + igood1[i];
659 int charm_i = ( *iter_i )->charm();
660 for ( int j = 0; j < igood2.size(); j++ )
661 {
662 iter_j = m_iterbegin + igood2[j];
663 int charm_j = ( *iter_j )->charm();
664 if ( charm_i * charm_j > 0 || igood2[j] == igood1[i] ) continue;
665
666 if ( shareTracks( iter_i, iter_j ) ) continue;
667
668 m_viterdtag1.push_back( m_iterbegin + igood1[i] );
669 m_viterdtag2.push_back( m_iterbegin + igood2[j] );
670
671 } // end of j loop
672 } // end of i loop
673
674 if ( m_viterdtag1.size() > 0 ) isDtcand = true;
675
676 return isDtcand;
677
678} // end of findADtag

◆ findADTag() [11/12]

bool DTagTool::findADTag ( int mode1,
int tagcharm1,
int mode2,
int tagcharm2 )

◆ findADTag() [12/12]

bool DTagTool::findADTag ( int mode1,
int tagcharm1,
int mode2,
int tagcharm2 )

◆ findDTag() [1/12]

bool DTagTool::findDTag ( EvtRecDTag::DecayMode mode1,
EvtRecDTag::DecayMode mode2,
string smass = "mbc" )

Definition at line 291 of file DTagTool.cxx.

292 {
293
294 return findDTag( static_cast<int>( mode1 ), static_cast<int>( mode2 ), smass );
295}
bool findDTag(EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2, string smass="mbc")
Definition DTagTool.cxx:291

Referenced by DDecay::execute(), findDTag(), and findDTag().

◆ findDTag() [2/12]

bool DTagTool::findDTag ( EvtRecDTag::DecayMode mode1,
EvtRecDTag::DecayMode mode2,
string smass = "mbc" )

◆ findDTag() [3/12]

bool DTagTool::findDTag ( EvtRecDTag::DecayMode mode1,
EvtRecDTag::DecayMode mode2,
string smass = "mbc" )

◆ findDTag() [4/12]

bool DTagTool::findDTag ( EvtRecDTag::DecayMode mode1,
int tagcharm1,
EvtRecDTag::DecayMode mode2,
int tagcharm2,
string smass = "mbc" )

Definition at line 297 of file DTagTool.cxx.

298 {
299
300 return findDTag( static_cast<int>( mode1 ), tagcharm1, static_cast<int>( mode2 ), tagcharm2,
301 smass );
302
303} // end of findDtag

◆ findDTag() [5/12]

bool DTagTool::findDTag ( EvtRecDTag::DecayMode mode1,
int tagcharm1,
EvtRecDTag::DecayMode mode2,
int tagcharm2,
string smass = "mbc" )

◆ findDTag() [6/12]

bool DTagTool::findDTag ( EvtRecDTag::DecayMode mode1,
int tagcharm1,
EvtRecDTag::DecayMode mode2,
int tagcharm2,
string smass = "mbc" )

◆ findDTag() [7/12]

bool DTagTool::findDTag ( int mode1,
int mode2,
string smass = "mbc" )

Definition at line 319 of file DTagTool.cxx.

319 {
320
321 int tagcharm1 = ( mode1 < 10 || mode1 >= 200 ) ? +1 : 0;
322 int tagcharm2 = ( mode2 < 10 || mode2 >= 200 ) ? -1 : 0;
323
324 if ( tagcharm1 * tagcharm2 > 0 )
325 {
326 cout << "double tagging warning! two modes can't have same nonzero charmness" << endl;
327 return false;
328 }
329
330 // define D candidate mass
331 double mDcand = 0;
332 if ( mode1 < 200 && mode2 < 200 ) mDcand = 1.86484;
333 else if ( mode1 >= 200 && mode1 < 400 && mode2 >= 200 && mode2 < 400 ) mDcand = 1.86966;
334 else if ( mode1 >= 400 && mode1 < 1000 && mode2 >= 400 && mode2 < 1000 ) mDcand = 1.96835;
335 else
336 {
337 cout << "double tag modes are not from same particle ! " << endl;
338 return false;
339 }
340
341 vector<int> igood1, igood2;
342 igood1.clear(), igood2.clear();
343 int index = 0;
344 EvtRecDTagCol::iterator iter_dtag = m_iterbegin;
345
346 // charge conjucation considered
347 for ( ; iter_dtag != m_iterend; iter_dtag++ )
348 {
349 int iter_mode = ( *iter_dtag )->decayMode();
350 int iter_charm = ( *iter_dtag )->charm();
351 int iter_type = ( *iter_dtag )->type();
352
353 if ( m_pid )
354 {
355 if ( iter_mode == mode1 && iter_charm == tagcharm1 && iter_type == 1 )
356 igood1.push_back( index );
357 if ( tagcharm1 != 0 && iter_mode == mode1 && iter_charm == -tagcharm1 && iter_type == 1 )
358 igood1.push_back( index );
359
360 if ( iter_mode == mode2 && iter_charm == tagcharm2 && iter_type == 1 )
361 igood2.push_back( index );
362 if ( tagcharm2 != 0 && iter_mode == mode2 && iter_charm == -tagcharm2 && iter_type == 1 )
363 igood2.push_back( index );
364 }
365 else
366 {
367 if ( iter_mode == mode1 && iter_charm == tagcharm1 ) igood1.push_back( index );
368 if ( tagcharm1 != 0 && iter_mode == mode1 && iter_charm == -tagcharm1 )
369 igood1.push_back( index );
370
371 if ( iter_mode == mode2 && iter_charm == tagcharm2 ) igood2.push_back( index );
372 if ( tagcharm2 != 0 && iter_mode == mode2 && iter_charm == -tagcharm2 )
373 igood2.push_back( index );
374 }
375
376 index++;
377 }
378
379 // look for the best pair of double-tagged event
380 if ( igood1.size() < 1 || igood2.size() < 1 ) return false;
381
382 bool isDtcand = false;
383 int index_i = 0, index_j = 0;
384
385 EvtRecDTagCol::iterator iter_i, iter_j;
386 int count = 0;
387 for ( int i = 0; i < igood1.size(); i++ )
388 {
389
390 iter_i = m_iterbegin + igood1[i];
391
392 int charm_i = ( *iter_i )->charm();
393 for ( int j = 0; j < igood2.size(); j++ )
394 {
395 iter_j = m_iterbegin + igood2[j];
396
397 int charm_j = ( *iter_j )->charm();
398 if ( charm_i * charm_j > 0 || igood2[j] == igood1[i] ) continue;
399
400 if ( shareTracks( iter_i, iter_j ) ) continue;
401 count++;
402 if ( count == 1 )
403 {
404 m_iterdtag1 = iter_i;
405 m_iterdtag2 = iter_j;
406 }
407
408 if ( compare( iter_i, iter_j, m_iterdtag1, m_iterdtag2, mDcand, smass ) )
409 {
410 m_iterdtag1 = iter_i;
411 m_iterdtag2 = iter_j;
412 isDtcand = true;
413 }
414
415 } // end of j loop
416 } // end of i loop
417
418 return isDtcand;
419}
DOUBLE_PRECISION count[3]
bool compare(EvtRecDTagCol::iterator pair1_iter1, EvtRecDTagCol::iterator pair1_iter2, EvtRecDTagCol::iterator pair2_iter1, EvtRecDTagCol::iterator pair2_iter2, double mD, string smass)
Definition DTagTool.cxx:132

◆ findDTag() [8/12]

bool DTagTool::findDTag ( int mode1,
int mode2,
string smass = "mbc" )

◆ findDTag() [9/12]

bool DTagTool::findDTag ( int mode1,
int mode2,
string smass = "mbc" )

◆ findDTag() [10/12]

bool DTagTool::findDTag ( int mode1,
int tagcharm1,
int mode2,
int tagcharm2,
string smass = "mbc" )

Definition at line 421 of file DTagTool.cxx.

421 {
422
423 if ( tagcharm1 * tagcharm2 > 0 )
424 {
425 cout << "double tagging warning! two modes can't have same nonzero charmness" << endl;
426 return false;
427 }
428
429 // define D candidate mass
430 double mDcand = 0;
431 if ( mode1 < 200 && mode2 < 200 ) mDcand = 1.86484;
432 else if ( mode1 >= 200 && mode1 < 400 && mode2 >= 200 && mode2 < 400 ) mDcand = 1.86966;
433 else if ( mode1 >= 400 && mode1 < 1000 && mode2 >= 400 && mode2 < 1000 ) mDcand = 1.96835;
434 else
435 {
436 cout << "double tag modes are not from same particle ! " << endl;
437 return false;
438 }
439
440 vector<int> igood1, igood2;
441 igood1.clear(), igood2.clear();
442 int index = 0;
443 EvtRecDTagCol::iterator iter_dtag = m_iterbegin;
444
445 for ( ; iter_dtag != m_iterend; iter_dtag++ )
446 {
447 int iter_mode = ( *iter_dtag )->decayMode();
448 int iter_charm = ( *iter_dtag )->charm();
449 int iter_type = ( *iter_dtag )->type();
450
451 if ( m_pid )
452 {
453 if ( iter_mode == mode1 && iter_charm == tagcharm1 && iter_type == 1 )
454 igood1.push_back( index );
455
456 if ( iter_mode == mode2 && iter_charm == tagcharm2 && iter_type == 1 )
457 igood2.push_back( index );
458 }
459 else
460 {
461 if ( iter_mode == mode1 && iter_charm == tagcharm1 ) igood1.push_back( index );
462
463 if ( iter_mode == mode2 && iter_charm == tagcharm2 ) igood2.push_back( index );
464 }
465
466 index++;
467 }
468
469 // look for the best pair of double-tagged event
470
471 if ( igood1.size() < 1 || igood2.size() < 1 ) return false;
472
473 bool isDtcand = false;
474 int index_i = 0, index_j = 0;
475
476 EvtRecDTagCol::iterator iter_i, iter_j;
477 int count = 0;
478 for ( int i = 0; i < igood1.size(); i++ )
479 {
480
481 iter_i = m_iterbegin + igood1[i];
482 int charm_i = ( *iter_i )->charm();
483 for ( int j = 0; j < igood2.size(); j++ )
484 {
485 iter_j = m_iterbegin + igood2[j];
486 int charm_j = ( *iter_j )->charm();
487 if ( charm_i * charm_j > 0 || igood2[j] == igood1[i] ) continue;
488
489 if ( shareTracks( iter_i, iter_j ) ) continue;
490 count++;
491 if ( count == 1 )
492 {
493 m_iterdtag1 = iter_i;
494 m_iterdtag2 = iter_j;
495 }
496
497 if ( compare( iter_i, iter_j, m_iterdtag1, m_iterdtag2, mDcand, smass ) )
498 {
499 m_iterdtag1 = iter_i;
500 m_iterdtag2 = iter_j;
501 isDtcand = true;
502 }
503
504 } // end of j loop
505 } // end of i loop
506
507 return isDtcand;
508
509} // end of findDtag

◆ findDTag() [11/12]

bool DTagTool::findDTag ( int mode1,
int tagcharm1,
int mode2,
int tagcharm2,
string smass = "mbc" )

◆ findDTag() [12/12]

bool DTagTool::findDTag ( int mode1,
int tagcharm1,
int mode2,
int tagcharm2,
string smass = "mbc" )

◆ findSTag() [1/12]

bool DTagTool::findSTag ( EvtRecDTag::DecayMode mode)

Definition at line 215 of file DTagTool.cxx.

215 {
216 return findSTag( static_cast<int>( mode ) );
217
218} // end of stag
vector< int > mode(EvtRecDTag::DecayMode decaymode)
Definition DTagTool.cxx:161
bool findSTag(EvtRecDTag::DecayMode mode, int tagcharm)
Definition DTagTool.cxx:208

◆ findSTag() [2/12]

bool DTagTool::findSTag ( EvtRecDTag::DecayMode mode)

◆ findSTag() [3/12]

bool DTagTool::findSTag ( EvtRecDTag::DecayMode mode)

◆ findSTag() [4/12]

bool DTagTool::findSTag ( EvtRecDTag::DecayMode mode,
int tagcharm )

Definition at line 208 of file DTagTool.cxx.

208 {
209
210 return findSTag( static_cast<int>( mode ), tagcharm );
211
212} // end of stag

Referenced by DDecay::execute(), DSemilepAlg::execute(), findSTag(), and findSTag().

◆ findSTag() [5/12]

bool DTagTool::findSTag ( EvtRecDTag::DecayMode mode,
int tagcharm )

◆ findSTag() [6/12]

bool DTagTool::findSTag ( EvtRecDTag::DecayMode mode,
int tagcharm )

◆ findSTag() [7/12]

bool DTagTool::findSTag ( int mode)

Definition at line 255 of file DTagTool.cxx.

255 {
256
257 bool isStcand = false;
258 double de_min = 1;
259
260 // loop over the dtag list
261 EvtRecDTagCol::iterator iter_dtag = m_iterbegin;
262 for ( ; iter_dtag != m_iterend; iter_dtag++ )
263 {
264
265 if ( m_pid )
266 {
267 if ( ( *iter_dtag )->type() != 1 || ( *iter_dtag )->decayMode() != mode ) continue;
268 }
269 else
270 {
271 if ( ( *iter_dtag )->decayMode() != mode ) continue;
272 }
273
274 if ( fabs( ( *iter_dtag )->deltaE() ) < fabs( de_min ) )
275 {
276 isStcand = true;
277 m_iterstag = iter_dtag;
278 de_min = ( *iter_dtag )->deltaE();
279 }
280
281 } // end of looping over the entire DTag list
282
283 return isStcand;
284
285} // end of stag

◆ findSTag() [8/12]

bool DTagTool::findSTag ( int mode)

◆ findSTag() [9/12]

bool DTagTool::findSTag ( int mode)

◆ findSTag() [10/12]

bool DTagTool::findSTag ( int mode,
int tagcharm )

Definition at line 221 of file DTagTool.cxx.

221 {
222
223 bool isStcand = false;
224 double de_min = 1;
225
226 // loop over the dtag list
227 EvtRecDTagCol::iterator iter_dtag = m_iterbegin;
228 for ( ; iter_dtag != m_iterend; iter_dtag++ )
229 {
230
231 if ( m_pid )
232 {
233 if ( ( *iter_dtag )->type() != 1 || ( *iter_dtag )->decayMode() != mode ||
234 ( *iter_dtag )->charm() != tagcharm )
235 continue;
236 }
237 else
238 {
239 if ( ( *iter_dtag )->decayMode() != mode || ( *iter_dtag )->charm() != tagcharm )
240 continue;
241 }
242 if ( fabs( ( *iter_dtag )->deltaE() ) < fabs( de_min ) )
243 {
244 isStcand = true;
245 m_iterstag = iter_dtag;
246 de_min = ( *iter_dtag )->deltaE();
247 }
248
249 } // end of looping over the entire DTag list
250
251 return isStcand;
252
253} // end of stag

◆ findSTag() [11/12]

bool DTagTool::findSTag ( int mode,
int tagcharm )

◆ findSTag() [12/12]

bool DTagTool::findSTag ( int mode,
int tagcharm )

◆ isDTagListEmpty() [1/3]

bool DTagTool::isDTagListEmpty ( )
inline

Definition at line 29 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

29{ return m_isdtaglistempty; }

Referenced by DDecay::execute(), and DSemilepAlg::execute().

◆ isDTagListEmpty() [2/3]

bool DTagTool::isDTagListEmpty ( )
inline

Definition at line 29 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

29{ return m_isdtaglistempty; }

◆ isDTagListEmpty() [3/3]

bool DTagTool::isDTagListEmpty ( )
inline

Definition at line 29 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

29{ return m_isdtaglistempty; }

◆ isElectron() [1/3]

bool DTagTool::isElectron ( EvtRecTrack * trk)

Definition at line 985 of file DTagTool.cxx.

985 {
986
987 m_simplePIDSvc->preparePID( trk );
988 return ( m_simplePIDSvc->iselectron( true ) );
989
990 /*
991
992 double dedxchi=-99;
993 double Eemc=0;
994 double ptrk=-99;
995
996 if(trk->isMdcDedxValid()){
997 RecMdcDedx* dedxTrk=trk->mdcDedx();
998 dedxchi=dedxTrk->chiE();
999 }
1000
1001 if( trk->isMdcKalTrackValid() ){
1002 RecMdcKalTrack *mdcKalTrk = trk->mdcKalTrack();
1003 ptrk= mdcKalTrk->p();
1004 }
1005 if( trk->isEmcShowerValid()){
1006 RecEmcShower *emcTrk = trk->emcShower();
1007 Eemc=emcTrk->energy();
1008 }
1009
1010 double eop = Eemc/ptrk;
1011
1012 if( fabs(eop)>0.8 && fabs(dedxchi)<5)
1013 return true;
1014 else
1015 return false;
1016 */
1017}

Referenced by cosmicandleptonVeto().

◆ isElectron() [2/3]

bool DTagTool::isElectron ( EvtRecTrack * trk)

◆ isElectron() [3/3]

bool DTagTool::isElectron ( EvtRecTrack * trk)

◆ isGoodShower() [1/6]

bool DTagTool::isGoodShower ( EvtRecTrack * trk)

Definition at line 1124 of file DTagTool.cxx.

1124 {
1125 if ( !( trk->isEmcShowerValid() ) ) return false;
1126 RecEmcShower* emcTrk = trk->emcShower();
1127 double eraw = emcTrk->energy();
1128 double time = emcTrk->time();
1129 double costh = cos( emcTrk->theta() );
1130 if ( ( ( fabs( costh ) < 0.80 && eraw > 0.025 ) ||
1131 ( fabs( costh ) > 0.86 && fabs( costh ) < 0.92 && eraw > 0.05 ) ) &&
1132 time > 0 && time < 14 )
1133 return true;
1134
1135 return false;
1136}

◆ isGoodShower() [2/6]

bool DTagTool::isGoodShower ( EvtRecTrack * trk)

◆ isGoodShower() [3/6]

bool DTagTool::isGoodShower ( EvtRecTrack * trk)

◆ isGoodShower() [4/6]

bool DTagTool::isGoodShower ( EvtRecTrack * trk,
double shwDang )

Definition at line 1138 of file DTagTool.cxx.

1138 {
1139 if ( !( trk->isEmcShowerValid() ) ) return false;
1140
1141 Hep3Vector xorigin( 0, 0, 0 );
1142 IVertexDbSvc* vtxsvc;
1143 Gaudi::svcLocator()->service( "VertexDbSvc", vtxsvc ).ignore();
1144 if ( vtxsvc->isVertexValid() )
1145 {
1146 double* dbv = vtxsvc->PrimaryVertex();
1147 double* vv = vtxsvc->SigmaPrimaryVertex();
1148 xorigin.setX( dbv[0] );
1149 xorigin.setY( dbv[1] );
1150 xorigin.setZ( dbv[2] );
1151 }
1152 SmartDataPtr<EvtRecEvent> evtRecEvent( eventSvc(), EventModel::EvtRec::EvtRecEvent );
1153 SmartDataPtr<EvtRecTrackCol> evtRecTrackCol( eventSvc(),
1155
1156 RecEmcShower* emcTrk = trk->emcShower();
1157 Hep3Vector emcpos( emcTrk->x(), emcTrk->y(), emcTrk->z() );
1158 Hep3Vector Gm_Vec( emcTrk->x(), emcTrk->y(), emcTrk->z() );
1159 Hep3Vector Gm_Mom = Gm_Vec - xorigin;
1160 Gm_Mom.setMag( emcTrk->energy() );
1161 HepLorentzVector shP4( Gm_Mom, emcTrk->energy() );
1162
1163 double costh = shP4.vect().cosTheta();
1164 double eraw = emcTrk->energy();
1165 double time = emcTrk->time();
1166 if ( time < 0 || time > 14 ) return false;
1167 if ( !( ( fabs( costh ) < 0.80 && eraw > 0.025 ) ||
1168 ( fabs( costh ) > 0.86 && fabs( costh ) < 0.92 && eraw > 0.05 ) ) )
1169 return false;
1170 double dang = 200.;
1171 for ( int j = 0; j < evtRecEvent->totalCharged(); j++ )
1172 {
1173 EvtRecTrackIterator jtTrk = evtRecTrackCol->begin() + j;
1174 if ( !( *jtTrk )->isExtTrackValid() ) continue;
1175 RecExtTrack* extTrk = ( *jtTrk )->extTrack();
1176 if ( extTrk->emcVolumeNumber() == -1 ) continue;
1177 Hep3Vector extpos = extTrk->emcPosition();
1178 double angd = extpos.angle( emcpos );
1179 if ( angd < dang ) dang = angd;
1180 }
1181 if ( dang >= 200 ) return false;
1182 dang = dang * 180 / ( CLHEP::pi );
1183 if ( fabs( dang ) < shwDang ) return false;
1184 return true;
1185}
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0

◆ isGoodShower() [5/6]

bool DTagTool::isGoodShower ( EvtRecTrack * trk,
double shwDang )

◆ isGoodShower() [6/6]

bool DTagTool::isGoodShower ( EvtRecTrack * trk,
double shwDang )

◆ isGoodTrack() [1/3]

bool DTagTool::isGoodTrack ( EvtRecTrack * trk)

Definition at line 1058 of file DTagTool.cxx.

1058 {
1059
1060 if ( !trk->isMdcKalTrackValid() ) { return false; }
1061
1062 Hep3Vector xorigin( 0, 0, 0 );
1063 IVertexDbSvc* vtxsvc;
1064 Gaudi::svcLocator()->service( "VertexDbSvc", vtxsvc ).ignore();
1065 if ( vtxsvc->isVertexValid() )
1066 {
1067 double* dbv = vtxsvc->PrimaryVertex();
1068 double* vv = vtxsvc->SigmaPrimaryVertex();
1069 xorigin.setX( dbv[0] );
1070 xorigin.setY( dbv[1] );
1071 xorigin.setZ( dbv[2] );
1072 }
1073
1074 RecMdcKalTrack* mdcKalTrk = trk->mdcKalTrack();
1075 mdcKalTrk->setPidType( RecMdcKalTrack::pion );
1076 HepVector a = mdcKalTrk->getZHelix();
1077 HepSymMatrix Ea = mdcKalTrk->getZError();
1078 HepPoint3D pivot( 0., 0., 0. );
1079 HepPoint3D IP( xorigin[0], xorigin[1], xorigin[2] );
1080 VFHelix helixp( pivot, a, Ea );
1081 helixp.pivot( IP );
1082 HepVector vec = helixp.a();
1083 double vrl = vec[0];
1084 double vzl = vec[3];
1085 double costheta = cos( mdcKalTrk->theta() );
1086
1087 if ( fabs( vrl ) < 1 && fabs( vzl ) < 10 && fabs( costheta ) < 0.93 ) return true;
1088 return false;
1089}
dble_vec_t vec[12]
HepGeom::Point3D< double > HepPoint3D

Referenced by cosmicandleptonVeto().

◆ isGoodTrack() [2/3]

bool DTagTool::isGoodTrack ( EvtRecTrack * trk)

◆ isGoodTrack() [3/3]

bool DTagTool::isGoodTrack ( EvtRecTrack * trk)

◆ isGoodTrack_loose() [1/3]

bool DTagTool::isGoodTrack_loose ( EvtRecTrack * trk)

Definition at line 1091 of file DTagTool.cxx.

1091 {
1092
1093 if ( !trk->isMdcKalTrackValid() ) { return false; }
1094
1095 Hep3Vector xorigin( 0, 0, 0 );
1096 IVertexDbSvc* vtxsvc;
1097 Gaudi::svcLocator()->service( "VertexDbSvc", vtxsvc ).ignore();
1098 if ( vtxsvc->isVertexValid() )
1099 {
1100 double* dbv = vtxsvc->PrimaryVertex();
1101 double* vv = vtxsvc->SigmaPrimaryVertex();
1102 xorigin.setX( dbv[0] );
1103 xorigin.setY( dbv[1] );
1104 xorigin.setZ( dbv[2] );
1105 }
1106
1107 RecMdcKalTrack* mdcKalTrk = trk->mdcKalTrack();
1108 mdcKalTrk->setPidType( RecMdcKalTrack::pion );
1109 HepVector a = mdcKalTrk->getZHelix();
1110 HepSymMatrix Ea = mdcKalTrk->getZError();
1111 HepPoint3D pivot( 0., 0., 0. );
1112 HepPoint3D IP( xorigin[0], xorigin[1], xorigin[2] );
1113 VFHelix helixp( pivot, a, Ea );
1114 helixp.pivot( IP );
1115 HepVector vec = helixp.a();
1116 double vrl = vec[0];
1117 double vzl = vec[3];
1118 double costheta = cos( mdcKalTrk->theta() );
1119
1120 if ( fabs( vzl ) < 20 && fabs( costheta ) < 0.93 ) { return true; }
1121 return false;
1122}

◆ isGoodTrack_loose() [2/3]

bool DTagTool::isGoodTrack_loose ( EvtRecTrack * trk)

◆ isGoodTrack_loose() [3/3]

bool DTagTool::isGoodTrack_loose ( EvtRecTrack * trk)

◆ isKaon() [1/3]

bool DTagTool::isKaon ( EvtRecTrack * trk)

Definition at line 970 of file DTagTool.cxx.

970 {
971 SmartRefVector<EvtRecTrack> kaonid = ( *m_iterbegin )->kaonId();
972
973 for ( int i = 0; i < kaonid.size(); i++ )
974 {
975 if ( trk->trackId() == kaonid[i]->trackId() )
976 {
977 return true;
978 break;
979 }
980 }
981
982 return false;
983}

Referenced by DDecay::execute().

◆ isKaon() [2/3]

bool DTagTool::isKaon ( EvtRecTrack * trk)

◆ isKaon() [3/3]

bool DTagTool::isKaon ( EvtRecTrack * trk)

◆ isMuon() [1/3]

bool DTagTool::isMuon ( EvtRecTrack * trk)

Definition at line 1019 of file DTagTool.cxx.

1019 {
1020
1021 double depth = -99;
1022
1023 double dedxchi = -99;
1024 double Eemc = 0;
1025 double ptrk = -99;
1026
1027 if ( trk->isMdcDedxValid() )
1028 {
1029 RecMdcDedx* dedxTrk = trk->mdcDedx();
1030 dedxchi = dedxTrk->chiMu();
1031 }
1032
1033 if ( trk->isMdcKalTrackValid() )
1034 {
1035 RecMdcKalTrack* mdcKalTrk = trk->mdcKalTrack();
1036 ptrk = mdcKalTrk->p();
1037 }
1038 if ( trk->isEmcShowerValid() )
1039 {
1040 RecEmcShower* emcTrk = trk->emcShower();
1041 Eemc = emcTrk->energy();
1042 }
1043
1044 double eop = Eemc / ptrk;
1045
1046 if ( trk->isMucTrackValid() )
1047 {
1048 RecMucTrack* mucTrk = trk->mucTrack();
1049 depth = mucTrk->depth();
1050 }
1051
1052 if ( fabs( dedxchi ) < 5 && fabs( Eemc ) > 0.15 && fabs( Eemc ) < 0.3 &&
1053 ( depth >= 80 * ptrk - 60 || depth > 40 ) )
1054 return true;
1055 return false;
1056}

Referenced by cosmicandleptonVeto().

◆ isMuon() [2/3]

bool DTagTool::isMuon ( EvtRecTrack * trk)

◆ isMuon() [3/3]

bool DTagTool::isMuon ( EvtRecTrack * trk)

◆ isPion() [1/3]

bool DTagTool::isPion ( EvtRecTrack * trk)

Definition at line 954 of file DTagTool.cxx.

954 {
955
956 SmartRefVector<EvtRecTrack> pionid = ( *m_iterbegin )->pionId();
957
958 for ( int i = 0; i < pionid.size(); i++ )
959 {
960 if ( trk->trackId() == pionid[i]->trackId() )
961 {
962 return true;
963 break;
964 }
965 }
966
967 return false;
968}

Referenced by DDecay::execute().

◆ isPion() [2/3]

bool DTagTool::isPion ( EvtRecTrack * trk)

◆ isPion() [3/3]

bool DTagTool::isPion ( EvtRecTrack * trk)

◆ ks_begin() [1/3]

EvtRecVeeVertexCol::iterator DTagTool::ks_begin ( )
inline

Definition at line 38 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

38{ return m_ksiterbegin; }

Referenced by DDecay::execute().

◆ ks_begin() [2/3]

EvtRecVeeVertexCol::iterator DTagTool::ks_begin ( )
inline

Definition at line 38 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

38{ return m_ksiterbegin; }

◆ ks_begin() [3/3]

EvtRecVeeVertexCol::iterator DTagTool::ks_begin ( )
inline

Definition at line 38 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

38{ return m_ksiterbegin; }

◆ ks_end() [1/3]

EvtRecVeeVertexCol::iterator DTagTool::ks_end ( )
inline

Definition at line 39 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

39{ return m_ksiterend; }

◆ ks_end() [2/3]

EvtRecVeeVertexCol::iterator DTagTool::ks_end ( )
inline

Definition at line 39 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

39{ return m_ksiterend; }

◆ ks_end() [3/3]

EvtRecVeeVertexCol::iterator DTagTool::ks_end ( )
inline

Definition at line 39 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

39{ return m_ksiterend; }

◆ ksId() [1/3]

vector< int > DTagTool::ksId ( EvtRecDTagCol::iterator iter,
int numks = 1 )

Needed to reject Lambda (and conversion?) combinations

Definition at line 840 of file DTagTool.cxx.

840 {
841
842 SmartRefVector<EvtRecTrack> tracks = ( *iter_dtag )->tracks();
843 if ( tracks.size() < 2 * numks )
844 {
845 cout << "too many kshort required" << endl;
846 exit( 1 );
847 }
848 vector<int> canid;
849 canid.clear();
850
851 if ( tracks.size() == 0 ) return canid;
852
853 for ( EvtRecVeeVertexCol::iterator ksItr = m_ksiterbegin; ksItr < m_ksiterend; ksItr++ )
854 {
855
856 /// Needed to reject Lambda (and conversion?) combinations
857 if ( ( *ksItr )->vertexId() != 310 ) continue;
858
859 EvtRecTrack* aKsChild1Trk = ( *ksItr )->daughter( 0 );
860 EvtRecTrack* aKsChild2Trk = ( *ksItr )->daughter( 1 );
861
862 int ksChild1TrkId = aKsChild1Trk->trackId();
863 int ksChild2TrkId = aKsChild2Trk->trackId();
864
865 for ( int index = 0; index < numks; ++index )
866 {
867 bool isc1id = false;
868 bool isc2id = false;
869
870 for ( int i = index * 2; i < index * 2 + 2; ++i )
871 {
872 if ( !isc1id && ksChild1TrkId == tracks[i]->trackId() ) isc1id = true;
873 if ( !isc2id && ksChild2TrkId == tracks[i]->trackId() ) isc2id = true;
874 }
875
876 if ( isc1id && isc2id ) canid.push_back( ksItr - m_ksiterbegin );
877 }
878
879 if ( canid.size() == numks )
880 {
881 return canid;
882 break;
883 }
884 } // End "ksItr" FOR Loop
885
886 return canid;
887}

Referenced by DDecay::execute().

◆ ksId() [2/3]

vector< int > DTagTool::ksId ( EvtRecDTagCol::iterator iter,
int numks = 1 )

◆ ksId() [3/3]

vector< int > DTagTool::ksId ( EvtRecDTagCol::iterator iter,
int numks = 1 )

◆ mode() [1/6]

vector< int > DTagTool::mode ( EvtRecDTag::DecayMode decaymode)

Definition at line 161 of file DTagTool.cxx.

161 {
162
163 vector<int> mode;
164 int index = 0;
165 for ( EvtRecDTagCol::iterator iter = m_iterbegin; iter != m_iterend; iter++ )
166 {
167
168 if ( m_pid )
169 {
170 if ( ( *iter )->decayMode() == decaymode && ( *iter )->type() == 1 )
171 mode.push_back( index );
172 }
173 else
174 {
175 if ( ( *iter )->decayMode() == decaymode ) mode.push_back( index );
176 }
177
178 index++;
179 }
180
181 return mode;
182}

Referenced by DDecay::execute(), findSTag(), findSTag(), findSTag(), findSTag(), mode(), and mode().

◆ mode() [2/6]

vector< int > DTagTool::mode ( EvtRecDTag::DecayMode decaymode)

◆ mode() [3/6]

vector< int > DTagTool::mode ( EvtRecDTag::DecayMode decaymode)

◆ mode() [4/6]

vector< int > DTagTool::mode ( int decaymode)

Definition at line 184 of file DTagTool.cxx.

184 {
185
186 vector<int> mode;
187 int index = 0;
188 for ( EvtRecDTagCol::iterator iter = m_iterbegin; iter != m_iterend; iter++ )
189 {
190
191 if ( m_pid )
192 {
193 if ( ( *iter )->decayMode() == decaymode && ( *iter )->type() == 1 )
194 mode.push_back( index );
195 }
196 else
197 {
198 if ( ( *iter )->decayMode() == decaymode ) mode.push_back( index );
199 }
200
201 index++;
202 }
203
204 return mode;
205}

◆ mode() [5/6]

vector< int > DTagTool::mode ( int decaymode)

◆ mode() [6/6]

vector< int > DTagTool::mode ( int decaymode)

◆ modes_begin() [1/3]

EvtRecDTagCol::iterator DTagTool::modes_begin ( )
inline

Definition at line 32 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

32{ return m_iterbegin; }

Referenced by DDecay::execute(), and DSemilepAlg::execute().

◆ modes_begin() [2/3]

EvtRecDTagCol::iterator DTagTool::modes_begin ( )
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

32{ return m_iterbegin; }

◆ modes_begin() [3/3]

EvtRecDTagCol::iterator DTagTool::modes_begin ( )
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

32{ return m_iterbegin; }

◆ modes_end() [1/3]

EvtRecDTagCol::iterator DTagTool::modes_end ( )
inline

Definition at line 33 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

33{ return m_iterend; }

Referenced by DDecay::execute(), and DSemilepAlg::execute().

◆ modes_end() [2/3]

EvtRecDTagCol::iterator DTagTool::modes_end ( )
inline

Definition at line 33 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

33{ return m_iterend; }

◆ modes_end() [3/3]

EvtRecDTagCol::iterator DTagTool::modes_end ( )
inline

Definition at line 33 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

33{ return m_iterend; }

◆ name() [1/3]

void DTagTool::name ( )
inline

Definition at line 103 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

103{ cout << " I am the dtag tool" << endl; }

◆ name() [2/3]

void DTagTool::name ( )
inline

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

103{ cout << " I am the dtag tool" << endl; }

◆ name() [3/3]

void DTagTool::name ( )
inline

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

103{ cout << " I am the dtag tool" << endl; }

◆ numofShowerAboveThreshold() [1/6]

int DTagTool::numofShowerAboveThreshold ( )

◆ numofShowerAboveThreshold() [2/6]

int DTagTool::numofShowerAboveThreshold ( )

◆ numofShowerAboveThreshold() [3/6]

int DTagTool::numofShowerAboveThreshold ( )

◆ numofShowerAboveThreshold() [4/6]

int DTagTool::numofShowerAboveThreshold ( int threshold)

◆ numofShowerAboveThreshold() [5/6]

int DTagTool::numofShowerAboveThreshold ( int threshold)

◆ numofShowerAboveThreshold() [6/6]

int DTagTool::numofShowerAboveThreshold ( int threshold)

◆ operator<<() [1/3]

void DTagTool::operator<< ( EvtRecDTagCol::iterator iter)

Definition at line 683 of file DTagTool.cxx.

683 {
684
685 cout << " print mode:" << ( *iter )->decayMode() << endl;
686 cout << "beam energy is:" << ( *iter )->beamE() << endl;
687 cout << "mBC is:" << ( *iter )->mBC() << endl;
688 cout << "deltaE is:" << ( *iter )->deltaE() << endl;
689 cout << "inv mass is:" << ( *iter )->mass() << endl;
690 cout << "charge is:" << ( *iter )->charge() << endl;
691 cout << "charm is:" << ( *iter )->charm() << endl;
692 cout << "num of children is:" << ( *iter )->numOfChildren() << endl;
693
694 cout << "found " << ( *iter )->tracks().size() << " same side tracks." << endl;
695 cout << "found " << ( *iter )->otherTracks().size() << " other side tracks." << endl;
696 cout << "found " << ( *iter )->showers().size() << " same side showers." << endl;
697 cout << "found " << ( *iter )->otherShowers().size() << " other side showers." << endl;
698}

◆ operator<<() [2/3]

void DTagTool::operator<< ( EvtRecDTagCol::iterator iter)

◆ operator<<() [3/3]

void DTagTool::operator<< ( EvtRecDTagCol::iterator iter)

◆ p4() [1/3]

HepLorentzVector DTagTool::p4 ( RecMdcKalTrack * mdcKalTrack,
int pid )

Definition at line 899 of file DTagTool.cxx.

899 {
900
901 HepVector zhelix;
902 double mass = 0;
903
904 if ( pid == 0 )
905 {
906 zhelix = mdcKalTrack->getZHelixE();
907 mass = 0.000511;
908 }
909 else if ( pid == 1 )
910 {
911 zhelix = mdcKalTrack->getZHelixMu();
912 mass = 0.105658;
913 }
914 else if ( pid == 2 )
915 {
916 zhelix = mdcKalTrack->getZHelix();
917 mass = 0.139570;
918 }
919 else if ( pid == 3 )
920 {
921 zhelix = mdcKalTrack->getZHelixK();
922 mass = 0.493677;
923 }
924 else
925 {
926 zhelix = mdcKalTrack->getZHelixP();
927 mass = 0.938272;
928 }
929
930 double dr( 0 ), phi0( 0 ), kappa( 0 ), dz( 0 ), tanl( 0 );
931 dr = zhelix[0];
932 phi0 = zhelix[1];
933 kappa = zhelix[2];
934 dz = zhelix[3];
935 tanl = zhelix[4];
936
937 int charge = 0;
938
939 if ( kappa > 0.0000000001 ) charge = 1;
940 else if ( kappa < -0.0000000001 ) charge = -1;
941
942 double pxy = 0;
943 if ( kappa != 0 ) pxy = 1.0 / fabs( kappa );
944
945 double px = pxy * ( -sin( phi0 ) );
946 double py = pxy * cos( phi0 );
947 double pz = pxy * tanl;
948
949 double e = sqrt( pxy * pxy + pz * pz + mass * mass );
950
951 return HepLorentzVector( px, py, pz, e );
952}
double mass

Referenced by p4shower().

◆ p4() [2/3]

HepLorentzVector DTagTool::p4 ( RecMdcKalTrack * mdcKalTrack,
int pid )

◆ p4() [3/3]

HepLorentzVector DTagTool::p4 ( RecMdcKalTrack * mdcKalTrack,
int pid )

◆ p4shower() [1/3]

HepLorentzVector DTagTool::p4shower ( RecEmcShower * shower)

Definition at line 889 of file DTagTool.cxx.

889 {
890
891 double Eemc = shower->energy();
892 double phi = shower->phi();
893 double theta = shower->theta();
894 HepLorentzVector p4( Eemc * sin( theta ) * cos( phi ), Eemc * sin( theta ) * sin( phi ),
895 Eemc * cos( theta ), Eemc );
896 return p4;
897}
HepLorentzVector p4(RecMdcKalTrack *mdcKalTrack, int pid)
Definition DTagTool.cxx:899

Referenced by etap4(), and pi0p4().

◆ p4shower() [2/3]

HepLorentzVector DTagTool::p4shower ( RecEmcShower * shower)

◆ p4shower() [3/3]

HepLorentzVector DTagTool::p4shower ( RecEmcShower * shower)

◆ pi0_begin() [1/3]

EvtRecPi0Col::iterator DTagTool::pi0_begin ( )
inline

Definition at line 34 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

34{ return m_pi0iterbegin; }

Referenced by DDecay::execute().

◆ pi0_begin() [2/3]

EvtRecPi0Col::iterator DTagTool::pi0_begin ( )
inline

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

34{ return m_pi0iterbegin; }

◆ pi0_begin() [3/3]

EvtRecPi0Col::iterator DTagTool::pi0_begin ( )
inline

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

34{ return m_pi0iterbegin; }

◆ pi0_end() [1/3]

EvtRecPi0Col::iterator DTagTool::pi0_end ( )
inline

Definition at line 35 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

35{ return m_pi0iterend; }

◆ pi0_end() [2/3]

EvtRecPi0Col::iterator DTagTool::pi0_end ( )
inline

Definition at line 35 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

35{ return m_pi0iterend; }

◆ pi0_end() [3/3]

EvtRecPi0Col::iterator DTagTool::pi0_end ( )
inline

Definition at line 35 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

35{ return m_pi0iterend; }

◆ pi0Id() [1/3]

vector< int > DTagTool::pi0Id ( EvtRecDTagCol::iterator iter,
int numpi0 = 1 )

Access pi0 children

Definition at line 744 of file DTagTool.cxx.

744 {
745
746 SmartRefVector<EvtRecTrack> showers = ( *iter_dtag )->showers();
747 if ( showers.size() < 2 * numpi0 )
748 {
749 cout << "too many pi0 required" << endl;
750 exit( 1 );
751 }
752
753 vector<int> canid;
754 canid.clear();
755
756 for ( EvtRecPi0Col::iterator pi0Itr = m_pi0iterbegin; pi0Itr < m_pi0iterend; pi0Itr++ )
757 {
758
759 /// Access pi0 children
760 EvtRecTrack* heGammaTrk = const_cast<EvtRecTrack*>( ( *pi0Itr )->hiEnGamma() );
761 EvtRecTrack* leGammaTrk = const_cast<EvtRecTrack*>( ( *pi0Itr )->loEnGamma() );
762
763 int heGammaTrkId = heGammaTrk->trackId();
764 int leGammaTrkId = leGammaTrk->trackId();
765
766 for ( int index = 0; index < numpi0; ++index )
767 {
768 bool isheid = false;
769 bool isleid = false;
770
771 for ( int i = index * 2; i < index * 2 + 2; ++i )
772 {
773
774 if ( !isheid && heGammaTrkId == showers[i]->trackId() ) isheid = true;
775 if ( !isleid && leGammaTrkId == showers[i]->trackId() ) isleid = true;
776 }
777
778 if ( isheid && isleid ) canid.push_back( pi0Itr - m_pi0iterbegin );
779 }
780
781 if ( canid.size() == numpi0 )
782 {
783 return canid;
784 break;
785 }
786
787 } // End "pi0Itr" FOR Loop
788
789 return canid;
790}

Referenced by DDecay::execute().

◆ pi0Id() [2/3]

vector< int > DTagTool::pi0Id ( EvtRecDTagCol::iterator iter,
int numpi0 = 1 )

◆ pi0Id() [3/3]

vector< int > DTagTool::pi0Id ( EvtRecDTagCol::iterator iter,
int numpi0 = 1 )

◆ pi0p4() [1/3]

HepLorentzVector DTagTool::pi0p4 ( EvtRecPi0Col::iterator pi0Itr,
bool isconstrain = true )

Definition at line 700 of file DTagTool.cxx.

700 {
701
702 if ( isconstrain )
703 {
704 HepLorentzVector p41 = ( *pi0Itr )->hiPfit();
705 HepLorentzVector p42 = ( *pi0Itr )->loPfit();
706 return ( p41 + p42 );
707 }
708 else
709 {
710 EvtRecTrack* trk1 = const_cast<EvtRecTrack*>( ( *pi0Itr )->hiEnGamma() );
711 EvtRecTrack* trk2 = const_cast<EvtRecTrack*>( ( *pi0Itr )->loEnGamma() );
712
713 RecEmcShower* emctrk1 = ( trk1 )->emcShower();
714 RecEmcShower* emctrk2 = ( trk2 )->emcShower();
715
716 HepLorentzVector p41 = p4shower( emctrk1 );
717 HepLorentzVector p42 = p4shower( emctrk2 );
718 return ( p41 + p42 );
719 }
720}

◆ pi0p4() [2/3]

HepLorentzVector DTagTool::pi0p4 ( EvtRecPi0Col::iterator pi0Itr,
bool isconstrain = true )

◆ pi0p4() [3/3]

HepLorentzVector DTagTool::pi0p4 ( EvtRecPi0Col::iterator pi0Itr,
bool isconstrain = true )

◆ setdtagDE() [1/3]

void DTagTool::setdtagDE ( double sigma1,
double sigma2 )
inline

Definition at line 70 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

70 {
71 m_tag1desigma = sigma1;
72 m_tag2desigma = sigma2;
73 }

◆ setdtagDE() [2/3]

void DTagTool::setdtagDE ( double sigma1,
double sigma2 )
inline

Definition at line 70 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

70 {
71 m_tag1desigma = sigma1;
72 m_tag2desigma = sigma2;
73 }

◆ setdtagDE() [3/3]

void DTagTool::setdtagDE ( double sigma1,
double sigma2 )
inline

Definition at line 70 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

70 {
71 m_tag1desigma = sigma1;
72 m_tag2desigma = sigma2;
73 }

◆ setPID() [1/3]

void DTagTool::setPID ( bool pid)
inline

Definition at line 30 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

30{ m_pid = pid; }

◆ setPID() [2/3]

void DTagTool::setPID ( bool pid)
inline

Definition at line 30 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

30{ m_pid = pid; }

◆ setPID() [3/3]

void DTagTool::setPID ( bool pid)
inline

Definition at line 30 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

30{ m_pid = pid; }

◆ shareTracks() [1/3]

bool DTagTool::shareTracks ( EvtRecDTagCol::iterator iter1,
EvtRecDTagCol::iterator iter2 )

Definition at line 1280 of file DTagTool.cxx.

1280 {
1281
1282 SmartRefVector<EvtRecTrack> tracks1 = ( *iter1 )->tracks();
1283 SmartRefVector<EvtRecTrack> showers1 = ( *iter1 )->showers();
1284 SmartRefVector<EvtRecTrack> tracks2 = ( *iter2 )->tracks();
1285 SmartRefVector<EvtRecTrack> showers2 = ( *iter2 )->showers();
1286
1287 // charged tracks
1288 for ( int i = 0; i < tracks1.size(); i++ )
1289 {
1290 for ( int j = 0; j < tracks2.size(); j++ )
1291 {
1292 if ( tracks1[i] == tracks2[j] ) return true;
1293 }
1294 }
1295
1296 // neutral showers
1297 for ( int i = 0; i < showers1.size(); i++ )
1298 {
1299 for ( int j = 0; j < showers2.size(); j++ )
1300 {
1301 if ( showers1[i] == showers2[j] ) return true;
1302 }
1303 }
1304
1305 return false;
1306}

Referenced by findADTag(), findADTag(), findDTag(), and findDTag().

◆ shareTracks() [2/3]

bool DTagTool::shareTracks ( EvtRecDTagCol::iterator iter1,
EvtRecDTagCol::iterator iter2 )

◆ shareTracks() [3/3]

bool DTagTool::shareTracks ( EvtRecDTagCol::iterator iter1,
EvtRecDTagCol::iterator iter2 )

◆ stag() [1/3]

EvtRecDTagCol::iterator DTagTool::stag ( )
inline

Definition at line 65 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

65{ return m_iterstag; }

Referenced by DDecay::execute(), and DSemilepAlg::execute().

◆ stag() [2/3]

EvtRecDTagCol::iterator DTagTool::stag ( )
inline

Definition at line 65 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

65{ return m_iterstag; }

◆ stag() [3/3]

EvtRecDTagCol::iterator DTagTool::stag ( )
inline

Definition at line 65 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

65{ return m_iterstag; }

◆ vdtag1() [1/3]

vector< EvtRecDTagCol::iterator > DTagTool::vdtag1 ( )
inline

Definition at line 68 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

68{ return m_viterdtag1; }

Referenced by DDecay::execute().

◆ vdtag1() [2/3]

vector< EvtRecDTagCol::iterator > DTagTool::vdtag1 ( )
inline

Definition at line 68 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

68{ return m_viterdtag1; }

◆ vdtag1() [3/3]

vector< EvtRecDTagCol::iterator > DTagTool::vdtag1 ( )
inline

Definition at line 68 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

68{ return m_viterdtag1; }

◆ vdtag2() [1/3]

vector< EvtRecDTagCol::iterator > DTagTool::vdtag2 ( )
inline

Definition at line 69 of file Analysis/DTagTool/include/DTagTool/DTagTool.h.

69{ return m_viterdtag2; }

Referenced by DDecay::execute().

◆ vdtag2() [2/3]

vector< EvtRecDTagCol::iterator > DTagTool::vdtag2 ( )
inline

Definition at line 69 of file InstallArea/x86_64-el9-gcc13-dbg/include/DTagTool/DTagTool.h.

69{ return m_viterdtag2; }

◆ vdtag2() [3/3]

vector< EvtRecDTagCol::iterator > DTagTool::vdtag2 ( )
inline

Definition at line 69 of file InstallArea/x86_64-el9-gcc13-opt/include/DTagTool/DTagTool.h.

69{ return m_viterdtag2; }

The documentation for this class was generated from the following files: