Changeset 129 in Idarraga for mafalda


Ignore:
Timestamp:
Apr 14, 2011, 6:22:07 PM (13 years ago)
Author:
idarraga
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mafalda/FEI3/FEI3Mips/FEI3Mips.cpp

    r128 r129  
    1212#include "MPXAlgo/Highlighter.h"
    1313
    14 #include "TColor.h"
     14#include "TH1F.h"
    1515
    1616using namespace MSG;
     
    2727{
    2828
     29
    2930}
    3031
     
    3839        getMyTree()->Branch("chargeWeights", &m_chargeWeights);
    3940        getMyTree()->Branch("lvl1Weights", &m_lvl1Weights);
     41        getMyTree()->Branch("chargePerSection", &m_chargePerSection);
     42
    4043        getMyTree()->Branch("clusterSize", &m_clusterSize, "clusterSize/I");
    4144        getMyTree()->Branch("alphaAngle", &m_alphaAngle, "alphaAngle/D");
     
    8992                                m_chargeWeights.push_back(0.0);
    9093                                m_lvl1Weights.push_back(0.0);
     94                                m_chargePerSection.push_back(vector<Int_t>()); // push back empty vectors
    9195                        }
    9296
     
    225229                                        m_lvl1Weights[__HEAD_INDX] += GetLVL1(*contItr);
    226230
     231                                        // store charge for landau distribution per section
     232                                        m_chargePerSection[__HEAD_INDX].push_back( GetMatrixElement(*contItr) );
     233
    227234                                }else if( firstThreeBits == __RIGHT_CORNER_MASK_1
    228235                                                || firstThreeBits == __RIGHT_CORNER_MASK_2){
     
    231238                                        m_chargeWeights[__TAIL_INDX] += GetMatrixElement(*contItr);
    232239                                        m_lvl1Weights[__TAIL_INDX] += GetLVL1(*contItr);
     240
     241                                        // store charge for landau distribution per section
     242                                        m_chargePerSection[__TAIL_INDX].push_back( GetMatrixElement(*contItr) );
    233243
    234244                                }else{
     
    241251
    242252                                        Int_t nB = NumberOfBitsOnBeforeDoubleZero(locationBitWord);
    243                                         Log << MSG::DEBUG << "... column " << nB << " ... " << endreq;
    244 
     253
     254                                        // Handle special case when the pixel is equidistant to two lines.
     255                                        // We end up with a word  001111  for m_nDivisions = 4.  This pixel belongs
     256                                        //  to the 3rd slice.
     257                                        if(nB == m_nDivisions){
     258                                                nB--;
     259                                        }
     260                                        Log << MSG::DEBUG << "... column " << nB << " ... " << GetFrameId() << endreq;
    245261                                        m_chargeWeights[nB] += GetMatrixElement(*contItr);
    246262                                        m_lvl1Weights[nB] += GetLVL1(*contItr);
     263                                        // Store charge for landau distribution per section
     264                                        m_chargePerSection[nB].push_back( GetMatrixElement(*contItr) );
     265
    247266                                }
    248267
     
    260279                        }
    261280
     281
    262282                        // WARNING, filling once per mip !!!
    263283                        m_frameId = GetFrameId();
     
    266286                        m_chargeWeights.clear();
    267287                        m_lvl1Weights.clear();
     288                        m_chargePerSection.clear();
    268289                        m_alphaAngle = 0.;
    269290                        m_clusterSize = 0;
     
    281302        m_chargeWeights.clear();
    282303        m_lvl1Weights.clear();
     304        m_chargePerSection.clear();
    283305
    284306}
Note: See TracChangeset for help on using the changeset viewer.