1 #include "StHbtMaker/CorrFctn/ParityTwistCorrFctn.h"
9 ParityTwistCorrFctn::ParityTwistCorrFctn(){
10 mTagWriter = StHbtTagWriter::Instance();
13 mSameTzz =
new StHbt1DHisto(
"SameTzz",
"Parity Same Twist zz",100,-0.0010,0.0010);
14 mMixedTzz =
new StHbt1DHisto(
"MixedTzz",
"Parity Mixed Twist zz",100,-0.0010,0.0010);
20 mSameTzz->SetDirectory(0);
21 mMixedTzz->SetDirectory(0);
29 ParityTwistCorrFctn::~ParityTwistCorrFctn(){
37 void ParityTwistCorrFctn::Finish(){
38 cout <<
" alive in finish " << endl;
42 StHbtString ParityTwistCorrFctn::Report(){
43 string stemp =
"Parity Correlation Function Report:\n";
44 StHbtString returnThis = stemp;
48 inline void ParityTwistCorrFctn::AddRealPair(
const StHbtPair* pair){
49 cout <<
"WARNING ParityTwistCorrFctn::AddRealPair shouldn't be called" << endl;
55 inline void ParityTwistCorrFctn::AddMixedPair(
const StHbtPair* pair){
56 cout <<
"WARNING ParityTwistCorrFctn::AddMixedPair shouldn't be called" << endl;
60 inline void ParityTwistCorrFctn::ParityCompute(ParityBuff *Plus, ParityBuff *Minus,
int mxd){
88 cout <<
"******** we got to the ParityComputeII for SAME event" << endl;
91 cout <<
"******** we got to the ParityComputeII for MIXED event" << endl;
94 int plusSize = Plus->size();
95 int minusSize = Minus->size();
97 {
for (
int jjj = 0; jjj < plusSize; jjj++){
100 sumYpos += TempV.y();
101 sumZpos += TempV.z();
102 sumXXpos += TempV.x()*TempV.x();
103 sumYYpos += TempV.y()*TempV.y();
104 sumZZpos += TempV.z()*TempV.z();
105 sumXYpos += TempV.x()*TempV.y();
106 sumXZpos += TempV.x()*TempV.z();
107 sumYZpos += TempV.y()*TempV.z();
110 {
for (
int jjj = 0; jjj < minusSize; jjj++){
112 sumXneg += TempV.x();
113 sumYneg += TempV.y();
114 sumZneg += TempV.z();
115 sumXXneg += TempV.x()*TempV.x();
116 sumYYneg += TempV.y()*TempV.y();
117 sumZZneg += TempV.z()*TempV.z();
118 sumXYneg += TempV.x()*TempV.y();
119 sumXZneg += TempV.x()*TempV.z();
120 sumYZneg += TempV.y()*TempV.z();
123 Tzz = ( (sumXZpos * sumYneg ) + (sumYpos * sumXZneg)
124 - (sumXpos * sumYZneg) - (sumYZpos * sumXneg ) ) / (plusSize*minusSize);
126 cout <<
"Tzz is ..................."<< Tzz <<endl;
132 mMixedTzz->Fill(Tzz);