//***************************************************************************** // File: Level3SummaryReaderModule.cc // ---------------------------------------------------------------------------- // Type: Class implementation source // Package: Level3Mods // Class: Level3SummaryReaderModule // Language: Standard C++ // Project: CDF Run II Offline Software Upgrade // OrigAuth: Kevin McFarland, Gilles de Lentdecker, Beate Heineman // Company: Fermilab //============================================================================= //***************************************************************************** //============================================================================= // Declarations and Definitions //============================================================================= //------------------------ // String Header First -- //------------------------ #include //----------------------- // This Class's Header -- //----------------------- #include "Level3Mods/Level3SummaryReaderModule.hh" //------------- // C Headers -- //------------- #include #include //--------------- // C++ Headers -- //--------------- #include #include //------------------------------- // Collaborating Class Headers -- //------------------------------- #include "AbsEnv/AbsEnv.hh" #include "Calor/CprWireCollectionMaker.hh" #include "Electron/emobj_alg.hh" #include "ElectronObjects/CdfEmObject.hh" #include "ElectronObjects/CdfEmObjectView.hh" #include "MuonObjects/CdfMuon.hh" #include "MuonObjects/CdfMuonView.hh" #include "JetObjects/CdfJetColl.hh" #include "MetObjects/CdfMet.hh" #include "RRL3/GrowResultList.hh" #include "TrackingObjects/Storable/CdfTrackColl.hh" #include "TrackingObjects/Storable/CdfTrackView.hh" #include "TrackingObjects/Tracks/track_cut.hh" #include "TauObjects/CdfTau.hh" #include "TauObjects/CdfTauCollection.hh" #include "rcp/Manager.hpp" #include "rcp/RCPValue.hpp" #include "HepTuple/HepHist1D.h" #include "HepTuple/HepTuple.h" #include "Level3Objects/L3SummaryObject.hh" // ------------------------------------------------- // -- Declarations of variables d // ------------------------------------------------- //----------------------------------------------------------------------- // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- //----------------------------------------------------------------------- #define TWOPI 6.28318530717958647692 #define RAD2DEG 57.29577951308232087684 #define DEG2RAD 0.01745329251994329576 #define MUON_MASS 0.105658389 static const char rcsid[] = "$Id: Level3SummaryReaderModule.cc"; //---------------- // Constructors -- //---------------- Level3SummaryReaderModule::Level3SummaryReaderModule(const char* const theName, const char* const theDescription) : HepHistModule(theName,theDescription), // _Jet4Et ("jet4Et",this,8.0), _Jet7Et ("jet7Et",this,8.0), _TrackPt ("trackPt",this,1.2), _EmObjectEt("emObjectEt",this,1.5), _MuonPt ("muonPt",this,1.2), _TauPt ("tauPt",this,5.0), angle_cut ("openAngle", this, 130), low_mass ("massLow", this, 2.80), high_mass ("massHigh", this, 3.40), muon_pt ("muonPt", this, 1.50) { // ------------------------------------------------------------------- // Electron menu : // ------------------------------------------------------------------- _commonMenu.initialize("commonMenu",this); _commonMenu.initTitle("commonMenu"); commands()->append(&_commonMenu); //common _Jet4Et.addDescription( " Specifies the Et cut applied to Jets of cone 0.4 for storing them in the L3 Summary bank.\n\ Default for Jet4Et is 8.0 GeV " ); _Jet7Et.addDescription( " Specifies the Et cut applied to Jets of cone 0.7 for storing them in the L3 Summary bank.\n\ Default for Jet7Et is 8.0 GeV " ); _TrackPt.addDescription( " Specifies the Pt cut applied to tracks for storing them in the L3 Summary bank.\n\ Default for TrackPt is 1.2 GeV " ); _EmObjectEt.addDescription( " Specifies the Et cut applied to CdfEmObjects for storing them in the L3 Summary bank.\n\ Default for EmObjectEt is 1.5 GeV " ); _MuonPt.addDescription( " Specifies the Pt cut applied to muons for storing them in the L3 Summary bank.\n\ Default for MuonPt is 1.2 GeV " ); _TauPt.addDescription( " Specifies the Pt cut applied to taus for storing them in the L3 Summary bank.\n\ Default for TauPt is 5.0 GeV " ); angle_cut.addDescription (" \tMinimum Muon pt [GeV]."); low_mass.addDescription(" \tMinimum JPsi mass [GeV]. for booking, default 2.80"); high_mass.addDescription(" \tMaximum JPsi mass [GeV]. for booking, default 3.4"); muon_pt.addDescription (" \tMinimum Muon pt [GeV], default 1.5"); _commonMenu.commands()->append(&_Jet4Et); _commonMenu.commands()->append(&_Jet7Et); _commonMenu.commands()->append(&_TrackPt); _commonMenu.commands()->append(&_EmObjectEt); _commonMenu.commands()->append(&_MuonPt); _commonMenu.commands()->append(&_TauPt); _commonMenu.commands()->append(&angle_cut); _commonMenu.commands()->append(&low_mass); _commonMenu.commands()->append(&high_mass); _commonMenu.commands()->append(&muon_pt); } //-------------- // Destructor -- //-------------- Level3SummaryReaderModule::~Level3SummaryReaderModule( ) { } //-------------- // Operations -- //-------------- AppResult Level3SummaryReaderModule::beginJob( AbsEvent* aJob ) { _manager = new HepRootFileManager("L3SummaryNtuple.root"); assert( 0 != _manager); _ntuple = &_manager->ntuple( "theTree",1 ); _ntuple->setColumnWise(); _ntuple->setDiskResident(); std::cout << " Ntuple BOOKED"<addBranch(); // Setup a muon branch _muonBranch = new MuonBranch( _ntuple ); // _muonBranch1->setParms( _isMC, "Tau","CdfTauCollection"); _muonBranch->addBranch(); // Setup Jet-0.4 branch _jet4Branch = new Jet4Branch( _ntuple ); _jet4Branch->addBranch(); // Setup Jet-0.7 branch _jet7Branch = new Jet7Branch( _ntuple ); _jet7Branch->addBranch(); // Setup COT branch _cotBranch = new COTBranch( _ntuple ); _cotBranch->addBranch(); // Setup SVX branch _svxBranch = new SVXBranch( _ntuple ); _svxBranch->addBranch(); // Setup MET branch _metBranch = new METBranch( _ntuple ); _metBranch->addBranch(); // Setup Tau branch _tauBranch = new TauBranch( _ntuple ); _tauBranch->addBranch(); std::cout << " Branches : All set !"<fill( anEvent ); _emBranch->capture(); _muonBranch->fill( anEvent ); _muonBranch->capture(); _jet4Branch->fill( anEvent ); _jet4Branch->capture(); _jet7Branch->fill( anEvent ); _jet7Branch->capture(); _cotBranch->fill( anEvent ); _cotBranch->capture(); _svxBranch->fill( anEvent ); _svxBranch->capture(); _metBranch->fill( anEvent ); _metBranch->capture(); _tauBranch->fill( anEvent ); _tauBranch->capture(); _ntuple->storeCapturedData(); _ntuple->clearData(); return AppResult::OK; } AppResult Level3SummaryReaderModule::other( AbsEvent* ) { return AppResult::OK; } AppResult Level3SummaryReaderModule::endRun( AbsEvent* aRun ) { std::cout << "end Run "< 0 _phet = new float[_Nobj]; _tracklambda = new float[_Nobj]; _phIso4 = new float[_Nobj]; } EMBranch::~EMBranch() { delete[] _elet; delete[] _eta; delete[] _trackpt; delete[] _trackcharge; delete[] _trackZ0; delete[] _trackPhi0; delete[] _trackD0; delete[] _hadem2; delete[] _hadem3; delete[] _delx; delete[] _delz; delete[] _ChiS; delete[] _ChiW; delete[] _LshrCes; delete[] _LshrEl2; delete[] _LshrEl3; delete[] _SeedIeta; delete[] _SeedIphi; delete[] _Iso4; delete[] _CesZ; delete[] _CesAvgChi2; delete[] _phet; delete[] _tracklambda; delete[] _phIso4; } void EMBranch::setParms( const std::string branchName, const string emDescription) { _branchName = branchName; _description = emDescription; return; } void EMBranch::addBranch() { _ntuple->columnAt(_branchName+"::nEmObj", &_nEmObj, (Int4)0); _ntuple->columnArray(_branchName+"::_elet", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_eta", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_trackpt", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_trackcharge",1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_trackZ0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_trackPhi0",1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_trackD0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_hadem2", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_hadem3", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_delx", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_delz", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_ChiS", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_ChiW", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_LshrCes", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_LshrEl2", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_LshrEl3", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_SeedIeta", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_SeedIphi", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_Iso4", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_CesZ", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_CesAvgChi2",1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phet", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_tracklambda",1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phIso4", 1, (Float4)0.).dimension(_Nobj); return; } void EMBranch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { _elet[k] = *(tWalking++); _eta[k] = *(tWalking++); if ((*it).blockVersion < 1) { _trackpt[k] = *(tWalking++); float thecurv = *(tWalking++); _trackcharge[k] = thecurv/fabs(thecurv); } else { float signedpt = *(tWalking++); _trackpt[k] = fabs(signedpt); _trackcharge[k] = signedpt/fabs(signedpt); float trackcurv = 0.0029979 * -1.4116/2*fabs(_trackpt[k]); } _trackZ0[k] = *(tWalking++); _trackPhi0[k] = *(tWalking++); _trackD0[k] = *(tWalking++); _hadem2[k] = *(tWalking++); _hadem3[k] = *(tWalking++); _delx[k] = *(tWalking++); _delz[k] = *(tWalking++); _ChiS[k] = *(tWalking++); _ChiW[k] = *(tWalking++); _LshrCes[k] = *(tWalking++); _LshrEl2[k] = *(tWalking++); _LshrEl3[k] = *(tWalking++); _SeedIeta[k] = *(tWalking++); _SeedIphi[k] = *(tWalking++); _Iso4[k] = *(tWalking++); _CesZ[k] = *(tWalking++); _CesAvgChi2[k] = *(tWalking++); if ((*it).blockVersion > 0){ _phet[k] = *(tWalking++); _tracklambda[k]= *(tWalking++); _phIso4[k] = *(tWalking++); } } _nEmObj = (*it).nEntries; } } } return; } void EMBranch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nEmObj", _nEmObj); _ntuple->capture(_branchName+"::_elet",&(_elet[0])); _ntuple->capture(_branchName+"::_eta",&(_eta[0])); _ntuple->capture(_branchName+"::_trackpt",&(_trackpt[0])); _ntuple->capture(_branchName+"::_trackcharge",&(_trackcharge[0])); _ntuple->capture(_branchName+"::_trackZ0",&(_trackZ0[0])); _ntuple->capture(_branchName+"::_trackPhi0",&(_trackPhi0[0])); _ntuple->capture(_branchName+"::_trackD0",&(_trackD0[0])); _ntuple->capture(_branchName+"::_hadem2",&(_hadem2[0])); _ntuple->capture(_branchName+"::_hadem3",&(_hadem3[0])); _ntuple->capture(_branchName+"::_delx",&(_delx[0])); _ntuple->capture(_branchName+"::_delz",&(_delz[0])); _ntuple->capture(_branchName+"::_ChiS",&(_ChiS[0])); _ntuple->capture(_branchName+"::_ChiW",&(_ChiW[0])); _ntuple->capture(_branchName+"::_LshrCes",&(_LshrCes[0])); _ntuple->capture(_branchName+"::_LshrEl2",&(_LshrEl2[0])); _ntuple->capture(_branchName+"::_LshrEl3",&(_LshrEl3[0])); _ntuple->capture(_branchName+"::_SeedIeta",&(_SeedIeta[0])); _ntuple->capture(_branchName+"::_SeedIphi",&(_SeedIphi[0])); _ntuple->capture(_branchName+"::_Iso4",&(_Iso4[0])); _ntuple->capture(_branchName+"::_CesZ",&(_CesZ[0])); _ntuple->capture(_branchName+"::_CesAvgChi2",&(_CesAvgChi2[0])); _ntuple->capture(_branchName+"::_phet",&(_phet[0])); _ntuple->capture(_branchName+"::_tracklambda",&(_tracklambda[0])); _ntuple->capture(_branchName+"::_phIso4",&(_phIso4[0])); _ntuple->captureBlock(_branchName); return; } void EMBranch::initializeVariables() { _nEmObj= 0; for( int i=0; i<_Nobj; ++i){ _elet[i] = -9999; _eta[i] = -9999; _trackpt[i] = -9999; _trackcharge[i] = -9999; _trackZ0[i] = -9999; _trackPhi0[i] = -9999; _trackD0[i] = -9999; _hadem2[i] = -9999; _hadem3[i] = -9999; _delx[i] = -9999; _delz[i] = -9999; _ChiS[i] = -9999; _ChiW[i] = -9999; _LshrCes[i] = -9999; _LshrEl2[i] = -9999; _LshrEl3[i] = -9999; _SeedIeta[i] = -9999; _SeedIphi[i] = -9999; _Iso4[i] = -9999; _CesZ[i] = -9999; _CesAvgChi2[i] = -9999; _phet[i] = -9999; _tracklambda[i] = -9999; _phIso4[i] = -9999; } return; } MuonBranch::MuonBranch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 20; _branchName = "Muon"; _charge = new float[_Nobj]; _pt = new float[_Nobj]; _eta = new float[_Nobj]; _phi0 = new float[_Nobj]; _d0 = new float[_Nobj]; _z0 = new float[_Nobj]; _em = new float[_Nobj]; _had = new float[_Nobj]; _dxCmu = new float[_Nobj]; _chixCmu = new float[_Nobj]; _dxCmp = new float[_Nobj]; _chixCmp = new float[_Nobj]; _dxCmx = new float[_Nobj]; _chixCmx = new float[_Nobj]; _chixPosCmu = new float[_Nobj]; _chixPosCmp = new float[_Nobj]; _chixPosCmx = new float[_Nobj]; } MuonBranch::~MuonBranch() { delete[] _charge; delete[] _pt; delete[] _eta; delete[] _phi0; delete[] _d0; delete[] _z0; delete[] _em; delete[] _had; delete[] _dxCmu; delete[] _chixCmu; delete[] _dxCmp; delete[] _chixCmp; delete[] _dxCmx; delete[] _chixCmx; delete[] _chixPosCmu; delete[] _chixPosCmp; delete[] _chixPosCmx; } void MuonBranch::setParms( const std::string branchName, const string muonDescription) { _branchName = branchName; _description = muonDescription; return; } void MuonBranch::addBranch() { _ntuple->columnAt(_branchName+"::nMuons", &_nMuons, (Int4)0); _ntuple->columnAt(_branchName+"::trigNum", &_trigNum, (Int4)0); _ntuple->columnArray(_branchName+"::_charge",1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_pt", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_eta", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_d0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_z0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_em", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_had", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_dxCmu", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chixCmu", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_dxCmp", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chixCmp", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_dxCmx", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chixCmx", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chixPosCmu", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chixPosCmp", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chixPosCmx", 1, (Float4)0.).dimension(_Nobj); return; } void MuonBranch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); _trigNum = AbsEnv::instance()->trigNumber(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } } else if ((*it).blockId == 1){ for (int k = 0; k < (*it).nEntries; k++) { if ((*it).blockVersion < 1){ _pt[k] = *(tWalking++); float thecurv = *(tWalking++); _charge[k] = thecurv/fabs(thecurv); } else { float signedpt = *(tWalking++); _pt[k] = fabs(signedpt); _charge[k] = signedpt/fabs(signedpt); float trackcurv = 0.0029979 * -1.4116/2*fabs(_pt[k]); } _eta[k] = *(tWalking++); _phi0[k] = *(tWalking++); _d0[k] = *(tWalking++); _z0[k] = *(tWalking++); _em[k] = *(tWalking++); _had[k] = *(tWalking++); _dxCmu[k] = *(tWalking++); _chixCmu[k] = *(tWalking++); _dxCmp[k] = *(tWalking++); _chixCmp[k] = *(tWalking++); _dxCmx[k] = *(tWalking++); _chixCmx[k] = *(tWalking++); if ((*it).blockVersion > 0){ _chixPosCmu[k] = *(tWalking++); _chixPosCmp[k] = *(tWalking++); _chixPosCmx[k] = *(tWalking++); } } _nMuons = (*it).nEntries; } } } return; } void MuonBranch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nMuons", _nMuons); _ntuple->capture(_branchName+"::trigNum", _trigNum); _ntuple->capture(_branchName+"::_charge",&(_charge[0])); _ntuple->capture(_branchName+"::_pt",&(_pt[0])); _ntuple->capture(_branchName+"::_eta",&(_eta[0])); _ntuple->capture(_branchName+"::_phi0",&(_phi0[0])); _ntuple->capture(_branchName+"::_d0",&(_d0[0])); _ntuple->capture(_branchName+"::_z0",&(_z0[0])); _ntuple->capture(_branchName+"::_em",&(_em[0])); _ntuple->capture(_branchName+"::_had",&(_had[0])); _ntuple->capture(_branchName+"::_dxCmu",&(_dxCmu[0])); _ntuple->capture(_branchName+"::_chixCmu",&(_chixCmu[0])); _ntuple->capture(_branchName+"::_dxCmp",&(_dxCmp[0])); _ntuple->capture(_branchName+"::_chixCmp",&(_chixCmp[0])); _ntuple->capture(_branchName+"::_dxCmx",&(_dxCmx[0])); _ntuple->capture(_branchName+"::_chixCmx",&(_chixCmx[0])); _ntuple->capture(_branchName+"::_chixPosCmu",&(_chixPosCmu[0])); _ntuple->capture(_branchName+"::_chixPosCmp",&(_chixPosCmp[0])); _ntuple->capture(_branchName+"::_chixPosCmx",&(_chixPosCmx[0])); _ntuple->captureBlock(_branchName); return; } void MuonBranch::initializeVariables() { _nMuons= 0; for( int i=0; i<_Nobj; ++i){ _trigNum = -9999; _charge[i] = -9999; _pt[i] = -9999; _eta[i] = -9999; _phi0[i] = -9999; _d0[i] = -9999; _z0[i] = -9999; _em[i] = -9999; _had[i] = -9999; _dxCmu[i] = -9999; _chixCmu[i] = -9999; _dxCmp[i] = -9999; _chixCmp[i] = -9999; _dxCmx[i] = -9999; _chixCmx[i] = -9999; _chixPosCmu[i] = -9999; _chixPosCmp[i] = -9999; _chixPosCmx[i] = -9999; } return; } Jet4Branch::Jet4Branch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 20; _branchName = "Jet4"; _et = new float[_Nobj]; _eta = new float[_Nobj]; _phi = new float[_Nobj]; } Jet4Branch::~Jet4Branch() { // delete[] _et; // delete[] _eta; // delete[] _phi; } void Jet4Branch::setParms( const std::string branchName, const string jet4Description) { _branchName = branchName; _description = jet4Description; return; } void Jet4Branch::addBranch() { _ntuple->columnAt(_branchName+"::nJet4", &_nJet4, (Int4)0); _ntuple->columnArray(_branchName+"::_et", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_eta", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi", 1, (Float4)0.).dimension(_Nobj); return; } void Jet4Branch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } } else if ((*it).blockId == 1){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 2){ for (int k = 0; k < (*it).nEntries; k++) { _et[k] = *(tWalking++); _eta[k] = *(tWalking++); _phi[k] = *(tWalking++); } _nJet4 = (*it).nEntries; } } } return; } void Jet4Branch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nJet4", _nJet4); _ntuple->capture(_branchName+"::_et",&(_et[0])); _ntuple->capture(_branchName+"::_eta",&(_eta[0])); _ntuple->capture(_branchName+"::_phi",&(_phi[0])); _ntuple->captureBlock(_branchName); return; } void Jet4Branch::initializeVariables() { _nJet4= 0; for( int i=0; i<_Nobj; ++i){ _et[i] = -9999; _eta[i] = -9999; _phi[i] = -9999; } return; } Jet7Branch::Jet7Branch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 25; _branchName = "Jet7"; _et = new float[_Nobj]; _eta = new float[_Nobj]; _phi = new float[_Nobj]; } Jet7Branch::~Jet7Branch() { delete[] _et; delete[] _eta; delete[] _phi; } void Jet7Branch::setParms( const std::string branchName, const string Jet7Description) { _branchName = branchName; _description = Jet7Description; return; } void Jet7Branch::addBranch() { _ntuple->columnAt(_branchName+"::nJet7", &_nJet7, (Int4)0); _ntuple->columnArray(_branchName+"::_et", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_eta", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi", 1, (Float4)0.).dimension(_Nobj); return; } void Jet7Branch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } } else if ((*it).blockId == 1){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 2){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 3){ for (int k = 0; k < (*it).nEntries; k++) { _et[k] = *(tWalking++); _eta[k] = *(tWalking++); _phi[k] = *(tWalking++); } _nJet7 = (*it).nEntries; } } } return; } void Jet7Branch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nJet7", _nJet7); _ntuple->capture(_branchName+"::_et",&(_et[0])); _ntuple->capture(_branchName+"::_eta",&(_eta[0])); _ntuple->capture(_branchName+"::_phi",&(_phi[0])); _ntuple->captureBlock(_branchName); return; } void Jet7Branch::initializeVariables() { _nJet7= 0; for( int i=0; i<_Nobj; ++i){ _et[i] = -9999; _eta[i] = -9999; _phi[i] = -9999; } return; } COTBranch::COTBranch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 100; _branchName = "COT"; _pt = new float[_Nobj]; _charge = new float[_Nobj]; _z0 = new float[_Nobj]; _d0 = new float[_Nobj]; _phi0 = new float[_Nobj]; _lambda = new float[_Nobj]; _hitmap = new double[_Nobj]; _algo = new int[_Nobj]; // _mask3 = new float[_Nobj]; // _mask4 = new float[_Nobj]; } COTBranch::~COTBranch() { delete[] _pt; delete[] _charge; delete[] _z0; delete[] _d0; delete[] _phi0; delete[] _lambda; delete[] _hitmap; delete[] _algo; } void COTBranch::setParms( const std::string branchName, const string COTDescription) { _branchName = branchName; _description = COTDescription; return; } void COTBranch::addBranch() { _ntuple->columnAt(_branchName+"::nCOTtracks", &_nCOTtracks, (Int4)0); _ntuple->columnArray(_branchName+"::_pt", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_charge", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_z0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_d0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_lambda",1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_hitmap", 1, (Float8)0).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_algo", 1, (Int4)0).dimension(_Nobj); // _ntuple->columnArray(_branchName+"::_mask3", 1, (Float4)0.).dimension(_Nobj); // _ntuple->columnArray(_branchName+"::_mask4", 1, (Float4)0.).dimension(_Nobj); return; } void COTBranch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } //std::cout << "There are "<< (*it).nEntries << " electrons" << endl; } else if ((*it).blockId == 1){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 2){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 3){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 4){ for (int k = 0; k < (*it).nEntries; k++) { if ((*it).blockVersion < 1){ _pt[k] = *(tWalking++); float thecurv = *(tWalking++); _charge[k] =thecurv/fabs(thecurv) ; } else { float signedpt = *(tWalking++); _pt[k] = fabs(signedpt); _charge[k] = signedpt/fabs(signedpt); float trackcurv = 0.0029979 * -1.4116/2*fabs(_pt[k]); } _z0[k] = *(tWalking++); _d0[k] = *(tWalking++); _phi0[k] = *(tWalking++); _lambda[k] = *(tWalking++); if ((*it).blockVersion > 0){ int mask1 = 0; int mask2 = 0; mask1 = *(tWalking++); mask2 = *(tWalking++); unsigned int thehitmap = 0; thehitmap |= (mask2 << 16 ) | (mask1 & 65535); _hitmap[k] = thehitmap; unsigned long test2 = _hitmap[k]; _algo[k] |= ((mask1 ) >> 16 & 255); } } _nCOTtracks = (*it).nEntries; } } } return; } void COTBranch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nCOTtracks", _nCOTtracks); _ntuple->capture(_branchName+"::_pt",&(_pt[0])); _ntuple->capture(_branchName+"::_charge",&(_charge[0])); _ntuple->capture(_branchName+"::_z0",&(_z0[0])); _ntuple->capture(_branchName+"::_d0",&(_d0[0])); _ntuple->capture(_branchName+"::_phi0",&(_phi0[0])); _ntuple->capture(_branchName+"::_lambda",&(_lambda[0])); _ntuple->capture(_branchName+"::_hitmap",&(_hitmap[0])); _ntuple->capture(_branchName+"::_algo",&(_algo[0])); // _ntuple->capture(_branchName+"::_mask3",&(_mask1[0])); // _ntuple->capture(_branchName+"::_mask4",&(_mask1[0])); _ntuple->captureBlock(_branchName); return; } void COTBranch::initializeVariables() { _nCOTtracks= 0; for( int i=0; i<_Nobj; ++i){ _pt[i] = -9999; _charge[i] = -9999; _z0[i] = -9999; _d0[i] = -9999; _phi0[i] = -9999; _lambda[i] = -9999; _hitmap[i] = 0; _algo[i] = 0; // _mask3[i] = -9999; // _mask4[i] = -9999; } return; } SVXBranch::SVXBranch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 80; _branchName = "SVX"; _pt = new float[_Nobj]; _charge = new float[_Nobj]; _z0 = new float[_Nobj]; _d0 = new float[_Nobj]; _phi0 = new float[_Nobj]; _lambda = new float[_Nobj]; _hitmap = new double[_Nobj]; _algo = new int[_Nobj]; _D0Significance = new float[_Nobj]; } SVXBranch::~SVXBranch() { delete[] _pt; delete[] _charge; delete[] _z0; delete[] _d0; delete[] _phi0; delete[] _lambda; delete[] _hitmap; delete[] _algo; delete[] _D0Significance; } void SVXBranch::setParms( const std::string branchName, const string SVXDescription) { _branchName = branchName; _description = SVXDescription; return; } void SVXBranch::addBranch() { _ntuple->columnAt(_branchName+"::nSVXtracks", &_nSVXtracks, (Int4)0); _ntuple->columnArray(_branchName+"::_pt", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_charge", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_z0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_d0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi0", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_lambda", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_hitmap",1, (Float8)0).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_algo",1, (Int4)0).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_D0Significance",1, (Float4)0.).dimension(_Nobj); // _ntuple->columnArray(_branchName+"::_trackingalgo",1, (Float4)0.).dimension(_Nobj); return; } void SVXBranch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } } else if ((*it).blockId == 1){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 2){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 3){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 4){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 5){ for (int k = 0; k < (*it).nEntries; k++) { if ((*it).blockVersion < 1){ _pt[k] = *(tWalking++); float thecurv = *(tWalking++); _charge[k] = thecurv/fabs(thecurv) ; } else { float signedpt = *(tWalking++); _pt[k] = fabs(signedpt); _charge[k] = signedpt/fabs(signedpt); float trackcurv = 0.0029979 * -1.4116/2*fabs(_pt[k]); } _z0[k] = *(tWalking++); _d0[k] = *(tWalking++); _phi0[k] = *(tWalking++); _lambda[k] = *(tWalking++); int mask1 = 0; int mask2 = 0; unsigned int test = 0; if ((*it).blockVersion > 0){ mask1 = *(tWalking++); mask2 = *(tWalking++); unsigned int thehitmap = 0; thehitmap |= (mask2 << 16) | (mask1 & 65535); _hitmap[k] = thehitmap; int test2 = _hitmap[k]; _algo[k] |= ((mask1 ) >> 16 & 255); if ((*it).blockVersion > 2){ _D0Significance[k] = *(tWalking++); } } } _nSVXtracks = (*it).nEntries; } } } return; } void SVXBranch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nSVXtracks", _nSVXtracks); _ntuple->capture(_branchName+"::_pt",&(_pt[0])); _ntuple->capture(_branchName+"::_charge",&(_charge[0])); _ntuple->capture(_branchName+"::_z0",&(_z0[0])); _ntuple->capture(_branchName+"::_d0",&(_d0[0])); _ntuple->capture(_branchName+"::_phi0",&(_phi0[0])); _ntuple->capture(_branchName+"::_lambda",&(_lambda[0])); _ntuple->capture(_branchName+"::_hitmap",&(_hitmap[0])); _ntuple->capture(_branchName+"::_algo",&(_algo[0])); _ntuple->capture(_branchName+"::_D0Significance",&(_D0Significance[0])); _ntuple->captureBlock(_branchName); return; } void SVXBranch::initializeVariables() { _nSVXtracks= 0; for( int i=0; i<_Nobj; ++i){ _pt[i] = -9999; _charge[i] = -9999; _z0[i] = -9999; _d0[i] = -9999; _phi0[i] = -9999; _lambda[i] = -9999; _hitmap[i] = 0; _algo[i] = 0; _D0Significance[i]= -999; } return; } METBranch::METBranch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 1; _branchName = "MET"; _metX = new float[_Nobj]; _metY = new float[_Nobj]; _phi = new float[_Nobj]; _etSum = new float[_Nobj]; } METBranch::~METBranch() { delete[] _metX; delete[] _metY; delete[] _phi; delete[] _etSum; } void METBranch::setParms( const std::string branchName, const string METDescription) { _branchName = branchName; _description = METDescription; return; } void METBranch::addBranch() { _ntuple->columnAt(_branchName+"::nMET", &_nMET, (Int4)0); _ntuple->columnArray(_branchName+"::_metX", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_metY", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_etSum", 1, (Float4)0.).dimension(_Nobj); return; } void METBranch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } //std::cout << "There are "<< (*it).nEntries << " electrons" << endl; } else if ((*it).blockId == 1){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 2){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 3){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 4){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 5){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 6){ for (int k = 0; k < (*it).nEntries; k++) { _metX[k] = *(tWalking++); _metY[k] = *(tWalking++); _phi[k] = *(tWalking++); _etSum[k] = *(tWalking++); } _nMET = (*it).nEntries; //std::cout << " there are " << _nMET << " MET " << endl; } } } return; } void METBranch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nMET", _nMET); _ntuple->capture(_branchName+"::_metX",&(_metX[0])); _ntuple->capture(_branchName+"::_metY",&(_metY[0])); _ntuple->capture(_branchName+"::_phi",&(_phi[0])); _ntuple->capture(_branchName+"::_etSum",&(_etSum[0])); _ntuple->captureBlock(_branchName); return; } void METBranch::initializeVariables() { _nMET= 0; for( int i=0; i<_Nobj; ++i){ _metX[i] = -9999; _metY[i] = -9999; _phi[i] = -9999; _etSum[i] = -9999; } return; } TauBranch::TauBranch( HepNtuple* ntuple ) : _ntuple( ntuple ) { _Nobj = 10; _branchName = "Tau"; _pt = new float[_Nobj]; _eta = new float[_Nobj];; _phi = new float[_Nobj]; _cluMass = new float[_Nobj]; _tkMass = new float[_Nobj]; _chargedtkSeed = new float[_Nobj]; } TauBranch::~TauBranch() { delete[] _pt; delete[] _eta; delete[] _phi; delete[] _cluMass; delete[] _tkMass; delete[] _chargedtkSeed; } void TauBranch::setParms( const std::string branchName, const string TauDescription) { _branchName = branchName; _description = TauDescription; return; } void TauBranch::addBranch() { _ntuple->columnAt(_branchName+"::nTaus", &_nTaus, (Int4)0); _ntuple->columnArray(_branchName+"::_pt", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_eta", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_phi", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_cluMass", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_tkMass", 1, (Float4)0.).dimension(_Nobj); _ntuple->columnArray(_branchName+"::_chargedtkSeed",1, (Float4)0.).dimension(_Nobj); return; } void TauBranch::fill( AbsEvent* anEvent ) { // initialize variables initializeVariables(); // look for the L3Summary within the event record EventRecord::ConstIterator L3SUM_iter( anEvent, "L3SummaryObject" ); if ( L3SUM_iter.is_valid() ) { // if L3Summary is found in event record then grab it ... ConstHandle L3Sum(L3SUM_iter); // Read from L3Summary the large array of floats and the array of short integers // The short integers are put inside theIndex. float * big = L3Sum->floatBuffer(); L3SummaryObject::indexType theIndex = L3Sum->index(); L3SummaryObject::indexType::const_iterator it; float* tWalking = big; for( it = theIndex.begin(); it != theIndex.end(); it++){ if ((*it).blockId == 0) { // Loop on the different electrons of the event. // For each electron fill the electronBlock. for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) tWalking++; } } else if ((*it).blockId == 1){ //std::cout << "LENGTH : " << (*it).entryLength << endl; for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 2){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 3){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 4){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 5){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 6){ for (int k = 0; k < (*it).nEntries; k++) { for (int i = 0; i < (*it).entryLength; i++) *(tWalking++); } } else if ((*it).blockId == 7){ for (int k = 0; k < (*it).nEntries; k++) { _pt[k] = *(tWalking++); _eta[k] = *(tWalking++); _phi[k] = *(tWalking++); _cluMass[k] = *(tWalking++); _tkMass[k] = *(tWalking++); _chargedtkSeed[k] = *(tWalking++); } _nTaus = (*it).nEntries; } } } return; } void TauBranch::capture() { _ntuple->clearDataBlock(_branchName); _ntuple->capture(_branchName+"::nTaus", _nTaus); _ntuple->capture(_branchName+"::_pt",&(_pt[0])); _ntuple->capture(_branchName+"::_eta",&(_eta[0])); _ntuple->capture(_branchName+"::_phi",&(_phi[0])); _ntuple->capture(_branchName+"::_cluMass",&(_cluMass[0])); _ntuple->capture(_branchName+"::_tkMass",&(_tkMass[0])); _ntuple->capture(_branchName+"::_chargedtkSeed",&(_chargedtkSeed[0])); _ntuple->captureBlock(_branchName); return; } void TauBranch::initializeVariables() { _nTaus= 0; for( int i=0; i<_Nobj; ++i){ _pt[i] = -9999; _eta[i] = -9999; _phi[i] = -9999; _cluMass[i] = -9999; _tkMass[i] = -9999; _chargedtkSeed[i] = -9999; } return; }